Skip to content

fix(bin): resolve blockers archived as Done in the fleet snapshot - #6451

Open
karotkriss wants to merge 5 commits into
kunchenguid:mainfrom
karotkriss:fm/fm-up-5816-snapshot-archived-blocker-v2
Open

karotkriss wants to merge 5 commits into
kunchenguid:mainfrom
karotkriss:fm/fm-up-5816-snapshot-archived-blocker-v2

Conversation

@karotkriss

@karotkriss karotkriss commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Fixes #5816

Bearings and the fleet snapshot keep a captain-held item blocked after its blocker is done, once backlog retention moves that Done blocker into the Done archive.
bin/fm-fleet-snapshot.sh resolves a blocked-by: edge only from structured Done rows in data/backlog.md and never reads data/done-archive.md, so the dependent shows as blocked while tasks-axi already treats it as unblocked.
The snapshot should also treat a blocker id recorded as Done in the configured Done archive as resolved.
A blocked-by: id that exists in neither the backlog nor the archive stays unresolved, as today.

What Changed

  • bin/fm-fleet-snapshot.sh now treats a blocked-by: id as resolved if it is a structured Done record in the backlog or a checked - [x] <id> - ... row in the Done archive. A held item no longer shows as blocked after its blocker is moved into the archive. Ids that appear in neither place still stay unresolved.
  • The snapshot finds the archive the same way tasks-axi does. It uses the archive key under [markdown] in the home's .tasks.toml, then in ~/.tasks-axi/config.toml, and otherwise falls back to data/done-archive.md. Relative paths are resolved from the parent of the resolved data directory (fm_backlog_root, now sourced from bin/fm-backlog-transition-lib.sh), so a symlinked data directory works. If perl is missing, the snapshot stops with a clear error instead of quietly reading the archive as empty.
  • Added six tests to tests/fm-fleet-snapshot-view.test.sh. They cover archived, live and dangling blockers, archive paths set in .tasks.toml and in the global config, quoted paths that contain #, a symlinked data directory, and the missing-perl error. The CI test count goes from 18 to 24, and docs/captain-hold-lifecycle.md now describes the archive lookup.

Risk Assessment

✅ Low: The change adds a narrowly scoped, read-only lookup of the Done archive that has a single caller and behavioral tests for the default, configured, quoted, global-config and symlinked archive paths, and dangling ids stay unresolved as the intent requires. The only remaining concern is that the snapshot now fails outright without perl, which the author chose deliberately and the user has capped as a theme.

Testing

I built two disposable lab homes with fm-lab-home.sh and filled them using the real tasks-axi through fm-tasks-axi.sh: mark a blocker Done, then prune it into the archive. I ran the base and target fleet snapshot and bearings snapshot against those homes. On base, the hold whose blocker was archived stayed in gates as blocked; this reproduces #5816. On target it moves to decisions_open with hold_bucket "live", which matches tasks-axi. The same result holds with a configured .tasks.toml archive path and a symlinked data directory. Adversarial cases stay blocked as intended: a dangling id, a blocker archived unfinished, and an archived id re-filed as live work. The targeted snapshot-view test file also passes, but that is a unit-level suite, so it is recorded as untested for live validation. The evidence is CLI transcripts; there is no UI to screenshot because bearings output is text. The lab homes and the base copy were removed, and the worktree is clean.

  • Live validation: ✅ go - 4 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Captain marks a blocker Done, tasks-axi prune moves it to data/done-archive.md, and bearings then lists the dependent captain hold as an open Captain's Call instead of a blocked gate ✅ pass live bearings-base.txt (held-a in gates, blocked-by blocker-a) vs bearings-target.txt (held-a in decisions_open); snapshot held-a unresolved_blocker_ids [] and hold_bucket live on target
A hold blocked-by an id in neither the backlog nor the archive stays blocked in the snapshot and bearings ✅ pass live bearings-target.txt: held-dangling remains in gates with blocked-by phantom-zz; snapshot unresolved_blocker_ids ["phantom-zz"]
A home with a symlinked data dir and a .tasks.toml-configured archive: once tasks-axi archives the blocker, the hold resolves from the configured archive under the resolved root, and the decoy at the… ✅ pass live configured-symlinked-archive.txt: base held-b blocked, target held-b live and in decisions_open
Adversarial: an archived-Done id re-filed as queued in the backlog, and a blocker archived unfinished ([ ]), both keep their holds blocked ✅ pass live adversarial-refiled-and-unfinished.txt: held-r and held-q have hold_bucket blocked and appear in bearings gates
Targeted regression suite for the snapshot view (archive, configured, global-config, symlink and no-perl cases) ⏸️ untested no The prior payload recorded only a unit-level test suite run (tests/fm-fleet-snapshot-view.test.sh) with live=false, not a run against the live product, so it did not establish a live result. The live…
Evidence: Bearings on base 4735ddc - archived-blocker hold wrongly in gates (blocked)

