Skip to content

fix(bin): renew watcher beacon after each completed step in slow cycles - #24

Merged
twilwa merged 5 commits into
mainfrom
fm/fm-watch-slow-cycle
Sep 26, 2026
Merged

twilwa merged 5 commits into
mainfrom
fm/fm-watch-slow-cycle

Conversation

@twilwa

@twilwa twilwa commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Intent

fm-watch.sh: under load, watcher cycles of 3-7 minutes exceed the 300 s beacon grace and trip auto-arm FAILED on every turn end.

Observation (2026-09-26 05:00-05:45, 8-core VPS, 1-minute load 25-33): every started fm-watch.sh cycle in state/.watch-cycle-exits.log ran 183-438 s and exited on actionable-signal with beacon_age equal to the cycle duration, meaning state/.last-watcher-beat is touched once at cycle start and never again before the cycle ends.
Once beacon age passes the 300 s grace (fm_poll_derived_grace), the Stop hook’s auto-arm refuses (lock held by a live pid, stale beat), fails twice, and the supervisor gets the ‘auto-arm FAILED’ notice on every turn end until the watcher exits on its own.
Four episodes in 45 minutes; all self-healed; no wake lost.

Ask:
(1) instrument one cycle, reading the main home read-only, to find which per-iteration step dominates under load (candidates: per-report fm-crew-state, secondmate liveness, procevent reconcile, PR polls, custom checks);
(2) fix it so a slow-but-alive cycle cannot look dead: touch the beacon after each expensive step or per direct report, and/or raise the derived grace when poll-independent work exceeds it;
(3) cut the dominant cost if it is redundant (for example, cache per-report state within a cycle).
docs/turnend-guard.md and docs/watcher-continuity.md own the liveness contract; do not change the 300 s floor’s meaning without updating those docs.

What Changed

  • bin/fm-watch.sh adds a watch_step_done helper. The watcher now renews state/.last-watcher-beat at cycle start, after each expensive step, and after each direct report, signal file and heartbeat scan. The expensive steps are fleet-ledger, home-summary, reconcile requests, pending replies, secondmate liveness and stall checks, procevent, inactive outcomes, each custom check, signal scan and triage. A slow cycle that is still alive no longer lets the beacon age past the 300 s grace. A step that hangs still does not renew it. Setting FM_WATCH_TRACE turns on an optional per-step trace (<epoch> <pid> <step>) that can be used to find which step is slow.
  • fm_pending_reply_tick in bin/fm-pending-reply-lib.sh makes each cycle cheaper by reading every pending-reply record in a single pass, instead of running grep, tail and cut once per field. It also only calls fm_pending_reply_close_escalation for a resolved reply that was escalated and not yet closed, so it no longer takes a lock for every old resolved reply.
  • docs/turnend-guard.md and docs/watcher-continuity.md now describe when the beacon renews within a cycle and document FM_WATCH_TRACE; the max(300, FM_POLL + 60) grace is unchanged. The new tests/fm-watch-beacon.test.sh checks that after a slow custom check makes the beacon stale, the live watcher renews it and auto-arm attaches to it. In tests/fm-watch-triage.test.sh, wait_poll_cycle now counts cycle-start trace lines instead of watching the beacon's mtime, because the beacon now changes during a cycle.

Risk Assessment

✅ Low: The change adds beacon renewals only after completed steps, and only in the executing watcher that holds the lock; the pending-reply scan now reads each record once with the same skip conditions as the locked close path; every prior-round finding is fixed in the current code, and existing beacon readers (midturn-healthy mtime comparison, stale/stuck grace checks) still behave correctly.

Testing

I ran real fm-watch.sh and fm-watch-arm.sh processes against throwaway FM_HOMEs, both at HEAD and at base f843953. Load was scaled down with slow trusted custom checks and with direct-report panes in a private real tmux server whose capture-pane calls were slowed by a shim. At HEAD the beacon age never went above 5 s across 20–30 s cycles, while at base it grew with the cycle length (24–30 s). In a mid-cycle scenario whose beacon was already older than the 300 s floor, base arm printed the incident's "lock held by live pid but heartbeat is stale" message followed by "watcher: FAILED", while HEAD printed "attached". A hung check let the beacon age until its timeout fired, and the 300 s floor is unchanged. A live cycle over 400 historical pending-reply records still closed the one open escalation. Function-level timing put the tick at 2.8 s on HEAD versus 103 s on base. The new tests/fm-watch-beacon.test.sh fails on base and passes on HEAD, and tests/fm-pending-reply.test.sh passed. The modified tests/fm-watch-triage.test.sh was still running when this phase ended: 86 ok, 0 not ok, no exit code yet. I used the private tmux server in place of a Herdr lab, and this change touches no Herdr-specific path.

  • Live validation: ✅ go - 7 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Slow-but-alive cycle (5 custom checks x 4 s) keeps the beacon fresh throughout the cycle ✅ pass live slow-cycle-head.txt: max beacon age 5 s across a 22 s cycle, and FM_WATCH_TRACE shows a renewal at check:slowN. slow-cycle-base.txt: age rises steadily to 24 s.
