Description
The decision-hold completion gate (bin/fm-decision-hold.sh verify/complete) tolerates a hold that is gone from the backlog only when the answer is durably recorded. To avoid trusting a NOT_FOUND that actually means the backlog is destroyed, backlog_is_intact checks that data/backlog.md is present, non-empty, and carries a Done heading before it trusts the "hold was trimmed" verdict.
That check is not strong enough for one residual case, which the shipping PR deliberately left open by decision.
Residual gap
A backlog wiped down to nothing but its section headings still passes backlog_is_intact (present, non-empty, has a Done heading). So the archival tolerance still fires and verify returns success even though every task entry, including the scout origin itself, was lost.
Reproduced against the real script in an isolated FM_HOME (real tasks-axi + jq): create a scout origin, open a keyed decision, register the hold, complete it, record a genuine answered: resolve line, then replace data/backlog.md with just its section headings. Verify passes, which would let teardown delete the source with no durable record of the decision left anywhere.
This is a fail-safe gap on catastrophic backlog loss, not a normal path. It does not affect the accepted behavior (an archived answered hold passes; a genuinely open, unanswered, never-registered, self-closed, or non-answered hold still fails).
Suggested direction
Prove the backlog still contains the origin's own entry (or a real task entry), not just headings, before trusting a NOT_FOUND as a single trimmed hold. A cheap check that data/backlog.md holds at least one real task line under a section, or that the origin id itself still appears, would close it. Judge cost against how reachable a headings-only wipe actually is.
Context
Surfaced during the review loop on PR for the archived-hold verify tolerance. The core fix and the other integrity guards (metadata-membership proof that a hold once existed, the answered: captain-answer marker, last-transition semantics, NOT_FOUND-only absence, non-empty backlog, and a relaxed Done-heading matcher) all shipped. This one edge case was banked by decision to avoid an eighth-plus fix pass.
Activity
EvanAgee commentedon Sep 1, 2026
Second residual: the
answered:status marker is not written on the normal chat-answer flowBanked from the same review loop, by decision, to stop the fix loop. This one is more consequential than the headings-only wipe and should be looked at first.
The gap
The archival tolerance in
verify_reviewed_holdpasses an absent hold only whenstatus_key_answeredfinds aresolved [key=<k>]: answered: ...line in the status log. The review argues that on the documented decision flow this line is never written, so the tolerance is either unreachable or is being satisfied by the metadata-membership gate alone without real answer evidence.The documented order is:
hold->complete-> captain answers -> hold Done -> retention trims ->verify.completeappendscaptain-held [key=<k>]: tracked by <hold-id>for every still-open reviewed key. The fold inbin/fm-classify-lib.shtreatscaptain-heldas closing the key, so aftercompletethe status log no longer owns that key as open.fm-send --resolve-key,fm-sendsplits keys:fm_send_close_resolved_keyswrites theresolved [key=X]: answered: ...status line only for keys the status log still OWNS (RESOLVE_STATUS_KEYS); a key that now names an active captain hold instead goes throughfm_send_feed_resolved_holds, which closes the hold in the backlog body and writes NO status line.completealready fold-closed the key, the answer takes the hold path, so noanswered:status line is written. The durable answer lives only in the hold's backlog body ("Resolution recorded by fm-decision-hold."), which is exactly what retention later deletes.Why it matters
Two possibilities, both bad, and this needs a clean end-to-end verification against the real
fm-send(not a fixture with a stubbed watcher):answered:line.fm-sendfailed to deliver), then the metadata-membership gate is passing an absent hold WITHOUT theanswered:evidence, which would be a fail-open.Every regression test that passes today hand-writes the
answered:line into the status log and does not runcompletebefore the answer, so the suite does not exercise the realhold -> complete -> fm-send answer -> archiveorder.Suggested direction
Verify the real order end-to-end against the actual
fm-send. Then either:complete's captain-held transfer, or the hold-close path, records an answer marker in the status log thatstatus_key_answeredrecognizes), orstatus_key_answeredrecognize thecaptain-heldtransfer plus a subsequent real hold-close as answer proof in a way that cannot be forged by a scout self-close, orrepairpath and document that the chat-answer path needs the status marker to be written at answer time.Confirm with a test that runs the true production order, not a hand-written
answered:line.Let scout cleanup finish after a captain decision is answered and arc…