Source: Bearings on base 4735ddc6 - archived-blocker hold wrongly in gates (blocked)

\### BASE 4735ddc6: bin/fm-bearings-snapshot.sh
schema: fm-bearings.v1
home: tmp/fm-lab.NTiCsQ
generated: "2026-10-11T06:26:26Z"
prs: "not_requested (run: /bearings include PRs)"
contributions: 
  scope: owned contributions per home
  known: 0
  checked: 0
  counts: 
    captain: 0
    fleet: 0
    maintainer: 0
    nobody: 0
  complete: true
  proven_clear: true
  unmeasured_homes: 0
  unreadable_records: 0
  unmeasured: 0
  stale_verdicts: 0
  missing_verdicts: 0
  captain_omitted: 0
  captain: []
in_flight: []
secondmates: []
secondmate_reconcile: []
decisions_open: []
landed: []
gates[2]{id,title,blocked_by,reason,owner,filed}:
  held-a,Captain decides after blocker,blocker-a,"blocked-by blocker-a: captain picks roll…",(main),2026-10-11
  held-dangling,Captain decides after phantom,phantom-zz,"blocked-by phantom-zz: captain picks aft…",(main),2026-10-11
reports: []
recorded_prs: []
omitted[7]{surface,reveal}:
  backlog item bodies,"--fields bodies"
  task paths,"--fields paths"
  watch/steer actions,"--fields actions"
  healthy endpoint detail,"--fields endpoints"
  full scout-report inventory,"--all-reports"
  "captain holds bucketed blocked, dated, or aged: 2","--all-decisions"
  live PR discovery + checks,"--include-prs"
Evidence: Bearings on target 876ccf7 - archived-blocker hold in decisions_open, dangling hold still gated

Source: Bearings on target 876ccf7 - archived-blocker hold in decisions_open, dangling hold still gated

\### TARGET 876ccf7: bin/fm-bearings-snapshot.sh
schema: fm-bearings.v1
home: tmp/fm-lab.NTiCsQ
generated: "2026-10-11T06:26:26Z"
prs: "not_requested (run: /bearings include PRs)"
contributions: 
  scope: owned contributions per home
  known: 0
  checked: 0
  counts: 
    captain: 0
    fleet: 0
    maintainer: 0
    nobody: 0
  complete: true
  proven_clear: true
  unmeasured_homes: 0
  unreadable_records: 0
  unmeasured: 0
  stale_verdicts: 0
  missing_verdicts: 0
  captain_omitted: 0
  captain: []
in_flight: []
secondmates: []
secondmate_reconcile: []
decisions_open[1]{id,key,verb,summary,owner}:
  held-a,held-a,captain-hold,"Captain decides after blocker: captain picks rollout after blocker",(main)
landed: []
gates[1]{id,title,blocked_by,reason,owner,filed}:
  held-dangling,Captain decides after phantom,phantom-zz,"blocked-by phantom-zz: captain picks aft…",(main),2026-10-11
reports: []
recorded_prs: []
omitted[7]{surface,reveal}:
  backlog item bodies,"--fields bodies"
  task paths,"--fields paths"
  watch/steer actions,"--fields actions"
  healthy endpoint detail,"--fields endpoints"
  full scout-report inventory,"--all-reports"
  "captain holds bucketed blocked, dated, or aged: 1","--all-decisions"
  live PR discovery + checks,"--include-prs"
Evidence: Lab fixture written by real tasks-axi (backlog, done-archive.md, tasks-axi ready)

Source: Lab fixture written by real tasks-axi (backlog, done-archive.md, tasks-axi ready)

# lab backlog (written by real tasks-axi; blocker-a done then pruned to archive; phantom-zz row hand-removed)
# Backlog

