<subproj> slot on a re-posted sub dot-branch
When a submodule POST targets an ALREADY-synthetic / detached-sha target, the synthetic dot-branch is mis-assembled: the commit SHA leaks into the <subproj> slot AND into the #fragment, producing a malformed ref ?<sha40>/.dogs#<sha40>/.dogs instead of ?/<sub>/.<parent>#<sha>. The correctly-formed branch ?/abc/.dogs (with the /) is fine — the earlier "missing /" reading was a ripgrep-rendering misread (2e=.); the real bug is the SHA in the subproject slot. Method: Issues.
?/<sub>/.<parent> — beagle/BE.cli.c:3069-3080 (bepost_synth_child_uri) emits / then . (lines 3073-3074); the abc sub's good commits sit on ?/abc/.dogs in both .be/abc/refs and abc/.be (hexdump 3f 2f 61 62 63 2f 2e 64 6f 67 73). Spec Submodules:60-68 agrees. The original "missing /" premise is INVALID.
.be/abc/refs 266168WPCD (mirror
abc/.be:26): post ?<sha40>/.dogs#<sha40>/.dogs — the <subproj> segment is the 40-hex SHA, not the title abc, AND the #fragment carries <sha40>/.dogs instead of a bare sha.
detached-sha "project" into the subproj slot. Leads: bepost_wt_project (BE.cli.c:2954-2990), the lq/DOGQueryStripProject arm (:3010-3025), the synth_view/msg_view assembly (:3159-3201).
be head "2 ahead" /
POSTDET symptoms hit while landing ABC-003 — NOT a branch-format bug.
<subproj> slot is ALWAYS the project title (never a SHA) and the
#fragment a bare sha — on first post AND on a re-post of an already synthetic/detached target.
the recorded branch is ?/<sub>/.<parent> with a bare-sha fragment.
beagle//sniff storechanges gate for review. Add the repro to the SUBS table-driven tests.
~/beagle/.be/abc/refs
266168WPCD + abc/.be) is a SEPARATE maintainer cleanup — the worker must NOT touch ~/beagle or its store; the good commits are independently reachable on ?/abc/.dogs, so dropping that row orphans nothing.
bepost_synth_child_uri is correct —
always emits ?/<sub>/.<parent>#<bare-sha>). The leak is GET-side: sniff/GET.c::SNIFFGetURI raw-hex fallback (~:2213) accepted ANY non-empty u->query as a checkout target with no hex check. A be get '?<sha40>/.<par>' missed REFSResolve, fell through, and the fallback wrote the query string VERBATIM into BOTH the recorded query AND fragment → ?<sha40>/.par#<sha40>/.par (it "succeeded" only because the 40-hex prefix matched the pin via prefix lookup).
DOGIsHashlet(u->query) (6..40 hex). A query
with path junk (?<sha40>/.par) is not a hashlet → clean SNIFFFAIL; clean sha-PREFIX gets (?abc1234, README:64) still work. (NB: DOGIsFullSha — used in the first pass — was WRONG; it requires 40/64 hex and would reject every sha-prefix get.)
test/post/41-sub-synth-no-sha-in-subproj/ (hermetic file://)— RED pre-fix (sha-in-subproj get accepted rc 0), GREEN post-fix (refused).
sniff/GET.c DOGIsFullSha gate; behaviour-preserving for real ?<40hex>.8c69c16b (be put+be post --nosub; 299/299 before & after).be get '?/<sub>/.<parent>' (well-formed syntheticre-attach) currently also fails — a reconcile-to-synthetic-branch issue; flag as a follow-up, not fixed here.
8c69c16b: sniff/GET.c DOGIsHashlet gate (corrected from
DOGIsFullSha) + test/post/41-sub-synth-no-sha-in-subproj (malformed ?<sha>/.par refused AND a clean sha-prefix get still succeeds); 299/299 before & after; canonical untouched. Follow-up still OPEN: be get '?/<sub>/.<parent>' well-formed synthetic re-attach also fails (reconcile-to-synthetic-branch issue).