Skip to content

fix(bin): guard the wedge cap-fire counter reset with the cap-state rollback - #7625

Merged
kunchenguid merged 5 commits into
kunchenguid:mainfrom
LorenzoMinghini:fm/wedge-cap-clean-2605
Oct 22, 2026
Merged

kunchenguid merged 5 commits into
kunchenguid:mainfrom
LorenzoMinghini:fm/wedge-cap-clean-2605

Conversation

@LorenzoMinghini

@LorenzoMinghini LorenzoMinghini commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Intent

The upstream maintainer has reviewed the pull request #7552, accepted the live validation as complete, and asked for one further change so it can land: make the escalation-counter reset opt-in, so it only kicks in when the cap is configured, so that homes which have not set anything keep today's behaviour and still get the deep-inspection prompt for a stuck pane. The captain's standing instruction covers this contribution to the upstream repository; the deliverable is the rework on the pull request's existing branch, raised through the real validation pipeline so the maintainer sees genuine evidence. The maintainer's words, which are the acceptance criteria: "could you make the escalation-counter reset opt-in too, so it only kicks in when the cap is configured? That way homes that haven't set anything keep today's behavior, and they still get the deep-inspection prompt for a stuck pane. (Related: #7580, the uncapped wedge loop.)"

What Changed

  • bin/fm-watch.sh: the cap-fire escalation-counter reset in wedge_timer_check is now checked like its two sibling cap-state writes — a state dir that refuses the reset rolls the cap state back, falls back to the .wedge-rollback-failed-<key> sentinel for FM_ROLLBACK_SENTINEL_TTL_SECS, and ends the cycle before the capped wake is delivered inline, rather than walking out with a counter left saturated at the bound that would re-fire the terminal silence after the horizon instead of climbing a fresh 1..N. The reset stays inside the FM_WEDGE_MAX_ESCALATIONS > 0 branch, so uncapped homes keep today's behaviour.
  • tests/fm-watch-wedge-cap.test.sh: added test_wedge_cap_unwritable_counter_reset_fails_safe, which turns the counter file unwritable between the count write and the post-fire reset and asserts exit 1, the sentinel, the rollback reporting, no inline PERMANENTLY-WEDGED wake, the terminal row already queued left durable, and the following poll staying silent behind the sentinel.
  • docs/configuration.md, docs/architecture.md, and .agents/skills/operational-home-layout/SKILL.md now name the third guarded cap-state write and its FM_ROLLBACK_SENTINEL_TTL_SECS trigger; docs/fm-test-portable-shards.md gets a shard-pack wording fix.

Risk Assessment

✅ Low: The only behavioral change is a defensive guard on one cap-state write that mirrors the fail-safe pattern already merged eleven lines above it, and it is reachable only on a write failure, so the healthy path is byte-for-byte unchanged; the remainder of the diff is documentation accuracy and one regression test that reproduces the pre-fix behavior.

Testing

