Beagle SCM
DIS-061 DONT : be / JS post advances the tracked branch on EVERY commit — superseded by DIS-071 ( the track - URI model ) ; live defects refiled as DIS-076 ( the split + ref mis - keying ) , DIS-072 ( pins ) , DIS-074 ( bare post )
trees ( AUTHORITATIVE ) separates the two motions , made UNIFORM by ruling 2026 - 07 - 13 : a commit moves only the worktree ( it goes " ahead " ) , fast - forwarding the tracked branch is a SEPARATE explicit post ?branch — no commit - time FF for any branch shape ( supersedes the 2026 - 07 - 12 tip = = base sub - ruling AND overrules the post ' s own example - 6 line " A regular branch would advance on commit " , trees.mkd:211 ) . The be/ JS does the opposite , by prior ruling : postOne FF - advances cur ' s attached branch atomically with every commit ( post.js:719 - 721 , gated only on !att.detached) , so a sub commit moves its pin - branch with no parent commit anywhere ( submount.js:319 - 320 , SUBS-040 I2 ; wiki Worktree : 12 " post advances the tip " ) . The post overturns that ruling ; this ticket carries the flip plus the adjacent bare - post/ own - branch / normalization defects .
Context
Commit = branch advance today : post.js:719 - 721 advanceRef(reader, reader.shard, branchKey, …) on every commit ; branchKey defaults to cur ' s attached branch ( post.js:601 - 602 , 624 ) .
Bare post has NO fast - forward arm : clean wt → POSTNONE: no changes since base ( post.js:666 - 673 ) ; dirty - unnamed → POSTNOMSG ( post.js:675 - 677 ) . The advance arm needs an explicit Query slot ( post.js:618 - 622 ) .
post ?<cur's own branch> REFUSES ( POSTNONE: cur's own branch — nothing to advance, post.js:263 - 264 ) — the exact inverse of the post ' s bare - post meaning .
Normalization bug : resolveTarget keeps the raw absolute query /jab/.beagle ( post.js:239 - 249 ) while wtlog ' s curBranch is the stripped key .beagle ( wtlog.js:39 - 57 ) ; the own - branch guard misses , resolveRef misses ( store.js:420 - 442 ) , advanceRef store . set ( ) s a bogus ref literally keyed /jab/.beagle ( post.js:281 ) . post ' s query path never routes through branchlib . parse / key .
The overturned ruling lives in : SUBS-040 : 15 , 26 , 30 ( I2 " the sub ' s recursive postOne advances the CURRENT branch ref … which IS the dot - branch " ) and Worktree : 12 ( " Branch is GET - owned … post advances the tip " ) .
What already matches trees : post - order recursion , gitlink bump , recursive top commit ( postSubs post.js:486 - 545 ) ; post "msg" commit path ( post.js:97 - 158 , 675 - 710 ) ; status ahead / behind divergence ( status.js:463 - 475 , 323 - 345 ) .
Goals
Split commit from branch - advance : postOne moves only the wt cur row ; the wt reads " ahead " in status until the branch catches up .
Pin - branch ref advances at the PARENT ' s gitlink - bump commit ( postSubs ) , never at the child ' s own commit — the reflection model per the ruling below .
Route every post Query through branchlib . parse / key so ?/jab/.beagle resolves to the stored .beagle key ; repro for the bogus - ref mint first .
Amend the overturned spec spots : Worktree : 12 , Submodules : 28 ( " child worktree commits update the local synthetic branch " ) , POST bare - row ( POST.mkd:27 " reuse absorbed msg " narrows to under - an - active - PATCH only ) , SUBS-040 ruling note .
Constraints
RULED ( gritzko , 2026 - 07 - 13 , SUPERSEDES the 2026 - 07 - 12 chain - anchor reading ) : a pin - branch tip IS the gitlink in the IMMEDIATE parent ' s BASE commit , refreshed by the parent on ANY move of its base ( post , get ) — level - by - level reflection , exactly trees.mkd:87 - 93 ( " commit the immediate parent … the problem may move one level up " ) . Pin refs are materialized rows the parent maintains for its immediate children ; pin - branches are synthetic and EXEMPT from the uniform explicit - post ?branch rule below . The only way OUT of a pin - chain is retracking ( get ?other, e . g . get ? = trunk ) or detaching — no put / post needed , the branch already exists .
RULED ( gritzko , 2026 - 07 - 13 , recursion + scope ) : every op is SCOPED to the context repo ( at ///jab/dog it affects dog + its sub abc , NEVER the parent jab ) ; clean recursion iff the sub is BASED ON the pin . get: a sub based BEHIND the pin that FFs cleanly is FF ' d ; ahead / diverged → skip , stays " adv " ( post / patch territory ) . Bare post: commit ALL changes to make the tree clean — sub dirty files bottom - up , then the resulting gitlinks ; an off - pin sub ' s advance is absorbed too . Explicit post ( put / deletes present ) : commit exactly the staged set ; a sub with put files gets a new commit whose gitlink is committed one level up , within scope . post- to - remote and patch are STORE - driven , independent of tree state ; patch merges on all levels from each sub ' s de - facto base + local edits . Views recur always ( if applicable ) ; put / delete recur only on an explicit path , never bare . status must show each sub ' s base vs pin ahead / behind ( counts + post / miss commit lists ) and the " adv " dir entry in the parent .
RULED ( gritzko , 2026 - 07 - 13 , UNIFORM — supersedes the 2026 - 07 - 12 tip = = base sub - ruling ) : post 'msg' advances the WORKTREE only , for every branch shape ; a plain branch advances ONLY by an explicit post ?branch ( the POST.mkd:30 arm ) , never as a commit side - effect . RESOLVED 2026 - 07 - 13 : pin - branches anchor at the immediate parent ' s WT base ( bullet above ) , so trees example 6 needs no extra post ? for the pins — only the top ' s own plain branch lags until explicitly posted .
Large behavioral change : every be / test / leg that assumes commit = = advance will move — inventory first , amend only with explicit permission per /meta/work .
Repro - first per the norms ; keep DIS-054 / DIS-058 / DIS-059 post.js changes reconciled at land time .
WIP
Design decisions
( pending the ruling above )
TODOs
obtain the pin - advance ruling — RULED 2026 - 07 - 12 : chain - anchored , moves only when the commits reach the chain root ( top / recursive commit )
obtain the plain - branch sub - ruling — re - RULED 2026 - 07 - 13 UNIFORM : no commit - time FF at all , advance = explicit post ?branch
obtain the root - anchor sub - ruling — RESOLVED 2026 - 07 - 13 : neither root form ; pin tip = immediate parent ' s base gitlink , refreshed on any parent move
repro : commit on ANY tracked branch → wt ahead , ref UNMOVED ; post ?branch → FF ' ed ; immediate - parent commit → child pin ref MOVES to the new base ' s gitlink , parent now ahead of ITS OWN pin ; post ?/jab/.beagle → no bogus key
repro , recursion legs : get FFs a behind sub to the pin , SKIPS a diverged one ( " adv " stays ) ; bare post absorbs an off - pin sub + dirty sub files bottom - up ; explicit post bubbles a put sub ' s gitlink one level up ; scope leg — run at the sub , the parent stays untouched
postOne : DROP advanceRef from the commit path entirely ; branch advance lives ONLY in the explicit Query arm
recursive post : the parent refreshes its immediate children ' s pin refs on ANY base move ( post , get ) — materialized rows , no lazy chain derivation
branchlib normalization in resolveTarget / advanceBranch
test inventory : legs assuming commit = = advance ; request user for amendments
spec sweep , wiki half — DONE 2026 - 07 - 13 : Worktree.mkd:12 ( uniform ) , Submodules.mkd intro + Recursion ( pin = parent - base gitlink , gate , FF - behind , post forms , store - driven push / patch , views , scope ) , POST.mkd:5 , 9 - 10 , 13 - 15 ( uniform + sub commit forms )
spec sweep , remainder : POST.mkd:27 bare - row wording ( narrow " reuse absorbed msg " to under - an - active - PATCH ) , SUBS-040 ruling note ( I2 overturned )
propose the post edits ( user - owned ) : trees.mkd:211 " A regular branch would advance on commit " is the one line the uniform ruling overrules ( : 87 - 93 stands as written under the parent - base anchoring )
verify get ? ( bare query = trunk ) retracks a mounted sub off its pin - branch — the trees unpin example ; add the leg to the repro set
Blockers and bummers
( none — both rulings made 2026 - 07 - 12 ; the ticket is fully actionable )
Outcome
FILED 2026 - 07 - 12 ( trees.mkd audit , 4 - agent sweep ) ; nothing landed yet .
STALE 2026 - 07 - 15 : its authority is gone — blog/trees.mkd no longer exists ( only img/trees.jpg survives ) , so every [trees] cite below dangles ; worktree replaces it and RULED 2026 - 07 - 15 replaces the rulings frozen here .
OVERRULED : the pin - branch exemption ( pin refs as materialized rows the immediate parent refreshes ) — RULED 2026 - 07 - 15 law # 4 : a sub tracks the parent ' s PIN URI //WT/path/to/sub, synthetic pin - branches are killed outright ( DIS-072 ) .
Refiled , nothing lost : the commit - vs - advance split + the ?/abs/branch mis - keying → DIS-076 ; the pin half → DIS-072 ; the bare - post / own - branch half → DIS-074 ; the model → DIS-071 .