fix: preserve live pipeline run state during crew reporting - #2159
fix: preserve live pipeline run state during crew reporting#2159bluewandd wants to merge 3 commits into
Conversation
f82d9a9 to
19d6742
Compare
|
Following up on this fix. The PR has all 13 checks passing and has been open since August 11. It prevents fm-crew-state from reporting a live pipeline-owned run as failed while keeping teardown\x27s strict branch/head safety. The branch is behind current main and needs a rebase before merge. Please review when you get a chance. |
fm_nm_head_matches_worktree rejected a run head it could not resolve as a local object, even though a live no-mistakes run legitimately advances a branch's head past what this worktree's object store has observed yet (branch_sync.state: pipeline_owned). The rejection fell through to the coarse runs-list fallback, which could then match an older failed row sitting at the worktree's own sha and report a healthy running validation as failed. Treat an unresolvable run head as unable to disprove attribution rather than as divergence, and make nm_runs_status_for_branch prefer an active row over a terminal one for the same branch regardless of list order, so a stale failed/completed row never outranks a live run.
|
Speaking as Kun's firstmate: first look on current class=corrective. Reporting-only attribution: a nonempty run head missing from the local object store stays reportable so a live pipeline-owned no-mistakes run is not mapped failed; coarse listing prefers an active same-branch row over a terminal row. Teardown keeps the strict VISION.md (inspected
This HEAD: Not first-time: Behavior/Lint/CI actually ran on this PR. No workflow approval this pass. Greptile is not a merge gate. Security: none. Read-only reporting relaxation; teardown stays fail-closed. Overlap: Land-eligible rec: NO. Captain-flag NOW: no. This is waiting-on-author (rebase onto current main + HEAD-matching attestation; coordinate with #3001 rather than land both). Not a captain-decision. Not a merge I will recommend. |
19d6742 to
912889d
Compare
Confidence Score: 5/5The PR appears safe to merge because reporting is relaxed without weakening the strict ownership check guarding teardown aborts. The changed reporting behavior is deliberately read-only, destructive teardown continues to require a resolvable code-identity match, and no concrete unacknowledged failure remains. Reviews (1): Last reviewed commit: "no-mistakes(document): Document reportin..." | Re-trigger Greptile |
What Changed
Risk Assessment
✅ Low: The reporting-only attribution relaxation is confined to fm-crew-state while teardown retains the strict verified-head predicate for destructive aborts.
Testing
Reviewed the target diff, ran the two focused behavior suites, and exercised the crew-state CLI end-to-end against representative no-mistakes responses; both unresolved live-run scenarios rendered
state: working · source: run-step, with no working-tree artifacts left behind.Evidence: Crew-state CLI end-to-end transcript
Pipeline
Updates from git push no-mistakes
⏭️ **intent** - skipped
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed ✅
bin/fm-nm-run-lib.sh:78- This shared ownership predicate now accepts any unresolvable head, but fm-teardown.sh uses it beforeaxi abort --runand explicitly requires a verified branch+head match. A stale/invalid or GC-pruned parked run on a reused branch therefore passes attribution and is aborted during teardown. Keep the resolvable-head requirement for destructive callers; add a reporting-only compatibility predicate (or explicit mode) for fm-crew-state's pipeline-owned containment path.🔧 Fix: Separate reporting-only run attribution from teardown safety
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
git diff --check e836a7f28bc5100f517c1d672a56483754899add 40622263504b110ac729a57ea1351fc3c6dc8117bin/fm-test-run.sh tests/fm-crew-state.test.shbin/fm-test-run.sh tests/fm-teardown.test.shManualbin/fm-crew-state.shCLI exercise with a pipeline-owned unresolved head and with a stale failed runs-list row preceding a live running row.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.