I drove the watcher itself, not a fixture of it: a real tmux server on a lab-private socket holds a real wedged process, a disposable lab home minted by bin/fm-lab-home.sh carries the task records, and bin/fm-watch.sh at df4b1b0 polls that pane. With nothing configured the pane escalated on every threshold and still received the demand-deep-inspection prompt at escalations 3 and 4 with no PERMANENTLY-WEDGED row and no cap marker - today's behaviour intact. With the cap configured the same pane produced exactly one terminal wake at the bound, wrote the window-scoped marker, went silent while the marker stood, and after the horizon came back audible at escalation 1, which is the post-fire counter reset doing its job. For the change itself I injected a filesystem fault that lets the count write and the cap-marker write succeed and then refuses the post-fire reset: on df4b1b0 the cycle delivers no wake, exits 1, logs the reset failure, sets the rollback-failure sentinel, leaves the already-queued terminal row durable and the saturated counter standing, and silences later polls through the sentinel even though the cap horizon had elapsed; replaying the identical fault against the pre-fix watcher extracted from base 6eb8b7f walks straight past it - raw permission error on stderr, 'wedge permanently capped' logged, terminal wake delivered inline, exit 0, no sentinel - which is the falsification that makes the new guard the cause of the ARM-B outcome. An unconfigured home driven with the counter never writable never enters the new code at all. Six scenarios rest on those live arms and pass; the seventh (unconfigured-home parity against origin/main across unset/0/empty/negative/non-numeric/out-of-range) is downgraded to untested because its only support is the repository's stubbed-boundary differential suite, so it is reported with empty evidence rather than as a live pass. The repo's wedge-cap suite passes 23/23 on this commit. The remaining edits in this diff are documentation wording (the away-posture terminal-row note in architecture.md and configuration.md, the shard-pack measurement line, the skill-file marker shorthand); they carry no runtime surface of their own and were not driven live.

  • Live validation: ✅ go - 6 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Operator has set nothing: a genuinely wedged pane keeps escalating on every threshold and still gets the demand-deep-inspection prompt, with no PERMANENTLY-WEDGED row and no cap marker ✅ pass live FM_WATCH_WEDGE_CAP_LIVE=1 bash tests/fm-watch-wedge-cap-live.test.sh - part 0 of wedge-cap-live-lab-transcript.txt: escalations 1, 2, 3 ('demand-deep-inspection: same pane has wedge-escalated 3 times…
Operator sets FM_WEDGE_MAX_ESCALATIONS=3: the same wedged pane publishes exactly one terminal PERMANENTLY-WEDGED wake at the bound, writes the window-scoped cap marker, and every later poll is silent… ✅ pass live wedge-cap-live-lab-transcript.txt parts 1 and 1b: one cycle printed PERMANENTLY-WEDGED with 'FM_WEDGE_MAX_ESCALATIONS=3 reached', cap markers on disk: 1, then two silence probes with woke=0 inside the…
The counter reset is opt-in and effective: after the cap's horizon elapses with no operator action, the same pane is audible again starting at escalation 1 (the fire reset the counter), not off a satu… ✅ pass live wedge-cap-live-lab-transcript.txt part 2: 'post-horizon cycle 1 -> woke=1 reason=stale: wedged-lab:wedged (idle 242s, possible wedge, escalation 1)'; independently, ARM-A of wedge-cap-reset-fault-live…
Adversarial: a state dir that accepts the count write and the cap-marker write but refuses the post-fire counter reset is not walked past - no inline capped wake, cycle ends 1, rollback-failure sentin… ✅ pass live ARM-B in wedge-cap-reset-fault-live.txt: cycle[cap-fire] exit=1 woke=0 with 0 delivered wake lines, triage 'wedge escalation-counter reset FAILED AND rollback ALSO FAILED ... sentinel set (TTL 600)',…
Differential oracle: the identical live workload with the identical injected fault, replayed against the pre-fix watcher (base 6eb8b7f), proceeds past the failed reset - raw permission error, 'wedge p… ✅ pass live ARM-C in wedge-cap-reset-fault-live.txt, against .live-scratch/base/bin/fm-watch.sh extracted with git archive 6eb8b7f: cycle[cap-fire] exit=0 woke=1 with the 'Permission denied' diagnostic and the…
Adversarial gating: an unconfigured home (no FM_WEDGE_MAX_ESCALATIONS at all) driven with the counter file never writable never enters the new guard - no rollback sentinel, no cap marker, no PERMANENT… ✅ pass live wedge-cap-unconfigured-fault-live.txt: six cycles, every one a plain stale escalation, triage 'wedge escalation counter write FAILED ... the next poll restarts this window's count at 1', counter mode4…
Unconfigured-home parity: with the cap unset, 0, empty, negative, non-numeric or out of range, the ladder is observably identical to upstream main (1 2 3 4 with the deep-inspection prompt at 3) includ… ⏸️ untested no The only run of this scenario is bash tests/fm-watch-wedge-cap-unconfigured-parity.test.sh, an offline differential against origin/main's watcher that reaches the wedge ladder through a stubbed tmux…
Evidence: wedge-cap live lab transcript: real tmux, real wedged pane, real watcher (unconfigured baseline, ceiled arm, silence probes, post-horizon release at escalation 1)

Source: wedge-cap live lab transcript: real tmux, real wedged pane, real watcher (unconfigured baseline, ceiled arm, silence probes, post-horizon release at escalation 1)

2026-10-22T09:09:25Z wedge-cap live run starting
2026-10-22T09:09:25Z cap=FM_WEDGE_MAX_ESCALATIONS=3 horizon=FM_CAP_HORIZON_SECS=300s stale=FM_STALE_ESCALATE_SECS=2s
2026-10-22T09:09:25Z tmux tmux 3.4, watcher 01M5H99YV8374277W16TR2XHXG/bin/fm-watch.sh at df4b1b0
2026-10-22T09:09:25Z lab home: /tmp/fm-watch-wedge-cap-live.b48wvB/lab-home
2026-10-22T09:09:25Z lab tmux server up on /tmp/fml.RXx1z5/tmux-1001/default with window wedged-lab:wedged
2026-10-22T09:09:25Z wedged worker recorded as wedged-worker (key=wedged-lab_wedged); its pane holds a live process that has made no progress
2026-10-22T09:09:25Z part 0: UNCEILED baseline at the shipped default FM_WEDGE_MAX_ESCALATIONS=0
2026-10-22T09:09:33Z unceiled escalation 1 -> exit=0 woke=1 reason=signal: /tmp/fm-watch-wedge-cap-live.b48wvB/lab-home/state/wedged-worker.status
2026-10-22T09:09:37Z pane-hash markers the watcher wrote under a key other than wedged-lab_wedged: 0
2026-10-22T09:09:45Z unceiled escalation 2 -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 3s, possible wedge, escalation 1)
2026-10-22T09:09:56Z unceiled escalation 3 -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 3s, possible wedge, escalation 2)
2026-10-22T09:10:14Z unceiled escalation 4 -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 5s, possible wedge, escalation 3, demand-deep-inspection: same pane has wedge-escalated 3 times in a row - do not re-absorb on the run-step/pane state alone)
2026-10-22T09:10:30Z unceiled escalation 5 -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 4s, possible wedge, escalation 4, demand-deep-inspection: same pane has wedge-escalated 4 times in a row - do not re-absorb on the run-step/pane state alone)
2026-10-22T09:10:35Z UNCEILED: 5 consecutive wakes from one wedged pane with the cap at its default, and nothing bounds the next one
2026-10-22T09:10:35Z part 1: the SAME workload with FM_WEDGE_MAX_ESCALATIONS=3 (ceiled)
2026-10-22T09:10:45Z ceiled cycle 1 (first sight: absorbed) -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 3s, possible wedge, escalation 1)
2026-10-22T09:10:59Z ceiled cycle 2 (escalation 1) -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 4s, possible wedge, escalation 2)
2026-10-22T09:11:18Z ceiled cycle 3 (escalation 2) -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 3s, possible wedge, escalation 3, demand-deep-inspection: same pane has wedge-escalated 3 times in a row - do not re-absorb on the run-step/pane state alone), PERMANENTLY-WEDGED: FM_WEDGE_MAX_ESCALATIONS=3 reached - no further wedge escalations for this WINDOW while its cap marker stands: until FM_CAP_HORIZON_SECS elapses, the crew resumes, or the operator manually removes STATE/.wedge-permanent-<key>
2026-10-22T09:11:51Z ceiled cycle 4 (escalation 3: cap threshold) -> exit=alive woke=0 reason=none
2026-10-22T09:11:54Z ceiled cycles that printed PERMANENTLY-WEDGED: 1 (cap bound is 3)
2026-10-22T09:11:54Z cap markers on disk: 1
2026-10-22T09:11:54Z part 1b: the cap must silence the still-wedged pane
2026-10-22T09:12:24Z silence probe 1 -> exit=alive woke=0 reason=none
2026-10-22T09:12:58Z silence probe 2 -> exit=alive woke=0 reason=none
2026-10-22T09:13:02Z ceiled: 2 further polls produced no wake at all (over 68s, inside the 300s horizon)
2026-10-22T09:13:02Z COMPARISON: same pane, same watcher, same thresholds - 5 wakes unceiled at the default versus 2 silent polls ceiled at 3, with one terminal PERMANENTLY-WEDGED wake instead of a train
2026-10-22T09:13:02Z part 2: wait out FM_CAP_HORIZON_SECS and confirm the cap releases itself
2026-10-22T09:13:02Z sleeping 234s so the 300s cap horizon elapses with no operator action
2026-10-22T09:17:07Z post-horizon cycle 1 -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 242s, possible wedge, escalation 1)
2026-10-22T09:17:27Z post-horizon cycle 2 -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 3s, possible wedge, escalation 2)
2026-10-22T09:17:32Z post-horizon the pane is audible again with no operator action: cycle 1 woke (stale: wedged-lab:wedged (idle 242s, possible wedge, escalation 1)), cycle 2 woke=1
2026-10-22T09:17:32Z cap markers on disk after the horizon: 1
2026-10-22T09:17:32Z SUMMARY: unceiled 5 consecutive wakes at the default; ceiled 1 terminal wake then 2 silent polls at FM_WEDGE_MAX_ESCALATIONS=3; audible again after the 300s horizon with no operator action
2026-10-22T09:17:32Z wedge-cap live run complete
ok - the same wedged worker escalates without bound at the default and is capped and then released at FM_WEDGE_MAX_ESCALATIONS=3
2026-10-22T09:17:32Z 
2026-10-22T09:17:32Z ----- transcript begin -----
2026-10-22T09:09:25Z wedge-cap live run starting
2026-10-22T09:09:25Z cap=FM_WEDGE_MAX_ESCALATIONS=3 horizon=FM_CAP_HORIZON_SECS=300s stale=FM_STALE_ESCALATE_SECS=2s
2026-10-22T09:09:25Z tmux tmux 3.4, watcher 01M5H99YV8374277W16TR2XHXG/bin/fm-watch.sh at df4b1b0
2026-10-22T09:09:25Z lab home: /tmp/fm-watch-wedge-cap-live.b48wvB/lab-home
2026-10-22T09:09:25Z lab tmux server up on /tmp/fml.RXx1z5/tmux-1001/default with window wedged-lab:wedged
2026-10-22T09:09:25Z wedged worker recorded as wedged-worker (key=wedged-lab_wedged); its pane holds a live process that has made no progress
2026-10-22T09:09:25Z part 0: UNCEILED baseline at the shipped default FM_WEDGE_MAX_ESCALATIONS=0
2026-10-22T09:09:33Z unceiled escalation 1 -> exit=0 woke=1 reason=signal: /tmp/fm-watch-wedge-cap-live.b48wvB/lab-home/state/wedged-worker.status
signal: /tmp/fm-watch-wedge-cap-live.b48wvB/lab-home/state/wedged-worker.status
2026-10-22T09:09:37Z pane-hash markers the watcher wrote under a key other than wedged-lab_wedged: 0
2026-10-22T09:09:45Z unceiled escalation 2 -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 3s, possible wedge, escalation 1)
stale: wedged-lab:wedged (idle 3s, possible wedge, escalation 1)
2026-10-22T09:09:56Z unceiled escalation 3 -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 3s, possible wedge, escalation 2)
stale: wedged-lab:wedged (idle 3s, possible wedge, escalation 2)
2026-10-22T09:10:14Z unceiled escalation 4 -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 5s, possible wedge, escalation 3, demand-deep-inspection: same pane has wedge-escalated 3 times in a row - do not re-absorb on the run-step/pane state alone)
stale: wedged-lab:wedged (idle 5s, possible wedge, escalation 3, demand-deep-inspection: same pane has wedge-escalated 3 times in a row - do not re-absorb on the run-step/pane state alone)
2026-10-22T09:10:30Z unceiled escalation 5 -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 4s, possible wedge, escalation 4, demand-deep-inspection: same pane has wedge-escalated 4 times in a row - do not re-absorb on the run-step/pane state alone)
stale: wedged-lab:wedged (idle 4s, possible wedge, escalation 4, demand-deep-inspection: same pane has wedge-escalated 4 times in a row - do not re-absorb on the run-step/pane state alone)
2026-10-22T09:10:35Z UNCEILED: 5 consecutive wakes from one wedged pane with the cap at its default, and nothing bounds the next one
2026-10-22T09:10:35Z part 1: the SAME workload with FM_WEDGE_MAX_ESCALATIONS=3 (ceiled)
2026-10-22T09:10:45Z ceiled cycle 1 (first sight: absorbed) -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 3s, possible wedge, escalation 1)
stale: wedged-lab:wedged (idle 3s, possible wedge, escalation 1)
2026-10-22T09:10:59Z ceiled cycle 2 (escalation 1) -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 4s, possible wedge, escalation 2)
stale: wedged-lab:wedged (idle 4s, possible wedge, escalation 2)
2026-10-22T09:11:18Z ceiled cycle 3 (escalation 2) -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 3s, possible wedge, escalation 3, demand-deep-inspection: same pane has wedge-escalated 3 times in a row - do not re-absorb on the run-step/pane state alone), PERMANENTLY-WEDGED: FM_WEDGE_MAX_ESCALATIONS=3 reached - no further wedge escalations for this WINDOW while its cap marker stands: until FM_CAP_HORIZON_SECS elapses, the crew resumes, or the operator manually removes STATE/.wedge-permanent-<key>
stale: wedged-lab:wedged (idle 3s, possible wedge, escalation 3, demand-deep-inspection: same pane has wedge-escalated 3 times in a row - do not re-absorb on the run-step/pane state alone), PERMANENTLY-WEDGED: FM_WEDGE_MAX_ESCALATIONS=3 reached - no further wedge escalations for this WINDOW while its cap marker stands: until FM_CAP_HORIZON_SECS elapses, the crew resumes, or the operator manually removes STATE/.wedge-permanent-<key>
2026-10-22T09:11:51Z ceiled cycle 4 (escalation 3: cap threshold) -> exit=alive woke=0 reason=none
2026-10-22T09:11:54Z ceiled cycles that printed PERMANENTLY-WEDGED: 1 (cap bound is 3)
2026-10-22T09:11:54Z cap markers on disk: 1
2026-10-22T09:11:54Z part 1b: the cap must silence the still-wedged pane
2026-10-22T09:12:24Z silence probe 1 -> exit=alive woke=0 reason=none
2026-10-22T09:12:58Z silence probe 2 -> exit=alive woke=0 reason=none
2026-10-22T09:13:02Z ceiled: 2 further polls produced no wake at all (over 68s, inside the 300s horizon)
2026-10-22T09:13:02Z COMPARISON: same pane, same watcher, same thresholds - 5 wakes unceiled at the default versus 2 silent polls ceiled at 3, with one terminal PERMANENTLY-WEDGED wake instead of a train
2026-10-22T09:13:02Z part 2: wait out FM_CAP_HORIZON_SECS and confirm the cap releases itself
2026-10-22T09:13:02Z sleeping 234s so the 300s cap horizon elapses with no operator action
2026-10-22T09:17:07Z post-horizon cycle 1 -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 242s, possible wedge, escalation 1)
stale: wedged-lab:wedged (idle 242s, possible wedge, escalation 1)
2026-10-22T09:17:27Z post-horizon cycle 2 -> exit=0 woke=1 reason=stale: wedged-lab:wedged (idle 3s, possible wedge, escalation 2)
stale: wedged-lab:wedged (idle 3s, possible wedge, escalation 2)
2026-10-22T09:17:32Z post-horizon the pane is audible again with no operator action: cycle 1 woke (stale: wedged-lab:wedged (idle 242s, possible wedge, escalation 1)), cycle 2 woke=1
2026-10-22T09:17:32Z cap markers on disk after the horizon: 1
2026-10-22T09:17:32Z SUMMARY: unceiled 5 consecutive wakes at the default; ceiled 1 terminal wake then 2 silent polls at FM_WEDGE_MAX_ESCALATIONS=3; audible again after the 300s horizon with no operator action
2026-10-22T09:17:32Z wedge-cap live run complete
2026-10-22T09:17:32Z 
2026-10-22T09:17:32Z ----- transcript begin -----
2026-10-22T09:17:32Z ----- transcript end -----
Evidence: live cap-fire counter-reset fault drive: ARM-A no fault, ARM-B fault on df4b1b0, ARM-C same fault on base 6eb8b7f

