Skip to content

fix: report delayed blocker handling in away return briefs - #44

Merged
peterOC26 merged 4 commits into
mainfrom
fm/fm-afk-blocker-check-build-b1
Nov 6, 2026
Merged

peterOC26 merged 4 commits into
mainfrom
fm/fm-afk-blocker-check-build-b1

Conversation

@peterOC26

Copy link
Copy Markdown
Owner

Intent

Away mode should notice and report when a blocker raised during the away window was never handled. On 2026-11-05 a Servora worker sat blocked for 5 h 32 m while the captain was away and the return brief never said so. Round 2 (firstmate PR 43) tried to build this check and the captain cut it after three fix rounds moved the bug (Q1779 B). On 2026-11-06 the captain approved a redesign from real logs, then a build (Q1804 Y: "q1804 y").

The design is /root/firstmate/data/fm-afk-blocker-check-redesign-d1/report.md. Its summary: stop trying to prove who handled a blocker from supervision logs; instead report, from the worker's own durable records (status log and steering inbox), how long each blocker raised during the away window sat before the first real action on it. On this home's real records every handled blocker had its first action within 0-6 minutes, and the 2026-11-05 stall shows 5 h 32 m. The return brief should carry a line such as: "servora-s15-ics-feed [key=default] blocked 09:43Z; no action for 5h32m - the longest wait this window."

Substance of the approved redesign referred to above:

At return and on subsequent check, measure the latest blocked interval per decision key on each still-live task record. Its opening epoch must be inside the away window from the stored entered_epoch through the evaluation time; never infer event time from file mtime, a wake, or observation time. Use the existing keyed status fold, including its resolved/captain-held closures and ship/scout done/failed terminal closure. A later working or paused line is not closure. For each interval take the first real action strictly after it opened: its keyed closure, a root or acknowledged steering-inbox record's at timestamp, or terminal task completion. Message prose is not parsed. Without action, measure through evaluation time. A blocker is handled when this gap is less than GRACE, default 900 seconds, with the single FM_AFK_BLOCKER_GRACE knob. Report inclusively at gap >= GRACE, including a late rescue as late rather than erasing the earlier wait.

Feed the existing Tried and failed, or could not be fixed section, longest wait first, showing task/key, blocked UTC time, first action and measured gap or no-action duration, and open/closed context. Keep the existing remediation wording on still-open blockers. Do not print handled intervals below grace. Count untimed blocked events in an honesty note without attributing them to this window, and name live task records with missing or unreadable status logs. Keep the existing catch-up gate, guard, and catchup-summary behavior unchanged; the dwell rows inform while that gate decides.

Use the worker-owned status and steering-inbox records for the predicate, independent of Pi branch, supervision-host, or away-daemon authorship and bookkeeping. The approved acceptance cases require real handled status/inbox fixtures to produce no dwell noise; the explicitly reconstructed Servora incident to show 5h32m; already-escalated daemon notices, unrelated progress, pre-entry blockers, and rotated ledgers not to count as action; needs-decision-only windows not to produce blocker rows; exact grace boundary and same-key reopening coverage; identical dwell output under all three bookkeeping sidecar shapes; and existing blocker-gate regressions unchanged. The design explicitly asks for a structural source guard excluding .supervision-host.log, .supervise-daemon.log, and branch-outcomes from the new dwell computation. Keep the reconstructed incident labelled as reconstructed. The predicate does not add actor inference, a turn counter, a watcher check, cadence, a new lock, or a fired-once ledger. During-window waking, needs-decision coverage, escalation-as-context requiring per-row queries, and cleaned-up-task history are separate follow-ups, not part of this return-time build.

What Changed

  • Report blockers raised during away windows that waited at least FM_AFK_BLOCKER_GRACE (default 900 seconds) for action, longest first, using worker status and steering inbox timestamps. Preserve late-action history and existing catch-up gating.
  • Surface untimed blocked events and missing or unreadable status logs, and document the grace setting.
  • Add real-record fixtures, a labelled reconstruction of the 5h32m Servora stall, and regression coverage for grace boundaries, reopened keys, closures, inbox timestamps, and independence from supervision bookkeeping.

Risk Assessment

⚠️ Medium: The change only adds reporting and leaves the catch-up gate, guard and catchup-summary alone, but the dwell computation can under-report or hide a real long stall when a worker repeats blocked on a key that is still open. That case shows up in this home's real records, so it is worth fixing, but it can safely follow the merge.

Testing

Three focused regression scripts and fresh wall-clock CLI scenarios passed. Live checks used shortened configurable grace; the exact reconstructed 5h32m case passed deterministic regression. CLI transcripts capture the product output. Disposable labs were removed and the worktree remained clean.

  • Live validation: ✅ go - 9 of 9 scenarios driven live against the product
