Log in
docs/findings-2026-06-11-branch-lifecycle.md 68 lines · 3.2 KB

Findings: branch lifecycle (oak 0.96, 2026-06-11)

Observed while reviewing/merging the accuracy-push branches on oak/benchmarks. All reproduced from fresh clones; verification commands inline.

1. oak close never propagates to the server (P0)

oak close <name> and oak close (current branch) both print βœ“ Closed branch '<name>', and oak branch list in that checkout shows [closed] β€” but a fresh clone (and the web UI) still reports the branch open. Tried from three separate clones, by name and as current branch; no form propagates. There is no --remote flag and no error.

Verify: oak clone oak/benchmarks /tmp/a && cd /tmp/a && oak close oak clone oak/benchmarks /tmp/b && cd /tmp/b && oak branch list # still open

Consequence: server branch lists accumulate dead branches forever; an agent told to "clean up branches" reports success while changing nothing visible to anyone else. The only working path today appears to be the web UI.

2. Every clone leaves a transient open branch in server listings

Each oak clone immediately creates its auto-named working branch (<user>-<hex>), and that branch shows open in branch list --json from other checkouts even when it carries zero commits. Review/CI/probe clones therefore pollute the branch UI. Zero-commit branches appear to be garbage-collected eventually (some probe branches vanished from listings), but the lifecycle is undocumented and listings are noisy meanwhile.

1b. Strengthened evidence for finding 1

oak --verbose close <name> shows zero server interaction (no request is even attempted), and a subsequent oak push + oak desc (both of which DO sync) still leave the server reporting open. Close is pure local bookkeeping in 0.96.

1c. Working CLI removal: equalize-then-merge

Branches whose content predates main conflict on merge ("N file(s) modified on both branches since fork"). The working pattern: switch to the branch, overwrite its tree with main's content (rsync, excluding .oak), commit, then oak merge β€” the no-op-content merge succeeds and removes the branch server-side. Used to remove bench-accuracy-push, mrmrs-baf5cf, and mrmrs-bacba9 on 2026-06-11.

1d. Self-inconsistent poisoned branch (P0)

bench-phase0-fleet-sync (the rename-target of a branch that hit the false-divergence trap) cannot be removed at all from the CLI: after oak pull --force syncs the checkout to the server's OWN tip (local == remote byte-for-byte), oak merge/push still report "remote has diverged". The branch's server-side state disagrees with itself; rename appears to have carried the corruption. Only server-side intervention / web UI can remove it.

3. merge is the only verified server-side branch remover

Merging a branch into its parent (oak switch <branch> && oak merge) removes it server-side and rotates the checkout onto a fresh branch β€” used successfully for the accuracy-push merge (2c45d63d7256). For abandoned (never-to-merge) branches there is no CLI-visible equivalent; see finding 1.

Related, already filed

False-divergence after concurrent desc/rename/push on a shared branch and the destructive-only pull --force recovery path are covered in prompts/oak-fix-handoff.md (P0 section) and were re-hit live during this work.