## In flight
## Queued
- [ ] held-a - Captain decides after blocker blocked-by: blocker-a (repo: alpha) (kind: captain) (since 2026-10-11) (hold: captain picks rollout after blocker) (hold-kind: captain)
- [ ] held-dangling - Captain decides after phantom blocked-by: phantom-zz (repo: alpha) (kind: captain) (since 2026-10-11) (hold: captain picks after phantom) (hold-kind: captain)
## Done

# lab data/done-archive.md (written by tasks-axi prune --keep 0)

## Archived 2026-10-11
- [x] blocker-a - Ship the blocker (repo: alpha) (kind: ship) (done 2026-10-11)

# tasks-axi ready --include-held
count: 0
ready: 0 unblocked queued tasks
ready_public_followups: 0 delivery-ready obligations
held[2]{id,state,kind,repo,title,hold_reason,hold_kind,hold_until}:
  held-a,queued,captain,alpha,Captain decides after blocker,captain picks rollout after blocker,captain,"-"
  held-dangling,queued,captain,alpha,Captain decides after phantom,captain picks after phantom,captain,"-"
help[1]:
  - Run `tasks-axi list --state queued` to see all queued work (incl. blocked)
Evidence: Configured .tasks.toml archive + symlinked data dir, base vs target

Source: Configured .tasks.toml archive + symlinked data dir, base vs target

# lab: data -> storage/data, storage/.tasks.toml [markdown] archive = records/done.md; tasks-axi prune wrote storage/records/done.md
lrwxrwxrwx 1 cmckay cmckay 12 Oct 11 02:26 /tmp/fm-lab.6R9Xyj/data -> storage/data
backend = "markdown"

[markdown]
archive = "records/done.md" # retention target
done_keep = 10
-- storage/records/done.md

## Archived 2026-10-11
- [x] blocker-b - Configured-archive blocker (repo: alpha) (kind: ship) (done 2026-10-11)
-- tasks-axi ready --include-held
count: 0
ready: 0 unblocked queued tasks
ready_public_followups: 0 delivery-ready obligations
held[1]{id,state,kind,repo,title,hold_reason,hold_kind,hold_until}:
  held-b,queued,captain,alpha,Captain hold on configured-archive blocker,captain picks after b,captain,"-"
help[1]:
== BASE 4735ddc6 snapshot
{"id":"held-b","unresolved_blocker_ids":["blocker-b"],"hold_bucket":"blocked","captain_actionable":false}
== TARGET 876ccf7 snapshot
{"id":"held-b","unresolved_blocker_ids":[],"hold_bucket":"live","captain_actionable":true}
== TARGET bearings decisions_open/gates
decisions_open[1]{id,key,verb,summary,owner}:
  held-b,held-b,captain-hold,"Captain hold on configured-archive blocker: captain picks after b",(main)
landed: []
gates: []
reports: []
recorded_prs: []
Evidence: Adversarial: re-filed archived id, archived-unfinished blocker, dangling id

Source: Adversarial: re-filed archived id, archived-unfinished blocker, dangling id

# adversarial: blocker-r archived Done then re-filed as queued in backlog; blocker-q archived UNFINISHED ([ ]) by tasks-axi prune --state queued
-- backlog
# Backlog

## In flight
## Queued
- [ ] held-a - Captain decides after blocker blocked-by: blocker-a (repo: alpha) (kind: captain) (since 2026-10-11) (hold: captain picks rollout after blocker) (hold-kind: captain)
- [ ] held-dangling - Captain decides after phantom blocked-by: phantom-zz (repo: alpha) (kind: captain) (since 2026-10-11) (hold: captain picks after phantom) (hold-kind: captain)
- [ ] held-r - Hold on reopened blocker blocked-by: blocker-r (repo: alpha) (kind: captain) (since 2026-10-11) (hold: after r) (hold-kind: captain)
- [ ] blocker-r - Blocker re-filed as live work (repo: alpha) (kind: ship) (since 2026-10-11)
- [ ] held-q - Hold on pruned-unfinished blocker blocked-by: blocker-q (repo: alpha) (kind: captain) (since 2026-10-11) (hold: after q) (hold-kind: captain)
## Done
-- archive

## Archived 2026-10-11
- [x] blocker-a - Ship the blocker (repo: alpha) (kind: ship) (done 2026-10-11)

## Archived 2026-10-11
- [x] blocker-r - Blocker that gets reopened (repo: alpha) (kind: ship) (done 2026-10-11)