Scenario Result Live Evidence
Return reports an unanswered blocker despite working, paused, and repeated blocked events ✅ pass live Live return/check CLI transcript
Prompt root or acknowledged steering, keyed resolution, captain-held transfer, and terminal completion suppress dwell noise ✅ pass live Live return/check CLI transcript
Late steering and terminal failure preserve the earlier wait and show open or closed context ✅ pass live Both live CLI transcripts
Exact grace reports inclusively, a higher grace suppresses the interval, and reopening uses the latest interval ✅ pass live Live return/check CLI transcript
Pi, host, daemon, and rotated bookkeeping cannot change blocker action timing ✅ pass live Both live CLI transcripts
Pre-entry and future blockers remain excluded; fresh mtime, pre-block steering, and message prose cannot supply action ✅ pass live Live attribution and ordering transcript
Multiple waits appear longest first with exactly one longest-wait marker ✅ pass live Live attribution and ordering transcript
Untimed events receive an honesty note and missing or unreadable live status logs are named ✅ pass live Live return/check CLI transcript
Guard retains catch-up refusal, summary preserves gate state, and resolving blockers clears the gate while questions remain ✅ pass live Live return/check CLI transcript
Evidence: Live return/check CLI transcript

Source: Live return/check CLI transcript

$ bin/fm-lab-home.sh create ~/.no-mistakes/worktrees/7f0ec18181b6/01M6R9JQBC9XXM9G75QQXE88JY/.fm-lab-dwell-_aokh_7t
~/.no-mistakes/worktrees/7f0ec18181b6/01M6R9JQBC9XXM9G75QQXE88JY/.fm-lab-dwell-_aokh_7t

exit=0
$ bin/fm-afk-contract.sh enter --words Live validation of blocker response timing
Away posture recorded at 2026-11-06T11:44:53Z: hold-for-return only. No phone channel is configured; anything that needs you waits for your return. Your away instructions are recorded verbatim; the away session will carry them out where it can, and anything it is unsure of, or that needs you, waits for your return. Destructive, irreversible, and security-sensitive actions are never pre-authorizable, whatever the words say. Expected return: not given. Spend cap: 4 concurrent workers.
Away posture (recorded):
  entered: 2026-11-06T11:44:53Z
  expected return: not given
  spend cap: 4 concurrent workers
  reach: hold-for-return only. No phone channel is configured; anything that needs you waits for your return.
  your words (verbatim):
    Live validation of blocker response timing

exit=0
worker appends live-stall: blocked [key=default] [at=1793965493]: live validation event
worker appends live-question: needs-decision [key=default] [at=1793965493]: live validation event
worker appends live-stall: working [key=default] [at=1793965494]: live validation event
worker appends live-stall: paused [key=default] [at=1793965494]: live validation event
worker appends live-stall: blocked [key=default]: live validation event
$ bin/fm-afk-return.sh begin
fm-afk-launch: away-posture record archived at ~/.no-mistakes/worktrees/7f0ec18181b6/01M6R9JQBC9XXM9G75QQXE88JY/.fm-lab-dwell-_aokh_7t/state/afk-contracts/1793965493.afk-contract
fm-afk-launch: away mode stopped; no daemon terminal was running, .afk cleared, and the posture record archived
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
●  WATCHER DOWN - SUPERVISION IS OFF
●  2 task(s) in flight, but no live watcher process holds this home lock (last beat: 2s ago).
●  Trust the emitted supervision protocol for this harness; do not use shell & for watcher repair.
●  This is a supervision warning only; the guarded operation WILL still run.
●  repair missing watcher supervision according to the session-start block for this harness; do not use shell &.
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
=== Return brief (away 2026-11-06T11:44:53Z -> 2026-11-06T11:45:00Z, 7s) ===
Supervisor health:
  - supervision ran through the away window with no detected gap (watcher beat 0s old at return)
Your instructions:
  your words at entry:
    Live validation of blocker response timing
  the away session took no action under them.
Waiting on you:
  - live-question [key=default] needs your decision: live validation event
Tried and failed, or could not be fixed:
  - live-stall [key=default] blocked 2026-11-06T11:44:53Z; no action for 7s, the longest wait this window; still blocked, firstmate remediates before ordinary work: live validation event
  - note: 1 blocked event(s) carried no time stamp and could not be attributed to this window
Landed, cleanup due:
  (nothing)
Handled while away:
  0 outcome(s) handled by the away session (0 routine, 0 escalated above)
  (no routine outcomes recorded in the store for this window)
Not started:
  (nothing)
Cost: 0 supervision outcome(s) recorded (0 routine, 0 captain); 2 task(s) live at return.
fm-afk-return: catch-up must finish before the captain request
catch-up health: supervision ran through the away window with no detected gap (watcher beat 0s old at return)
catch-up wake: OPEN DECISIONS (still open, folded from the durable status logs - not just the latest line):
catch-up wake: live-question needs-decision: live validation event
catch-up wake: live-stall blocked: live validation event
catch-up wake: OPEN DECISIONS: close one by answering it: bin/fm-send.sh <task> --resolve-key <key> '<answer>'
firstmate-actionable blocker: live-stall [key=default] live validation event
fm-afk-return: handle each blocker now, or close it with resolved [key=...] and append a durable reclassification reason, then run bin/fm-afk-return.sh check

