Skip to content

fix(bin): let the captain-call completion gate see archived calls - #12

Merged
VasanthAmana merged 1 commit into
mainfrom
fm/completion-gate-cannot-see-archived-calls
Oct 15, 2026
Merged

VasanthAmana merged 1 commit into
mainfrom
fm/completion-gate-cannot-see-archived-calls

Conversation

@VasanthAmana

Copy link
Copy Markdown

Problem

A markdown backlog prunes Done rows into data/done-archive.md once they pass done_keep, and tasks-axi show no longer finds them there.
When a captain call was answered and its row archived, fm-captain-hold.sh complete and verify could no longer see it:

  • With no other match, the gate failed with "no captain-held task ... in this home's configured backlog", so a finished investigation looked unfinished.
  • When a live row matched the legacy derived identity <origin>-decision-<entry>, the gate resolved to that other row and passed against it, even when the archived call was never answered.

Change

  • complete and verify now read an entry the live backlog misses from its newest row in data/done-archive.md (ids can repeat there; sections are appended), before any legacy fallback can substitute a different row.
    The archived row is read through tasks-axi show from a private one-row copy, so parsing stays with tasks-axi.
  • An archived row is Done, so it passes only with a recorded resolution (answered, released, repaired, or reconciled).
    An archived call with no recorded answer is refused as unsettled, with a message naming the repair.
  • The live backlog always wins, non-markdown backends are unchanged, and the keyed-answer intake does not consult the archive because it cannot write to an archived row.
  • Script header and docs/captain-hold-lifecycle.md describe the archive lookup; the skill's policy is unchanged.

Tests

tests/fm-captain-hold-lifecycle.test.sh gains two cases:

  • test_answered_and_archived_call_satisfies_the_gate: an answered call pruned into the archive (behind an older archived row reusing the same id) passes verify and a re-run of complete.
  • test_archived_call_without_an_answer_fails_the_gate: a call closed and archived without an answer fails both verify and complete, even with a live held row at its legacy identity.

Against the previous script, the first case fails with the absent-task error and the second passes wrongly through the legacy row.
The full file passes locally (63 cases), shellcheck is clean for both changed scripts, and bin/fm-doc-audience-check.sh passes.
bin/fm-lint.sh could not complete its workflow lint locally because actionlint is not installed here.

A markdown backlog prunes Done rows into data/done-archive.md, where
tasks-axi show no longer finds them. complete and verify then treated an
answered, archived captain call as absent and kept failing, or - when a
live row matched the legacy derived identity - resolved to that other row
and passed against it.

The completion gate now reads an entry the live backlog misses from its
newest row in the done archive, before any legacy fallback. An archived
row is Done, so it satisfies the gate only with a recorded resolution; an
archived call nobody answered is refused as unsettled. The keyed-answer
intake does not consult the archive, since it cannot write there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant