jab get ?<branch> fetches the WRONG branch (trunk) for any non-main/master name
jab get ?feat (or ?/proj/feat) over the wire silently checks out TRUNK instead of feat: the want-ref builder prefixes the bare branch with refs/ (→ refs/feat) instead of refs/heads/, so it never matches the peer's advertised refs/heads/feat and falls through to the HEAD/main/master fallback, returning the trunk tip. ?master/?main only work by the coincidence of those fallback lines. No error — the user gets the wrong content. Part of JGET-001; method Issues.
beagle/test/get/{24-uri-refs, 38-remote-main-branch} (ref-shaperesolution).
be peer with trunk+feat; jab get "be://localhost/<U>?/proj/feat"
→ jab checks out hello.c=TRUNK; native checks out FEAT. Evidence ~/todo/JS096-probe1/c24/{j2,n2,j3}.
pickWant (be/shared/wire.js:107):
const full = wantRef.indexOf("refs/")===0 ? wantRef : ("refs/"+wantRef); builds refs/feat, never matching the advertised refs/heads/feat.
?<branch> resolves the peer's literal refs/heads/<branch>, exactly
like native; full refs/... refs pass through unchanged; trunk/empty still resolves HEAD/default.
?main per DIS-028, whichcase 38 pins). Repro-first.
pickWant, complete a bare branch to refs/heads/<branch> (not refs/<b>);
keep the already-refs/-qualified and HEAD/default arms. Confirm the advert parser exposes refs/heads/* for the match.
?feat checks out FEAT (not trunk); ?master/?main still OK.be/shared/wire.js:122 (wantRef.indexOf("refs/")===0 ? wantRef : ("refs/"+wantRef)); callers pass the BARE branch (get.js:213 wire.fetch(rem.raw, rem.branch)), so ?feat builds refs/feat, misses refs/heads/feat, falls to the HEAD/main/master arms (wire.js:125-130). Complete a bare name to refs/heads/<b> (keep heads/x/tags/x/full-refs/… passthrough per the wire.js:117 comment).be/test/get — the existing be/git/http cases exercise trunk only; add a non-main branch fetch (native oracle retired by TEST-003).