Skip to content

fix: keep OMP from going idle with pending wakes and replies - #323

Merged
dnth merged 6 commits into
mainfrom
fm/fm-idle-gap-1507-narrow
Nov 21, 2026
Merged

dnth merged 6 commits into
mainfrom
fm/fm-idle-gap-1507-narrow

Conversation

@dnth

@dnth dnth commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

Firstmate's OMP primary went idle for 17 minutes on 2026-11-20 with two Discord requests and their overdue reminders pending.
Two gaps let that happen: the turn-end hook only checked watcher health, and the main-fallback coalescing episode kept suppressing every later wake while main sat idle.

 session_stop
   runGuard                      # watcher health (unchanged)
+  owedWorkHere                  # lock owner, not away, checked before and after the scan
+    fm_wake_actor_pending_count main
+    fm_ext_owed_requests        # no reply, reply delivering, or ack-only with no live task
+  -> continue once with drain/ack instructions (+ visible-ack note after a provider refusal)
+  -> bounded second stop: captain-visible warning
+agent_end (terminal, no stop check ran)
+  -> captain-visible warning when work is owed
 deliverMainWake (open fallback episode)
-  suppress unless stale in-flight or decision-owned
+  also force-send while main is idle (retiring an unconsumed staged wake)
+mainSettled
+  force-send the newest close coalesced during the ending run, once per batch; replayed after a mid-restore settle