Source: live cap-fire counter-reset fault drive: ARM-A no fault, ARM-B fault on df4b1b0, ARM-C same fault on base 6eb8b7f

ARM-B (df4b1b0, state dir refuses only the post-fire reset): cycle[cap-fire] fault=1 exit=1 woke=0 reason=none delivered wake lines in this cycle: 0 triage: wedge escalation-counter reset FAILED AND rollback ALSO FAILED on wedge-lab:wedged - sentinel set (TTL 600); no wake-amplification counter=2 mode=444 sentinel=present permanent=present queued-terminal-rows=1 next poll: triage 'rollback-failed sentinel active ... operator can rm the sentinel', no wake, queue unchanged ARM-C (base 6eb8b7f, identical fault): cycle[cap-fire] fault=1 exit=0 woke=1 stderr: .../base/bin/fm-watch.sh: line 2126: .../state/.wedge-escalations-wedge-lab_wedged: Permission denied delivered: stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2), PERMANENTLY-WEDGED: FM_WEDGE_MAX_ESCALATIONS=2 reached ... triage: wedge permanently capped: wedge-lab:wedged (escalation 2, max 2, hash abebac7b7640) counter=2 mode=444 sentinel=absent

########## live adversarial drive: cap-fire escalation-counter reset ##########
\### real tmux lab server + real wedged process + real bin/fm-watch.sh, one disposable
\### firstmate lab home per arm; FM_WEDGE_MAX_ESCALATIONS=2, FM_CAP_HORIZON_SECS=3,
\### FM_ROLLBACK_SENTINEL_TTL_SECS=600, FM_STALE_ESCALATE_SECS=2.

\### ARM-A: target tree, NO fault injected (positive control)
2026-10-22T09:24:28Z == ARM-A no-fault cap fire (target tree df4b1b0) ==
2026-10-22T09:24:28Z watcher: ~/.no-mistakes/worktrees/8b845ac61faf/01M5H99YV8374277W16TR2XHXG/bin/fm-watch.sh (df4b1b0)
2026-10-22T09:24:28Z lab: /tmp/fmfault.GpDOID/lab-home state: /tmp/fmfault.GpDOID/lab-home/state window: wedge-lab:wedged key: wedge-lab_wedged
2026-10-22T09:24:28Z pane is a real process: bash pid=1943200
2026-10-22T09:24:28Z capture: claude> working (elapsed 00:00:01)||||||||||||||||||||||||
2026-10-22T09:24:36Z cycle[first-sight] fault=0 exit=0 woke=1 reason=signal: /tmp/fmfault.GpDOID/lab-home/state/wedged-worker.status
2026-10-22T09:24:36Z   watcher stdout/stderr: signal: /tmp/fmfault.GpDOID/lab-home/state/wedged-worker.status
2026-10-22T09:24:36Z   delivered wake lines in this cycle: 0
0
2026-10-22T09:24:36Z   triage tail: 
2026-10-22T09:24:36Z   counter=<absent> mode=- sentinel=absent permanent=absent queued-terminal-rows=0
2026-10-22T09:24:46Z cycle[escalation-1] fault=0 exit=0 woke=1 reason=stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 1)
2026-10-22T09:24:46Z   watcher stdout/stderr: stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 1)
2026-10-22T09:24:46Z   delivered wake lines in this cycle: 1
2026-10-22T09:24:46Z   triage tail: [2026-10-22T11:24:40+0200] absorbed busy (no completed turn) timer reset: wedge-lab:wedged|
2026-10-22T09:24:46Z   counter=1 mode=664 sentinel=absent permanent=absent queued-terminal-rows=0
2026-10-22T09:24:55Z cycle[cap-fire] fault=0 exit=0 woke=1 reason=stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2), PERMANENTLY-WEDGED: FM_WEDGE_MAX_ESCALATIONS=2 reached - no further wedge escalations for this WINDOW while its cap marker stands: until FM_CAP_HORIZON_SECS elapses, the crew resumes, or the operator manually removes STATE/.wedge-permanent-<key>
2026-10-22T09:24:55Z   watcher stdout/stderr: stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2), PERMANENTLY-WEDGED: FM_WEDGE_MAX_ESCALATIONS=2 reached - no further wedge escalations for this WINDOW while its cap marker stands: until FM_CAP_HORIZON_SECS elapses, the crew resumes, or the operator manually removes STATE/.wedge-permanent-<key>
2026-10-22T09:24:55Z   delivered wake lines in this cycle: 1
2026-10-22T09:24:55Z   triage tail: [2026-10-22T11:24:49+0200] absorbed busy (no completed turn) timer reset: wedge-lab:wedged|[2026-10-22T11:24:54+0200] wedge permanently capped: wedge-lab:wedged (escalation 2, max 2, hash abebac7b7640)|
2026-10-22T09:24:55Z   counter= mode=664 sentinel=absent permanent=present queued-terminal-rows=1
2026-10-22T09:25:10Z cycle[after-cap-fire] fault=0 exit=0 woke=1 reason=stale: wedge-lab:wedged (idle 8s, possible wedge, escalation 1)
2026-10-22T09:25:10Z   watcher stdout/stderr: stale: wedge-lab:wedged (idle 8s, possible wedge, escalation 1)
2026-10-22T09:25:10Z   delivered wake lines in this cycle: 1
2026-10-22T09:25:10Z   triage tail: [2026-10-22T11:24:54+0200] wedge permanently capped: wedge-lab:wedged (escalation 2, max 2, hash abebac7b7640)|[2026-10-22T11:24:58+0200] absorbed busy (no completed turn) timer reset: wedge-lab:wedged|
2026-10-22T09:25:10Z   counter=1 mode=664 sentinel=absent permanent=present queued-terminal-rows=1
--- wake queue after the cap fire ---
  stale	stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 1)
  stale	stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2), PERMANENTLY-WEDGED: FM_WE
  stale	stale: wedge-lab:wedged (idle 8s, possible wedge, escalation 1)
2026-10-22T09:25:10Z end of arm

\### ARM-B: target tree, fault injected on the cap-fire cycle
2026-10-22T09:25:10Z == ARM-B state dir refuses the post-fire counter reset (target tree df4b1b0) ==
2026-10-22T09:25:10Z watcher: ~/.no-mistakes/worktrees/8b845ac61faf/01M5H99YV8374277W16TR2XHXG/bin/fm-watch.sh (df4b1b0)
2026-10-22T09:25:11Z lab: /tmp/fmfault.eRb4hY/lab-home state: /tmp/fmfault.eRb4hY/lab-home/state window: wedge-lab:wedged key: wedge-lab_wedged
2026-10-22T09:25:11Z pane is a real process: bash pid=1951490
2026-10-22T09:25:11Z capture: claude> working (elapsed 00:00:01)||||||||||||||||||||||||
2026-10-22T09:25:21Z cycle[first-sight] fault=0 exit=0 woke=1 reason=signal: /tmp/fmfault.eRb4hY/lab-home/state/wedged-worker.status
2026-10-22T09:25:21Z   watcher stdout/stderr: signal: /tmp/fmfault.eRb4hY/lab-home/state/wedged-worker.status
2026-10-22T09:25:21Z   delivered wake lines in this cycle: 0
0
2026-10-22T09:25:21Z   triage tail: 
2026-10-22T09:25:21Z   counter=<absent> mode=- sentinel=absent permanent=absent queued-terminal-rows=0
2026-10-22T09:25:32Z cycle[escalation-1] fault=0 exit=0 woke=1 reason=stale: wedge-lab:wedged (idle 4s, possible wedge, escalation 1)
2026-10-22T09:25:32Z   watcher stdout/stderr: stale: wedge-lab:wedged (idle 4s, possible wedge, escalation 1)
2026-10-22T09:25:32Z   delivered wake lines in this cycle: 1
2026-10-22T09:25:32Z   triage tail: [2026-10-22T11:25:24+0200] absorbed busy (no completed turn) timer reset: wedge-lab:wedged|
2026-10-22T09:25:32Z   counter=1 mode=664 sentinel=absent permanent=absent queued-terminal-rows=0
2026-10-22T09:25:40Z cycle[cap-fire] fault=1 exit=1 woke=0 reason=none
2026-10-22T09:25:40Z   delivered wake lines in this cycle: 0
0
2026-10-22T09:25:40Z   triage tail: [2026-10-22T11:25:34+0200] absorbed busy (no completed turn) timer reset: wedge-lab:wedged|[2026-10-22T11:25:40+0200] wedge escalation-counter reset FAILED AND rollback ALSO FAILED on wedge-lab:wedged - sentinel set (TTL 600); no wake-amplification|
2026-10-22T09:25:40Z   counter=2 mode=444 sentinel=present permanent=present queued-terminal-rows=1
2026-10-22T09:26:27Z cycle[after-cap-fire] fault=0 exit=alive woke=0 reason=none
2026-10-22T09:26:27Z   triage tail: [2026-10-22T11:26:21+0200] wedge_timer_check: rollback-failed sentinel active for wedge-lab:wedged (TTL 600); escalations silenced to prevent queue-flood under persistent fs failure; operator can rm the sentinel for immediate re-engagement|[2026-10-22T11:26:24+0200] wedge_timer_check: rollback-failed sentinel active for wedge-lab:wedged (TTL 600); escalations silenced to prevent queue-flood under persistent fs failure; operator can rm the sentinel for immediate re-engagement|
2026-10-22T09:26:27Z   counter=2 mode=444 sentinel=present permanent=present queued-terminal-rows=1
--- wake queue after the cap fire ---
  stale	stale: wedge-lab:wedged (idle 4s, possible wedge, escalation 1)
  stale	stale: wedge-lab:wedged (idle 4s, possible wedge, escalation 2), PERMANENTLY-WEDGED: FM_WE
