DIS-059: be/ JS post detached-wt handling wrong TWICE — POSTDET MISFIRES on an attached ?#<sha>/trunk wt (status says trunk, post says detached), and POSTDET REFUSES a genuinely-detached post (contradicts GET "a bare sha will stay detached on commit"); root cause: status and post read attachment from DIFFERENT routines. Fix: ONE wtlog.attachedBranch reader (recentmost GET record) + let a detached post commit-and-hop.

be/ JS post mishandled the detached/attached axis two ways, both surfaced while landing DIS-057 (a jab post of the classifier work threw POSTDET on a trunk-pinned wt). (1) DETECTION DIVERGENCE: status labels the branch from baselineTip().rawQuery (views/status/status.js) while post's DIS-009 detached guard read curTip().query-is-40-sha + a separate backward curHasFragment scan (verbs/post/post.js) — two routines deriving attachment differently, so a ?#<sha> (trunk PINNED at a sha — ATTACHED) read trunk in status but DETACHED in post → spurious POSTDET. (2) WRONG POLICY: even a genuinely-detached ?<sha> wt was REFUSED, contradicting GET pt 3 "a bare sha detaches (will stay detached on commit)". The rule (ruling 2026-06-29): a wt is attached as per the RECENTMOST get record — ?master/?/?branch#sha/?#sha ATTACHED, only a bare ?<sha> (full-sha in the query, no branch) DETACHED — and there must be exactly ONE routine reading it. FIX (in ~/todo/DIS-057, uncommitted): added shared/wtlog.js::attachedBranch() (the single recentmost-GET reader → {branch, detached, rawQuery, sha}); rerouted the three readers (status label, post detach-guard, post curBranch); and let a detached post COMMIT — the FF pre-flight and advanceRef are gated on !att.detached, so it builds the commit on cur, advances only the cur wtlog row, and moves NO branch ref (git detached-HEAD "hop to the next hash"). be/ only; method per CLAUDE. See GET, POST, DIS-009, DIS-057, DIS-058, DIS-055.

Input

Context

Goals

Constraints

WIP

Design decisions

TODOs

Blockers and bummers

Outcome