jab get ? (switch to trunk) records the WRONG branch — a later be post rewrites that branch's history
jab get ? (the explicit "switch to trunk" form: present-but-empty query) writes a wtlog get row pinned to the CURRENT branch instead of trunk, because the empty query string collapses to curBranch. The worktree gets trunk's bytes but the anchor pins e.g. feat at a trunk commit; a following be post then advances feat to a commit rooted on the trunk tip — silently force-moving feat off its own history (committed-history corruption). Native distinguishes ? (switch to trunk) from a bare be get (FF the current branch). Part of JGET-001; method Issues.
beagle/test/get/56-orphan-banner-not-dag; the wiki GET model:
empty ? = the trunk, no query = the current branch.
echo feat>h.c; be post f; jab get ? → jab writes wtlog row get ?feat#<trunktip> (branch=feat); native writes get ?#<trunktip> (trunk). Proven consequence: the next be post advances feat to a trunk-rooted commit. Evidence ~/todo/JS096-probe1/{iso_j,iso_n,verify_switch}`.
inRepoSeed D3' fallback (get.js:423-429):
const branch = query; const wantBranch = branch || curBranch; — a literal ? yields query==="", so || curBranch swallows the explicit-trunk intent.
jab get ? resolves to TRUNK and records a get ?#<tip> row (empty branch),
matching native; bare be get (no query at all) keeps FF-ing the current branch.
(don't fold them). Repro-first; add the parity test.
parseRemote/inRepoSeed so ?
(present, empty → trunk) ≠ no-query (→ current branch). wantBranch="" for ?.
jab get ? records get ?#<tip>, and a follow-up post stays on trunk.be/verbs/get/get.js:510-511 (const branch = query; const wantBranch = branch || curBranch;); URI-009 already distinguishes u.query==="" (bare ?) from undefined (absent), but get.js:461 folds both via u.query || "" — keep the presence bit through the D3' arm.be/test/get (trunk-switch arm; native oracle retired by TEST-003); check PUT-005 (baseline-anchor sibling) closes with it.
because ? is the canonical "go to trunk" idiom.