Skip to content

fix: suppress repeated unchanged supervision reports - #78

Merged
peterOC26 merged 2 commits into
mainfrom
fm/fm-helper-no-repeat-captain-f1
Nov 21, 2026
Merged

peterOC26 merged 2 commits into
mainfrom
fm/fm-helper-no-repeat-captain-f1

Conversation

@peterOC26

Copy link
Copy Markdown
Owner

Intent

Captain asked how Sonnet does as the supervision helper. Answer given: accurate, but over ~16 hours 11 of its 46 captain-verdict outcomes were re-reports of an unchanged situation ("still paused, waiting on the captain, nothing new"), mostly while the Sydney restore waited on captain input; each one opens a MAIN turn for nothing. The 8 Nov comparison found the same regression: repeated captain re-reports of one unchanged situation (9 consecutive captain rows for one situation in 68 minutes, plus 4 for one parked test state), each opening a main turn. Recommendation: keep Sonnet and file a small fix so the helper does not re-report a situation that has not changed. Captain: "yes, please do that".

What Changed

  • Apply captain escalation rules only to new captain-relevant facts, comparing the current situation with the latest captain outcome, including its waiting reason and pending decision.
  • Allow task-level routine silence when the newest outcome, regardless of verdict, matches the current situation and no artifact, finding, decision, or action is new, including while waiting on MAIN or the captain.
  • Update prompt assertions to cover the revised reporting and silence rules.

Risk Assessment

✅ Low: This change only rewords the supervision prompt. Silence now depends on the newest durable row of any verdict, which list --recent returns because it includes silent rows. The captain-only read and the heartbeat rule are unchanged, docs only point to the prompt, and the tests check the prompt the script actually emits for both report surfaces.

Testing

The focused test passed when run through Bash. Two live Sonnet turns in a disposable lab recorded the unchanged hold as silent routine and the red-to-green history case as visible and non-silent, with both scoped wakes acknowledged. An initial assertion required a specific verdict for the changed case; the final check followed the durable-history contract and verified visibility instead.

  • Live validation: ✅ go - 2 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Repeated unchanged captain hold is recorded as silent routine ✅ pass live branch-repeat-live-sonnet.log
A green CI update after an intervening red-CI outcome stays visible ✅ pass live branch-repeat-live-sonnet.log
Evidence: Live Claude Sonnet repeat-outcome evaluation

Source: Live Claude Sonnet repeat-outcome evaluation

Live synthetic evaluation of the generated supervision-host prompt through the production Claude Sonnet engine turn.
Scenario: unchanged captain hold
Input history: {"seq":1,"epoch":1795255150,"task":"sydney-restore","wake":"","verdict":"captain","summary":"Sydney restore remains paused awaiting the captain choice between snapshot A and snapshot B; no restore action.","silent":false,"statusEndpoint":98,"statusIdent":"strong:38:11967001:2026-11-21 10:59:10.586727040 +0100"};{"seq":2,"epoch":1795255156,"task":"sydney-restore","wake":"signal: sydney-restore still waits for the same captain choice; no new facts","verdict":"routine","summary":"Sydney restore still paused awaiting the captain's choice between snapshot A and B; nothing new, no action taken.","silent":true,"statusEndpoint":98,"statusIdent":"strong:38:11967001:2026-11-21 10:59:10.586727040 +0100"};
Claude response: I handled the sydney-restore wake and recorded one silent routine outcome.

The restore is still paused waiting for the captain to pick snapshot A or snapshot B. The newest earlier outcome for this task was already a captain report with the same decision, so I added nothing for the captain. I took no action on the task.

I ran the acknowledgement command the drain printed. I claimed no leases, so there was nothing to release.
Persisted result: {"seq":2,"epoch":1795255156,"task":"sydney-restore","wake":"signal: sydney-restore still waits for the same captain choice; no new facts","verdict":"routine","summary":"Sydney restore still paused awaiting the captain's choice between snapshot A and B; nothing new, no action taken.","silent":true,"statusEndpoint":98,"statusIdent":"strong:38:11967001:2026-11-21 10:59:10.586727040 +0100"}
Host receipt: unchanged-turn	2	routine	sydney-restore
Wake row acknowledgement: empty; branch grant: consumed
Scenario: new green CI result after an intervening routine row
Durable history (captain, then red-CI routine): {"seq":1,"epoch":1795255228,"task":"ci-recovery","wake":"","verdict":"captain","summary":"Pull request is ready and waiting on the captain decision.","silent":false,"statusEndpoint":131,"statusIdent":"strong:38:11967947:2026-11-21 11:00:28.497624721 +0100"};{"seq":2,"epoch":1795255228,"task":"ci-recovery","wake":"","verdict":"routine","summary":"CI went red after rebase and the worker is fixing it.","silent":false,"statusEndpoint":131,"statusIdent":"strong:38:11967947:2026-11-21 11:00:28.497624721 +0100"};
Claude response: I recorded one captain-verdict outcome for `ci-recovery`. CI is green again after the rebase, and the pull request is still waiting on the captain's same approval. No PR URL was available in the records I read, so the summary doesn't include one.