Slow per-direct-report inspection (5 real tmux report panes, 4 s capture latency each) renews the beacon per report ✅ pass live per-report-head.txt: max age 4 s, and the trace shows report:r1..r5 about 4–5 s apart. per-report-base.txt: age climbs to 30 s. signal-path-head.txt covers the per-signal renewal path.
Stop-hook arm (real fm-watch-arm.sh, derived 300 s grace) attaches mid-cycle to a watcher whose cycle already exceeded 300 s, instead of FAILED ✅ pass live arm-midcycle-head.txt: 'watcher: attached pid=… (beacon 3s)'. arm-midcycle-base.txt: 'lock held by live pid … heartbeat is stale … (>300s)' then 'watcher: FAILED', which reproduces the incident.
Adversarial: a hung step (check sleeps 1000 s, 10 s timeout) cannot keep the beacon fresh indefinitely ✅ pass live hung-check-head.txt: beacon ages 1 s to 10 s while blocked and renews only after the timeout kills the check.
Regression test reproduces the reported failure: fails before the fix, passes after ✅ pass live beacon-test-base-f843953.txt: 'not ok - completed slow check left a stale beacon'. beacon-test-head.txt: ok.
Dominant-cost cut: 400 historical resolved pending-reply records no longer dominate the cycle, and an open escalation still closes ✅ pass live pending-replies-head.txt: the live pending-replies step took 4 s, the open escalation was closed once, 200/200 closed records were untouched, and no locks were left. pending-reply-tick-timing.txt (fun…
Liveness contract: 300 s floor unchanged, FM_WATCH_TRACE off by default ✅ pass live trace-off-and-grace.txt
Modified watcher triage suite (new wait_poll_cycle synchronization) still passes ⏸️ untested no The suite is long, and it was still running when this phase had to return its result: 86 ok, 0 not ok, no exit code yet. Remote CI owns its final result. Re-run it with `bash tests/fm-watch-triage.tes…
Evidence: Live slow-cycle beacon timeline, HEAD

Source: Live slow-cycle beacon timeline, HEAD

== HEAD: 5 checks x 4s, check-timeout 30s, watcher pid 1704268 ==
t=  1.0s beacon_age=0s alive=yes
t=  2.1s beacon_age=0s alive=yes
t=  3.1s beacon_age=2s alive=yes
t=  4.2s beacon_age=3s alive=yes
t=  5.2s beacon_age=4s alive=yes
t=  6.2s beacon_age=5s alive=yes
t=  7.3s beacon_age=1s alive=yes
t=  8.3s beacon_age=2s alive=yes
t=  9.3s beacon_age=3s alive=yes
t= 10.4s beacon_age=4s alive=yes
t= 11.4s beacon_age=1s alive=yes
t= 12.4s beacon_age=2s alive=yes
t= 13.4s beacon_age=3s alive=yes
t= 14.5s beacon_age=4s alive=yes
t= 15.5s beacon_age=1s alive=yes
t= 16.5s beacon_age=2s alive=yes
t= 17.6s beacon_age=3s alive=yes
t= 18.6s beacon_age=4s alive=yes
t= 19.7s beacon_age=0s alive=yes
t= 20.7s beacon_age=1s alive=yes
t= 21.8s beacon_age=2s alive=yes
t= 22.8s beacon_age=3s alive=yes
t= 23.9s beacon_age=4s alive=yes
t= 24.9s beacon_age=1s alive=yes
MAX beacon age during run: 5s
-- FM_WATCH_TRACE step log (epoch pid step) --
1790400749 1704268 cycle-start
1790400749 1704268 fleet-ledger
1790400749 1704268 home-summary
1790400749 1704268 reconcile-requests
1790400749 1704268 pending-replies
1790400749 1704268 secondmate-liveness
1790400749 1704268 secondmate-stall
1790400750 1704268 procevent
1790400750 1704268 inactive-outcomes
1790400750 1704268 check:slow1.check.sh
1790400755 1704268 check:slow2.check.sh
1790400759 1704268 check:slow3.check.sh
1790400763 1704268 check:slow4.check.sh
1790400768 1704268 check:slow5.check.sh
1790400772 1704268 checks
1790400772 1704268 signal-scan
1790400772 1704268 heartbeat
Evidence: Live slow-cycle beacon timeline, base f843953

Source: Live slow-cycle beacon timeline, base f843953

== BASE-f843953: 5 checks x 4s, check-timeout 30s, watcher pid 1704248 ==
t=  1.1s beacon_age=0s alive=yes
t=  2.1s beacon_age=1s alive=yes
t=  3.1s beacon_age=3s alive=yes
t=  4.2s beacon_age=4s alive=yes
t=  5.2s beacon_age=5s alive=yes
t=  6.3s beacon_age=6s alive=yes
t=  7.3s beacon_age=7s alive=yes
t=  8.3s beacon_age=8s alive=yes
t=  9.4s beacon_age=9s alive=yes
t= 10.4s beacon_age=10s alive=yes
t= 11.4s beacon_age=11s alive=yes
t= 12.5s beacon_age=12s alive=yes
t= 13.5s beacon_age=13s alive=yes
t= 14.5s beacon_age=14s alive=yes
t= 15.6s beacon_age=15s alive=yes
t= 16.6s beacon_age=16s alive=yes
t= 17.6s beacon_age=17s alive=yes
t= 18.6s beacon_age=18s alive=yes
t= 19.7s beacon_age=19s alive=yes
t= 20.8s beacon_age=20s alive=yes
t= 21.8s beacon_age=21s alive=yes
t= 22.8s beacon_age=22s alive=yes
t= 23.9s beacon_age=23s alive=yes
t= 25.0s beacon_age=24s alive=yes
MAX beacon age during run: 24s
-- no FM_WATCH_TRACE output (hook absent in this build) --
Evidence: Arm attaches mid-cycle (HEAD)

Source: Arm attaches mid-cycle (HEAD)

watcher: attached pid=1782602 (beacon 3s)

== HEAD ==
watcher pid 1782602 alive=yes, mid-cycle inside b-slow check
beacon age now: 3s  (derived grace: 300)
--- fm-watch-arm.sh (FM_POLL=20, FM_GUARD_GRACE unset -> derived) ---
watcher: attached pid=1782602 (beacon 3s)
Evidence: Arm FAILED mid-cycle (base f843953, incident reproduction)

Source: Arm FAILED mid-cycle (base f843953, incident reproduction)

watcher: lock held by live pid 1782596 but heartbeat is stale for 843719625s (>300s); inspect or stop that watcher before re-arming. watcher: FAILED - watcher cycle exited 1 without an actionable reason

== BASE-f843953 ==
watcher pid 1782596 alive=yes, mid-cycle inside b-slow check
beacon age now: 843719625s  (derived grace: 300)
--- fm-watch-arm.sh (FM_POLL=20, FM_GUARD_GRACE unset -> derived) ---
watcher: lock held by live pid 1782596 but heartbeat is stale for 843719625s (>300s); inspect or stop that watcher before re-arming.
watcher: FAILED - watcher cycle exited 1 without an actionable reason
Evidence: Per-direct-report renewal with real tmux panes, HEAD

Source: Per-direct-report renewal with real tmux panes, HEAD

== HEAD: 5 direct reports in private tmux (/tmp/fm-perrep.vC7j/tmux), capture latency 4s ==
  tmux window fm-r1
  tmux window fm-r2
  tmux window fm-r3
  tmux window fm-r4
  tmux window fm-r5
t= 2s beacon_age=1s alive=yes
t= 3s beacon_age=2s alive=yes
t= 4s beacon_age=0s alive=yes
t= 5s beacon_age=1s alive=yes
t= 6s beacon_age=2s alive=yes
t= 7s beacon_age=3s alive=yes
t= 8s beacon_age=4s alive=yes
t= 9s beacon_age=0s alive=yes
t=10s beacon_age=1s alive=yes
t=11s beacon_age=2s alive=yes
t=12s beacon_age=3s alive=yes
t=13s beacon_age=4s alive=yes
t=14s beacon_age=0s alive=yes
t=15s beacon_age=1s alive=yes
t=16s beacon_age=2s alive=yes
t=17s beacon_age=3s alive=yes
t=18s beacon_age=0s alive=yes
t=19s beacon_age=1s alive=yes
t=20s beacon_age=2s alive=yes
t=21s beacon_age=3s alive=yes
t=22s beacon_age=4s alive=yes
t=23s beacon_age=0s alive=yes
t=24s beacon_age=1s alive=yes
t=25s beacon_age=2s alive=yes
t=26s beacon_age=3s alive=yes
t=27s beacon_age=4s alive=yes
t=28s beacon_age=1s alive=yes
t=29s beacon_age=2s alive=yes
t=30s beacon_age=3s alive=yes
MAX beacon age during run: 4s
-- FM_WATCH_TRACE (epoch pid step) --
1790400886 1866374 cycle-start
1790400886 1866374 fleet-ledger
1790400886 1866374 home-summary
1790400886 1866374 reconcile-requests
1790400886 1866374 pending-replies
1790400886 1866374 secondmate-liveness
1790400886 1866374 secondmate-stall
1790400886 1866374 procevent
1790400889 1866374 inactive-outcomes
1790400889 1866374 checks
1790400889 1866374 signal-scan
1790400894 1866374 report:r1
1790400899 1866374 report:r2
1790400903 1866374 report:r3
1790400908 1866374 report:r4
1790400913 1866374 report:r5
1790400913 1866374 heartbeat
-- watcher stderr (tail) --
Evidence: Per-direct-report timeline, base f843953

Source: Per-direct-report timeline, base f843953

== BASE-f843953: 5 direct reports in private tmux (/tmp/fm-perrep.JP9L/tmux), capture latency 4s ==
  tmux window fm-r1
  tmux window fm-r2
  tmux window fm-r3
  tmux window fm-r4
  tmux window fm-r5
t= 2s beacon_age=1s alive=yes
t= 3s beacon_age=2s alive=yes
t= 4s beacon_age=3s alive=yes
t= 5s beacon_age=4s alive=yes
t= 6s beacon_age=5s alive=yes
t= 7s beacon_age=6s alive=yes
t= 8s beacon_age=7s alive=yes
t= 9s beacon_age=8s alive=yes
t=10s beacon_age=9s alive=yes
t=11s beacon_age=10s alive=yes
t=12s beacon_age=11s alive=yes
t=13s beacon_age=12s alive=yes
t=14s beacon_age=13s alive=yes
t=15s beacon_age=14s alive=yes
t=16s beacon_age=15s alive=yes
t=17s beacon_age=16s alive=yes
t=18s beacon_age=17s alive=yes
t=19s beacon_age=18s alive=yes
t=20s beacon_age=19s alive=yes
t=21s beacon_age=21s alive=yes
t=22s beacon_age=22s alive=yes
t=23s beacon_age=23s alive=yes
t=24s beacon_age=24s alive=yes
t=25s beacon_age=25s alive=yes
t=26s beacon_age=26s alive=yes
t=27s beacon_age=27s alive=yes
t=28s beacon_age=28s alive=yes
t=29s beacon_age=29s alive=yes
t=30s beacon_age=30s alive=yes
MAX beacon age during run: 30s
-- no FM_WATCH_TRACE output --
-- watcher stderr (tail) --
Evidence: Signal-path renewal, HEAD

Source: Signal-path renewal, HEAD

== HEAD: 5 direct reports in private tmux (/tmp/fm-perrep.cSbM/tmux), capture latency 4s ==
  tmux window fm-r1
  tmux window fm-r2
  tmux window fm-r3
  tmux window fm-r4
  tmux window fm-r5
t= 1s beacon_age=0s alive=yes
t= 2s beacon_age=1s alive=yes
t= 3s beacon_age=2s alive=yes
t= 4s beacon_age=0s alive=yes
t= 5s beacon_age=1s alive=yes
t= 6s beacon_age=1s alive=yes
t= 7s beacon_age=2s alive=yes
t= 8s beacon_age=3s alive=yes
t= 9s beacon_age=0s alive=yes
t=10s beacon_age=0s alive=yes
t=11s beacon_age=1s alive=yes
t=12s beacon_age=2s alive=yes
t=13s beacon_age=3s alive=yes
t=14s beacon_age=4s alive=yes
t=15s beacon_age=5s alive=no
t=16s beacon_age=6s alive=no
t=17s beacon_age=7s alive=no
t=18s beacon_age=8s alive=no
t=19s beacon_age=10s alive=no
t=20s beacon_age=11s alive=no
t=21s beacon_age=12s alive=no
t=22s beacon_age=13s alive=no
t=23s beacon_age=14s alive=no
t=24s beacon_age=15s alive=no
t=25s beacon_age=16s alive=no
t=26s beacon_age=17s alive=no
MAX beacon age during run: 17s
-- FM_WATCH_TRACE (epoch pid step) --
1790400849 1821045 cycle-start
1790400849 1821045 fleet-ledger
1790400849 1821045 home-summary
1790400849 1821045 reconcile-requests
1790400849 1821045 pending-replies
1790400849 1821045 secondmate-liveness
1790400849 1821045 secondmate-stall
1790400849 1821045 procevent
1790400852 1821045 inactive-outcomes
1790400852 1821045 checks
1790400853 1821045 signal-scan
1790400857 1821045 signal:r1
1790400857 1821045 signal:r2
1790400857 1821045 signal:r3
1790400858 1821045 signal:r4
1790400858 1821045 signal:r5
1790400858 1821045 signal-triage
-- watcher stderr (tail) --
Evidence: Hung check does not keep the beacon fresh

Source: Hung check does not keep the beacon fresh

== HEAD-hung-check: 1 checks x 1000s, check-timeout 10s, watcher pid 1738994 ==
t=  2.1s beacon_age=1s alive=yes
t=  3.1s beacon_age=1s alive=yes
t=  4.1s beacon_age=2s alive=yes
t=  5.2s beacon_age=3s alive=yes
t=  6.2s beacon_age=4s alive=yes
t=  7.2s beacon_age=5s alive=yes
t=  8.3s beacon_age=6s alive=yes
t=  9.3s beacon_age=7s alive=yes
t= 10.4s beacon_age=8s alive=yes
t= 11.4s beacon_age=9s alive=yes
t= 12.4s beacon_age=10s alive=yes
t= 13.5s beacon_age=1s alive=yes
t= 14.6s beacon_age=2s alive=yes
MAX beacon age during run: 10s
-- FM_WATCH_TRACE step log (epoch pid step) --
1790400782 1738994 cycle-start
1790400782 1738994 fleet-ledger
1790400782 1738994 home-summary
1790400782 1738994 reconcile-requests
1790400782 1738994 pending-replies
1790400782 1738994 secondmate-liveness
1790400782 1738994 secondmate-stall
1790400782 1738994 procevent
1790400783 1738994 inactive-outcomes
1790400783 1738994 check:slow1.check.sh
1790400793 1738994 checks
1790400793 1738994 signal-scan
1790400793 1738994 heartbeat
Evidence: Beacon regression test on base (fails)

Source: Beacon regression test on base (fails)

not ok - completed slow check left a stale beacon

real	0m17.485s
user	0m2.005s
sys	0m6.487s
rc=1
Evidence: Beacon regression test on HEAD (passes)

Source: Beacon regression test on HEAD (passes)

ok - slow completed step refreshes beacon and arm attaches to the live watcher

real	0m34.684s
user	0m1.865s
sys	0m7.555s
rc=0
Evidence: Live pending-replies cycle over 400 records

Source: Live pending-replies cycle over 400 records

== HEAD: 400 historical resolved records + 1 resolved-with-open-escalation ==
open escalation before cycle: pending-reply-d2ea8598517323af
pending-replies step (FM_WATCH_TRACE epochs): 4s
escalation_closed_epoch on open record after cycle: '1790400972'
-- hibit.status lines appended by the watcher --
  resolved [key=pending-reply-d2ea8598517323af] [at=1790400972]: pending-reply-resolved: task=hibit pending-reply-id=d2ea8598517323af via=
historical closed records untouched: 200/200 still closed at 4710; lock files left: 0
Evidence: Pending-reply tick timing HEAD vs base

Source: Pending-reply tick timing HEAD vs base

HEAD 2.81s BASE-f843953 103.03s

fm_pending_reply_tick over 400 resolved records (200 escalated+closed, 200 never escalated); function-level timing, NOT a live watcher run
HEAD             2.81s
BASE-f843953   103.03s
load at measurement: 13.82 13.75 14.65
Evidence: FM_WATCH_TRACE off by default; derived grace floor unchanged

Source: FM_WATCH_TRACE off by default; derived grace floor unchanged

== FM_WATCH_TRACE unset: one real watcher cycle, then list new files ==
watcher alive: yes; beacon age: 4s
files under the throwaway home matching *trace*: 0 (the single find hit was the fm-notrace.XXXX temp dir itself; re-checked with find -mindepth 1)
stray step-trace lines in watcher cwd/home: 0

== fm_poll_derived_grace (liveness floor unchanged) ==
FM_POLL=1    -> grace 300
FM_POLL=15   -> grace 300
FM_POLL=20   -> grace 300
FM_POLL=240  -> grace 300
FM_POLL=300  -> grace 360
FM_POLL=900  -> grace 960
Evidence: Pending-reply suite output

Source: Pending-reply suite output

ok - normal correlated reply resolves once (idempotent)
ok - completed turn with no report triggers exactly one recovery
ok - recovery attempts reconcile without reinjection
ok - recovery reply resolves the original expectation
ok - second missed turn escalates once and remains durable
ok - escalations and replies wake; the home's own escalation close stays quiet
ok - failed escalation publication remains retryable and publishes once
ok - legacy escalation closes under the shared default key
ok - legacy escalation cannot close an unrelated default-key decision
ok - foreign correlated blocker cannot impersonate a pending-reply escalation
ok - concurrent resolution closes one keyed escalation exactly once
ok - concurrent escalation yields to a late correlated reply
ok - transport success cannot masquerade as reply success
ok - undelivered records remain immutable across scan paths
ok - delivery confirmation fallback reconciles durably
ok - delivery confirmation serializes with reconciliation
ok - unrelated events and stale correlation ids cannot resolve
ok - restart preserves expectation and exact parent destination
ok - wrong-home reports are detected but do not silently acknowledge
ok - direct unmarked captain input creates no expectation
ok - fm-send marked secondmate path creates pending and embeds corr
ok - status-pointed document resolves the expectation
ok - optional helper report resolves without being required for correctness
ok - backend busy/idle observation covers Pi/Claude paths without conversation scrape
ok - tmux and zellij unknown states use bounded capture fallback
ok - pending replies scope Kimi capture fallback by recorded harness
ok - tick skips terminal records and reuses target observations
ok - correlations are reused only for matching open task records
ok - tick end-to-end: miss -> one recovery -> escalate -> durable
ok - failed transport discards undelivered expectation only
ok - a remote repost waits for the reply channel and still fires on a real miss
ok - a mirrored correlated remote reply resolves without any repost
ok - same-basename self-home corr= is restated onto the parent channel and resolves
ok - same-basename reply resolves at the recovery failure boundary
ok - a child-file mate-home sighting is not copied and still escalates
ok - mechanical helper writes the parent channel from verb, corr, and note
ok - remote parent-replies.status is not classified as wrong-home
ok - local parent-replies.status remains wrong-home evidence
ok - an escalated correlation stays retryable only while undelivered
ok - all pending-reply tests passed

real	1m58.077s
user	0m19.902s
sys	1m35.131s
rc=0
Evidence: Watcher triage suite output (partial: still running when this phase returned)

Source: Watcher triage suite output (partial: still running when this phase returned)

ok - status_span_has_actionable: benign absorbed, captain events surfaced, classified events not re-fired
ok - an actionable event is not hidden by later routine appends, and is named as itself
ok - span classification retires closed decisions and surfaces rejected transitions for reconciliation
ok - span classification from an offset keeps closed decisions closed and live ones live
ok - a malformed seen signature causes the whole status log to be classified
ok - stale_is_terminal: terminal status surfaces, non-terminal and no-status are benign
ok - classifier primitives: keyed decisions and activity phases, captain relevance, window-to-task, and overrides
ok - crew_is_provably_working: only working+run-step/pane is provable; idle/finished/parked/failed/unknown surface
ok - status_is_paused: only the leading paused verb matches, paused is not captain-relevant, and the two declared-wait verbs stay separable
ok - crew_absorb_class: working/paused/none from one read; crew_is_paused and crew_is_provably_working agree
ok - crew_worktree_written_since: real writes are evidence; no worktree, no anchor, quiet trees, .git churn and a mate's own home are not
ok - an empty FM_WORKTREE_WRITE_PRUNE widens the probe to the whole depth-bounded tree instead of disabling it
ok - an empty FM_WORKTREE_WRITE_PRUNE exported into the environment prunes nothing, widening the probe
ok - the worktree write probe is wall-clock bounded, and hitting the bound reads as no write evidence
ok - signal_crew_provably_working: benign only when every referenced crew is provably working
ok - a secondmate's status signal is never absorbed as provably working; crewmates are unaffected
ok - a no-verb signal whose crew is provably working is absorbed (no exit, no queue, suppressor advanced, beacon present)
ok - a bare turn-end whose crew is provably working (busy pane) is absorbed
ok - a bare turn-end whose crew is not provably working is surfaced (the swallowed-finish fix)
ok - a bare turn-end from a pane that churned since the previous poll is absorbed
ok - pane churn starts a fresh stale-classification interval before a stopped render returns
ok - pane churn resets prior wedge escalation state before the stale-path poll
ok - a churning turn-end inside an already-open deferral window is absorbed without re-marking
ok - a bare turn-end from a pane unchanged since the previous poll still surfaces
ok - a bare turn-end backed by a malformed prior hash surfaces
ok - a bare turn-end backed by a newline-terminated prior hash surfaces
ok - a churning secondmate turn-end surfaces without a stale resurface path
ok - a turn-end whose marker key matches another recorded endpoint surfaces
ok - two metadata records sharing one endpoint make churn evidence ambiguous
ok - a batch may satisfy positive evidence independently per task
ok - per-task evidence composition stays off until the home opts in
ok - a status-bearing batch never falls through to pane-churn evidence
ok - pane-churn turn-end absorb is off until a home opts in
ok - a perpetually churning pane surfaces once its bounded deferral window is spent
ok - an unrecordable pane-churn deadline surfaces the turn-end
ok - an invalid pane-churn bound surfaces the turn-end
ok - an oversized pane-churn bound surfaces the turn-end
ok - invalid existing pane-churn deadlines surface without mutation
ok - a surfaced batch opens no partial pane-churn deadline
ok - a no-verb working: note whose crew is idle with no running pipeline is surfaced
ok - a secondmate's status note surfaces even while its own agent is busy
ok - a secondmate blocker wakes despite busy evidence and later unrelated appends
ok - a self-announced close never wakes its own home, and the next real note still does
ok - a close after OPEN DECISIONS fold never wakes its own home, and the next real note still does
ok - a folded worker decision with no home append still wakes
ok - separate answers over unclassified decisions wake once, and the next real note still does
ok - a close after OPEN DECISIONS fold still surfaces a worker failure inside the folded span
ok - a close after OPEN DECISIONS fold still surfaces unlisted secondmate lines inside the folded span
ok - captain-relevant signal is surfaced (queue + exit) and marked surfaced
ok - a needs-decision signal row's queued payload is marked needs-decision: for branch exclusion
ok - a reconciliation-required needs-decision row's queued payload is still marked needs-decision:
ok - a captain-held signal stays actionable while the crew is still working
ok - a pending-reply second-mate escalation is marked for main-only routing
ok - an ordinary blocked event remains branch-eligible
ok - a routine event containing a needs-decision phrase keeps its ordinary payload, unmarked
ok - a captain event hidden behind a later routine append is still surfaced (queue + exit)
ok - a keyed decision signal reads only the newly appended span, not the whole log
ok - a finished release reported before routine cleanup chatter is still surfaced
ok - a routine append after an already-classified event is absorbed (no re-wake)
ok - unreadable status reports are bounded without advancing classification
ok - permission recovery surfaces content from the unadvanced position
ok - a stale pane sitting on a terminal status is surfaced (queue + exit)
ok - a stale terminal-looking status is overridden and absorbed while a run is actively working, then wedge-escalated
ok - provably-working non-terminal stale is absorbed on first sight, then wedge-escalated past the threshold
ok - consecutive wedge escalations on the same pane accumulate and demand deep inspection at the threshold
ok - a pane becoming active again resets the consecutive wedge-escalation counter
ok - a record whose endpoint is dead or missing reports itself once and is never re-escalated
ok - a live wedged agent, an unattributable one, and an unreadable endpoint escalate unchanged
ok - the once-only gone report re-arms when the endpoint comes back, and reports a later death again
ok - a second death after a same-window relaunch reports in full without a live probe, and an unchanged dead pane stays silent
ok - a successor's byte-identical dead display reports in full, and the same incarnation still absorbs
ok - TERM stops a watcher blocked inside a poll and still runs its cleanup
ok - a busy worker below the turn-age bound remains working with no escalation
ok - a busy worker with a stable pane hash still escalates once its completed-turn age reaches the bound
ok - a busy worker whose pane hash changes every poll still escalates once its completed-turn age reaches the bound
ok - touching a busy worker's completed-turn marker resets the age and prevents an old-age escalation
ok - native progress resets busy age without a completed turn or notification
ok - repeated busy turn-age escalations reuse the existing escalation counter and demand deep inspection at the threshold
ok - the production default busy-turn-age bound is 3600s (5min under does not wedge, 66min over does)
ok - a busy pane under a declared pause is rechecked on the long cadence, and lifting the pause restores the wedge escalation
ok - away mode hands a busy declared pause to the daemon as a plain stale, and lifting the declaration restores the wedge escalation
ok - away mode wakes the daemon once per declaration for a busy pane whose footer ticks on every capture
ok - a not-provably-working non-terminal stale is surfaced immediately (never left to wait out the timer)
ok - a declared pause is absorbed on first sight, then re-surfaced as a recheck past the threshold, never wedge-escalated
ok - exited declared-pause and captain-held panes use bounded pause cadence while a live decision gate still surfaces once
ok - absorbed paused and captain-held replacements each start their own re-surface cadence

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 6 issues found → auto-fixed → no changes applied ✅
  • ⚠️ bin/fm-watch.sh:2647 - Custom/PR-poll check loop renews the beacon only once, after every check. The checks block runs each due *.check.sh / PR poll through run_check_capture (bounded by CHECK_TIMEOUT=30s each, plus fm_lock_acquire_wait on the PR control lock) and only calls watch_step_done once at bin/fm-watch.sh:2761. With >=10 due checks under load, one cycle can spend >300s inside this block without renewing .last-watcher-beat, reproducing the exact auto-arm 'lock held by live pid, stale beat' refusal the change targets. The intent names 'PR polls, custom checks' as candidates and asks to 'touch the beacon after each expensive step'; the commit notes check execution was suppressed during measurement, so this cost was never measured. Fix: call watch_step_done "check:$(basename "$c")" at the top of each for-loop iteration (after the previous check completed, covering every continue path).
  • ⚠️ tests/fm-watch-triage.test.sh:78 - wait_poll_cycle no longer guarantees a full cycle that started after the call. The new helper targets previous_consumed+1 cycle-starts, which only proves the cycle already running at the previous return (possibly started before the caller's mutation) completed. The old helper deleted the beacon and waited for two fresh touches, guaranteeing a cycle that began after the call. Repeated calls on one watcher (hold_watch_churn at tests/fm-watch-triage.test.sh:3754, which needs 3 post-mutation cycles; also :2562, :2752) now observe one fewer post-mutation cycle, so 'stays in loop / no wake' assertions can pass vacuously. Fix: snapshot the cycle-start count on entry and wait for entry+2; this also removes the .watch-test-consumed state file.
  • ⚠️ tests/fm-watch-triage.test.sh:88 - Tests introduce an undeclared ripgrep dependency with a silent failure mode. No test executed rg before this change; the suite uses grep. If rg is missing, rg -c ... 2&gt;/dev/null || true yields starts=0, so every wait_poll_cycle (~50 call sites) times out after 30s and returns 1. Same dependency at tests/fm-watch-beacon.test.sh:55 and :60 (rg -q). Replace with grep -c / grep -q.
  • ⚠️ tests/fm-watch-beacon.test.sh:28 - Beacon regression test also passes on the pre-fix code. The watcher runs with FM_POLL=1; on the base commit, after the slow check backdates the beacon, the remainder of the cycle plus a 1s sleep reaches the next cycle-start touch within ~1-2s, well inside the 60x0.1s health-poll window at lines 40-49, so fm_watcher_healthy succeeds without any in-cycle renewal. The test does not reproduce the reported failure. Use a much larger watcher FM_POLL so only in-cycle renewal can make the beacon healthy within the window.
  • ℹ️ bin/fm-pending-reply-lib.sh:1463 - Resolved records whose escalation was already closed still take a lock every cycle: only escalated_epoch is checked, so every historically escalated-and-closed resolved record still re-sources fm-wake-lib.sh and acquires the per-corr lock each cycle before _fm_pending_reply_close_escalation_locked returns 0 on escalation_closed_epoch. Also parse escalation_closed_epoch=* in the same read loop and skip when set.
  • ⚠️ bin/fm-watch.sh:2310 - New FM_WATCH_TRACE opt-in trace mode exceeds the intent's one-off instrumentation. The intent asked to instrument one cycle to find the dominant step (reported in the commit message) and to renew the beacon; it does not require a permanent, undocumented env-var trace mode in the watcher. The mode is now also load-bearing for tests/fm-watch-triage.test.sh wait_poll_cycle, coupling test synchronization to a diagnostic hook. Recommend removing it (or, if kept, documenting it in the docs that own the liveness contract).

🔧 No changes applied.
5 issues (4 warnings, 1 info) still open:

  • ⚠️ bin/fm-watch.sh:2647 - Custom/PR-poll check loop renews the beacon only once, after every check. The checks block runs each due *.check.sh / PR poll through run_check_capture (bounded by CHECK_TIMEOUT=30s each, plus fm_lock_acquire_wait on the PR control lock) and only calls watch_step_done once at bin/fm-watch.sh:2761. With >=10 due checks under load, one cycle can spend >300s inside this block without renewing .last-watcher-beat, reproducing the exact auto-arm 'lock held by live pid, stale beat' refusal the change targets. The intent names 'PR polls, custom checks' as candidates and asks to 'touch the beacon after each expensive step'; the commit notes check execution was suppressed during measurement, so this cost was never measured. Fix: call watch_step_done "check:$(basename "$c")" at the top of each for-loop iteration (after the previous check completed, covering every continue path).
  • ⚠️ tests/fm-watch-triage.test.sh:78 - wait_poll_cycle no longer guarantees a full cycle that started after the call. The new helper targets previous_consumed+1 cycle-starts, which only proves the cycle already running at the previous return (possibly started before the caller's mutation) completed. The old helper deleted the beacon and waited for two fresh touches, guaranteeing a cycle that began after the call. Repeated calls on one watcher (hold_watch_churn at tests/fm-watch-triage.test.sh:3754, which needs 3 post-mutation cycles; also :2562, :2752) now observe one fewer post-mutation cycle, so 'stays in loop / no wake' assertions can pass vacuously. Fix: snapshot the cycle-start count on entry and wait for entry+2; this also removes the .watch-test-consumed state file.
  • ⚠️ tests/fm-watch-triage.test.sh:88 - Tests introduce an undeclared ripgrep dependency with a silent failure mode. No test executed rg before this change; the suite uses grep. If rg is missing, rg -c ... 2&gt;/dev/null || true yields starts=0, so every wait_poll_cycle (~50 call sites) times out after 30s and returns 1. Same dependency at tests/fm-watch-beacon.test.sh:55 and :60 (rg -q). Replace with grep -c / grep -q.
  • ⚠️ tests/fm-watch-beacon.test.sh:28 - Beacon regression test also passes on the pre-fix code. The watcher runs with FM_POLL=1; on the base commit, after the slow check backdates the beacon, the remainder of the cycle plus a 1s sleep reaches the next cycle-start touch within ~1-2s, well inside the 60x0.1s health-poll window at lines 40-49, so fm_watcher_healthy succeeds without any in-cycle renewal. The test does not reproduce the reported failure. Use a much larger watcher FM_POLL so only in-cycle renewal can make the beacon healthy within the window.
  • ℹ️ bin/fm-pending-reply-lib.sh:1463 - Resolved records whose escalation was already closed still take a lock every cycle: only escalated_epoch is checked, so every historically escalated-and-closed resolved record still re-sources fm-wake-lib.sh and acquires the per-corr lock each cycle before _fm_pending_reply_close_escalation_locked returns 0 on escalation_closed_epoch. Also parse escalation_closed_epoch=* in the same read loop and skip when set.

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 7 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Slow-but-alive cycle (5 custom checks x 4 s) keeps the beacon fresh throughout the cycle ✅ pass live slow-cycle-head.txt: max beacon age 5 s across a 22 s cycle, and FM_WATCH_TRACE shows a renewal at check:slowN. slow-cycle-base.txt: age rises steadily to 24 s.
Slow per-direct-report inspection (5 real tmux report panes, 4 s capture latency each) renews the beacon per report ✅ pass live per-report-head.txt: max age 4 s, and the trace shows report:r1..r5 about 4–5 s apart. per-report-base.txt: age climbs to 30 s. signal-path-head.txt covers the per-signal renewal path.
Stop-hook arm (real fm-watch-arm.sh, derived 300 s grace) attaches mid-cycle to a watcher whose cycle already exceeded 300 s, instead of FAILED ✅ pass live arm-midcycle-head.txt: 'watcher: attached pid=… (beacon 3s)'. arm-midcycle-base.txt: 'lock held by live pid … heartbeat is stale … (>300s)' then 'watcher: FAILED', which reproduces the incident.
Adversarial: a hung step (check sleeps 1000 s, 10 s timeout) cannot keep the beacon fresh indefinitely ✅ pass live hung-check-head.txt: beacon ages 1 s to 10 s while blocked and renews only after the timeout kills the check.
Regression test reproduces the reported failure: fails before the fix, passes after ✅ pass live beacon-test-base-f843953.txt: 'not ok - completed slow check left a stale beacon'. beacon-test-head.txt: ok.
Dominant-cost cut: 400 historical resolved pending-reply records no longer dominate the cycle, and an open escalation still closes ✅ pass live pending-replies-head.txt: the live pending-replies step took 4 s, the open escalation was closed once, 200/200 closed records were untouched, and no locks were left. pending-reply-tick-timing.txt (fun…
Liveness contract: 300 s floor unchanged, FM_WATCH_TRACE off by default ✅ pass live trace-off-and-grace.txt
Modified watcher triage suite (new wait_poll_cycle synchronization) still passes ⏸️ untested no The suite is long, and it was still running when this phase had to return its result: 86 ok, 0 not ok, no exit code yet. Remote CI owns its final result. Re-run it with `bash tests/fm-watch-triage.tes…
  • bash tests/fm-watch-beacon.test.sh at HEAD and against base f843953's bin/
  • drive-slow-cycle.sh on HEAD and base (real fm-watch.sh, trusted slow custom checks)
  • drive-slow-cycle.sh &lt;root&gt; HEAD-hung-check 1 1000 16 10 (adversarial hung check)
  • drive-arm-midcycle.sh on HEAD and base (real fm-watch-arm.sh against a live mid-cycle watcher)
  • drive-per-report.sh on HEAD and base (private real tmux server, capture-pane latency shim), plus the signal-path variant
  • drive-pending-replies.sh <root> HEAD 400
  • Function-level fm_pending_reply_tick timing, HEAD vs base
  • Watcher run with FM_WATCH_TRACE unset, plus a fm_poll_derived_grace sweep
  • bash tests/fm-pending-reply.test.sh
  • bash tests/fm-watch-triage.test.sh (still running when this phase returned: 86 ok, 0 not ok)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Summary by Sourcery

Keep slow watcher cycles visibly alive while reducing pending-reply polling overhead and preserving the existing liveness grace contract.

New Features:

  • Add progress-aware watcher beacon renewal after completed cycle steps, direct reports, signal scans, and heartbeat scans, with optional FM_WATCH_TRACE diagnostics.

Bug Fixes:

  • Prevent slow but active watcher cycles from being classified as stale and causing auto-arm failures.
  • Ensure blocked watcher steps do not falsely renew the liveness beacon.

Enhancements:

  • Optimize pending-reply reconciliation by parsing each record once and avoiding redundant locks for already-closed escalations.

Documentation:

  • Document progress-based beacon renewal, diagnostic tracing, and the unchanged poll-derived grace contract.

Tests:

  • Add regression coverage for beacon renewal after slow checks and update triage synchronization to use cycle-start traces.

twilwa and others added 4 commits September 26, 2026 06:50
Scratch snapshot timing (seconds; before -> after): fleet ledger 0 -> 0; home summary 0 -> 0; reconcile requests 0 -> 0; pending replies 120 -> 7; secondmate liveness 3 -> 0; secondmate stall 0 -> 0; procevent 0 -> 1; inactive outcomes not reached -> 0; checks not reached -> 0; signal scan not reached -> 3; signal triage not reached -> 84. Baseline ended on recovery before later stages; liveness/procevent/check execution was suppressed in the scratch copy to avoid touching live routes. 377 of 378 reply records were resolved. Jevhelper rated pending replies dominant in measured baseline (confidence 0.92); signal triage was measured only after optimization.

Refresh the beacon at completed steps, per signal/report and before terminal wait; retain the 300-second floor. Make resolved-reply scanning use one shell read per record and skip unnecessary closure locks. Exercise a backdated beacon during a live slow check and real auto-arm attachment. Tests: fm-watch-beacon, fm-pending-reply, fm-watch-arm and targeted fm-watch-triage slice passed; full fm-watch-triage exceeded the contained 900-second limit without a reported failure before timeout; fm-lint passed.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @twilwa, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 20 hours and 11 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T06:00:24.242521Z 77444c5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sourcery-ai

sourcery-ai Bot commented Sep 26, 2026

Copy link
Copy Markdown

Reviewer's Guide

The PR makes watcher liveness progress-aware: fm-watch.sh refreshes its beacon only after completed work, including granular checks and report scans, while retaining stale detection for blocked steps and the existing grace policy. It also substantially optimizes pending-reply scans and adds documentation and regression coverage for slow-cycle auto-arm behavior.

Sequence diagram for progress-aware watcher beacon renewal

sequenceDiagram
    participant W as fm-watch.sh
    participant B as .last-watcher-beat
    participant C as CompletedStep
    participant A as fm-watch-arm.sh

    W->>B: watch_step_done cycle-start
    W->>C: Run expensive step
    C-->>W: Step completes
    W->>B: watch_step_done step
    W->>C: Run next step
    C-->>W: Step completes
    W->>B: watch_step_done step
    A->>B: Check beacon age
    B-->>A: Fresh beacon
    A-->>A: Attach to live watcher

    alt Step stalls
        W-->>C: Blocked step does not complete
        B-->>A: Beacon becomes stale
        A-->>A: Refuse stale live watcher
    end
Loading

Flow diagram for watcher cycle beacon checkpoints

flowchart TD
    Start[Cycle starts] --> Ledger[fleet-ledger]
    Ledger --> Beat1[watch_step_done]
    Beat1 --> Summary[home-summary and reconciliation]
    Summary --> Beat2[watch_step_done]
    Beat2 --> Replies[pending-replies and liveness checks]
    Replies --> Beat3[watch_step_done]
    Beat3 --> Checks[Each custom or PR check]
    Checks --> Beat4[watch_step_done per check]
    Beat4 --> Signals[Signal and heartbeat scans]
    Signals --> Beat5[watch_step_done per scan]
    Beat5 --> Reports[Each direct report inspection]
    Reports --> Beat6[watch_step_done per report]
    Beat6 --> Wait[Terminal wait]
    Wait --> Start
Loading

File-Level Changes

Change Details Files
Renew the watcher liveness beacon after completed work so slow but progressing cycles remain attachable without masking hung steps.
  • Added a centralized post-step beacon renewal helper with optional epoch/PID/step tracing.
  • Renewed after cycle-level work, each custom/PR check, signal and heartbeat scan, triage, and each direct-report inspection, including failure/continue paths.
  • Kept the derived grace formula and 300-second floor unchanged.
bin/fm-watch.sh
docs/turnend-guard.md
docs/watcher-continuity.md
Reduce pending-reply reconciliation cost by parsing each record once and avoiding unnecessary escalation locks.
  • Replaced repeated field extraction commands with a single record read.
  • Skipped escalation-close attempts for resolved records without an open escalation while preserving retry behavior for unresolved closures.
bin/fm-pending-reply-lib.sh
Add regression coverage and update watcher test synchronization for in-cycle beacon updates.
  • Added a slow-check beacon/auto-arm regression test.
  • Changed triage cycle waits to count cycle-start trace entries rather than beacon mtime changes.
  • Documented the beacon renewal contract and FM_WATCH_TRACE behavior.
tests/fm-watch-beacon.test.sh
tests/fm-watch-triage.test.sh
docs/turnend-guard.md
docs/watcher-continuity.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

…ests/fm-watch-beacon.test.sh loads wake-helpers.sh through a dynamic path but was missing the `# shellcheck source=tests/wake-helpers.sh` comment that every other test loading that file has. CI's lint run (--external-sources) therefore reported SC1091 and failed. Rule: every file a linted script loads must be one ShellCheck can resolve. The other file-loading lines in the files this PR changes pass the same lint run, so this file was the only one affected. Fix: added that one comment above the loading line in tests/fm-watch-beacon.test.sh. The test's behaviour does not change. Checks run: before the fix, `bin/fm-lint.sh tests/fm-watch-beacon.test.sh` (explicit paths use CI's settings) failed with exit 1 and the same SC1091 error. After the fix, `bin/fm-lint.sh` on all 4 shell files the PR changes (bin/fm-watch.sh, bin/fm-pending-reply-lib.sh, tests/fm-watch-beacon.test.sh, tests/fm-watch-triage.test.sh) exits 0, and `bash tests/fm-watch-beacon.test.sh` still passes. The change is in the working tree and not committed
@twilwa

twilwa commented Sep 26, 2026

Copy link
Copy Markdown
Owner Author

Final disposition for head 72667ed:

  • Validation: isolated no-mistakes run 01M3E0SQY74S8PXMRZ6PG62280 on claude-opus-5-5 reviewed and approved dd77993; the later commits are that run's own document-step and CI-step fixes (72667ed adds one # shellcheck source= directive to the new test).
  • CI: every check on this head passes, including Lint 1/2, all behavior shards, and the provenance check.
  • Review feedback: the Sourcery item is a rate-limit notice and the Codex and Sourcery summaries carry no findings; nothing to address.
  • Merging under the repository's standing merge policy.

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