Skip to content

feat(bin): defer wedge escalation while a no-mistakes run is validating - #293

Merged
sKeLe100 merged 1 commit into
mainfrom
fm/burn-pc02-mate-rules
Nov 20, 2026
Merged

sKeLe100 merged 1 commit into
mainfrom
fm/burn-pc02-mate-rules

Conversation

@sKeLe100

Copy link
Copy Markdown
Owner

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

  • Added crew_run_is_validating to bin/fm-classify-lib.sh. It reads one fm-crew-state.sh line and succeeds only for a working state from the run-step source with whole validating (running) or validating (fixing) and run: <id> components. It prints <run-id> <step>. Parked, terminal, ci-monitoring, coarse validating (background run), runless and unreadable verdicts do not count.
  • Added wedge_defer_validating to bin/fm-watch.sh and called it in wedge_timer_check after 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 per PAUSE_RESURFACE_SECS through resurface_absorbed, tracked by new .validating-since-* and .validating-resurfaced-* markers that clear_write_tracking now also removes. A different run id starts a new chain.
  • The deferral is opt-in and off by default: it applies only when config/wedge-defer-validating exists. Without the flag the crew state is never read and the wedge ladder is unchanged. Comments in bin/fm-watch.sh were updated to match.
  • Extended tests/fm-watch-triage-lib.sh (+146 lines) and wired it into tests/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.

  • Live validation: ✅ go - 3 of 3 scenarios driven live against the product
Scenario Result Live Evidence
With the flag armed, a quiet pane whose crew has a running or fixing no-mistakes run is deferred on the long recheck cadence with no wedge alarm ✅ pass live deferred-when-armed.log
Adversarial: parked, terminal, ci-monitoring, coarse, runless, absent or unreadable run states still escalate through the normal wedge ladder ✅ pass live escalates-when-not-executing.log
Adversarial: without config/wedge-defer-validating a running validation keeps the unchanged ladder, wording and reads ✅ pass live off-until-armed.log
Evidence: armed: running or fixing run is deferred

Source: armed: running or fixing run is deferred

ok - a running or fixing validation run is deferred on the long recheck cadence rather than wedge-escalated
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

ok - parked, terminal, ci-monitoring, coarse, runless, absent and unreadable runs keep the unchanged wedge ladder
Evidence: flag absent: ladder unchanged

Source: flag absent: ladder unchanged

ok - with config/wedge-defer-validating absent a running validation keeps the unchanged ladder, wording and reads

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.

  • Live validation: ✅ go - 3 of 3 scenarios driven live against the product
Scenario Result Live Evidence
With the flag armed, a quiet pane whose crew has a running or fixing no-mistakes run is deferred on the long recheck cadence with no wedge alarm ✅ pass live deferred-when-armed.log
Adversarial: parked, terminal, ci-monitoring, coarse, runless, absent or unreadable run states still escalate through the normal wedge ladder ✅ pass live escalates-when-not-executing.log
Adversarial: without config/wedge-defer-validating a running validation keeps the unchanged ladder, wording and reads ✅ pass live off-until-armed.log
  • bin/fm-test-run.sh --changed --exclude-family real-herdr-gated --exclude-quarantined --pc02-if-idle
  • Baseline bin/fm-test-run.sh --changed ... (already passed)
  • test_wedge_threshold_defers_to_an_executing_validation_run run alone against the real bin/fm-watch.sh
  • test_wedge_threshold_escalates_when_no_run_is_executing run alone
  • test_wedge_threshold_validating_run_is_off_until_armed run alone
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@sKeLe100
sKeLe100 merged commit d739542 into main Nov 20, 2026
24 checks passed
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