2026-10-22T09:26:27Z end of arm

\### ARM-C: BASE tree 6eb8b7f (pre-fix), same fault (differential oracle)
2026-10-22T09:26:28Z == ARM-C same fault on the pre-fix watcher (base 6eb8b7f) ==
2026-10-22T09:26:28Z watcher: ~/.no-mistakes/worktrees/8b845ac61faf/01M5H99YV8374277W16TR2XHXG/.live-scratch/base/bin/fm-watch.sh (df4b1b0)
2026-10-22T09:26:28Z lab: /tmp/fmfault.vzXrm3/lab-home state: /tmp/fmfault.vzXrm3/lab-home/state window: wedge-lab:wedged key: wedge-lab_wedged
2026-10-22T09:26:28Z pane is a real process: bash pid=1964550
2026-10-22T09:26:28Z capture: claude> working (elapsed 00:00:01)||||||||||||||||||||||||
2026-10-22T09:26:35Z cycle[first-sight] fault=0 exit=0 woke=1 reason=signal: /tmp/fmfault.vzXrm3/lab-home/state/wedged-worker.status
2026-10-22T09:26:35Z   watcher stdout/stderr: signal: /tmp/fmfault.vzXrm3/lab-home/state/wedged-worker.status
2026-10-22T09:26:35Z   delivered wake lines in this cycle: 0
0
2026-10-22T09:26:35Z   triage tail: 
2026-10-22T09:26:35Z   counter=<absent> mode=- sentinel=absent permanent=absent queued-terminal-rows=0
2026-10-22T09:26:45Z cycle[escalation-1] fault=0 exit=0 woke=1 reason=stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 1)
2026-10-22T09:26:45Z   watcher stdout/stderr: stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 1)
2026-10-22T09:26:45Z   delivered wake lines in this cycle: 1
2026-10-22T09:26:45Z   triage tail: [2026-10-22T11:26:39+0200] absorbed busy (no completed turn) timer reset: wedge-lab:wedged|
2026-10-22T09:26:45Z   counter=1 mode=664 sentinel=absent permanent=absent queued-terminal-rows=0
2026-10-22T09:26:53Z cycle[cap-fire] fault=1 exit=0 woke=1 reason=~/.no-mistakes/worktrees/8b845ac61faf/01M5H99YV8374277W16TR2XHXG/.live-scratch/base/bin/fm-watch.sh: line 2126: /tmp/fmfault.vzXrm3/lab-home/state/.wedge-escalations-wedge-lab_wedged: Permission denied
2026-10-22T09:26:53Z   watcher stdout/stderr: ~/.no-mistakes/worktrees/8b845ac61faf/01M5H99YV8374277W16TR2XHXG/.live-scratch/base/bin/fm-watch.sh: line 2126: /tmp/fmfault.vzXrm3/lab-home/state/.wedge-escalations-wedge-lab_wedged: Permission denied
2026-10-22T09:26:53Z   watcher stdout/stderr: stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2), PERMANENTLY-WEDGED: FM_WEDGE_MAX_ESCALATIONS=2 reached - no further wedge escalations for this WINDOW while its cap marker stands: until FM_CAP_HORIZON_SECS elapses, the crew resumes, or the operator manually removes STATE/.wedge-permanent-<key>
2026-10-22T09:26:53Z   delivered wake lines in this cycle: 1
2026-10-22T09:26:53Z   triage tail: [2026-10-22T11:26:48+0200] absorbed busy (no completed turn) timer reset: wedge-lab:wedged|[2026-10-22T11:26:53+0200] wedge permanently capped: wedge-lab:wedged (escalation 2, max 2, hash abebac7b7640)|
2026-10-22T09:26:53Z   counter=2 mode=444 sentinel=absent permanent=present queued-terminal-rows=1
2026-10-22T09:27:03Z cycle[after-cap-fire] fault=0 exit=1 woke=0 reason=none
2026-10-22T09:27:03Z   delivered wake lines in this cycle: 0
0
2026-10-22T09:27:03Z   triage tail: [2026-10-22T11:26:56+0200] absorbed busy (no completed turn) timer reset: wedge-lab:wedged|[2026-10-22T11:27:03+0200] wedge escalation counter write FAILED on wedge-lab:wedged - cap state rolled back and the wedge path silenced (TTL 600), since a ceiling whose count cannot be recorded cannot stop the next poll's escalation; operator can rm the sentinel for immediate re-engagement|
2026-10-22T09:27:03Z   counter=2 mode=444 sentinel=present permanent=present queued-terminal-rows=1
--- wake queue after the cap fire ---
  stale	stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 1)
  stale	stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2), PERMANENTLY-WEDGED: FM_WE
2026-10-22T09:27:03Z end of arm
Evidence: live gating arm: unconfigured home (no FM_WEDGE_MAX_ESCALATIONS at all) with the counter file never writable

Source: live gating arm: unconfigured home (no FM_WEDGE_MAX_ESCALATIONS at all) with the counter file never writable

2026-10-22T09:41:29Z == ARM-D unconfigured home (no FM_WEDGE_MAX_ESCALATIONS at all) with the counter file never writable ==
2026-10-22T09:41:29Z watcher: ~/.no-mistakes/worktrees/8b845ac61faf/01M5H99YV8374277W16TR2XHXG/bin/fm-watch.sh (df4b1b0)
2026-10-22T09:41:29Z lab: /tmp/fmfault.hHCAv9/lab-home state: /tmp/fmfault.hHCAv9/lab-home/state window: wedge-lab:wedged key: wedge-lab_wedged
2026-10-22T09:41:29Z pane is a real process: bash pid=2135757
2026-10-22T09:41:29Z capture: claude> working (elapsed 00:00:01)||||||||||||||||||||||||
2026-10-22T09:41:38Z cycle[first-sight] fault=0 exit=0 woke=1 reason=signal: /tmp/fmfault.hHCAv9/lab-home/state/wedged-worker.status
2026-10-22T09:41:38Z   watcher stdout/stderr: signal: /tmp/fmfault.hHCAv9/lab-home/state/wedged-worker.status
2026-10-22T09:41:38Z   delivered wake lines in this cycle: 0
0
2026-10-22T09:41:38Z   triage tail: 
2026-10-22T09:41:38Z   counter=<absent> mode=- sentinel=absent permanent=absent queued-terminal-rows=0
2026-10-22T09:41:48Z cycle[escalation-1] fault=0 exit=0 woke=1 reason=stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 1)
2026-10-22T09:41:48Z   watcher stdout/stderr: stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 1)
2026-10-22T09:41:48Z   delivered wake lines in this cycle: 1
2026-10-22T09:41:48Z   triage tail: [2026-10-22T11:41:42+0200] absorbed busy (no completed turn) timer reset: wedge-lab:wedged|
2026-10-22T09:41:48Z   counter=1 mode=664 sentinel=absent permanent=absent queued-terminal-rows=0
2026-10-22T09:42:01Z cycle[cap-fire] fault=1 exit=0 woke=1 reason=stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2)
2026-10-22T09:42:01Z   watcher stdout/stderr: stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2)
2026-10-22T09:42:02Z   delivered wake lines in this cycle: 1
2026-10-22T09:42:02Z   triage tail: [2026-10-22T11:41:54+0200] absorbed busy (no completed turn) timer reset: wedge-lab:wedged|[2026-10-22T11:41:59+0200] wedge_timer_check: escalation counter write FAILED for wedge-lab:wedged (/tmp/fmfault.hHCAv9/lab-home/state/.wedge-escalations-wedge-lab_wedged); the next poll restarts this window's count at 1|
2026-10-22T09:42:02Z   counter=1 mode=444 sentinel=absent permanent=absent queued-terminal-rows=0
2026-10-22T09:42:14Z cycle[post-escalation-2] fault=0 exit=0 woke=1 reason=stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2)
2026-10-22T09:42:14Z   watcher stdout/stderr: stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2)
2026-10-22T09:42:14Z   delivered wake lines in this cycle: 1
2026-10-22T09:42:14Z   triage tail: [2026-10-22T11:42:09+0200] absorbed busy (no completed turn) timer reset: wedge-lab:wedged|[2026-10-22T11:42:13+0200] wedge_timer_check: escalation counter write FAILED for wedge-lab:wedged (/tmp/fmfault.hHCAv9/lab-home/state/.wedge-escalations-wedge-lab_wedged); the next poll restarts this window's count at 1|
2026-10-22T09:42:14Z   counter=1 mode=444 sentinel=absent permanent=absent queued-terminal-rows=0
2026-10-22T09:42:23Z cycle[post-escalation-3] fault=0 exit=0 woke=1 reason=stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2)
2026-10-22T09:42:23Z   watcher stdout/stderr: stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2)
2026-10-22T09:42:23Z   delivered wake lines in this cycle: 1
2026-10-22T09:42:23Z   triage tail: [2026-10-22T11:42:17+0200] absorbed busy (no completed turn) timer reset: wedge-lab:wedged|[2026-10-22T11:42:22+0200] wedge_timer_check: escalation counter write FAILED for wedge-lab:wedged (/tmp/fmfault.hHCAv9/lab-home/state/.wedge-escalations-wedge-lab_wedged); the next poll restarts this window's count at 1|
2026-10-22T09:42:23Z   counter=1 mode=444 sentinel=absent permanent=absent queued-terminal-rows=0
2026-10-22T09:42:32Z cycle[after-cap-fire] fault=0 exit=0 woke=1 reason=stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2)
2026-10-22T09:42:32Z   watcher stdout/stderr: stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2)
2026-10-22T09:42:32Z   delivered wake lines in this cycle: 1
2026-10-22T09:42:32Z   triage tail: [2026-10-22T11:42:26+0200] absorbed busy (no completed turn) timer reset: wedge-lab:wedged|[2026-10-22T11:42:31+0200] wedge_timer_check: escalation counter write FAILED for wedge-lab:wedged (/tmp/fmfault.hHCAv9/lab-home/state/.wedge-escalations-wedge-lab_wedged); the next poll restarts this window's count at 1|
2026-10-22T09:42:32Z   counter=1 mode=444 sentinel=absent permanent=absent queued-terminal-rows=0
--- wake queue after the cap fire ---
  stale	stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 1)
  stale	stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2)
  stale	stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2)
  stale	stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2)
  stale	stale: wedge-lab:wedged (idle 3s, possible wedge, escalation 2)