## Archived 2026-10-11
- [ ] blocker-q - Queued blocker pruned unfinished (repo: alpha) (kind: ship) (since 2026-10-11)
- [ ] held-q - Hold on pruned-unfinished blocker blocked-by: blocker-q (repo: alpha) (kind: captain) (since 2026-10-11) (hold: after q) (hold-kind: captain)
== TARGET 876ccf7 snapshot
{"id":"held-a","blocked_by_ids":["blocker-a"],"unresolved_blocker_ids":[],"hold_bucket":"live"}
{"id":"held-dangling","blocked_by_ids":["phantom-zz"],"unresolved_blocker_ids":["phantom-zz"],"hold_bucket":"blocked"}
{"id":"held-r","blocked_by_ids":["blocker-r"],"unresolved_blocker_ids":["blocker-r"],"hold_bucket":"blocked"}
{"id":"held-q","blocked_by_ids":["blocker-q"],"unresolved_blocker_ids":["blocker-q"],"hold_bucket":"blocked"}
== TARGET bearings
decisions_open[1]{id,key,verb,summary,owner}:
  held-a,held-a,captain-hold,"Captain decides after blocker: captain picks rollout after blocker",(main)
landed: []
gates[4]{id,title,blocked_by,reason,owner,filed}:
  held-dangling,Captain decides after phantom,phantom-zz,"blocked-by phantom-zz: captain picks aft…",(main),2026-10-11
  held-r,Hold on reopened blocker,blocker-r,"blocked-by blocker-r: after r",(main),2026-10-11
  blocker-r,Blocker re-filed as live work,"-","-",(main),2026-10-11
  held-q,Hold on pruned-unfinished blocker,blocker-q,"blocked-by blocker-q: after q",(main),2026-10-11
reports: []
Evidence: Snapshot hold records, base vs target
BASE held-a unresolved=["blocker-a"] bucket=blocked actionable=false
TARGET held-a unresolved=[] bucket=live actionable=true
BASE/TARGET held-dangling unresolved=["phantom-zz"] bucket=blocked

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 warning
  • ⚠️ bin/fm-fleet-snapshot.sh:175 - Reported under the archive-root cap, not as a new fix round. done_archive_path now requires perl, and DONE_ARCHIVE=$(done_archive_path) || exit 1 (line 353) makes the whole snapshot exit 1 when perl is missing. That happens before any backlog is read, even for homes with no archive, no .tasks.toml, and no blocked-by: edges. Every snapshot consumer (bearings, fleet view) therefore loses its output on a perl-less host. Before this change only the archive lookup degraded, and the rest of the snapshot already treats perl as optional (line 1692 guards it). This is wider than the round-2 instruction, which was to fall back to (cd &#34;$DATA&#34; &amp;&amp; pwd -P) when fm_backlog_root fails. It is also a deliberate, tested choice in 876ccf7, and round 3 declined further work on this theme. Recording it so a human can confirm that the hard failure across the whole snapshot is intended.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 4 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Captain marks a blocker Done, tasks-axi prune moves it to data/done-archive.md, and bearings then lists the dependent captain hold as an open Captain's Call instead of a blocked gate ✅ pass live bearings-base.txt (held-a in gates, blocked-by blocker-a) vs bearings-target.txt (held-a in decisions_open); snapshot held-a unresolved_blocker_ids [] and hold_bucket live on target
A hold blocked-by an id in neither the backlog nor the archive stays blocked in the snapshot and bearings ✅ pass live bearings-target.txt: held-dangling remains in gates with blocked-by phantom-zz; snapshot unresolved_blocker_ids ["phantom-zz"]
A home with a symlinked data dir and a .tasks.toml-configured archive: once tasks-axi archives the blocker, the hold resolves from the configured archive under the resolved root, and the decoy at the… ✅ pass live configured-symlinked-archive.txt: base held-b blocked, target held-b live and in decisions_open
Adversarial: an archived-Done id re-filed as queued in the backlog, and a blocker archived unfinished ([ ]), both keep their holds blocked ✅ pass live adversarial-refiled-and-unfinished.txt: held-r and held-q have hold_bucket blocked and appear in bearings gates
Targeted regression suite for the snapshot view (archive, configured, global-config, symlink and no-perl cases) ⏸️ untested no The prior payload recorded only a unit-level test suite run (tests/fm-fleet-snapshot-view.test.sh) with live=false, not a run against the live product, so it did not establish a live result. The live…
  • bin/fm-lab-home.sh create x2 to make disposable FM_HOMEs; seeded both through bin/fm-tasks-axi.sh add/block/hold/start/done/prune --keep 0 (real tasks-axi)
  • bin/fm-tasks-axi.sh ready --include-held: checked that tasks-axi already treats the archived-blocker hold as unblocked
  • Base (git archive 4735ddc6 bin) vs target bin/fm-fleet-snapshot.sh --json, jq projection of the held records' unresolved_blocker_ids, hold_bucket and captain_actionable
  • Base vs target bin/fm-bearings-snapshot.sh (captain-facing view): decisions_open vs gates
  • Lab with data -&gt; storage/data symlink and storage/.tasks.toml [markdown] archive = &#34;records/done.md&#34;, plus a decoy records/done.md at the unresolved root
  • Adversarial: archived-Done id re-filed as queued in the backlog; blocker archived unfinished via tasks-axi prune --state queued; dangling id with its row hand-removed
  • bash tests/fm-fleet-snapshot-view.test.sh (targeted suite incl. new archive tests, 0 failures)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@greptile-apps

greptile-apps Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Medium risk] Updates fleet snapshot logic to recognize archived blockers.