exit=3
PASS Live unresolved blocker reports no-action dwell despite working, paused and untimed reassertion
PASS Untimed event gets honesty note and a question produces no blocker dwell
$ bin/fm-afk-return.sh guard
fm-afk-return: return catch-up is pending; remediate or durably reclassify every listed blocker, then run bin/fm-afk-return.sh check
firstmate-actionable blocker: live-stall [key=default] live validation event

exit=4
$ bin/fm-afk-return.sh catchup-summary
1	

exit=0
PASS Catchup-summary leaves gate bytes unchanged
$ bash -c . bin/fm-task-inbox-lib.sh; fm_task_inbox_write "$FM_HOME/state" "$1" "$2" steer live-stall Continue the blocked task; prose at=1970-01-01T00:00:00Z is not a header
~/.no-mistakes/worktrees/7f0ec18181b6/01M6R9JQBC9XXM9G75QQXE88JY/.fm-lab-dwell-_aokh_7t/state/live-stall.inbox/001.msg
exit=0
$ bin/fm-afk-return.sh check
WARNING: watcher still down (same stale episode; last beat: 6s ago, grace 300s) - full banner already printed this episode.
=== Return brief (away 2026-11-06T11:44:53Z -> 2026-11-06T11:45:04Z, 11s) ===
Supervisor health:
  - supervision ran through the away window with no detected gap (watcher beat 0s old at return)
Your instructions:
  your words at entry:
    Live validation of blocker response timing
  the away session took no action under them.
Waiting on you:
  - live-question [key=default] needs your decision: live validation event
Tried and failed, or could not be fixed:
  - live-stall [key=default] blocked 2026-11-06T11:44:53Z; first action 2026-11-06T11:45:01Z (8s later), the longest wait this window; still blocked, firstmate remediates before ordinary work: live validation event
  - note: 1 blocked event(s) carried no time stamp and could not be attributed to this window
Landed, cleanup due:
  (nothing)
Handled while away:
  0 outcome(s) handled by the away session (0 routine, 0 escalated above)
  (no routine outcomes recorded in the store for this window)
Not started:
  (nothing)
Cost: 0 supervision outcome(s) recorded (0 routine, 0 captain); 2 task(s) live at return.
fm-afk-return: catch-up must finish before the captain request
catch-up health: supervision ran through the away window with no detected gap (watcher beat 0s old at return)
catch-up wake: OPEN DECISIONS (still open, folded from the durable status logs - not just the latest line):
catch-up wake: live-question needs-decision: live validation event
catch-up wake: live-stall blocked: live validation event
catch-up wake: OPEN DECISIONS: close one by answering it: bin/fm-send.sh <task> --resolve-key <key> '<answer>'
firstmate-actionable blocker: live-stall [key=default] live validation event
fm-afk-return: handle each blocker now, or close it with resolved [key=...] and append a durable reclassification reason, then run bin/fm-afk-return.sh check

exit=3
PASS Late root steering reports first action and retains remediation gate
worker appends live-boundary: blocked [key=route] [at=1793965505]: live validation event
worker appends live-boundary: blocked [key=route] [at=1793965506]: live validation event
worker appends live-boundary: resolved [key=route] [at=1793965507]: live validation event
$ bin/fm-afk-return.sh check
WARNING: watcher still down (same stale episode; last beat: 12s ago, grace 300s) - full banner already printed this episode.
=== Return brief (away 2026-11-06T11:44:53Z -> 2026-11-06T11:45:09Z, 16s) ===
Supervisor health:
  - supervision ran through the away window with no detected gap (watcher beat 0s old at return)
Your instructions:
  your words at entry:
    Live validation of blocker response timing
  the away session took no action under them.
Waitin

... [20852 bytes truncated] ...

 blocker: live-root [key=default] live validation event
firstmate-actionable blocker: live-stall [key=default] live validation event
fm-afk-return: handle each blocker now, or close it with resolved [key=...] and append a durable reclassification reason, then run bin/fm-afk-return.sh check

exit=3
PASS Same-key reopening evaluates its latest interval
$ bin/fm-afk-return.sh check
WARNING: watcher still down (same stale episode; last beat: 57s ago, grace 300s) - full banner already printed this episode.
=== Return brief (away 2026-11-06T11:44:53Z -> 2026-11-06T11:45:55Z, 1m) ===
Supervisor health:
  - supervision ran through the away window with no detected gap (watcher beat 0s old at return)
  - status file unreadable: ~/.no-mistakes/worktrees/7f0ec18181b6/01M6R9JQBC9XXM9G75QQXE88JY/.fm-lab-dwell-_aokh_7t/state/live-missing.status; catch-up stays gated
Your instructions:
  your words at entry:
    Live validation of blocker response timing
  the away session took no action under them.