2026-10-22T09:42:32Z end of arm
Evidence: tests/fm-watch-wedge-cap.test.sh on df4b1b0: 23 ok, 0 not ok, SUITE_EXIT=0

Source: tests/fm-watch-wedge-cap.test.sh on df4b1b0: 23 ok, 0 not ok, SUITE_EXIT=0

ok - FM_WEDGE_MAX_ESCALATIONS=0 keeps the cap inert and never writes a cap marker
ok - wedge cap fires PERMANENTLY-WEDGED at FM_WEDGE_MAX_ESCALATIONS and writes the window-scoped cap marker
ok - subsequent polls on the same hash stay silent while the window-scoped cap marker stands
ok - the window-scoped cap marker silences a hash-churning pane across all post-cap polls
ok - the cap is bound by FM_CAP_HORIZON_SECS and re-fires after the horizon elapses
ok - operator rm of the cap marker lifts the cap and the next wedge re-accumulates from 1
ok - non-integer FM_WEDGE_MAX_ESCALATIONS falls back to 0 and the cap stays inert
ok - an escalation counter the shell cannot compare is read as a fresh count of 1, never as a count the arithmetic wrapped around
ok - the rollback-failed sentinel silences the wedge path within FM_ROLLBACK_SENTINEL_TTL_SECS and still reports a gone endpoint
ok - an escalation count the state dir refuses fails safe under a configured cap and silences nothing without one
ok - a window silenced by the rollback-failure sentinel keeps the probe on its escalation cadence, not once per poll
ok - a counter reset the state dir refuses ends the cycle behind the sentinel instead of walking out with a saturated counter
ok - a genuine recovery clears the cap marker and the re-wedged pane escalates again
ok - a persistent marker-write failure across two cap cycles queues exactly one PERMANENTLY-WEDGED wake
ok - a declared wait and its lift both release the cap markers, and the re-wedged pane escalates again
ok - a capped window still reports its gone endpoint exactly once across repeated polls
ok - a new wedge episode publishes its own terminal wake behind an unconsumed earlier one
ok - a capped live endpoint is probed on its own escalation cadence, not once per poll
ok - an unwritable terminal episode marker narrows suppression instead of flooding the queue
ok - every first-sight route that ends a wedge episode releases that episode's cap and lets the next wedge escalate
ok - a non-terminal stale poll ends the episode, releases the cap, and lets the fresh wedge escalate immediately
ok - with the cap off, a leftover cap marker or rollback-failure sentinel silences nothing
ok - a cap fired on the terminal-override route still reports a gone endpoint exactly once
SUITE_EXIT=0
Evidence: unconfigured-home parity against origin/main: 3 ok (identical ladder incl. demand-deep-inspection prompt; invalid cap values; harness really delivers the cap) - offline suite, not a live run

Source: unconfigured-home parity against origin/main: 3 ok (identical ladder incl. demand-deep-inspection prompt; invalid cap values; harness really delivers the cap) - offline suite, not a live run