The newest earlier outcome was routine (CI red, worker fixing it), so the green result counts as new. I took no action on the task.

The report command printed "recorded seq 3 [captain]". The acknowledgement command that followed printed nothing, so I can't confirm it consumed the wake.

I claimed no lease because I changed nothing on the task.
Persisted result: {"seq":3,"epoch":1795255236,"task":"ci-recovery","wake":"signal: CI is green again; ci-recovery is waiting for the captain","verdict":"captain","summary":"CI is green again after the rebase; the pull request is ready and still waiting on the captain's same approval.","silent":false,"statusEndpoint":131,"statusIdent":"strong:38:11967947:2026-11-21 11:00:28.497624721 +0100"}
Host receipt: changed-turn	3	captain	ci-recovery
Wake row acknowledgement: empty; branch grant: consumed

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ⚠️ bin/fm-branch-prompt.sh:149 - The new silence rule checks against the wrong history row. It says to set silent true when the situation is unchanged "since the last task outcome" (line 149, and line 121 says "since the last outcome for that task"). But the only durable-history read the prompt allows is the captain-only query on line 147 (select(.task=="<id>" and .verdict=="captain") | tail -n 1), with "do not expand the window" and "an earlier routine outcome does not count". So when the branch has no conversation memory of its latest routine row (after a restart, or because the prompt tells it durable records outrank memory), it can only compare against the newest captain row. Before this change that gap did nothing, because a situation still waiting on MAIN or the captain was never silent.

Example: (1) captain row: "PR ready for review, waiting on captain". (2) Visible routine row: "CI went red after rebase, worker fixing". (3) Next wake: CI is green and the task is waiting on the captain again, no action taken. Compared with the captain row nothing has changed, so the branch reports routine with silent true. The drain (bin/fm-wake-drain.sh:655) and the startup replay both drop silent rows, so the newest row MAIN can see still says CI is red. MAIN ends up with the wrong state and no error is raised.

Fix: have the silence decision read the newest row for the task regardless of verdict, for example bin/fm-branch-outcome.sh list --recent 2000 | jq -c 'select(.task=="<id>")' | tail -n 1, alongside the captain-row read. Then "unchanged since the last task outcome" is checked against the durable record. Same rule, other site: bin/fm-branch-prompt.sh:121 (task-level silence rule), plus the matching assertions at tests/fm-branch-supervision.test.sh:62 and :125.

  • ℹ️ bin/fm-branch-prompt.sh:93 - Repeats are only partly removed for heartbeats. The change now silences per-task rows for an unchanged hold, but the heartbeat rule on line 93 is unchanged: "Only report a silent routine fleet outcome after those checks find nothing pending". While a captain decision stays pending (the Sydney restore case), every heartbeat still records a visible routine fleet row that repeats the same unchanged hold. In attended posture these rows are listed in MAIN's drain without opening a turn. In away posture they go into the return brief. The removed line used to forbid silence for both tasks and fleet reviews; now tasks may be silent while fleet reviews may not. If the intent ("the helper does not re-report a situation that has not changed") is meant to cover these heartbeat rows too, the heartbeat rule needs the same exception. If it is meant to cover only captain rows that open MAIN turns, the current split is fine. This is a product decision for the author.

🔧 Fix applied.
1 info still open:

  • ℹ️ bin/fm-branch-prompt.sh:93 - Repeats are only partly removed for heartbeats. The change now silences per-task rows for an unchanged hold, but the heartbeat rule on line 93 is unchanged: "Only report a silent routine fleet outcome after those checks find nothing pending". While a captain decision stays pending (the Sydney restore case), every heartbeat still records a visible routine fleet row that repeats the same unchanged hold. In attended posture these rows are listed in MAIN's drain without opening a turn. In away posture they go into the return brief. The removed line used to forbid silence for both tasks and fleet reviews; now tasks may be silent while fleet reviews may not. If the intent ("the helper does not re-report a situation that has not changed") is meant to cover these heartbeat rows too, the heartbeat rule needs the same exception. If it is meant to cover only captain rows that open MAIN turns, the current split is fine. This is a product decision for the author.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 2 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Repeated unchanged captain hold is recorded as silent routine ✅ pass live branch-repeat-live-sonnet.log
A green CI update after an intervening red-CI outcome stays visible ✅ pass live branch-repeat-live-sonnet.log
  • tests/fm-branch-supervision.test.sh direct invocation (permission denied; rerun through Bash)
  • bash tests/fm-branch-supervision.test.sh
  • FM_HOME=<marked lab> bin/fm-branch-prompt.sh --supervision-host
  • fm_supervision_engine_turn claude sonnet ... using the production engine function and synthetic lab histories
  • bin/fm-branch-outcome.sh list --recent 2000 to inspect persisted verdicts
  • bin/fm-wake-drain.sh and its printed acknowledgement command; verified both lab wake rows and grants were consumed
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@peterOC26
peterOC26 merged commit a4a0d07 into main Nov 21, 2026
30 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