Skip to content

fix(bin): resolve captain holds and legacy teardowns on non-markdown backends - #3782

Merged
kunchenguid merged 12 commits into
kunchenguid:mainfrom
RooseveltAdvisors:fm/fm-legacy-records-20260905
Sep 5, 2026
Merged

kunchenguid merged 12 commits into
kunchenguid:mainfrom
RooseveltAdvisors:fm/fm-legacy-records-20260905

Conversation

@RooseveltAdvisors

@RooseveltAdvisors RooseveltAdvisors commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Intent

The developer wanted two leftover firstmate records in the main home to be closeable now that the home runs on the Beads backend, so they asked for fixes to the two tools that still assumed the pre-Beads markdown world. First, bin/fm-captain-hold.sh's completion path had to stop grepping data/backlog.md and instead resolve every attested captain-held task id through the configured backend (tasks-axi/beads per the transition library's data-directory contract), falling back for migrated items either by the exact notes marker "migrated from data/backlog.md id " or by the legacy id with the configured prefix prepended, while still working on markdown homes and naming the id in any refusal (the old message printed an empty name). Second, bin/fm-teardown.sh had to allow tearing down a record that predates spawn_gen when the caller passes an explicit --legacy-record flag, the recorded endpoint is dead or a bare shell, and the worktree passes the ordinary landed test, logging the accepted legacy incarnation while never relaxing the unlanded-work refusal. They also required colocated behavior tests for both paths using a beads fixture home, kept CI-portable via self-skipping since the runner only has markdown-only tasks-axi plus npm bd. Validation had to run through the no-mistakes pipeline on a branch, driving every gate via respond without --yes, escalating ask-user findings rather than answering them, and reporting the PR URL once checks were green.