Waiting on you:
  - live-question [key=default] needs your decision: live validation event
Tried and failed, or could not be fixed:
  - live-acked [key=default] still blocked, firstmate remediates before ordinary work: live validation event
  - note: 1 blocked event(s) carried no time stamp and could not be attributed to this window
  - note: live-missing status log missing or unreadable; blocker wait could not be judged
Landed, cleanup due:
  (nothing)
Handled while away:
  0 outcome(s) handled by the away session (0 routine, 0 escalated above)
  (no routine outcomes recorded in the store for this window)
Not started:
  (nothing)
Cost: 0 supervision outcome(s) recorded (0 routine, 0 captain); 8 task(s) live at return.
fm-afk-return: catch-up must finish before the captain request
catch-up health: supervision ran through the away window with no detected gap (watcher beat 0s old at return)
catch-up wake: OPEN DECISIONS (still open, folded from the durable status logs - not just the latest line):
catch-up wake: live-question needs-decision: live validation event
catch-up wake: live-stall blocked: live validation event
catch-up wake: OPEN DECISIONS: close one by answering it: bin/fm-send.sh <task> --resolve-key <key> '<answer>'
catch-up wake: STATUS OUTCOME BACKSTOP (newest captain-facing task event has no covering branch outcome):
catch-up wake: live-terminal done [key=default] [at=1793965518]: live validation event
catch-up wake: live-acked blocked: live validation event
catch-up wake: live-root blocked: live validation event
catch-up lifecycle: status file unreadable: ~/.no-mistakes/worktrees/7f0ec18181b6/01M6R9JQBC9XXM9G75QQXE88JY/.fm-lab-dwell-_aokh_7t/state/live-missing.status; catch-up stays gated
firstmate-actionable blocker: live-acked [key=default] live validation event
fm-afk-return: handle each blocker now, or close it with resolved [key=...] and append a durable reclassification reason, then run bin/fm-afk-return.sh check

exit=3
PASS Missing status is named and gate retained
$ bin/fm-afk-return.sh check
WARNING: watcher still down (same stale episode; last beat: 62s ago, grace 300s) - full banner already printed this episode.
=== Return brief (away 2026-11-06T11:44:53Z -> 2026-11-06T11:46:00Z, 1m) ===
Supervisor health:
  - supervision ran through the away window with no detected gap (watcher beat 0s old at return)
  - status file unreadable: ~/.no-mistakes/worktrees/7f0ec18181b6/01M6R9JQBC9XXM9G75QQXE88JY/.fm-lab-dwell-_aokh_7t/state/live-missing.status; catch-up stays gated
Your instructions:
  your words at entry:
    Live validation of blocker response timing
  the away session took no action under them.
Waiting on you:
  - live-question [key=default] needs your decision: live validation event
Tried and failed, or could not be fixed:
  - live-acked [key=default] still blocked, firstmate remediates before ordinary work: live validation event
  - note: 1 blocked event(s) carried no time stamp and could not be attributed to this window
  - note: live-missing status log missing or unreadable; blocker wait could not be judged
Landed, cleanup due:
  (nothing)
Handled while away:
  0 outcome(s) handled by the away session (0 routine, 0 escalated above)
  (no routine outcomes recorded in the store for this window)
Not started:
  (nothing)
Cost: 0 supervision outcome(s) recorded (0 routine, 0 captain); 8 task(s) live at return.
fm-afk-return: catch-up must finish before the captain request
catch-up health: supervision ran through the away window with no detected gap (watcher beat 0s old at return)
catch-up wake: OPEN DECISIONS (still open, folded from the durable status logs - not just the latest line):
catch-up wake: live-question needs-decision: live validation event
catch-up wake: live-stall blocked: live validation event
catch-up wake: OPEN DECISIONS: close one by answering it: bin/fm-send.sh <task> --resolve-key <key> '<answer>'
catch-up wake: STATUS OUTCOME BACKSTOP (newest captain-facing task event has no covering branch outcome):
catch-up wake: live-terminal done [key=default] [at=1793965518]: live validation event
catch-up wake: live-acked blocked: live validation event
catch-up wake: live-root blocked: live validation event
catch-up lifecycle: status file unreadable: ~/.no-mistakes/worktrees/7f0ec18181b6/01M6R9JQBC9XXM9G75QQXE88JY/.fm-lab-dwell-_aokh_7t/state/live-missing.status; catch-up stays gated
firstmate-actionable blocker: live-acked [key=default] live validation event
fm-afk-return: handle each blocker now, or close it with resolved [key=...] and append a durable reclassification reason, then run bin/fm-afk-return.sh check

exit=3
PASS Unreadable symlink status is named and gate retained
worker appends live-missing: done [key=default] [at=1793965562]: live validation event
worker appends live-stall: resolved [key=default] [at=1793965562]: live validation event
worker appends live-root: resolved [key=default] [at=1793965562]: live validation event
worker appends live-acked: resolved [key=default] [at=1793965562]: live validation event
$ bin/fm-afk-return.sh check
WARNING: watcher still down (same stale episode; last beat: 68s ago, grace 300s) - full banner already printed this episode.
=== Return brief (away 2026-11-06T11:44:53Z -> 2026-11-06T11:46:06Z, 1m) ===
Supervisor health:
  - supervision ran through the away window with no detected gap (watcher beat 0s old at return)
