Beagle SCM
DIS-076: post couples the commit with the branch-advance — every commit FFs the tracked branch; post ?/abs/branch mints a bogus ref key (refiles the live half of DIS-061)
Context
Refiled from DIS-061 STALE — its 2026-07-13 rulings cite the deleted trees.mkd and its pin-branch half is overruled by law #4; the commit/advance split and the normalization bug survive verbatim.
- post.js:717-721: advanceRef on EVERY commit, gated only on
!att.detached; branchKey defaults to cur's attached branch (post.js:580, 601-602, 624).
- RULED 2026-07-13, restated under worktree 2026-07-15:
post 'msg' advances the WORKTREE only, for every branch shape — never as a commit side-effect.
- SUPERSEDED 2026-07-15: DIS-061's pin-branch exemption (pin refs the parent refreshes level-by-level) dies with the pin-branches — a sub tracks
//WT/path/to/sub (DIS-072).
- Normalization: resolveTarget returns the raw
/jab/.beagle (post.js:239-249) but curBranch is the stripped .beagle (wtlog.js:39-57) — so the own-branch guard misses.
- Then resolveRef misses too (store.js:420-442) and advanceRef store.set()s a ref literally keyed
/jab/.beagle (post.js:281); post's query path never routes through branchlib.
- The overturned model still lives in the wiki/tickets: SUBS-040:15,26,30 (I2) and Worktree:12's "post advances the tip" — both need the ruling note.
- Already matching worktree: post-order recursion + the gitlink bump (postSubs, post.js:486-545), the
post "msg" commit path (post.js:675-710), status's ahead/behind.
Goals
Split the two motions; normalize every branch key through the ONE codec.
- postOne moves the wt cur row ONLY: DROP advanceRef from the commit path entirely; the worktree reads "ahead" in status until the branch catches up.
- The branch advance lives ONLY in the advance-shaped arm — an explicit
post ?branch or a bare post implying the track (DIS-074).
- Route every post Query through branchlib.parse/key so
?/jab/.beagle resolves to the stored .beagle key; no bogus ref is ever minted.
- Amend the overturned spots: Worktree:12, POST:27 (narrow the bare-row "reuse absorbed msg" to under-an-active-PATCH), SUBS-040's I2 ruling note.
Constraints
Every test leg assuming commit==advance moves; that is the expensive part.
- Large behavioral change: inventory the be/test/ legs asserting a ref moved on commit; amend ONLY with explicit permission (/meta/work rule 4).
- Repro-first: commit on any tracked branch → wt ahead, ref UNMOVED;
post ?branch → FF'd; post ?/jab/.beagle → no bogus key.
- Keep DIS-054/DIS-058/DIS-059 post.js changes reconciled at land time (the same arm).
- The pin-refresh half belongs to DIS-072 — do NOT re-implement pin-branch reflection here.
WIP
Design decisions
- (carried) the split is RULED; what remains is the test-leg inventory and the landing order against DIS-072/DIS-074.
TODOs
Blockers and bummers
- Landing order: DIS-072 (pin refresh) must land with or after this, or a sub's pin stops moving with nothing to replace it.
Outcome
- FILED 2026-07-15, refiling the live half of DIS-061 (FILED 2026-07-12, trees.mkd audit); nothing landed yet.