The owed-work scan is never killed: the handler stops waiting after 15 s (inside OMP's 30 s handler deadline) and treats the scan as inconclusive, because its live-task lookup can be recording task metadata.

Evidence

Each behaviour was proven by reverting its fix alone and watching its test fail, then restoring it.

Behaviour Test Failure with the fix reverted
Owed wakes force a continuation test_native_omp_turn_end_with_unacked_wakes_continues_once "unacknowledged rows let the turn end"
Ack-only request with no task is owed same "an ack-only request with no task let the turn end"
Terminal end without a stop check warns same "terminal end without a stop check was silent"
Timed-out scan is not killed same "the timed-out scan was killed before its live-task lookup finished"
Custody rechecked after the scan same "a scan result outlived the session's custody"
Refusal keeps the visible-ack instruction same "first continuation lacks post a visible ack on any that has no reply yet"
Idle main hears a close behind an open episode test_native_omp_idle_main_hears_wake_behind_open_episode "timeout waiting for idle main hears the close behind the open episode"
Settlement force-delivers a held close same "timeout waiting for settlement force-delivers a close coalesced during the run"
Idle bypass retires an unconsumed staged wake test_native_omp_settlement_edges "timeout waiting for idle main hears a close behind an unconsumed wake"
Settlement picks the newest close same "settlement preferred an older close"
Settlement replays after a mid-restore settle same "timeout waiting for replayed settlement delivers the coalesced close"

Open items (not fixed here)

AC2 is accepted with the captain's exception "2026-11-21 Discord: 2": a terminal agent_end with no stop continuation only warns; forced recovery there is follow-up backlog item fm-omp-terminal-recovery.
Review findings approved past review under the captain's decision "A" and tracked in that follow-up:

  • settlement-can-miss-newest-main-close: settlement skips while a wake staged after the last turn_start is in flight, and a selected close can be re-offered to the branch.
  • owed-scan-can-return-stale-clear: a Discord request arriving during the slow live-task lookup can read as clear.
  • owed-scan-masks-helper-failures: a library load or count failure prints zeros instead of inconclusive.
  • unrequired-terminal-refusal-annotation: the terminal warning carries a refusal note the intent did not ask for.

Pre-existing CI failures, not touched (approved past the CI gate; each fails the same way on main):

Serial 3 (fm-task-inbox), 5 (fm-backend-tmux-smoke), and 8 (fm-pi-watch-extension) failed on this PR's first CI run and passed on the second; locally bin/fm-test-run.sh tests/fm-pi-watch-extension.test.sh tests/fm-task-inbox.test.sh tests/fm-backend-tmux-smoke.test.sh reported total=3 failed=0 on this head (inferred flaky).
The one CI failure this PR caused, Stock macOS Bash 3.2 parsing an apostrophe in a test comment inside a command substitution, is fixed in 4f556a70.

Merge Danger

Door: two-way.

The change is confined to the OMP primary adapter, the shared watcher core's OMP-only coalescing path, one read-only helper in the overdue library, docs, and tests; reverting the PR restores the previous behaviour.

Blast Radius: OMP-primary.

A wrong owed-work verdict costs at most one extra forced continuation per stop or one extra warning; the idle bypass and settlement send at most one forced wake per idle period or batch.
Other harnesses and the shared bin/fm-turnend-guard.sh predicate are unchanged.

Testing

The base runtime reproduced the silent stop, and the target passed every local OMP scenario with synthetic bridge data, the focused regression fixtures, and evidence from the live terminal and wake logs.

  • Live validation: ✅ go - 11 of 11 scenarios driven live against the product
Scenario Result Live Evidence
End a local OMP turn with a queued wake and synthetic Discord requests. OMP continues once, excludes the receipted answer, and warns if work remains. ✅ pass live Live OMP transcript, One continuation and an attended warning
End a local OMP turn with a synthetic ack receipt and a linked task paused in a live tmux pane. The turn ends without a continuation. ✅ pass live Live OMP transcript, Ack with a live linked task
End a local OMP turn with a stale watcher beacon and a synthetic unanswered request. One continuation carries both the repair and the owed work. ✅ pass live Live OMP transcript, Supervision repair and owed-work context
Hold the local linked-task lookup past 15 seconds after a synthetic provider refusal. OMP continues with visible-ack guidance and the original lookup finishes after release. ✅ pass live Live OMP transcript, Slow scan and refusal guidance
Enter away mode during a local owed-work scan or give the lock to another live process. OMP leaves the synthetic work queued without a continuation or warning. ✅ pass live Live OMP transcript, Away custody changes during the scan and A different PID owns the session lock
Press Escape in local OMP while a synthetic Discord request still needs an answer. The turn ends without a stop hook and displays the owed-work warning. ✅ pass live Live OMP transcript, Warning on a terminal Escape
Receive a typed refusal from the loopback provider with a synthetic unanswered request. The continuation asks for a visible ack and states how to brief the legitimate work without quoting the refusal… ✅ pass live Live OMP transcript, Typed provider refusal
Let a second synthetic Discord request become overdue after local OMP returns to idle behind an open wake episode. The real watcher starts a model turn for the new wake. ✅ pass live Live OMP transcript, Real watcher rings again from idle
Deliver two synthetic overdue requests to idle OMP with ACP deferral active. The second close retires the unconsumed marker and uses the forced hand-off. ✅ pass live Live OMP transcript, Unconsumed wake marker in deferred ACP delivery
Queue an overdue check and then a newer task signal during a local OMP run. Settlement force-delivers the newer signal, and the next settlement leaves the same batch alone. ✅ pass live Live OMP transcript, Newest coalesced close and once-per-batch bound
End the local OMP run while its watcher successor is being restored. After the real supervision branch accepts the restored signal, settlement delivers the earlier coalesced check to main. ✅ pass live Live OMP transcript, Settlement replay after watcher restoration
Evidence: Live OMP transcript with provider prompts, wake delivery records, and exit statuses
Firstmate OMP live validation at a1451f856b0a76d4384de29e4bc10e5eaa540225
Local OMP against synthetic bridge records and a loopback provider. Each TUI used an isolated tmux server.

=== Baseline reproduction ===
OMP 18.22.2 in tmux 145×44, synthetic localhost provider, case base
$ ~/.bun/bin/omp --offline --no-extensions --no-tools --no-lsp --session-dir {run-worktree}/.live-validation/base/sessions -e {run-worktree}/.live-validation/base/lab.ts -e {run-worktree}/.live-validation/base/.omp/extensions/fm-primary-omp.ts --model local-fm-probe/probe
Replay of the bounded case with the three changed runtime files from base e89ec466. OMP issued one ordinary stop, gave no owed-work warning, and left the wake queued.

OMP event transcript
{"at": 1795229977246, "type": "lock", "pid": 4053567, "result": 0, "out": "lock acquired: harness pid 4053567\n", "err": ""}
{"at": 1795229978069, "type": "turn_start"}
{"at": 1795229978168, "type": "session_stop", "stop_hook_active": false}
{"at": 1795229978232, "type": "agent_end"}

OMP pane capture

                                                         ████████████
                                                            ██  ██       ▄▀▀▄ █▀▄▀▄ █▀▀▄
                                                            ██  ██       ▀▄▄▀ █ █ █ █▄▄▀
                                                            ▒▒  ██                  █
                                                                ██       v18.22.2

                                     Tip: Did you know? Each kitty/tmux/cmux/zellij/wezterm split keeps its
                                                  own session — `omp -c` resumes the right one


 Please finish this captain turn.


 Local provider response 1.

                                                                                                                        Local provider response 3
 π > ⬢ Local synthetic model > 📁 …E6EP5STDX/.live-validation/base/project > ⑂ master ▶─2%────────────────────────────────────╎─────┃───────128K─
╰─


























OMP teardown: 0


=== One continuation and an attended warning ===
OMP 18.22.2 in tmux 145×44, synthetic localhost provider, case bounded
$ ~/.bun/bin/omp --offline --no-extensions --no-tools --no-lsp --session-dir {run-worktree}/.live-validation/bounded/sessions -e {run-worktree}/.live-validation/bounded/lab.ts -e {run-worktree}/.live-validation/bounded/.omp/extensions/fm-primary-omp.ts --model local-fm-probe/probe
Seeded one durable main wake and four request records. No reply, emitted answer without receipt and ack with no linked task were counted. Delivered answer was excluded.
Received continuation at local model endpoint:
⁣FIRSTMATE_OP: v1 turn-end-guard: TURN WOULD END WITH 1 unacknowledged main wake row(s) and 3 Communication Officer request(s) still owed an answer. Run `bin/fm-wake-drain.sh`, handle every row - answer each EXT REQUESTS AWAITING ANSWER entry with the ext-respond skill - and run the printed `--ack-through` acknowledgement before ending the turn.

OMP event transcript
{"at": 1795229973344, "type": "lock", "pid": 4047412, "result": 0, "out": "lock acquired: harness pid 4047412\n", "err": ""}
{"at": 1795229974161, "type": "turn_start"}
{"at": 1795229974267, "type": "session_stop", "stop_hook_active": false}
{"at": 1795229974426, "type": "agent_end", "willContinue": true}
{"at": 1795229974428, "type": "turn_start"}
{"at": 1795229974433, "type": "session_stop", "stop_hook_active": true}
{"at": 1795229974530, "type": "agent_end"}

OMP pane capture

                                                         ████████████
                                                            ██  ██       ▄▀▀▄ █▀▄▀▄ █▀▀▄
                                                            ██  ██       ▀▄▄▀ █ █ █ █▄▄▀
                                                            ▒▒  ██                  █
                                                                ██       v18.22.2

                                                          Tip: Please use nerdfont 😭.


 Please finish this captain turn.


 Local provider response 1.

 Local provider response 5.

 Warning: Firstmate ended a turn with 1 unacknowledged main wake row(s) and 3 Communication Officer request(s) still owed an answer after one
 forced continuation. Run bin/fm-wake-drain.sh to inspect.

                                                                                                                        Local provider response 3
 π > ⬢ Local synthetic model > 📁 …P5STDX/.live-validation/bounded/project > ⑂ master ▶─2%────────────────────────────────────╎─────┃───────128K─
╰─






















OMP teardown: 0


=== Ack with a live linked task ===
OMP 18.22.2 in tmux 145×44, synthetic localhost provider, case linked
$ ~/.bun/bin/omp --offline --no-extensions --no-tools --no-lsp --session-dir {run-worktree}/.live-validation/linked/sessions -e {run-worktree}/.live-validation/linked/lab.ts -e {run-worktree}/.live-validation/linked/.omp/extensions/fm-primary-omp.ts --model local-fm-probe/probe
Synthetic ack receipt with a linked paused task in a real local tmux pane.
$ bin/fm-crew-state.sh linked
state: paused · source: status-log · waiting for the synthetic external task
The actual stop completed without a continuation.

OMP event transcript
{"at": 1795229981433, "type": "lock", "pid": 4057805, "result": 0, "out": "lock acquired: harness pid 4057805\n", "err": ""}
{"at": 1795229982230, "type": "turn_start"}
{"at": 1795229982321, "type": "session_stop", "stop_hook_active": false}
{"at": 1795229982469, "type": "agent_end"}

OMP pane capture

                                                         ████████████
                                                            ██  ██       ▄▀▀▄ █▀▄▀▄ █▀▀▄
                                                            ██  ██       ▀▄▄▀ █ █ █ █▄▄▀
                                                            ▒▒  ██                  █
                                                                ██       v18.22.2

                                    Tip: Bulk data to classify or triage? Say `jevify` in your message — the
                                      eval kernel's `judge()` processes the batch and you read only what it
                                                        flags — watch it glow as you type


 Finish while a linked task is still expected to answer.


 Local provider response 1.

                                                                                                                        Local provider response 3
 π > ⬢ Local synthetic model > 📁 …EP5STDX/.live-validation/linked/project > ⑂ master ▶─2%────────────────────────────────────╎─────┃───────128K─
╰─

























OMP teardown: 0


=== Supervision repair and owed-work context ===
OMP 18.22.2 in tmux 145×44, synthetic localhost provider, case repair
$ ~/.bun/bin/omp --offline --no-extensions --no-to

... [27721 bytes truncated] ...

1863786c5 age=15m
1795230019871	consumed	gen=1	wake=77562354-76d4-49fe-a04f-1ff9f427480b	close=4076202-1795230019491-1	by=turn_start	after_ms=14
1795230019895	turn	gen=1	wake=77562354-76d4-49fe-a04f-1ff9f427480b	close=4076202-1795230019491-1	after_ms=38
1795230021681	suppressed	gen=1	close=4076202-1795230021361-2	behind=episode	reason=check: ext-request-overdue 419487a66d85c8f86b54728fe123f2ae514939c9304e333ff43ab34c763a5e05 age=15m
1795230022417	suppressed	gen=1	close=4076202-1795230022089-3	behind=episode	reason=signal: {run-worktree}/.live-validation/settle/state/newest-synthetic.status
1795230022531	granted	gen=1	close=4076202-1795230022089-3	kind=settle
1795230022644	sent	gen=1	wake=973d7663-0ddf-4311-9ce6-d95232a69251	close=4076202-1795230022089-3	kind=successor	force=1	reason=signal: {run-worktree}/.live-validation/settle/state/newest-synthetic.status
1795230022786	consumed	gen=1	wake=973d7663-0ddf-4311-9ce6-d95232a69251	close=4076202-1795230022089-3	by=turn_start	after_ms=142
1795230022809	turn	gen=1	wake=973d7663-0ddf-4311-9ce6-d95232a69251	close=4076202-1795230022089-3	after_ms=165


OMP pane capture

                                                         ████████████
                                                            ██  ██       ▄▀▀▄ █▀▄▀▄ █▀▀▄
                                                            ██  ██       ▀▄▄▀ █ █ █ █▄▄▀
                                                            ▒▒  ██                  █
                                                                ██       v18.22.2

                                     Tip: `/shake` rips heavy tool results out of context to reclaim tokens
                                           without a full /compact — `/shake images` drops just images

 Warning: Firstmate's turn ended without its stop check while 4 unacknowledged main wake row(s) and 2 Communication Officer request(s) still
 owed an answer. Run bin/fm-wake-drain.sh now.

 Local provider response 2.

 Local provider response 3.

 Warning: Firstmate ended a turn with 4 unacknowledged main wake row(s) and 2 Communication Officer request(s) still owed an answer after one
 forced continuation. Run bin/fm-wake-drain.sh to inspect.

 π > ⬢ Local synthetic model > 📁 …EP5STDX/.live-validation/settle/project > ⑂ master ▶─2%────────────────────────────────────╎─────┃───────128K─
╰─























OMP teardown: 0


=== Settlement replay after watcher restoration ===
OMP 18.22.2 in tmux 145×44, synthetic localhost provider, case restore
$ ~/.bun/bin/omp --offline --no-extensions --no-tools --no-lsp --session-dir {run-worktree}/.live-validation/restore/sessions -e {run-worktree}/.live-validation/restore/lab.ts -e {run-worktree}/.live-validation/restore/.omp/extensions/fm-primary-omp.ts --model local-fm-probe/probe -e {run-worktree}/.live-validation/restore/.omp/extensions/fm-branch-supervision-omp.ts
Actual watcher successor entered delay at 1795230032479 ms. Escape settled main at 1795230032569 ms. Released the same real arm after verifying the check had stayed coalesced. The real branch accepted the restored signal, and replayed settlement force-delivered the earlier overdue check.
1795230030071	sent	gen=1	wake=617f1083-aaf1-4055-a795-dfe1bcb0539d	close=4086159-1795230029712-1	kind=close	force=0	reason=check: ext-request-overdue 13b7994fae9387c2e1b598524ba1204ae404d02fa67016ed86c74183ab1aafca age=15m
1795230031947	suppressed	gen=1	close=4086159-1795230031598-2	behind=episode	reason=check: ext-request-overdue e609d533127c0ec82085faf4f164a2957f866ece2ac65d7401f2c7285eade435 age=15m
1795230033296	branch-accepted	gen=1	close=4086159-1795230032458-3	reason=signal: {run-worktree}/.live-validation/restore/state/crew-restore.status
1795230033377	sent	gen=1	wake=747f7865-7f15-4708-86f7-b101e2723486	close=4086159-1795230031598-2	kind=successor	force=1	reason=check: ext-request-overdue e609d533127c0ec82085faf4f164a2957f866ece2ac65d7401f2c7285eade435 age=15m
⁣FIRSTMATE_OP: v1 watcher: FIRSTMATE WATCHER WAKE: check: ext-request-overdue e609d533127c0ec82085faf4f164a2957f866ece2ac65d7401f2c7285eade435 age=15m

Run bin/fm-wake-drain.sh first and handle the queued wake. Watcher continuity is extension-owned.

OMP event transcript
{"at": 1795230028917, "type": "lock", "pid": 4086159, "result": 0, "out": "lock acquired: harness pid 4086159\n", "err": ""}
{"at": 1795230030085, "type": "turn_start"}
{"at": 1795230032565, "type": "message_end", "stopReason": "aborted", "error": "Interrupted by user"}
{"at": 1795230032568, "type": "turn_end", "stopReason": "aborted", "error": "Interrupted by user"}
{"at": 1795230032569, "type": "agent_end"}
{"at": 1795230033391, "type": "turn_start"}
{"at": 1795230033457, "type": "session_stop", "stop_hook_active": false}

Firstmate main wake delivery ledger
1795230030071	sent	gen=1	wake=617f1083-aaf1-4055-a795-dfe1bcb0539d	close=4086159-1795230029712-1	kind=close	force=0	reason=check: ext-request-overdue 13b7994fae9387c2e1b598524ba1204ae404d02fa67016ed86c74183ab1aafca age=15m
1795230030086	consumed	gen=1	wake=617f1083-aaf1-4055-a795-dfe1bcb0539d	close=4086159-1795230029712-1	by=turn_start	after_ms=15
1795230030097	turn	gen=1	wake=617f1083-aaf1-4055-a795-dfe1bcb0539d	close=4086159-1795230029712-1	after_ms=26
1795230031947	suppressed	gen=1	close=4086159-1795230031598-2	behind=episode	reason=check: ext-request-overdue e609d533127c0ec82085faf4f164a2957f866ece2ac65d7401f2c7285eade435 age=15m
1795230033296	branch-accepted	gen=1	close=4086159-1795230032458-3	reason=signal: {run-worktree}/.live-validation/restore/state/crew-restore.status
1795230033323	granted	gen=1	close=4086159-1795230031598-2	kind=settle
1795230033377	sent	gen=1	wake=747f7865-7f15-4708-86f7-b101e2723486	close=4086159-1795230031598-2	kind=successor	force=1	reason=check: ext-request-overdue e609d533127c0ec82085faf4f164a2957f866ece2ac65d7401f2c7285eade435 age=15m
1795230033392	consumed	gen=1	wake=747f7865-7f15-4708-86f7-b101e2723486	close=4086159-1795230031598-2	by=turn_start	after_ms=15
1795230033395	turn	gen=1	wake=747f7865-7f15-4708-86f7-b101e2723486	close=4086159-1795230031598-2	after_ms=18


OMP pane capture

                                                         ████████████
                                                            ██  ██       ▄▀▀▄ █▀▄▀▄ █▀▀▄
                                                            ██  ██       ▀▄▄▀ █ █ █ █▄▄▀
                                                            ▒▒  ██                  █
                                                                ██       v18.22.2

                                    Tip: Bulk data to classify or triage? Say `jevify` in your message — the
                                      eval kernel's `judge()` processes the batch and you read only what it
                                                        flags — watch it glow as you type

 Warning: Firstmate's turn ended without its stop check while 4 unacknowledged main wake row(s) and 2 Communication Officer request(s) still
 owed an answer. Run bin/fm-wake-drain.sh now.

  ⎋ Working…
 ⠧ 0s > ⬢ Local synthetic model > 📁 …P5STDX/.live-validation/restore/project > ⑂ master ▶─2%──────────────────────────────────╎─────┃──────128K─
╰─




























OMP teardown: 0

Rendered OMP pane showing the warning after one continuation

Rendered OMP pane showing the terminal warning after Escape

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 3 issues (1 error, 2 warnings)
  • 🚨 .omp/extensions/fm-primary-omp.ts:195 - The intent says “A turn must not end silently with unacknowledged main wake rows or Communication Officer requests still owed an answer.” The scan counts rows at .omp/extensions/fm-primary-omp.ts:195 and snapshots the inbox at bin/fm-ext-overdue-lib.sh:52 before the potentially slow live-task lookup at line 59. Start with an empty queue and one acked request whose linked task is still live. If a second Discord request arrives during that lookup, intake can publish its inbox record and wake row before the scan returns. The scan still reports zero, so the first stop allows the turn to end and the second stop emits no warning. The same stale result suppresses the unchecked terminal warning at .omp/extensions/fm-primary-omp.ts:695. Recount main rows after the slow lookup and treat a newly arrived inbox record as inconclusive within the existing wait budget. The slow-lookup fixture at tests/fm-omp-primary.test.sh:3226 can exercise this by publishing a request while the lookup is blocked.
  • ⚠️ .omp/extensions/fm-primary-omp.ts:197 - The scan converts shell failures into a successful zero count. If the overdue library fails to load while an unanswered inbox record exists and the wake queue is empty, lines 196–198 print 0 0 0, so the scan is treated as clear. The same masking occurs for the wake-library load or count at line 195, a failed owed-request count at line 197, and failed inbox enumeration at bin/fm-ext-overdue-lib.sh:52. Propagate failures to the existing inconclusive-result path at .omp/extensions/fm-primary-omp.ts:211. A successfully scanned inactive bridge already has an explicit zero-result path.
  • ⚠️ .omp/extensions/fm-primary-omp.ts:700 - The terminal warning’s separate “after a provider refusal” wording is outside the requested refusal behavior. The intent calls for a captain-visible owed-work warning here and a visible Discord ack instruction in the stop continuation. Remove the terminal warning’s refusal annotation and its local copy at .omp/extensions/fm-primary-omp.ts:689.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 11 of 11 scenarios driven live against the product
Scenario Result Live Evidence
End a local OMP turn with a queued wake and synthetic Discord requests. OMP continues once, excludes the receipted answer, and warns if work remains. ✅ pass live Live OMP transcript, One continuation and an attended warning
End a local OMP turn with a synthetic ack receipt and a linked task paused in a live tmux pane. The turn ends without a continuation. ✅ pass live Live OMP transcript, Ack with a live linked task
End a local OMP turn with a stale watcher beacon and a synthetic unanswered request. One continuation carries both the repair and the owed work. ✅ pass live Live OMP transcript, Supervision repair and owed-work context
Hold the local linked-task lookup past 15 seconds after a synthetic provider refusal. OMP continues with visible-ack guidance and the original lookup finishes after release. ✅ pass live Live OMP transcript, Slow scan and refusal guidance
Enter away mode during a local owed-work scan or give the lock to another live process. OMP leaves the synthetic work queued without a continuation or warning. ✅ pass live Live OMP transcript, Away custody changes during the scan and A different PID owns the session lock
Press Escape in local OMP while a synthetic Discord request still needs an answer. The turn ends without a stop hook and displays the owed-work warning. ✅ pass live Live OMP transcript, Warning on a terminal Escape
Receive a typed refusal from the loopback provider with a synthetic unanswered request. The continuation asks for a visible ack and states how to brief the legitimate work without quoting the refusal… ✅ pass live Live OMP transcript, Typed provider refusal
Let a second synthetic Discord request become overdue after local OMP returns to idle behind an open wake episode. The real watcher starts a model turn for the new wake. ✅ pass live Live OMP transcript, Real watcher rings again from idle
Deliver two synthetic overdue requests to idle OMP with ACP deferral active. The second close retires the unconsumed marker and uses the forced hand-off. ✅ pass live Live OMP transcript, Unconsumed wake marker in deferred ACP delivery
Queue an overdue check and then a newer task signal during a local OMP run. Settlement force-delivers the newer signal, and the next settlement leaves the same batch alone. ✅ pass live Live OMP transcript, Newest coalesced close and once-per-batch bound
End the local OMP run while its watcher successor is being restored. After the real supervision branch accepts the restored signal, settlement delivers the earlier coalesced check to main. ✅ pass live Live OMP transcript, Settlement replay after watcher restoration
  • python3 .live-validation/checks.py bounded base linked nonowner repair timeout custody terminal refusal idle drove the real OMP TUI in disposable tmux sessions with a loopback provider. The baseline replay substituted the three runtime files from e89ec466.
  • python3 .live-validation/wakes.py settle restore drove the real watcher and OMP TUI with synthetic overdue records and a newer task status signal.
  • python3 .live-validation/acp.py drove omp acp over stdio to exercise the unconsumed-wake hand-off.
  • tests/fm-omp-primary.test.sh targeted selectors test_native_omp_idle_main_hears_wake_behind_open_episode, test_native_omp_settlement_edges, and test_native_omp_turn_end_with_unacked_wakes_continues_once. The initial selection also ran test_native_omp_launch_error_journal and test_resolve_path_uses_node_when_readlink_f_is_unavailable.
  • Captured live terminal output with tmux capture-pane, rendered both captain warnings to PNG, and verified that the disposable OMP, watcher, and tmux processes had exited.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

dnth added 6 commits November 21, 2026 09:32
- session_stop continues once while the lock-owning session outside away mode still has main-owned wake rows, naming any provider refusal from the run; the bounded second stop warns the captain instead of ending silently.
- The watch core records a settled main on terminal agent_end; a close behind an open fallback episode now forces a turn while main is idle instead of being suppressed until someone acknowledges.
- runGuard ignores stdin EPIPE from a guard that exits before reading its payload.
- ext-respond: a provider refusal never excuses silence; phrase briefs in the work's legitimate purpose.
- Regression tests cover both paths; docs updated in turnend-guard.md and omp-supervision-branch.md.
…turn ends

- The turn-end continuation counts Communication Officer requests still owed an answer (no reply, reply still delivering, or ack-only with no live task) through fm_ext_owed_requests, alongside unacknowledged main wake rows, and rides the supervision continuation when both apply.
- The owed-work scan is bounded at 15 s, inside OMP's 30 s handler deadline; an unfinished scan counts as owed rather than clear.
- Refusal tracking uses only typed stopDetails, makes no fallback claim, copies no provider text, and asks for an ack only when a request has no reply yet.
- Settlement force-delivers the newest close coalesced during the ending run, once per batch newer than the last hand-off; the unread main_idle mirror field is gone.
- A terminal agent_end with no preceding stop check raises a captain-visible warning when work is owed; forced recovery on that path is filed as fm-omp-terminal-recovery.
…scans

- idle-close-suppressed-behind-inflight: the idle-episode bypass no longer requires an empty in-flight marker; it retires a staged but unconsumed wake (consumed by=idle-bypass) and force-sends the next close.
- settlement-prefers-older-check: settlement delivers the newest coalesced close, matching docs/omp-supervision-branch.md.
- settlement-lost-during-watcher-restore: a settlement that lands mid-restore is recorded and replayed when the delivery run completes.
- timeout-drops-refusal-ack-instruction: an inconclusive owed-work scan keeps the refusal ack instruction and asks ext-respond to check reply state.
- tests: test_native_omp_settlement_edges covers the first three; the owed-work test gains a timed-out-scan phase.
- owed-scan-can-interrupt-local-head-acceptance: the scan runs through the shared runCommandAsync with no kill timeout; the handler stops waiting after 15 s and treats it as inconclusive, while the scan (and any fm-crew-state.sh metadata write) finishes on its own.
- remove-duplicate-omp-subprocess-runner: the local spawn runner is gone; a failed or malformed scan is inconclusive instead of clear.
- owed-work-uses-stale-custody: lock ownership and away mode are rechecked after the scan before any continuation or warning.
- remove-unconditional-warning-delivery-claims: both warnings drop their predictions about what will force a turn.
- restore-replay-test-manufactures-branch-acceptance: the branch double accepts only offers the adapter marks eligible, with task metadata seeded per the dispatch contract.
- refusal-tests-miss-visible-ack-contract: both refusal phases assert the visible-ack instruction.
- settlement-can-miss-newest-main-close is declined into backlog item fm-omp-terminal-recovery per the captain's decision.
@dnth
dnth merged commit d0ec00f into main Nov 21, 2026
17 of 21 checks passed
@dnth
dnth deleted the fm/fm-idle-gap-1507-narrow branch November 21, 2026 04:11
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