Your instructions:
  your words at entry:
    Live validation of blocker response timing
  the away session took no action under them.
Waiting on you:
  - live-question [key=default] needs your decision: live validation event
Tried and failed, or could not be fixed:
  - note: 1 blocked event(s) carried no time stamp and could not be attributed to this window
Landed, cleanup due:
  (nothing)
Handled while away:
  0 outcome(s) handled by the away session (0 routine, 0 escalated above)
  (no routine outcomes recorded in the store for this window)
Not started:
  (nothing)
Cost: 0 supervision outcome(s) recorded (0 routine, 0 captain); 8 task(s) live at return.
catch-up health: supervision ran through the away window with no detected gap (watcher beat 0s old at return)
catch-up wake: OPEN DECISIONS (still open, folded from the durable status logs - not just the latest line):
catch-up wake: live-question needs-decision: live validation event
catch-up wake: live-stall blocked: live validation event
catch-up wake: OPEN DECISIONS: close one by answering it: bin/fm-send.sh <task> --resolve-key <key> '<answer>'
catch-up wake: STATUS OUTCOME BACKSTOP (newest captain-facing task event has no covering branch outcome):
catch-up wake: live-terminal done [key=default] [at=1793965518]: live validation event
catch-up wake: live-acked blocked: live validation event
catch-up wake: live-root blocked: live validation event
catch-up wake: live-missing done [key=default] [at=1793965562]: live validation event
fm-afk-return: catch-up clear; ordinary captain work may proceed

exit=0
PASS Resolving open blockers clears gate while question remains
$ bin/fm-afk-return.sh guard

exit=0
Removed disposable lab home; no harness or fleet endpoints were launched.
Evidence: Live attribution and ordering transcript

Source: Live attribution and ordering transcript

$ bin/fm-lab-home.sh create ~/.no-mistakes/worktrees/7f0ec18181b6/01M6R9JQBC9XXM9G75QQXE88JY/.fm-lab-boundaries-k5m01y8v
~/.no-mistakes/worktrees/7f0ec18181b6/01M6R9JQBC9XXM9G75QQXE88JY/.fm-lab-boundaries-k5m01y8v

exit=0
worker appends before-entry: blocked [at=1793965609]: validation event
$ bin/fm-afk-contract.sh enter --words Live boundary validation
Away posture recorded at 2026-11-06T11:46:50Z: hold-for-return only. No phone channel is configured; anything that needs you waits for your return. Your away instructions are recorded verbatim; the away session will carry them out where it can, and anything it is unsure of, or that needs you, waits for your return. Destructive, irreversible, and security-sensitive actions are never pre-authorizable, whatever the words say. Expected return: not given. Spend cap: 4 concurrent workers.
Away posture (recorded):
  entered: 2026-11-06T11:46:50Z
  expected return: not given
  spend cap: 4 concurrent workers
  reach: hold-for-return only. No phone channel is configured; anything that needs you waits for your return.
  your words (verbatim):
    Live boundary validation

exit=0
$ bash -c . bin/fm-task-inbox-lib.sh; fm_task_inbox_write "$FM_HOME/state" prose-only "A message body mentions at=2099-01-01T00:00:00Z; it is not action during the blocked interval"
~/.no-mistakes/worktrees/7f0ec18181b6/01M6R9JQBC9XXM9G75QQXE88JY/.fm-lab-boundaries-k5m01y8v/state/prose-only.inbox/001.msg
exit=0
worker appends prose-only: blocked [at=1793965612]: validation event
worker appends younger: blocked [at=1793965613]: validation event
worker appends future-event: blocked [at=1793969213]: validation event
$ bin/fm-afk-return.sh begin
fm-afk-launch: away-posture record archived at ~/.no-mistakes/worktrees/7f0ec18181b6/01M6R9JQBC9XXM9G75QQXE88JY/.fm-lab-boundaries-k5m01y8v/state/afk-contracts/1793965610.afk-contract
fm-afk-launch: away mode stopped; no daemon terminal was running, .afk cleared, and the posture record archived
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
●  WATCHER DOWN - SUPERVISION IS OFF
●  4 task(s) in flight, but no live watcher process holds this home lock (last beat: 2s ago).
●  Trust the emitted supervision protocol for this harness; do not use shell & for watcher repair.
●  This is a supervision warning only; the guarded operation WILL still run.
●  repair missing watcher supervision according to the session-start block for this harness; do not use shell &.
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
=== Return brief (away 2026-11-06T11:46:50Z -> 2026-11-06T11:46:59Z, 9s) ===
Supervisor health:
  - supervision ran through the away window with no detected gap (watcher beat 0s old at return)