What Changed

  • Backlog lifecycle reads, row probes, and mutations (bin/fm-backlog-transition-lib.sh, bin/fm-captain-hold.sh) now branch on the home's configured tasks-axi backend: the explicit --file <data>/backlog.md override and the markdown-file presence requirement apply to the markdown backend only, so a non-markdown home is addressed from its addressing root by its own .tasks.toml and no longer needs a markdown backlog to exist.
  • bin/fm-captain-hold.sh resolves an attested legacy markdown id that names no task through the markdown-to-beads migration: it scans the configured beads graph ([beads] path/binary from the root .tasks.toml, via bd list --all --json + jq) for a notes marker line migrated from data/backlog.md id <legacy id> (bare or on <date>), and only when no row carries that marker falls back to the legacy id under the configured prefix — accepted solely for a single still-captain-held row, with ambiguity and scan failures refusing (rc=2) rather than attesting. complete names each prefix-resolved row in its output, answers reports scan refusals as skips, and refusals now name the id and the configured backlog instead of printing an empty markdown path.
  • bin/fm-teardown.sh accepts a --legacy-record flag for records that predate spawn_gen: teardown proceeds only when the recorded endpoint classifies as dead or missing, stamps a legacy-<timestamp>-<pid> incarnation into the record immediately before the close marker is written (rolling the stamp back to the record's pre-stamp bytes if the marker write, append, or validation fails), names the accepted incarnation in the teardown line, and never relaxes the unlanded-work refusal; option parsing moved to a loop and the backlog reminder names the configured backend on non-markdown homes. Behavior tests were added for both paths in tests/fm-captain-hold-lifecycle.test.sh, tests/fm-teardown.test.sh, and tests/fm-backlog-atomicity.test.sh (beads cases self-skip where bd is unavailable), with docs/captain-hold-lifecycle.md and docs/configuration.md updated to match.

Risk Assessment

✅ Low: The migrated-hold resolution, backend-gated addressing, and legacy-record teardown paths all traced cleanly against concrete inputs, the new tests assert observable behavior rather than source text, and both errors the earlier fix rounds introduced (the CLAUDE.md block and the tracked .codegraph artifact) are fully reverted with a clean worktree.

Testing

Completed 1 recorded test check.

  • Outcome: ⚠️ 1 error across 1 run (18m48s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 2 infos
  • ⚠️ bin/fm-teardown.sh:1291 - backlog_refresh_reminder still names &lt;data&gt;/backlog.md unconditionally, and this branch is what makes that line reachable on a home that has no such file. Concrete: the branch's own new case tests/fm-backlog-atomicity.test.sh:test_completion_omits_the_file_for_a_beads_done writes backend = &#34;beads&#34;, does rm -f &#34;$home/data/backlog.md&#34;, and teardown now succeeds (before this change fm_backlog_transition_applies skipped on the missing file). The final line therefore prints Backlog: atomic-completion-beads-b1 is closed in &lt;case&gt;/data/backlog.md - a closure claim located in a file that was explicitly deleted, and on the retain branch (line 1289) it tells the operator the item "stays open in" that nonexistent path. The remedy is the pattern this branch already applied in bin/fm-captain-hold.sh:433/852: name the configured backlog by data directory when fm_tasks_axi_backend is not markdown, and keep the file name only for markdown homes.
  • ⚠️ bin/fm-captain-hold.sh:583 - The configured-prefix fallback accepts any existing row whose id happens to be &lt;prefix&gt;-&lt;entry&gt; with no migration evidence at all, and it is tried BEFORE the authoritative marker-note scan (line 589), so it shadows a correctly-marked row. The branch's own test test_verify_resolves_a_hold_migrated_under_the_configured_prefix proves the unverified acceptance: legacy id other-legacy-row resolves to fm-other-legacy-row, a row carrying no marker note whatsoever. On a home whose beads prefix is fm (the migration's own prefix), an ordinary task filed as fm-&lt;key&gt; - or a beads auto-allocated fm-&lt;n&gt; against a numeric legacy id - is indistinguishable from a migrated row, so verify/complete can attest against an unrelated captain-held task instead of the migrated one. The prefix fallback itself is explicitly what was asked for; what needs your call is the ordering (scan the marker notes first, use the bare prefix guess only when no marker matches) and whether the prefix hit should be required to carry the marker line.
  • ℹ️ tests/fm-captain-hold-lifecycle.test.sh:434 - Two of the three new --file regression assertions can never fail. assert_no_grep (tests/lib.sh:344) is grep -F, so the .* in assert_no_grep &#34;update $id --body-file .* --file&#34; is matched literally and no log line can ever contain it. Line 422's assert_no_grep &#34;hold $id --file&#34; is also vacuous: the captain-hold wrapper appends --file LAST (bin/fm-captain-hold.sh:291), so a markdown-backend call logs hold &lt;id&gt; --reason ... --kind captain --file &lt;path&gt; and the asserted adjacency never occurs. (Line 438's done $id --file is real, because that call has no other flags.) The regression is still genuinely caught - the stub hard-fails on --file and the invocation exits non-zero - but the assertions as written protect nothing; asserting the literal --file token in the log would.
  • ℹ️ tests/fm-captain-hold-lifecycle.test.sh:106 - The comment cites tests/fm-stale-sweep.test.sh as the self-skipping precedent, but that file does not exist anywhere in the repo (this comment is its only mention). The actual precedent for the pass &#34;skipped ...&#34; idiom is tests/fm-control-relaunch.test.sh.

🔧 Fix: Name the configured backend in teardown's backlog reminder
2 errors still open:

  • 🚨 CLAUDE.md:4 - The fix round appended a 9-line CODE-INTEL-ROUTING block to CLAUDE.md. .github/workflows/ci.yml:424 (job invariants, step "Compatibility pointers must stay intact") does cmp -s CLAUDE.md &#34;$tmp&#34; against the exact two-line @AGENTS.md pointer and exits 1 with ::error::CLAUDE.md must be the canonical @AGENTS.md pointer. With this block present that job fails deterministically on every push of this branch. It also contradicts the repo's own stated contract (bin/fm-ensure-agents-md.sh header: "CLAUDE.md is a real regular file whose canonical content is the two-line @AGENTS.md pointer"; AGENTS.md:42 lists it as shared tracked material), and the block is unrelated to this branch's intent - it was written by the fixer's code-index.sh tooling, references machine-local MCP servers, and is not part of the legacy-record work. Remedy: drop the block, restoring CLAUDE.md to its two canonical lines (if the routing guidance is wanted, AGENTS.md is where project-intrinsic knowledge belongs).
  • 🚨 .codegraph/.gitignore:1 - The same fix commit added a tracked .codegraph/.gitignore. This run's test step is bin/fm-test-run.sh --changed --exclude-family real-herdr-gated (.no-mistakes.yaml:55). families_for_changed_path in bin/fm-test-run.sh has no case matching .codegraph/.gitignore (the exempt arm is README.md|LICENSE|assets/*|docs/*|.gitignore - root-level only), so it falls to *) -> families_for_test_reference &#39;.codegraph/.gitignore&#39;, no test file contains that string, so it emits __unmapped__: and select_changed calls die &#34;no changed-test mapping for source path: .codegraph/.gitignore&#34; (bin/fm-test-run.sh:1436). The test phase aborts before running a single suite. The file is also purely a machine-local artifact: it exists only to hide the 4.0 MB .codegraph/codegraph.db this worktree's indexer wrote, and has nothing to do with the legacy-record change. Remedy: drop .codegraph/ from the change entirely; if the ignore is genuinely wanted, put .codegraph/ in the root .gitignore, which the selector explicitly exempts.

🔧 Fix: Scan migration markers before the prefix guess
3 issues (2 warnings, 1 info) still open:

  • ⚠️ bin/fm-captain-hold.sh:616 - The prefix fallback accepts a row only while hold_kind is still captain, but answers with close mode release runs close_answered &lt;id&gt; 1 -> tasks-axi unhold (bin/fm-captain-hold.sh:825-831), which clears hold_kind while leaving state != done. Concrete sequence on a beads home whose migrated row carries no marker note (exactly what this branch exists for): (1) answers &lt;origin&gt; with mode release resolves the legacy key through the prefix branch and releases the hold; (2) the row now has hold_kind empty plus a resolution record in its body; (3) the scout teardown's complete/verify re-resolves the same attested key -- task_show &lt;legacy&gt; still fails, the marker scan still finds nothing, and line 616 now continues past the very row it just answered, so prefixed_count is 0 and resolve_entry reaches fail &#34;no captain-held task ... and no migrated hold for it&#34;. That refusal contradicts verify_hold_durable (line 436-438), which was written to accept precisely this answered-and-released state via body_has_resolution_record, and it blocks the scout teardown the branch's own intent is trying to unblock. The done close mode is unaffected (tasks-axi keeps hold_kind through a close, per the comment at line 907). The hold_kind = captain restriction was your explicit instruction last round, so tightening/loosening it is your call: the minimal correction is to also accept a prefixed row whose body already carries a resolution record (the same evidence verify_hold_durable trusts), keeping the sole-candidate requirement. The remedy changes an authorized safety constraint, which is why it needs your decision rather than an auto-fix.
  • ⚠️ bin/fm-captain-hold.sh:125 - Commit cdcf0f5 reordered resolution (marker note first, prefix guess only as a last resort) and narrowed the prefix guess to a single captain-held row, and it updated the section comment at line 446-458 -- but not the two places this repo treats as the owning contract. The script header at lines 123-126 still reads "accepted through the migrated row fm-hold-migration produced: the legacy id under the configured beads prefix, or a row whose notes carry the exact marker line", listing the prefix guess FIRST as a co-equal alternative. docs/captain-hold-lifecycle.md:113 carries the identical superseded sentence. Neither mentions that the prefix guess is only reached when no marker matches, nor that it requires a still-captain-held sole candidate. A maintainer reading either one will conclude the prefix name alone is sufficient evidence and is tried first -- the exact belief the fix round was meant to correct. (The prior round already required this same header-contract discipline for bin/fm-backlog-transition-lib.sh.)
  • ℹ️ tests/fm-captain-hold-lifecycle.test.sh:220 - test_verify_resolves_a_hold_migrated_under_the_configured_prefix attests id other-legacy-row against row fm-other-legacy-row and asserts only that verify exits 0. By the new sibling test's own comment (line 246-248: "the real one resolves a bare legacy id onto its prefixed row itself, answering before any migration lookup runs"), the real beads-capable tasks-axi resolves the bare legacy id, so resolve_entry's first task_show &#34;$entry&#34; probe (line 636) answers exact and the prefix branch is never entered. The test therefore passes unchanged even if the entire prefix fallback is deleted -- it does not prove what its name claims. Coverage of the branch is real but comes solely from test_marker_noted_row_wins_over_a_prefix_namesake, which stubs tasks-axi to make the ordering observable. Either fold the stub into this test or note in its body that it is an end-to-end smoke case, not prefix-branch coverage.

🔧 Fix: Document marker-first resolution and cover the prefix branch
2 infos still open:

  • ℹ️ bin/fm-backlog-transition-lib.sh:308 - The six new backend gates select markdown addressing only on an exact = markdown match (fm_backlog_transition_applies:195, fm_backlog_row_show:220, fm_backlog_row_list:232, fm_backlog_row_probe:255, fm_backlog_mutate:308, and fm-captain-hold.sh:292), so any value that is neither markdown nor a real backend name silently selects the no---file path. fm_tasks_axi_backend itself deliberately fails safe in the opposite direction, returning markdown when nothing resolves (bin/fm-tasks-axi-lib.sh:153), so the callers are less conservative than the helper they consult. Concrete: export TASKS_AXI_BACKEND= (set but empty) - the ${TASKS_AXI_BACKEND+x} branch at bin/fm-tasks-axi-lib.sh:140 prints the empty string, [ &#34;&#34; = markdown ] is false, and fm_backlog_mutate runs cd &lt;root&gt; &amp;&amp; tasks-axi done &lt;id&gt; with no --file. On the ordinary layout that is a no-op (the root .tasks.toml resolves data/backlog.md to the same file), but on the relocated-data-directory case this addressing exists for - a root with no .tasks.toml, which the header at line 38 says "gets tasks-axi's built-in defaults" - the close lands in tasks-axi's default store instead of &lt;data&gt;/backlog.md, and reports success. backend = &#34;&#34; in a root .tasks.toml reaches the same state through fm_tasks_axi_backend_from_toml. Remedy is mechanical: treat an empty resolved backend as markdown at the gate, matching the helper's own default.
  • ℹ️ bin/fm-captain-hold.sh:588 - The reorder makes captain_migration_scan_load a hard precondition for the prefix fallback: resolve_migrated_entry now returns 2 whenever the graph cannot be read (missing bd, missing jq, no [beads] path, or a failed bd list), before the prefix branch at line 601 ever runs. Before the reorder the prefix guess used only tasks-axi show and needed neither binary, so on a beads home without jq or bd a verify/complete that previously resolved a migrated hold now hard-refuses - which also blocks the scout teardown gate at bin/fm-teardown.sh:2741. This follows directly from the authorized marker-first ordering (you cannot know whether a marker exists without reading the graph), so I am flagging it as a consequence to be aware of rather than a defect; docs/configuration.md:98 names only the missing-[beads]-section trigger for rc=2, not the missing-binary one.
⚠️ **Test** - 1 error
  • 🚨 tests failed with exit code 1
  • bin/fm-test-run.sh --changed --exclude-family real-herdr-gated
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@greptile-apps

greptile-apps Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge because the previously reported legacy teardown retry bypasses are no longer reachable.

No blocking failure remains; valid retained legacy stamps are treated as legacy records and must pass the dead-or-missing endpoint gate again, while malformed or duplicate incarnation fields refuse teardown.

Reviews (6): Last reviewed commit: "no-mistakes(ci): Fixed the Greptile P1 o..." | Re-trigger Greptile

Comment thread bin/fm-teardown.sh Resolved
Comment thread bin/fm-teardown.sh Resolved
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

Triage on HEAD 64f3a92b14feb7de318e07dede1ec26b3ecea82c vs body attestation c66f212c… → MISMATCH. Require no-mistakes on tip FAILURE. Greptile FAILURE with P1 on bin/fm-teardown.sh (legacy stamp rollback / failed truncation can skip the dead-or-agent-less gate on retry and risk tearing down a reused live endpoint). CI behavior jobs are green but NM + Greptile P1 block.

Contract-class: restore / configured-backend — resolves legacy hold/teardown records through the configured tasks-axi backend (beads only when configured; not always-on BEADS_ACTOR / not a second tracker). OK under no-beads learning.

VISION: (1)–(7) OK for the intended restore, but not merge-ready while tip attestation/NM/Greptile are uncleared.

Outcome: waiting-author — please (1) re-raise via no-mistakes so tip attestation MATCH and NM green, (2) address Greptile P1 on legacy-stamp rollback so a failed close-marker path cannot skip the endpoint gate. Not waiting-captain.

Security FYI (not waiting-captain): Greptile P1 — failed legacy-stamp rollback can let a retry kill a newly live agent on a reused endpoint. Fix before merge; tip-only FYI while author clears.

Two pre-Beads reads blocked honest closure of leftover records:

1. fm-captain-hold.sh complete/verify resolved attested legacy hold ids
   only against the live backend and the pre-collapse derived identity, so
   a home whose holds fm-hold-migration rehomed under fm- ids failed with
   an empty-name absence message (the resolve failure was swallowed by the
   command substitution feeding verify_hold_durable). Resolution now falls
   back, on the Beads backend only, to the legacy id under the configured
   beads prefix and to the row whose notes carry the exact marker line
   'migrated from data/backlog.md id <legacy id>'; every refusal names the
   id it could not resolve, and the markdown path is unchanged.

2. fm-teardown.sh refused any record without spawn_gen forever. A record
   that predates the field can now be torn down with an explicit
   --legacy-record flag once the recovery-grade endpoint classifier
   confirms the recorded endpoint dead or agent-less; the accepted
   incarnation is stamped into the record right before its close marker
   binds to it and named in the teardown line. Refusals leave the record
   byte-identical, the unlanded-work refusal is not relaxed, and a corrupt
   (multi-valued) spawn_gen is never accepted.

The companion repair this branch carries (follow-up commit) is the
backend-gated --file and markdown-file requirement in the mutate path and
lifecycle gates: fm_backlog_mutate passed --file and required the markdown
backlog file regardless of the resolved backend, and the transition gate
plus row probe required that file before any backend work, so a home on a
non-markdown backend could neither gate, probe, nor close its rows.

Behavior tests: self-contained beads fixtures over a scratch bd graph
(self-skipping on markdown-only tasks-axi installs), legacy meta fixtures
for every teardown gate, and the relocated markdown backlog coverage stays
green.
…and guard legacy spawn_gen stamp against newline-less records
Completes the fm-backlog-transition-lib repair the first commit's message
claims: on this base fm_backlog_mutate passed --file and required the
markdown backlog file regardless of the resolved backend, and
fm_backlog_transition_applies plus fm_backlog_row_probe required that file
before any backend work, so a home on a non-markdown backend could neither
gate, probe, nor close its backlog rows. All three now gate the markdown
file on the resolved tasks-axi backend: markdown keeps exactly its explicit
<data>/backlog.md behavior, non-markdown homes address the backend their
own configuration selects with no markdown file requirement.
fm_backlog_row_show and fm_backlog_row_list already gated correctly and
are unchanged. docs/configuration.md owns the contract line.

Also extends the same backend gate to fm-captain-hold.sh's own mutation
wrapper - hold/add/update/answer/done append the markdown --file only when
the resolved backend is markdown, so a captain call on a Beads home reaches
the Beads store end to end - and applies the review round's two direct
remedies there: the [beads] graph path resolves against the backlog root
when relative (never the process CWD), and a failed bd graph read reports
bd's own trimmed stderr reason in the refusal.

Coverage: tests/fm-backlog-atomicity.test.sh gains a stub-driven Beads
completion case proving the transition gate applies, the row probe reads,
and done runs without any markdown file or --file override; the relocated
markdown backlog test stays green.
…kend-aware transition lib

The legacy-records change made fm-backlog-transition-lib.sh resolve the
configured backend via fm_tasks_axi_backend before the markdown-only skip.
The gotmp fixture's fm-tasks-axi-lib stub lacked that function, so the
markdown check fell through and teardown hit the incompatible-backend
error with unbound FM_TASKS_AXI_MIN under set -u. Stub the backend as
markdown and define the floor, restoring the intended no-backlog skip.
A legacy-record teardown stamps its accepted incarnation into the record
right before the close marker binds to it; when that marker write then
fails, the stamp survived, so a retried teardown sailed past the
dead-or-agent-less endpoint gate the stamp now proved unnecessary. The
failed marker write now truncates the record back to its exact pre-stamp
bytes (verified by size), restoring the byte-identical-refusal invariant;
when the rollback itself fails the operator is told to re-run with
--legacy-record after reconciling the endpoint.

Also completes the recorded review decision's coverage wording: the
beads stub test now drives the answer close end to end (update and done
through the gated wrapper), asserting no markdown file override reaches
either verb.
…rated ids

The legacy-record stamp rollback now uses perl (already in the teardown
curated PATH; truncate is not, and is absent on stock macOS), routes every
failure branch inside the stamp block through the same size-verified
rollback so the byte-identical-refusal invariant holds on those paths too,
and gains behavior coverage: an unrecordable close (an invalid pr= link)
fails the teardown, leaves the record byte-identical, keeps the backlog
row in flight, and a flag-less retry still refuses.

Migrated-hold resolution now probes the derived pre-collapse identity
(<origin>-decision-<entry>) alongside the raw entry - fm-hold-migration
recorded the DERIVED id in every migrated row's marker note - in both the
prefix and the migration-note forms, with the ambiguity refusal naming
every identity tried, plus behavior coverage for a bare decision key
resolved through its derived identity's marker.

Also aligns fm-backlog-transition-lib.sh's header ADDRESSING/SCOPE
paragraphs with the backend-gated contract, drops an unreachable FORCE
validity guard the parser rewrite left behind, and switches the new stub
fixture to the portable sed -i.bak idiom.
@RooseveltAdvisors
RooseveltAdvisors force-pushed the fm/fm-legacy-records-20260905 branch from ff64a0d to 9900bb1 Compare September 5, 2026 17:19
@RooseveltAdvisors RooseveltAdvisors changed the title fix(backlog): resolve legacy records through the configured tasks-axi backend fix(bin): resolve captain holds and legacy teardowns on non-markdown backends Sep 5, 2026
Comment thread bin/fm-teardown.sh Resolved
…d rollback of the synthetic legacy stamp let a retry bypass the dead-or-agent-less endpoint gate. Root cause: teardown minted `spawn_gen=legacy-<ts>-<pid>` into the task record before the close marker bound to it. When the close-marker write failed AND the rollback also failed, the record retained that token. On the next invocation `fm_backlog_meta_spawn_gen` succeeded, so `TEARDOWN_LEGACY_PENDING` stayed 0 and the endpoint gate was skipped entirely — even with `--legacy-record`. The script's own error text told the operator to "re-run teardown with --legacy-record", advice the code could not honor. Fix (bin/fm-teardown.sh): - A `legacy-*` spawn_gen is now recognized as a stamp this teardown path minted, never one a spawn published (fm-spawn.sh publishes `s<epoch>.<pid>.<random>`). Such a record still reads as the legacy record it is: it re-enters the endpoint gate, and a flag-less retry refuses naming `--legacy-record`. - Acceptance reuses the retained token instead of minting a second one; the append block is skipped when the record already carries it, so no duplicate spawn_gen is written. - The rollback attempt and its "could not be rolled back" message are guarded to runs that actually appended a stamp, so a run that appended nothing never claims a rollback it did not perform. - Usage header documents the retained-stamp rule. Test (tests/fm-teardown.test.sh): added `test_retained_legacy_stamp_still_faces_the_endpoint_gate`, an end-to-end reproduction — a `perl` stub that fails only the rollback's `truncate` (delegating every other perl call to the real interpreter) leaves the stamp behind, then the retry must still hit the gate, must not stamp a second incarnation, must not close the backlog row, and the flag-less retry must refuse. Verification: the new test fails against the pre-fix script on exactly the reported defect ("the retry skipped the dead-or-agent-less endpoint gate") and passes after. Full tests/fm-teardown.test.sh 80 ok / 0 failures / rc=0; tests/fm-backlog-atomicity.test.sh 80 ok / 0 failures / rc=0; bin/fm-lint.sh (pinned ShellCheck 0.11.0 + actionlint 1.7.12) clean
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

Merging. HEAD a12a616db557b4e4ee57a24a7ebc1e6371ce8d66 (moved past prior MISMATCH stamp 64f3a92b).

Contract-class: restore — captain-hold completion and teardown already promised to address the home's configured tasks-axi backend; this removes the markdown-only greps/--file overrides that broke non-markdown homes. Markdown path unchanged. Beads migration-note resolution is only for homes already configured on the beads backend (not a new default; not always-on BEADS_ACTOR — fixture-only in tests).

VISION: aligns on scripts-own-mechanics, restart durability (closable holds/teardowns), and authority (backend from config, not inferred). Scope stays command-layer backlog tools.

CI green (NM pass, Greptile 5/5, attestation MATCH, MERGEABLE/CLEAN). Auto-merge eligible.

@kunchenguid
kunchenguid merged commit af8c4b6 into kunchenguid:main Sep 5, 2026
16 checks passed
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: this is merged. Thank you @RooseveltAdvisors — really appreciate you taking the time on this.

RooseveltAdvisors added a commit to RooseveltAdvisors/firstmate that referenced this pull request Sep 5, 2026
Upstream main advanced 21 commits past the PR base, including kunchenguid#3782
(resolve captain holds and legacy teardowns on non-markdown backends),
which touches the same gate library this PR collapses. Merge-conflict
resolution:

- bin/fm-backlog-transition-lib.sh: keep this PR's collapsed single-owner
  gate (fm_backlog_source_present + fm_backlog_tasks_axi) everywhere;
  upstream's post-kunchenguid#3582/kunchenguid#3782 markdown-only checks are subsumed by it.
  Upstream's new legacy-close/reopen body (retain-mode deliverable
  recording) auto-merges and now routes through the collapsed gate.
- bin/fm-captain-hold.sh: take upstream's tasks_axi (explicit --file for
  the markdown backend only) - it is exactly the addressing this PR
  restores for configured adapters, and this PR deliberately left the
  function's behavior untouched.
- docs/configuration.md: keep this PR's gate description and add
  upstream's migrated-hold [beads] resolution sentence.
- tests/fm-gotmp.test.sh: keep upstream's new fm_tasks_axi_backend stub
  in the fake tasks-axi lib.

Validation: bash -n and ShellCheck clean on both resolved scripts;
tests/fm-backlog-atomicity.test.sh 87 ok (including upstream's new
configured-adapter cases), tests/fm-lint.test.sh 29 ok,
tests/fm-teardown.test.sh 80 ok, tests/fm-gotmp.test.sh 3 ok, all rc=0.
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.

2 participants