Repository navigation
feat(bin): defer wedge escalation while a no-mistakes run is validating - #293
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Captain's go on 2026-11-18 around 10:25 PM ET: dispatch the burn fixes from the 5-hour burn report. This item is fix row 2: pc02-mate decides its own routine waits and relaunches; no wedge alarm while a pane shows a blocking no-mistakes drive (a flat context counter is expected). Wedge check lives in bin/fm-watch.sh and bin/fm-classify-lib.sh. Spec: data/orchestrator-5h-burn-20261118/report.md section 4, row 2.
Captain decision on 2026-11-19: the deferral is delivered as an opt-in flag, config/wedge-defer-validating, kept off by default; arming it is local home configuration and is not part of this change.
What Changed
crew_run_is_validatingtobin/fm-classify-lib.sh. It reads onefm-crew-state.shline and succeeds only for aworkingstate from therun-stepsource with wholevalidating (running)orvalidating (fixing)andrun: <id>components. It prints<run-id> <step>. Parked, terminal, ci-monitoring, coarsevalidating (background run), runless and unreadable verdicts do not count.wedge_defer_validatingtobin/fm-watch.shand called it inwedge_timer_checkafter the dead-record probe and before the operator guard consult. A pane whose crew has a running or fixing attributed run restarts its idle timer instead of raising a wedge. It re-surfaces at most once perPAUSE_RESURFACE_SECSthroughresurface_absorbed, tracked by new.validating-since-*and.validating-resurfaced-*markers thatclear_write_trackingnow also removes. A different run id starts a new chain.config/wedge-defer-validatingexists. Without the flag the crew state is never read and the wedge ladder is unchanged. Comments inbin/fm-watch.shwere updated to match.tests/fm-watch-triage-lib.sh(+146 lines) and wired it intotests/fm-watch-triage-waits.test.sh(+3 lines).Risk Assessment
✅ Low: The deferral is opt-in and off by default, matching the recorded decision. When the flag is absent, the wedge ladder never reads crew state. The parser accepts only the exact run-step output of fm-crew-state.sh. The three new tests exercise the real watcher with a fake crew-state binary.
Testing
I ran the three new tests for the opt-in validating-run deferral, one at a time, against the real bin/fm-watch.sh. They use fixture homes, fake crew-state and a fake backend. All three passed. The full tests/fm-watch-triage-waits.test.sh file was too slow to finish in this turn, so I did not run it whole. A herdr or tmux lab run was not attempted, because the behaviour comes from the watcher's timer path, and the fixture tests drive that path directly.
Evidence: armed: running or fixing run is deferred
Source: armed: running or fixing run is deferred
Evidence: parked, terminal, ci-monitoring, coarse, runless, absent and unreadable runs still escalate
Source: parked, terminal, ci-monitoring, coarse, runless, absent and unreadable runs still escalate
Evidence: flag absent: ladder unchanged
Source: flag absent: ladder unchanged
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bin/fm-test-run.sh --changed --exclude-family real-herdr-gated --exclude-quarantined --pc02-if-idleBaselinebin/fm-test-run.sh --changed ...(already passed)test_wedge_threshold_defers_to_an_executing_validation_runrun alone against the real bin/fm-watch.shtest_wedge_threshold_escalates_when_no_run_is_executingrun alonetest_wedge_threshold_validating_run_is_off_until_armedrun alone✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.