Your instructions:
  your words at entry:
    Live boundary validation
  the away session took no action under them.
Waiting on you:
  (nothing)
Tried and failed, or could not be fixed:
  - prose-only [key=default] blocked 2026-11-06T11:46:52Z; no action for 7s, the longest wait this window; still blocked, firstmate remediates before ordinary work: validation event
  - younger [key=default] blocked 2026-11-06T11:46:53Z; no action for 6s; still blocked, firstmate remediates before ordinary work: validation event
  - before-entry [key=default] still blocked, firstmate remediates before ordinary work: validation event
  - future-event [key=default] still blocked, firstmate remediates before ordinary work: validation event
Landed, cleanup due:
  (nothing)
Handled while away:
  0 outcome(s) handled by the away session (0 routine, 0 escalated above)
  (no routine outcomes recorded in the store for this window)
Not started:
  (nothing)
Cost: 0 supervision outcome(s) recorded (0 routine, 0 captain); 4 task(s) live at return.
fm-afk-return: catch-up must finish before the captain request
catch-up health: supervision ran through the away window with no detected gap (watcher beat 0s old at return)
catch-up wake: OPEN DECISIONS (still open, folded from the durable status logs - not just the latest line):
catch-up wake: before-entry blocked: validation event
catch-up wake: future-event blocked: validation event
catch-up wake: prose-only blocked: validation event
catch-up wake: younger blocked: validation event
catch-up wake: OPEN DECISIONS: close one by answering it: bin/fm-send.sh <task> --resolve-key <key> '<answer>'
firstmate-actionable blocker: before-entry [key=default] validation event
firstmate-actionable blocker: future-event [key=default] validation event
firstmate-actionable blocker: prose-only [key=default] validation event
firstmate-actionable blocker: younger [key=default] validation event
fm-afk-return: handle each blocker now, or close it with resolved [key=...] and append a durable reclassification reason, then run bin/fm-afk-return.sh check

exit=3
PASS Pre-entry event stays excluded despite fresh status mtime
PASS Future event cannot be attributed to this window
PASS Pre-block inbox, body timestamps and rotated daemon ledger are not real action
PASS Longest wait comes first and is marked exactly once
worker appends prose-only: failed [at=1793965620]: validation event
$ bin/fm-afk-return.sh check
WARNING: watcher still down (same stale episode; last beat: 6s ago, grace 300s) - full banner already printed this episode.
=== Return brief (away 2026-11-06T11:46:50Z -> 2026-11-06T11:47:03Z, 13s) ===
Supervisor health:
  - supervision ran through the away window with no detected gap (watcher beat 0s old at return)
Your instructions:
  your words at entry:
    Live boundary validation
  the away session took no action under them.
Waiting on you:
  (nothing)
Tried and failed, or could not be fixed:
  - younger [key=default] blocked 2026-11-06T11:46:53Z; no action for 10s, the longest wait this window; still blocked, firstmate remediates before ordinary work: validation event
  - prose-only [key=default] blocked 2026-11-06T11:46:52Z; first action 2026-11-06T11:47:00Z (8s later); closed 2026-11-06T11:47:00Z: validation event
  - before-entry [key=default] still blocked, firstmate remediates before ordinary work: validation event
  - future-event [key=default] still blocked, firstmate remediates before ordinary work: validation event
  - prose-only: failed [at=1793965620]: validation event
Landed, cleanup due:
  (nothing)
Handled while away:
  0 outcome(s) handled by the away session (0 routine, 0 escalated above)
  (no routine outcomes recorded in the store for this window)
Not started:
  (nothing)
Cost: 0 supervision outcome(s) recorded (0 routine, 0 captain); 4 task(s) live at return.
fm-afk-return: catch-up must finish before the captain request
catch-up health: supervision ran through the away window with no detected gap (watcher beat 0s old at return)
catch-up wake: OPEN DECISIONS (still open, folded from the durable status logs - not just the latest line):
catch-up wake: before-entry blocked: validation event
catch-up wake: future-event blocked: validation event
catch-up wake: prose-only blocked: validation event
catch-up wake: younger blocked: validation event
catch-up wake: OPEN DECISIONS: close one by answering it: bin/fm-send.sh <task> --resolve-key <key> '<answer>'
catch-up wake: STATUS OUTCOME BACKSTOP (newest captain-facing task event has no covering branch outcome):
catch-up wake: prose-only failed [at=1793965620]: validation event
firstmate-actionable blocker: before-entry [key=default] validation event
firstmate-actionable blocker: future-event [key=default] validation event
firstmate-actionable blocker: younger [key=default] validation event
fm-afk-return: handle each blocker now, or close it with resolved [key=...] and append a durable reclassification reason, then run bin/fm-afk-return.sh check