The PR is not yet safe to merge because archive-only Done blockers remain blocked on hosts without Perl.

Reviews (2) · Last reviewed commit: "no-mistakes(ci): I fixed the finding (ci..."

Comment thread bin/fm-fleet-snapshot.sh Resolved
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: first stamp this fetch vs tip e31bc6e6 (just merged #5489).

HEAD a2087695b6a0d6ae0c2e8042d73509f71be7896c. Attestation MATCH. NM SUCCESS. CI SUCCESS. Greptile FAILURE (open P1). MERGEABLE/UNSTABLE. Fixes #5816 verified.

contract-class: restore — concrete existing fleet-snapshot blocked-by: resolution vs Done archive was incomplete after retention; tip also reads configured [markdown] archive (project → global → default). Not a new Bearings/observer surface.

VISION: all align (honest holds; scripts own archive parse; restart from disk; no consent widen; scope = snapshot + hold-lifecycle docs + test count).

Waiting-author: Greptile P1 on done_archive_path — when data is a symlink, resolve the data directory (e.g. pwd -P / fm_backlog_root) before choosing the archive root so symlink homes match tasks-axi. Please address and re-push / rebind attestation if HEAD moves.

Overlap: preferred over sibling #6123 for the same #5816 (this tip has config-path + quote/# + global fallback). When this lands, #6123 will be closed as leftover.

Merge note: tip edits .github/workflows/ci.yml expected count 18→22 — squash may need workflow-capable token when otherwise green (same class as prior ci.yml bumps). Not otherwise-ready this pass (Greptile P1). Firstmate flag no.

Comment thread bin/fm-fleet-snapshot.sh
}
done_archive_path() {
local root archive
root=$(fm_backlog_root "$DATA") || return 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Archive lookup silently fails

If Perl is unavailable, fm_backlog_root fails and this line returns without an archive path. The snapshot then reads /dev/null instead of the Done archive. A captain hold whose blocker is Done only in that archive remains incorrectly blocked, even though the snapshot otherwise supports hosts without Perl.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 876ccf7: done_archive_path now checks for perl up front and the snapshot exits 1 with fm-fleet-snapshot: perl not found (needed to resolve the Done archive) instead of silently reading an empty archive. The path resolution runs after argument parsing, so --help still works without perl. test_missing_perl_stops_with_a_clear_archive_error covers the failure (exit code, no JSON, exact message), --help without perl, and the same home resolving its archived blocker once perl is present.

Separately, the Behavior portable serial 2 job was cancelled by the runner (not a test failure; every other check passes). A maintainer re-run of that job would be appreciated.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: restamp vs tip 1f3e7696 (just merged #5863).

HEAD 884c4484b4d03268228165336b9b32d4e6208759. Attestation MATCH. NM SUCCESS. CI SUCCESS. Greptile FAILURE (open P1). MERGEABLE/BLOCKED. Fixes #5816 verified.

contract-class: restore — concrete existing fleet-snapshot blocked-by: resolution vs Done archive was incomplete after retention; tip also reads configured [markdown] archive (project → global → default via fm_backlog_root). Not a new Bearings/observer surface. Tip moved a2087695 → 884c4484 to prefer fm_backlog_root (addresses prior symlink P1); Greptile now has a new open P1: if Perl is unavailable, fm_backlog_root fails and archive lookup silently falls through to /dev/null.

VISION (per rule):

  1. One captain, one interface — aligns (honest hold/gate presentation once archived Done blockers resolve).
  2. Authority explicit — aligns (no new autonomy; snapshot read-only).
  3. Scripts vs agents — aligns (scripts own archive parse).
  4. Restart non-event — aligns (disk archive + backlog).
  5. Delegation with spine — n/a.
  6. Fleet outlives vendor — n/a.
  7. Scope — aligns (fleet snapshot + hold-lifecycle docs + tests).

Waiting-author: please address Greptile P1 on Perl-unavailable fm_backlog_root failure so Done-archive resolution still works (or fails loudly) without Perl. Do not merge until Greptile green.

@karotkriss

Copy link
Copy Markdown
Contributor Author

Without Perl the snapshot already fails before the archive path is used: backlog_json pipes the backlog through fm_hold_reason_decode_stream, which calls perl, on the base commit as well. A Perl-less archive fallback would be dead code, so no change is made for this finding.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: RELOOK vs tip 1f3e7696. Diff reviewed (done_archive_path via fm_backlog_root; archive Done ids in backlog_json; symlink + config-path tests; ci count 18→23).

Contract-class: restore — concrete existing fleet-snapshot blocked-by: resolution vs Done archive was incomplete after done_keep retention (#5816). Tip also honors configured [markdown] archive (project → global → default) via fm_backlog_root. Not a new Bearings/observer/wake surface.

VISION (per /workspace/VISION.md):

  1. One captain, one interface — aligns (honest hold/gate presentation once archived Done blockers resolve).
  2. Authority is explicit and never inferred — aligns (read-only snapshot; no new autonomy grant).
  3. Scripts own the mechanics, agents own the judgment — aligns (scripts own archive parse + blocker resolve).
  4. A restart is a non-event — aligns (disk archive + backlog).
  5. Delegation with a spine — n/a.
  6. The fleet outlives any vendor — n/a.
  7. Scope — aligns (fleet snapshot + hold-lifecycle docs + test count; not workshop).

Attestation MATCH HEAD 884c4484. NM SUCCESS. CI SUCCESS. Greptile FAILURE (open P1). MERGEABLE/BLOCKED. Closes #5816: yes (Fixes #5816; body matches issue).

Author rebuttal (2026-10-04T01:34Z): without Perl, snapshot already fails earlier via fm_hold_reason_decode_stream (and fm_backlog_root itself uses perl for control-byte checks). Verified on tip: backlog_json pipes through fm_hold_reason_decode_stream json. Firstmate accepts the technical claim that a Perl-less archive fallback is dead code on this path.

Still waiting-author: Greptile Review remains FAILURE with open P1 (Perl/archive). Charter keeps Greptile P1s as waiting-author; cannot auto-merge while that check fails / merge=BLOCKED. Please get Greptile to clear/retract the P1 (retrigger or resolve the thread) — no further code change required per the verified rebuttal. Firstmate-flag=no.

…or the Done archive in the same directory tasks-axi does, even when `data` is a symlink. The new symlink test fails on the old code and passes now. **What was wrong:** tasks-axi reads `.tasks.toml` and resolves the archive path from the parent of the resolved (`pwd -P`) data directory. `done_archive_path` in `bin/fm-fleet-snapshot.sh` used `dirname "$DATA"` instead. With `home/data -> home/storage/data`, tasks-axi uses `home/storage` but the snapshot used `home`. That made it read the wrong `.tasks.toml` and archive, so a blocker archived as Done stayed blocked. `DONE_ARCHIVE` is computed once and is the only input `backlog_json` uses for archived Done ids. Fixing it there covers every place the snapshot reads the archive. **Fix (no new helper, as you asked):** - `bin/fm-fleet-snapshot.sh` now sources `bin/fm-backlog-transition-lib.sh` with its other libraries. I checked first that its function and variable names don't clash with the snapshot's. - `done_archive_path` now gets its root from `fm_backlog_root "$DATA"`, the same function tasks-axi callers use, which resolves symlinks with `pwd -P`. - If the data directory can't be resolved, it returns an empty path. `backlog_json` already treats that as an empty archive, and with no data directory there is no backlog to check anyway. - `DONE_ARCHIVE` is now set after the library is sourced. The comment above the function now names the resolved root. **Test:** added `test_symlinked_data_dir_resolves_archive_from_target_root` to `tests/fm-fleet-snapshot-view.test.sh`. It builds `data -> storage/data` and puts an archive at both `home/records/done.md` and `home/storage/records/done.md`. It checks two things: - A blocker archived under `storage` counts as resolved, so that hold shows as "live". - A blocker that only appears in the archive under `home` stays unresolved, so that hold shows as "blocked". I updated the expected test count in `.github/workflows/ci.yml` from 22 to 23. **Verification:** - With the old `dirname` line put back, the new test fails. - With the fix, `tests/fm-fleet-snapshot-view.test.sh` passes all 23 tests. - `shellcheck -x` passes on the changed script and test. - The other snapshot-related test suites all pass: `fm-bearings-snapshot` (60), `fm-fleet-ledger` (10), `fm-bearings-board` (18) and `fm-fleet-sync` (27). Nothing is committed yet. The diff covers only `bin/fm-fleet-snapshot.sh`, `tests/fm-fleet-snapshot-view.test.sh` and `.github/workflows/ci.yml`
@karotkriss
karotkriss force-pushed the fm/fm-up-5816-snapshot-archived-blocker-v2 branch from 884c448 to 876ccf7 Compare October 11, 2026 06:29
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: re-look at head 876ccf72 vs main 072a7da3. Waiting on CI (not on you).

Thanks @karotkriss. The Perl finding is handled: done_archive_path now checks for perl first and exits 1 with a clear message, so the archive is never read as empty without anyone noticing. Your live lab evidence (archived blocker resolves; dangling, re-filed, and unfinished blockers stay gated) covers the main path.

contract-class: restore. Fleet-snapshot blocked-by: resolution was already specified for Done blockers, and it broke once retention moved them into the Done archive (#5816). The tip makes the snapshot read the same archive tasks-axi uses. It is read-only and adds no new surface.

VISION: one captain, one interface: aligns (holds show honestly) · authority: aligns (read-only, no new autonomy) · scripts/agents: aligns (scripts parse the archive) · restart: aligns (disk records) · delegation: n/a · vendor: n/a · scope: aligns (snapshot, docs, tests; the ci.yml change only bumps the test count 18→24).

CI: every job passed except Behavior portable serial 2, which the runner cancelled at 30 minutes. The same timeout also hits main, so I re-ran the failed job. If it comes back green, this squash-merges next pass. Closes #5816 (verified Fixes #5816). The sibling #6123 will be closed as the leftover once this lands.

@karotkriss karotkriss closed this Oct 12, 2026
@karotkriss karotkriss reopened this Oct 12, 2026
@karotkriss karotkriss closed this Oct 12, 2026
@karotkriss karotkriss reopened this Oct 12, 2026
@karotkriss

Copy link
Copy Markdown
Contributor Author

CI status on head 876ccf7, which is unchanged across three CI runs: every job has passed on it at least once.

The only non-green results are runner cancellations of Behavior portable serial 2 (runs 38118231183 and 38264891700) and a Behavior timing aggregate job left queued in the last run. No test failure is attributable to this change.

Could a maintainer re-run the cancelled Behavior portable serial 2 job in run 38264891700?

@kunchenguid

kunchenguid commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @karotkriss for the clear CI rundown, and sorry this has bounced off runner timeouts for so long.

The head is unchanged at 876ccf72, and the no-mistakes attestation still matches it. In run 38264891700, every job passed except Behavior portable serial 2, which the runner cancelled at 30 minutes. I re-ran the failed jobs there (attempt 2). Update: attempt 2's serial 2 hit the same 30-minute cancel in the supervision-host suite, which this PR doesn't touch. I'll re-run it again once the run's queued timing job clears. Your read is right: no test failure here comes from this change.

Contract-class: restore, as before. Fleet-snapshot blocked-by: resolution was already specified for Done blockers, and it broke once retention moved them into the Done archive (#5816). VISION.md: one captain, one interface: aligns · authority: aligns (read-only) · scripts/agents: aligns · restart: aligns · delegation: n/a · vendor: n/a · scope: aligns.

Waiting on CI, not on you. If a re-run comes back green, this squash-merges, and the sibling #6123 gets closed as the leftover. Fixes #5816 is verified.

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.

Bearings reads a blocked-by edge as unresolved once done_keep archives the Done blocker

2 participants