fix(e2e): pin git-branch when E2E_CHECKPOINT_STORE is unset · Entire
fix(e2e): pin git-branch when E2E_CHECKPOINT_STORE is unset
5e8ed07→main·
peyton-alt·11h ago·2 files·+9 added/-7 removed
With the store unset (local test:e2e:canary / test:ci / check), TestMain left ENTIRE_CHECKPOINTS_PRIMARY unset, so first-run enable wrote git-refs while the harness's backend-aware assertions still defaulted to the v1 branch — every branch-shaped assertion timed out. Pin git-branch when unset; the env also suppresses the first-run settings write.
Trail-Finding: 019f712a-a2ad-7c38-ba73-074d9eb55c85
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Changes
2
cmd/entire/cli
Msetup_test.go-1
e2e/tests
Mmain_test.go+9/-6
3914 unmodified lines
3915
3916
3917
3918
3918
3919
3920
3914 unmodified lines
t.Run("env override suppresses the first-run default", func(t *testing.T) {
setupTestRepo(t)
stubLadder(t)
// ENTIRE_CHECKPOINTS_PRIMARY fully replaces the settings block, so
// writing the refs default under it would persist config diverging
// from the backend actually in use (and break harnesses pinning
Mcmd/entire/cli/setup_test.go-1
43 unmodified lines
44
45
46
47
48
49
50
51
52
47
48
49
50
51
52
53
54
55
56
57
58
59
43 unmodified lines
// Select the checkpoint storage backend for the whole suite. E2E_CHECKPOINT_STORE
// (e.g. "git-refs") maps to the ENTIRE_CHECKPOINTS_PRIMARY override the spawned
// binary honors, so every condensation/read/push in the run exercises that
// backend. "git-branch" is mapped explicitly too — first-run enable defaults
// new setups to git-refs, so the branch mode must be pinned rather than
// relying on the product default (the env also suppresses that first-run
// settings write). Unset leaves the product defaults in place.
if store := os.Getenv("E2E_CHECKPOINT_STORE"); store != "" {
os.Setenv("ENTIRE_CHECKPOINTS_PRIMARY", store)
// backend. Unset pins git-branch: the harness's backend-aware assertions
// (testutil.checkpointStoreMode) default to the v1 branch while first-run
// enable now defaults new setups to git-refs — without the pin the binary
// writes refs and every branch-shaped assertion times out. The env also
// suppresses that first-run settings write.
store := os.Getenv("E2E_CHECKPOINT_STORE")
if store == "" {
store = "git-branch"
}
os.Setenv("ENTIRE_CHECKPOINTS_PRIMARY", store)
// Resolve the entire binary (set by mise run build via E2E_ENTIRE_BIN).
entireBin := entire.BinPath()
Me2e/tests/main_test.go+9/-6