exit=3
PASS A late ship failure preserves earlier wait and shows closed context
Removed disposable lab home.

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ⚠️ bin/fm-afk-return.sh:252 - scan_blocker_dwell treats every valid blocked line as the start of a new interval. Lines 252-253 replace the key's latest record unconditionally, even when the running fold already holds that key open as blocked. Workers do repeat blocked on a key that is still open: the real fixture pv-delivery-hide-leftovers-l1.status has four consecutive blocked: lines on the default key with no closure between them. Concrete failing case (since=900): blocked [at=1000]: X, then the worker retries and writes blocked [at=20000]: still X, and the return runs at now=20300. The scan measures from 20000, so gap=300 < GRACE and no dwell row prints. The real wait was 19300s with no action, which is the Servora-style stall the intent requires the brief to report. When the second line comes later in the window, the wait is still under-reported (for example 1h15m instead of 5h32m). Same invariant, sibling site: if the re-stated line has no time stamp (line 250 sets epoch=-), the whole in-window interval is dropped at line 257, and the stall falls into the untimed note instead of a row. Fix: in the scan loop, keep a running fold of the status log using _fm_decision_fold_line, including resolve, captain-held and terminal lines, and only record a new opening epoch when the key was not already open as blocked before this line. status_key_closing_verb's watch already matches on the opening line's epoch, so it will then find the first closure of the true interval. Add a test for a re-stated blocker while the key is still open.
  • ⚠️ bin/fm-classify-lib.sh:1080 - Simplification: status_key_closing_verb gained two optional modes. One is an out-var with no opening epoch, which returns the epoch of the last closure (lines 1067-1068 when $4 is empty, plus line 1080). The other is the out-var with an opening epoch, which returns the first closure of that interval. The only production caller, bin/fm-afk-return.sh:261, always passes both arguments. The existing caller, bin/fm-captain-hold.sh:2032, passes neither. So the 3-argument mode without an opening epoch is used only by tests (tests/fm-classify-decision-key.test.sh:617-632). No intent requirement needs it. Recommended remedy: remove that mode, so the out-var is only filled when the blocked-epoch argument is present, and drop or adapt the tests that exercise it.
  • ℹ️ tests/fm-afk-return.test.sh:1642 - test_blocker_dwell_source_boundary only greps the text of bin/fm-afk-return.sh between scan_blocker_dwell() and write_pending_seed() for sidecar filenames. That is a source-content-only assertion, which the repository's test-quality rule says to flag. It also misses any helper the scan calls outside that span. The user intent does explicitly ask for 'a structural source guard excluding .supervision-host.log, .supervise-daemon.log, and branch-outcomes', and test_blocker_dwell_ignores_supervision_sidecars already proves the same boundary behaviorally across all the sidecar shapes. The intent and the test rule conflict here, so the user needs to decide whether to keep this grep test or rely on the behavioral test alone.
  • ℹ️ bin/fm-afk-return.sh:288 - blocker_dwell_iso (line 288) is the same date -u -r || date -u -d @ formatter as the existing epoch_to_iso (line 561). blocker_dwell_duration (line 293) is a second copy of format_duration (line 553), differing only in zero-padding the minutes (5h5m vs 5h05m). Have the dwell rows reuse epoch_to_iso and format_duration so the brief has one time format and one duration format.