ok - unconfigured-home wedge ladder is observably identical to upstream main across the busy ladder and the first-sight surface, and still reaches the demand-deep-inspection prompt
ok - FM_WEDGE_MAX_ESCALATIONS at 0, empty, negative, non-numeric, and out-of-range all keep the unchanged ladder through the keep-count routes: 1 2 3 4 with demand-deep-inspection at 3, no PERMANENTLY-WEDGED, no cap marker, no crash
ok - the harness really delivers FM_WEDGE_MAX_ESCALATIONS to the watcher: a configured cap of 2 fires PERMANENTLY-WEDGED at count 2 and leaves its marker standing, while every unconfigured value leaves the ladder untouched

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 3 infos
  • ℹ️ bin/fm-watch.sh:2133 - The clean-rollback branch of the new counter-reset guard logs wedge escalation-counter reset FAILED on $win - cap state rolled back, copied from the sibling marker-write branch at bin/fm-watch.sh:2122. That wording is accurate there and wrong here: the cap marker .wedge-permanent-&lt;key&gt; was already written successfully at bin/fm-watch.sh:2113 before this block, and _wedge_cap_rollback (bin/fm-watch.sh:1408) only truncates the counter, re-arms the since-file and clears write tracking - it never calls _wedge_cap_markers_clear. So the window is still silenced for FM_CAP_HORIZON_SECS, while the one operator-facing line that reports this failure says the cap state was rolled back. Reachable sequence: the post-fire truncation fails transiently (ENOSPC that clears before the rollback's own retry), the rollback's : &gt; &#34;$_esc&#34; then succeeds, _wedge_cap_rollback returns 0, this branch logs the line and exits 1 - the next polls take the cap-marker short-circuit at bin/fm-watch.sh:2029 for the rest of the horizon. In the source vocabulary cap state names the marker set that _wedge_cap_markers_clear drops (docs/architecture.md:65, bin/fm-watch.sh:1938), so the natural reading of this line is that it is not. Name what actually happened (the counter reset was rolled back; the cap marker stands) so the operator's next question - is this window still capped? - is answered by the log.
  • ℹ️ bin/fm-watch.sh:1938 - The sentinel short-circuit comment this change extended still opens from either route that has to defend cap state this state dir would not persist and then enumerates three routes (cap-marker write, escalation-count write, cap-fire counter reset) with or. either is now factually wrong in the comment that is the canonical description of when .wedge-rollback-failed-&lt;key&gt; is written. Same-class site in the changed code: none - the same route list appears only here in bin/fm-watch.sh; the doc-side lists (docs/architecture.md:66, docs/configuration.md:2740) already read as three. One-word fix (any of the routes), no behavior change.
  • ℹ️ tests/fm-watch-wedge-cap.test.sh:1032 - The new case injects its fault with chmod 444 &#34;$state/.wedge-escalations-$key&#34;, which does not restrict root, so the case fails when the suite is run as root rather than skipping. Concrete sequence: run the portable lane in a root container -> chmod 444 succeeds and the later : &gt; &#34;$escalation_file&#34; at bin/fm-watch.sh:2127 succeeds too (root bypasses the mode) -> the guard never fires, the watcher logs wedge permanently capped and exits 0, and the case fails on its own exit-code assertion at tests/fm-watch-wedge-cap.test.sh:1057. This repo already treats root-run suites as a real occurrence and handles them explicitly: tests/fm-control-relaunch.test.sh:2040 and tests/fm-claude-trust.test.sh:511 emit a skipped as root pass, and tests/fm-task-inbox.test.sh:764 notes in a comment that a chosen fault also works as root in CI. The sibling cases in this same file (tests/fm-watch-wedge-cap.test.sh:776-777, :889) use a directory in place of the counter, which is root-proof - that technique is unavailable here only because this route needs the count write at bin/fm-watch.sh:2069 to succeed first, and a directory would break it. Either add the repo's standard root skip to this case, or make the shim replace the counter with a directory (rm -f then mkdir) so : &gt; fails for root too - the latter also keeps the saturated-counter assertion working if the shim is placed after the count write rather than before the reset.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 6 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Operator has set nothing: a genuinely wedged pane keeps escalating on every threshold and still gets the demand-deep-inspection prompt, with no PERMANENTLY-WEDGED row and no cap marker ✅ pass live FM_WATCH_WEDGE_CAP_LIVE=1 bash tests/fm-watch-wedge-cap-live.test.sh - part 0 of wedge-cap-live-lab-transcript.txt: escalations 1, 2, 3 ('demand-deep-inspection: same pane has wedge-escalated 3 times…
Operator sets FM_WEDGE_MAX_ESCALATIONS=3: the same wedged pane publishes exactly one terminal PERMANENTLY-WEDGED wake at the bound, writes the window-scoped cap marker, and every later poll is silent… ✅ pass live wedge-cap-live-lab-transcript.txt parts 1 and 1b: one cycle printed PERMANENTLY-WEDGED with 'FM_WEDGE_MAX_ESCALATIONS=3 reached', cap markers on disk: 1, then two silence probes with woke=0 inside the…
The counter reset is opt-in and effective: after the cap's horizon elapses with no operator action, the same pane is audible again starting at escalation 1 (the fire reset the counter), not off a satu… ✅ pass live wedge-cap-live-lab-transcript.txt part 2: 'post-horizon cycle 1 -> woke=1 reason=stale: wedged-lab:wedged (idle 242s, possible wedge, escalation 1)'; independently, ARM-A of wedge-cap-reset-fault-live…
Adversarial: a state dir that accepts the count write and the cap-marker write but refuses the post-fire counter reset is not walked past - no inline capped wake, cycle ends 1, rollback-failure sentin… ✅ pass live ARM-B in wedge-cap-reset-fault-live.txt: cycle[cap-fire] exit=1 woke=0 with 0 delivered wake lines, triage 'wedge escalation-counter reset FAILED AND rollback ALSO FAILED ... sentinel set (TTL 600)',…
Differential oracle: the identical live workload with the identical injected fault, replayed against the pre-fix watcher (base 6eb8b7f), proceeds past the failed reset - raw permission error, 'wedge p… ✅ pass live ARM-C in wedge-cap-reset-fault-live.txt, against .live-scratch/base/bin/fm-watch.sh extracted with git archive 6eb8b7f: cycle[cap-fire] exit=0 woke=1 with the 'Permission denied' diagnostic and the…
Adversarial gating: an unconfigured home (no FM_WEDGE_MAX_ESCALATIONS at all) driven with the counter file never writable never enters the new guard - no rollback sentinel, no cap marker, no PERMANENT… ✅ pass live wedge-cap-unconfigured-fault-live.txt: six cycles, every one a plain stale escalation, triage 'wedge escalation counter write FAILED ... the next poll restarts this window's count at 1', counter mode4…
Unconfigured-home parity: with the cap unset, 0, empty, negative, non-numeric or out of range, the ladder is observably identical to upstream main (1 2 3 4 with the deep-inspection prompt at 3) includ… ⏸️ untested no The only run of this scenario is bash tests/fm-watch-wedge-cap-unconfigured-parity.test.sh, an offline differential against origin/main's watcher that reaches the wedge ladder through a stubbed tmux…
  • FM_WATCH_WEDGE_CAP_LIVE=1 bash tests/fm-watch-wedge-cap-live.test.sh (real tmux 3.4 lab server on a lab-private socket, real wedged process, real bin/fm-watch.sh at df4b1b0; unceiled baseline arm, ceiled arm, silence probes, post-horizon release)
  • three-arm live fault drive against bin/fm-watch.sh (temporary driver .live-scratch/wedge-cap-reset-fault.sh, removed after the run; one disposable bin/fm-lab-home.sh lab home + tmux server per arm): ARM-A no fault at FM_WEDGE_MAX_ESCALATIONS=2, ARM-B fault injected so the state dir refuses only the post-fire counter reset, ARM-C the identical fault replayed against the base watcher extracted with git archive 6eb8b7f
  • unconfigured-home gating arm: no FM_WEDGE_MAX_ESCALATIONS passed at all, counter file flipped read-only on every rm, 6 watcher cycles (ARM-D)
  • bash tests/fm-watch-wedge-cap.test.sh (23 assertions incl. the branch's new regression test for the refused post-fire reset; SUITE_EXIT=0)
  • bash tests/fm-watch-wedge-cap-unconfigured-parity.test.sh (differential against origin/main's own bin/ tree: unconfigured parity, invalid-value parity, harness-delivers-the-cap control) - offline differential through a stubbed tmux boundary, not counted as live
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @LorenzoMinghini, and thanks again for #7552. It's merged as bd866530, including the opt-in counter reset Kun asked for.

This PR is that same branch re-raised after the merge, so GitHub sees all 26 commits again and reports conflicts with main in 6 files. Your pipeline's own review note says the same thing. Compared with the merged tree, the only new content is b99a65f: it guards the cap-fire escalation-counter reset with the existing rollback and sentinel, adds two doc clarifications and test_wedge_cap_unwritable_counter_reset_fails_safe, plus small wording fixes from f7451b9b. That guard sits inside the configured-cap fire branch, so contract-class: opt-in (my own read). Homes without FM_WEDGE_MAX_ESCALATIONS set never reach it. VISION: it aligns. It strengthens a fail-safe path and changes nothing on the default path.

Waiting on you: could you rebase this onto current main (bd866530) so it carries only that delta, retitle it as a follow-up (for example "guard the wedge-cap counter reset"), and re-raise it with git push no-mistakes? CI can't run while the branch conflicts. Once it's a clean delta with green CI and the attestation on that head, it can take the opt-in merge path.

@LorenzoMinghini
LorenzoMinghini force-pushed the fm/wedge-cap-clean-2605 branch from f7451b9 to 5af4072 Compare October 22, 2026 10:42
@LorenzoMinghini LorenzoMinghini changed the title feat(fm-watch): add opt-in per-window cap on wedge escalations fix(bin): guard the wedge cap-fire counter reset with the cap-state rollback Oct 22, 2026
…-host.test.sh from the local 789123 ms to 1192918 ms, the one completed successful CI sample (run 39642852135, job 119276758966), and let the LPT packer rebalance. The guard was not weakened (PORTABLE_SERIAL_MAX_WEIGHT_MS=1200000, PORTABLE_SERIAL_SHARDS=9, coverage guard and packing-boundary check untouched) and nothing was hand-placed. New packed hint sums of the 9 serial shards (ms): 1=1192918 (1 script), 2=1139923 (18), 3=1139903 (30), 4=1139922 (30), 5=1139917 (30), 6=1139886 (29), 7=1139891 (30), 8=1139880 (29), 9=1139911 (31). Total 228 scripts = the serial lane exactly; max 1192918 < 1200000, so it fits. Packing guard: bin/fm-test-run.sh --check-coverage -> FM_TEST_COVERAGE ok total=268 parallel=24 parallel_max_ms=665545 parallel_imbalance_ms=2 parallel_unhinted=0 serial=228 serial_shards=9 serial_unhinted=15 serial_max_ms=1192918 serial_budget_ms=1200000 herdr=16, exit 0. tests/fm-test-run.test.sh passes both packing contracts: 'coverage guard bounds the unmeasured share and serial packing within twenty minutes' and 'serial packing accepts the exact budget and refuses one millisecond above it'. bin/fm-doc-audience-check.sh ok (surfaces=124 local_links=851). docs/fm-test-portable-shards.md now states the same 1192918 ms for that script, citing run 39642852135 (documented duration == packed weight), and adds the required honesty note in the same paragraph style: run 39765114423 cancelled this script alone in a shard at the 30-minute job cap and upstream run 39618934309 hangs identically, so the weight is a fit to the 20-minute packing target, not a cure, and the underlying slowness is an upstream defect this branch does not own. No other file, weight, test or doc line touched. Unrelated pre-existing failure, verified by git stash at base commit 5af4072: tests/fm-session-lock-ancestry.test.sh asserts 'the pty-host was not reparented to init after the daemon ended' and fails identically on the unmodified tree (sandbox pty behaviour); the --jobs family-admission assertion in the same suite fails only because of it. Not caused by this change
@kunchenguid
kunchenguid merged commit 314ed46 into kunchenguid:main Oct 22, 2026
19 checks passed
@kunchenguid

Copy link
Copy Markdown
Owner

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

Thanks for rebasing it down to the clean follow-up delta. On head d08b9364, the cap-fire counter reset now gets the same rollback-and-sentinel defence as its two sibling cap-state writes. It stays inside the configured-cap branch, so homes that haven't set FM_WEDGE_MAX_ESCALATIONS are unchanged (contract-class opt-in, my own read). VISION aligns: it strengthens a fail-safe path and leaves the default path alone. The attestation matched this head, live validation was go (6/7), all 19 checks were green, and GitHub reported it CLEAN. It landed as 314ed460.

roderik added a commit to roderik/firstmate-rex that referenced this pull request Oct 23, 2026
…ex integrations (#11)

* feat: add auto-detected Rex session backend (kunchenguid#7633)

* feat(bin): add Rex as an auto-detected session backend

Add bin/backends/rex.sh, a session-provider adapter for the Rex terminal
multiplexer, and wire it through the dispatcher, spawn, control plane,
crew state, busy evidence, and away-mode supervision.

- Auto-detect Rex from TERM_PROGRAM=rex with REX_BLOCK, after tmux and
  Herdr and before cmux; explicit --backend, FM_BACKEND, and
  config/backend still win, and a nested tmux or Herdr is never read
  as Rex.
- One focus-safe tab per task: in Firstmate's own Rex session when it
  runs directly inside Rex (confirmed against the server), otherwise in
  one session per home; new blocks are resized to 200x50; every call
  names its session and block by immutable id.
- Recovery-grade agent state from Rex's process view, OSC 7501 program
  status as positive busy evidence only while its owner is in the
  foreground chain, and a viewport derived from the last size.rows rows
  of the styled capture.
- Absence proof from a structured not-found on the recorded server
  (rex_server), so fm-control exit and relaunch work on Rex and a gone
  block is reclaimed into a fresh tab in its recorded session.
- Away mode for a Rex-hosted primary runs its daemon in a dedicated Rex
  session killed by exact id.
- Docs: docs/rex-backend.md, configuration and control-plane tables,
  and a dated live verification record; tests: a stateful fake-CLI
  suite, a real-server smoke test guarded to its own fm-test- session,
  and a Rex away-launcher e2e.

* no-mistakes(review): Recover Rex reclaim after server stops; document deferred asks

* no-mistakes(document): Correct Rex documentation and consolidate stale backend guidance

* fix(bin): guard the wedge cap-fire counter reset with the cap-state rollback (kunchenguid#7625)

* no-mistakes(review): wedge cap: guard the cap-fire counter reset with rollback

* no-mistakes(document): docs: repair shard-pack wording and wedge-cap marker shorthand

* no-mistakes(review): docs: correct away-release terminal-row bound claim

* no-mistakes(document): docs: cover third guarded cap-state write in watcher comment

* no-mistakes(ci): Reweighted the packing hint for tests/fm-supervision-host.test.sh from the local 789123 ms to 1192918 ms, the one completed successful CI sample (run 39642852135, job 119276758966), and let the LPT packer rebalance. The guard was not weakened (PORTABLE_SERIAL_MAX_WEIGHT_MS=1200000, PORTABLE_SERIAL_SHARDS=9, coverage guard and packing-boundary check untouched) and nothing was hand-placed. New packed hint sums of the 9 serial shards (ms): 1=1192918 (1 script), 2=1139923 (18), 3=1139903 (30), 4=1139922 (30), 5=1139917 (30), 6=1139886 (29), 7=1139891 (30), 8=1139880 (29), 9=1139911 (31). Total 228 scripts = the serial lane exactly; max 1192918 < 1200000, so it fits. Packing guard: bin/fm-test-run.sh --check-coverage -> FM_TEST_COVERAGE ok total=268 parallel=24 parallel_max_ms=665545 parallel_imbalance_ms=2 parallel_unhinted=0 serial=228 serial_shards=9 serial_unhinted=15 serial_max_ms=1192918 serial_budget_ms=1200000 herdr=16, exit 0. tests/fm-test-run.test.sh passes both packing contracts: 'coverage guard bounds the unmeasured share and serial packing within twenty minutes' and 'serial packing accepts the exact budget and refuses one millisecond above it'. bin/fm-doc-audience-check.sh ok (surfaces=124 local_links=851). docs/fm-test-portable-shards.md now states the same 1192918 ms for that script, citing run 39642852135 (documented duration == packed weight), and adds the required honesty note in the same paragraph style: run 39765114423 cancelled this script alone in a shard at the 30-minute job cap and upstream run 39618934309 hangs identically, so the weight is a fit to the 20-minute packing target, not a cure, and the underlying slowness is an upstream defect this branch does not own. No other file, weight, test or doc line touched. Unrelated pre-existing failure, verified by git stash at base commit 5af4072: tests/fm-session-lock-ancestry.test.sh asserts 'the pty-host was not reparented to init after the daemon ended' and fails identically on the unmodified tree (sandbox pty behaviour); the --jobs family-admission assertion in the same suite fails only because of it. Not caused by this change

* fix(bin): restore watcher downtime before main-only hand-back (kunchenguid#6588)

* fix(bin): restore inherited handling before main-only hand-back

* Restored downtime so an earlier engine turn could not suppress a later
  main-owned close while leaving a healthy successor behind
* Routed restoration failures through the existing Stop-hook alarm
  instead of silently discarding the hand-back
* Added host-and-hook regressions plus attended and away idle-return
  controls to separate missing monitoring from status classification

* no-mistakes(test): Assert ordered stale event in returned-driver controls

* no-mistakes(document): Document main-only hand-back downtime restoration and failure

* no-mistakes(document): Correct host header on main-only downtime republish

* test(herdr): bound the piped composer probe with fm_run_timed instead of GNU timeout (kunchenguid#7636)

* feat: add Rex push notifications and cursor-aware composer detection (kunchenguid#7639)

* feat(rex): push blocked edges from Rex program status through a bounded Lua reader

Rex joins Herdr as a push-capable backend: a bounded rex do reader streams
program_status_changed, child_exited, and block_closed for the watched task
blocks, and a trusted blocked edge wakes the supervisor with Rex's blocked
kind and message in the reason. The per-pane dedupe moves into the shared
transition lib, the record gains a detail field, and gone edges end the wait
for an immediate poll. The real-Rex test isolation is shared by both smokes.

* fix(rex): anchor the composer read on Rex's cursor position

Rex's format method reports the cursor alongside the styled grid, so the
composer verdict now uses the same cursor-anchored read as tmux and falls
back to the cursorless read only where that is unknown. OpenCode 1.19 draws
a status line below its composer, which made every cursorless read of an
idle OpenCode worker on Rex unknown and refused steers, exit, and relaunch.

* test(rex): add a live composer guard for every installed harness on Rex

* docs(rex): record push-event and per-tool live evidence on Rex

* no-mistakes(document): Clarify Rex documentation and shared transition ownership

* no-mistakes(ci): Fixed flaky public-followup fixture teardown: killing only the remote worker child allowed its supervisor to restart and race directory removal. Cleanup now uses the existing whole-worker-tree stop helper. Verified the full public-followup suite, remote-job orphan-reap suite, shell syntax, and git diff checks all pass

* feat(bin): notify owned PR conflicts and failing required checks behind an opt-in flag (kunchenguid#7634)

* refactor(bin): share the branch-to-PR lookup through fm-pr-lib

* feat(bin): notify owned PR health changes behind an opt-in flag

* no-mistakes(review): drop status-line ownership, key checks per name, remove PR wait rule

* no-mistakes(review): rediscover the branch PR once the cached one is final

* no-mistakes(review): refuse retired re-enrollment, require marked checks, verify owned records

* no-mistakes(document): note shared branch-to-PR lookup in scripts table

* fix(bin): notify reported failures when no checks are required

* no-mistakes(document): inventory PR health flag and state, note new pr-forge member

* test: isolate real-Rex suites on private servers (kunchenguid#7649)

* Isolate real Rex tests with private servers

* no-mistakes(review): Trap Rex cleanup early and prove passive-read autostart guard

* no-mistakes(document): Consolidate Rex test isolation documentation

* fix: distinguish outdated tools from missing tools (kunchenguid#5688)

* fix(bin): report an outdated bootstrap tool instead of a missing one

detect_local_tools printed "MISSING:" for a treehouse without --lease, a
no-mistakes below 1.46.0, a gh-axi below its floor, and an incompatible
tasks-axi or quota-axi, so a supervisor read an installed tool as absent
and took the first-install remediation again.

Report those as "OUTDATED:" with the installed version, the requirement
and the tool's own upgrade command: treehouse update, no-mistakes update,
gh-axi update and quota-axi update. tasks-axi ships no self-updater, so it
keeps its install command. "MISSING:" stays for absent tools only, and
lavish-axi keeps PRESENTATION_UNAVAILABLE with its text fallback.

Update the bootstrap-diagnostics handler, the AGENTS.md section 13 trigger
list and the operator diagnostics in docs/configuration.md, and cover
absent, below-floor and at-floor for every floored tool in
tests/fm-bootstrap.test.sh.

* no-mistakes(document): Documented distinct bootstrap tool diagnostics

* fix(bin): reuse the tasks-axi check's own probe results

Rendering the tasks-axi OUTDATED requirement text ran the two `--help`
capability probes again after the compatibility check had already run
them, including when session start handed bootstrap an incompatible
verdict. The check now records the reason behind its verdict - the
version floor, or the capability probes the build fails - and reuses it,
both within the process and across the existing one-hop handoff, so
naming a missing capability costs no second probe pass. A build below the
floor is answered by its version alone and never pays for capability
probes it cannot use.

The bootstrap tests that simulate a tool as absent removed it from the
fake bin directory while bootstrap kept searching the fallback base PATH,
so a real host install could satisfy the lookup instead of the expected
MISSING line. Those cases now hide the tool from the base path as well,
and a new case pins the contrast between a bare and a curated fallback.

Verified: the touched bootstrap suite passes, and its probe-count and
capability assertions fail against the pre-fix scripts. Run with a
fallback base PATH carrying real installs of the absent tools, the
pre-fix suite fails on "absent treehouse reports a missing tool" while
the fixed suite passes every case.

* no-mistakes(document): Documented missing versus outdated tool diagnostics

* no-mistakes(document): Refresh outdated-tool documentation

* no-mistakes(review): Reuse shared version parser for outdated diagnostics

* no-mistakes(document): Correct outdated-tool diagnostics documentation

* no-mistakes(document): Align toolchain upgrade documentation

* fix(skills): keep main's bootstrap-diagnostics description and only add OUTDATED

* fix(bin): clarify ahoy skill legacy session-start exclusion to require verbatim match (kunchenguid#7530)

* Clarify ahoy legacy startup exclusion

* Fix quoted payload code span

* fix(bin): resolve timeout/gtimeout to executable paths via type -P (kunchenguid#7637)

* fix(timeout): bypass shell builtins when invoking external runners

* no-mistakes(review): Remove redundant slashless runner resolution from external timeout

* fix(bin): count answered captain holds moved to the Done archive as durable (kunchenguid#6094)

* fix: count answered captain holds in the Done archive at the completion gate

Done retention moves closed markdown rows into the configured Done archive,
which tasks-axi show never reads, so verify, complete, and scout teardown
refused an answered captain hold once retention archived it. The completion
gate now reads the newest archived block for an attested entry, under its
exact or legacy identity, and accepts it only through a recorded resolution.
Unanswered archived closes and holds found nowhere still refuse.

* no-mistakes(document): document Done-archive durability in captain-hold verification record

* no-mistakes(ci): Fixed the selected Greptile findings in bin/fm-captain-hold.sh (all in the Done-archive read path added by this PR). code_change_needed=true. ci-3 (Archived reads can hang): task_show_archived() now bounds the replayed archive `tasks-axi show` with the same read bound the live backlog read uses (FM_BACKLOG_ROW_TIMEOUT_SECS via fm_run_timed, sanitising a non-positive/padded value to 10s, mirroring fm_backlog_row_show). A bound hit is treated as 124, not absence: task_show_archived returns 124 and prints a loud reason; archived_entry() propagates 124; verify_entry_durable() exits 124 on the archived-read bound (alongside its existing resolve 124 handling); verify_hold_durable() exits 124 rather than reading the row as absent. So verify can no longer hang and complete can no longer stay blocked while holding the origin metadata lock. ci-4 (User-level archive setting ignored): added captain_markdown_archive_setting(), which resolves the [markdown] archive key with tasks-axi's own source precedence — the backlog root's .tasks.toml first, then $HOME/.tasks-axi/config.toml — before the existing default of done-archive.md beside the backlog; a relative value still resolves against the backlog root, which I verified empirically matches tasks-axi (root config wins over home config; a relative home-config value resolves against the backlog root; default stays data/done-archive.md). tasks-axi exposes no command for the archive path, so re-parsing with matched precedence is the available approach. Added test_archived_answer_in_a_user_configured_archive_satisfies_the_gate, which sets the archive only in a fixture $HOME/.tasks-axi/config.toml and drives the whole hold→answer→retention→verify/complete/teardown flow with that HOME, asserting the answered call archived to the relocated location still satisfies the gate. ci-5 (repeated archive scans, P2): left unchanged per the instruction's opt-out. A clean reuse of the row archived_entry already found is not small: archived_entry runs inside a command substitution, so its TASK_SHOW_OUTPUT dies with the subshell and cannot be handed to verify_hold_durable without restructuring both to pass the loaded row through the current shell. The growth is bounded (O(archive size) per attested entry) and P2, so hardening it would add more machinery than the fix warrants. Unanswered archived closes and holds found nowhere still refuse (existing test coverage retained). Verification: `bash -n` clean; pinned ShellCheck 0.11.0 (`shellcheck -x bin/fm-captain-hold.sh`) reports 0 findings; tasks-axi archive-precedence behaviour confirmed by direct experiment. The full fm-captain-hold-lifecycle.test.sh suite (which exercises both the pre-existing archived-gate test and the new user-config test) is slow due to beads spawns and was still running at report time; recommend confirming it green before merge. ci-1/ci-2 need no code change (action_required fork workflow runs awaiting maintainer approval), per the recorded user decision

* no-mistakes(document): Document Done-archive reads under backlog row timeout

* docs: say only the archive row replay is bounded, not the archive scan

* no-mistakes(document): Move Done-archive rule to the complete section

* fix(bin): read a PR with no CI checks as unverified, not checks green (kunchenguid#7627)

* fix(bin): optionally read a PR with no CI checks as unverified, not checks green

nm_ci_checks_state maps the ci log marker "no CI checks reported - still
monitoring" to green, the same verdict as "all CI checks passed". A pull
request that no check ever ran against therefore surfaced as "checks green: PR
ready for review" (kunchenguid#3216).

Add a no-checks verdict for that marker, returned only in a home that creates
config/ci-no-checks-not-green. The run-step consumer reports working with a
detail naming the real condition, and the status-log override no longer
promotes a crew's own "checks green" report while that marker is the latest.
Without the flag every reading is unchanged.

Co-authored-by: Harlan Do <[email protected]>

* no-mistakes(document): document ended-monitor reading under the zero-checks flag

* fix(bin): read a PR with no CI checks as unverified on every home

The ci log marker "no CI checks reported - still monitoring" now always
yields the no-checks verdict, so a pull request that no check ran against is
reported as working instead of checks green (kunchenguid#3216). The opt-in flag, its
docs section, and its skill entry are removed, the default-path test now
expects working, and the usage header and architecture note describe the
no-checks reading.

---------

Co-authored-by: Harlan Do <[email protected]>

* fix(bin): correct the wedge reset-failure log line and make the fault test root-safe (kunchenguid#7650)

* no-mistakes(review): correct the counter-reset log line, the sentinel comment, and the root proof

Three findings the review step recorded but never applied, all in this branch's own change.

The clean-rollback branch of the counter-reset guard logged "cap state rolled back", copied
from the sibling marker-write branch. That is wrong here: the cap marker was already written
before this block and _wedge_cap_rollback only truncates the counter, re-arms the since-file
and clears write tracking - it never clears the markers. The window therefore stays silenced
for FM_CAP_HORIZON_SECS, so the one operator-facing line must say that rather than claim the
cap state was rolled back. The rollback behaviour is unchanged and no marker-clear call is
added: the marker is deliberately kept so the window stays quiet.

The sentinel short-circuit comment opened "from either route that has to defend cap state"
and then enumerated three routes. Wording only.

The new regression case injected its fault with chmod 444, which does not restrict root, so
under root the guard would never fire and the case would fail on its own exit-code
assertion. It now skips as root the way this suite's other mode-based faults do. The
assertions are untouched: as the ordinary user the case still proves the guard.

* no-mistakes(review): name both ways a capped window leaves the silence in the reset log line

The tier-0 message for a refused post-fire escalation-counter reset says the cap marker
stands, so the window stays silent until its horizon elapses. That names one release route
where there are two: wedge_episode_end drops the marker through _wedge_cap_markers_clear, so
any episode-ending route ends the silence early, and docs/configuration.md records deleting
the marker as the operator's way to re-engage a capped window at once. This tier writes no
sentinel, so the marker is the only thing left to remove.

The message now names the horizon, an episode-ending route, and the operator remedy, in one
line in the same shape and position as its sibling tier-0 messages. The rollback behaviour,
the marker handling and the tier are unchanged.

* no-mistakes(document): correct root-skip comment's mode-bit precedent in wedge-cap test

* fix: resurface queued wakes from handling successors (kunchenguid#7466)

* fix(bin): resurface wakes appended while a handling successor is parked

The supervision host parks on the handling successor it starts for a wake
its engine handled, and a handling successor never resurfaced recovery, so
a row another script appended during the park (a captain inbox note from
the Basecamp integration) sat queued until an unrelated close - four hours
in the observed case.

A handling successor now records the newest queued sequence at its start
and closes once with the recovery wake while a newer row is still queued;
a newer row already consumed only advances that mark, so the predecessor's
delivered episode is still never re-announced.

Follow-ups, not built here:
- A row appended in the short window between a handled close and its
  successor's start (about a second) is below the successor's mark; if the
  engine handles that close without claiming the row, the row waits for the
  next close. Closing that window needs the host to treat rows left queued
  after a handled attended turn as main's, which is a separate host change.
- After a machine reboot the primary session does not restart on its own,
  so queued wakes wait until it is resumed by hand. Either auto-resume the
  primary session after boot, or alert the owner when the primary session
  is down while wakes are queued.

* no-mistakes(review): Close handling-successor startup wake race

* no-mistakes(test): Stabilize parked-host inbox wake regression timeout

* no-mistakes(document): Clarify handling-successor wake continuity guarantees

* no-mistakes(ci): Stabilized the flaky remote secondmate lifecycle test by extending the auto-relaunch watcher deadline from ~30 to ~60 seconds. The CI runner exceeded the old deadline by about 3 seconds; the changed production branch was not reachable in this fixture. `bash -n` and `git diff --check` pass. The full test was attempted but exceeded the 600-second local execution limit before reaching this case

* no-mistakes(ci): Fixed flaky concurrent Herdr recovery testing by retrying only documented session-lock contention after both competitors finish. Cleanup now handles fixture-owned read-only hooks. Targeted E2E passed; bash syntax and diff checks passed. Shellcheck reported only existing SC1091 source-following notices

* no-mistakes(test): Preserve successor wake boundaries across handoffs

* no-mistakes(test): Revert successor boundaries and drain teardown fixture wake

* no-mistakes(test): Notify main when downtime handback publication fails

* no-mistakes(test): Revert downtime handback notification changes

* no-mistakes(document): Correct stale supervision wake routing documentation

* fix(bin): stop the supervision host deadlocking and re-announcing handed-back closes

Two defects in this branch's handling-successor changes surfaced as the
"Behavior portable serial 2" shard hanging at its 30-minute limit.

A TERM that lands while the host settles a handled turn's successor handoff
left the host holding the wake-queue and recovery-marker locks; its exit
cleanup then waited forever on the queue lock it still owned. The cleanup now
releases those locks if this process owns them before releasing its grant.

When an accepted close turns main-only at its turn, the host hands it back and
leaves the successor running, but republished the episode as pending
downtime, so that successor re-announced the same close and exited. The
handback now republishes the episode as already announced; a later durable
append still opens a pending episode the successor recovers.

* no-mistakes(test): Park on successor after handling settlement failure

* no-mistakes(test): Use tab-delimited handled-settlement failure logs

---------

Co-authored-by: Caleb LeNoir <[email protected]>

* fix(bin): preserve accents in pending-reply summaries (kunchenguid#7618)

* fix(bin): keep accented letters in pending-reply request summaries

fm_pending_reply_summarize deleted every byte outside printable ASCII, so a Portuguese summary lost its accents: "não faça a correção" was stored as "no faa a correo". It now removes control characters only. The 120-character cap counts UTF-8 characters from lead bytes, so it never splits a letter under any caller locale, including the C locale.

* no-mistakes(document): Documentar preservação de acentos nos resumos

---------

Co-authored-by: Alexandre Custodio <[email protected]>

* feat: add OpenRouter support for typed dispatch resolution (kunchenguid#7149)

* Add explicit OpenRouter Jev dispatch resolution

* no-mistakes(document): Clarify dispatch documentation and remove stale duplicates

* chore: exclude local Stele binding from PR

* no-mistakes(document): Correct dispatch help and never-send documentation

* ci: retrigger CI after a timed-out test shard

* no-mistakes(document): Correct dispatch architecture documentation ownership

* feat(bin): publish lane capacity facts with beat pressure and keyed limits (kunchenguid#6983)

Opt-in: fm-watch.sh publishes state/lane-capacity.json via bin/fm-capacity.sh --publish only while config/lane-capacity exists; adds beat pressure and keyed limits to fm-capacity.sh. Unconfigured fm-capacity output unchanged.

* fix(bin): propagate contribution input assembly failures (kunchenguid#5359)

* fix(bin): transport contribution-input JSON through slurpfile, not argjson

bin/fm-fleet-snapshot.sh --contribution-input passed the full backlog and
task-record JSON to jq through --argjson. A single --argjson argument is
capped by the kernel's MAX_ARG_STRLEN (131072 bytes on Linux), so a large
enough backlog made the kernel refuse to exec jq while the script still
exited 0 with a broken result.

Transport both documents through temporary files and --slurpfile, matching
the pattern the default snapshot path already uses, and propagate a
non-zero exit when that jq invocation fails.

Fixes kunchenguid#5349

* test: narrow contribution-input regression to final assembly failure

The ARG_MAX transport is already fixed on main by kunchenguid#6830, so keep only the regression proving a failing final jq assembly exits non-zero.

* fix: correct Rex secondmate grouping and lifecycle (kunchenguid#7656)

* Fix Rex secondmate session lifecycle

* no-mistakes(review): Retire Rex secondmate sessions under the owning home identity

* no-mistakes(review): Limit Rex FM_ROOT label override to secondmate launches

* no-mistakes(document): Clarify Rex secondmate grouping and lifecycle documentation

* docs: describe the merged Rex spawn gate and guide contents

---------

Co-authored-by: Kun Chen <[email protected]>
Co-authored-by: Lorenzo Minghini <[email protected]>
Co-authored-by: zachlandes <[email protected]>
Co-authored-by: Tiago <[email protected]>
Co-authored-by: YifuGu <[email protected]>
Co-authored-by: laffy-999 <[email protected]>
Co-authored-by: chsong <[email protected]>
Co-authored-by: Hamish <[email protected]>
Co-authored-by: Harlan Do <[email protected]>
Co-authored-by: Caleb LeNoir <[email protected]>
Co-authored-by: Caleb LeNoir <[email protected]>
Co-authored-by: Alexandre Custodio <[email protected]>
Co-authored-by: Alexandre Custodio <[email protected]>
Co-authored-by: Pedro Guimarães <[email protected]>
Co-authored-by: Konner Moshier <[email protected]>
Co-authored-by: Oscar Santis Brante <[email protected]>