🔧 Fix applied.
4 issues (2 warnings, 2 infos) still open:

  • ⚠️ bin/fm-afk-return.sh:252 - scan_blocker_dwell treats every valid blocked line as the start of a new interval. Lines 252-253 replace the key's latest record unconditionally, even when the running fold already holds that key open as blocked. Workers do repeat blocked on a key that is still open: the real fixture pv-delivery-hide-leftovers-l1.status has four consecutive blocked: lines on the default key with no closure between them. Concrete failing case (since=900): blocked [at=1000]: X, then the worker retries and writes blocked [at=20000]: still X, and the return runs at now=20300. The scan measures from 20000, so gap=300 < GRACE and no dwell row prints. The real wait was 19300s with no action, which is the Servora-style stall the intent requires the brief to report. When the second line comes later in the window, the wait is still under-reported (for example 1h15m instead of 5h32m). Same invariant, sibling site: if the re-stated line has no time stamp (line 250 sets epoch=-), the whole in-window interval is dropped at line 257, and the stall falls into the untimed note instead of a row. Fix: in the scan loop, keep a running fold of the status log using _fm_decision_fold_line, including resolve, captain-held and terminal lines, and only record a new opening epoch when the key was not already open as blocked before this line. status_key_closing_verb's watch already matches on the opening line's epoch, so it will then find the first closure of the true interval. Add a test for a re-stated blocker while the key is still open.
  • ℹ️ tests/fm-afk-return.test.sh:1642 - test_blocker_dwell_source_boundary only greps the text of bin/fm-afk-return.sh between scan_blocker_dwell() and write_pending_seed() for sidecar filenames. That is a source-content-only assertion, which the repository's test-quality rule says to flag. It also misses any helper the scan calls outside that span. The user intent does explicitly ask for 'a structural source guard excluding .supervision-host.log, .supervise-daemon.log, and branch-outcomes', and test_blocker_dwell_ignores_supervision_sidecars already proves the same boundary behaviorally across all the sidecar shapes. The intent and the test rule conflict here, so the user needs to decide whether to keep this grep test or rely on the behavioral test alone.
  • ℹ️ bin/fm-afk-return.sh:288 - blocker_dwell_iso (line 288) is the same date -u -r || date -u -d @ formatter as the existing epoch_to_iso (line 561). blocker_dwell_duration (line 293) is a second copy of format_duration (line 553), differing only in zero-padding the minutes (5h5m vs 5h05m). Have the dwell rows reuse epoch_to_iso and format_duration so the brief has one time format and one duration format.
  • ⚠️ bin/fm-afk-return.sh:244 - The round-1 fix for dwell-reassert-restarts-interval brought in this cost. It now runs folded=$(_fm_decision_fold_line ...) in a command substitution on every line of every live task's status log, before the verb check. That forks a subshell per line, so the return-time cost grows with each log's whole lifetime length. Status logs are append-only, so a worker's progress lines keep adding to it. The repo avoids exactly this cost elsewhere. status_open_decisions (bin/fm-classify-lib.sh:903-907) runs the fold only for needs-decision/blocked/done/failed/resolve/held lines, and status_key_closing_verb pre-filters lines with grep, with a comment calling per-line cost a concern. Concrete case: 10 live tasks with 500-line logs means about 5000 extra forks each time the return brief or check runs. Only a few dozen of those lines are transitions, and the fold leaves the open set unchanged for every other line (it early-returns $open). Fix: call status_line_verb first and run the fold only when the verb is needs-decision|blocked|done|failed|$resolve|$held. This matches status_open_decisions and gives the same result. Optionally, reuse that fold's result in place of the separate valid=$(_fm_decision_fold_line &#39;&#39; ...) fork at line 250.

🔧 Fix applied.
1 info still open:

  • ℹ️ tests/fm-afk-return.test.sh:1642 - test_blocker_dwell_source_boundary only greps the text of bin/fm-afk-return.sh between scan_blocker_dwell() and write_pending_seed() for sidecar filenames. That is a source-content-only assertion, which the repository's test-quality rule says to flag. It also misses any helper the scan calls outside that span. The user intent does explicitly ask for 'a structural source guard excluding .supervision-host.log, .supervise-daemon.log, and branch-outcomes', and test_blocker_dwell_ignores_supervision_sidecars already proves the same boundary behaviorally across all the sidecar shapes. The intent and the test rule conflict here, so the user needs to decide whether to keep this grep test or rely on the behavioral test alone.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 9 of 9 scenarios driven live against the product
Scenario Result Live Evidence
Return reports an unanswered blocker despite working, paused, and repeated blocked events ✅ pass live Live return/check CLI transcript
Prompt root or acknowledged steering, keyed resolution, captain-held transfer, and terminal completion suppress dwell noise ✅ pass live Live return/check CLI transcript
Late steering and terminal failure preserve the earlier wait and show open or closed context ✅ pass live Both live CLI transcripts
Exact grace reports inclusively, a higher grace suppresses the interval, and reopening uses the latest interval ✅ pass live Live return/check CLI transcript
Pi, host, daemon, and rotated bookkeeping cannot change blocker action timing ✅ pass live Both live CLI transcripts
Pre-entry and future blockers remain excluded; fresh mtime, pre-block steering, and message prose cannot supply action ✅ pass live Live attribution and ordering transcript
Multiple waits appear longest first with exactly one longest-wait marker ✅ pass live Live attribution and ordering transcript
Untimed events receive an honesty note and missing or unreadable live status logs are named ✅ pass live Live return/check CLI transcript
Guard retains catch-up refusal, summary preserves gate state, and resolving blockers clears the gate while questions remain ✅ pass live Live return/check CLI transcript
  • bash tests/fm-afk-return.test.sh — includes real-record excerpts, the explicitly reconstructed Servora 5h32m case, sidecar invariance, and existing gate regressions.
  • bash tests/fm-classify-decision-key.test.sh
  • bash tests/fm-task-inbox.test.sh
  • python3 ~/.no-mistakes/evidence/01M6R9JQBC9XXM9G75QQXE88JY/live-dwell.py — real CLI, wall clock, isolated marked lab home.
  • python3 ~/.no-mistakes/evidence/01M6R9JQBC9XXM9G75QQXE88JY/live-boundaries.py — adversarial attribution, ordering, and late terminal action.
  • git status --short — clean after disposable lab cleanup.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@peterOC26

Copy link
Copy Markdown
Owner Author

Fixture provenance: the report's A7 event could not be verified and is not represented as a real fixture. Closure beating a late steer is covered by a clearly labelled synthetic recombination of real S2 status transitions and an S4 inbox header. The Servora 5h32m status fixture remains explicitly labelled reconstructed because the original worker log no longer survives.

@peterOC26
peterOC26 merged commit 25c1d6a into main Nov 6, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant