Skip to content

fix(pi): suppress routine supervision wake noise - #87

Merged
withally merged 13 commits into
mainfrom
fm/fm-pi-idle-note-absorb-f1
Aug 30, 2026
Merged

withally merged 13 commits into
mainfrom
fm/fm-pi-idle-note-absorb-f1

Conversation

@withally

@withally withally commented Aug 29, 2026 •

Copy link
Copy Markdown
Owner

Intent

Stop idle and stale Pi supervision notes from costing model turns. Unsolicited routine outcomes must remain in the durable branch outcome store, never render on MAIN, and never start a captain-facing turn. Captain outcomes remain for PR-ready work, decisions, failures, blockers, credentials, destructive actions, and security matters. Implement bounded pre-prompt wake coalescing with urgent bypass so one idle-repeat flood produces at most one branch turn, not one per note. For a given window and text, the first stale wake is urgent and bypasses coalescing; an identical same-text stale repeat while that text remains the last-delivered stale for that window is store-only with no branch turn and no re-prompt. Accept routine outcomes carrying silent:true durably and silently. Treat every first stale payload as urgent, and classify validated status tails as urgent for blocked, failed, done, or needs-decision prefixes plus login, credential, credentials, PR ready, ready for review, and checks green. Keep status-tail reads bounded, direct-child only, no-follow, nonblocking, and aligned with the shared task-id grammar; do not add watcher-boundary urgency metadata in this task. Preserve pending wakes safely across shutdown and suppress stale-generation fallback to replacement MAIN. Do not solve this only by pinning a cheaper branch model. This is fork-local for withally/firstmate. Weekly overlay PR 83 is already merged as f6600b7 on withally/main, so rebase normally and do not add a keep-list entry. Origin and any PR must be withally/firstmate, never kunchenguid/firstmate. Use one sentence per line in Markdown, plain dash style, no agent co-author, and colocated behavioral tests. Preserve the documented Pi 0.84.2 no-model live-guard limitation as upstream follow-up for fixes 3158 and 3261 through weekly sync. Record coalesced-offer-not-reserved and suppressed-stale-row-replayed as PR follow-up rather than fixing them in this task, per Firstmate final-round ruling.

What Changed

  • Keep routine supervision outcomes in the durable outcome store with no MAIN delivery or captain-facing turn, while captain outcomes use one hidden follow-up turn and remain readable on demand.
  • Add 250 ms pre-prompt wake coalescing with urgent bypass for first stale wakes, validated urgent status tails and direct destructive/security cues, plus same-text stale-repeat suppression and stale-generation shutdown safeguards.
  • Update the Pi supervision contracts and poster, and extend colocated portable/live coverage for store-only delivery, coalescing, urgency, shutdown preservation, and isolated credential behavior including the documented Pi 0.84.2 no-model follow-up.

Risk Assessment

⚠️ Medium: The change is bounded, but a valid shared status form still misses the required urgent bypass and can delay a captain-relevant wake by the coalescing window.

Testing

Targeted behavioral, integration, documentation, and real Pi SDK validation passed with a reviewer-visible transcript captured; the broader backlog-handoff run is partial due an unrelated unchanged fixture failure at bin/fm-public-followup.sh:142.

  • Outcome: ⚠️ 1 warning across 1 run (14m31s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 error
  • 🚨 .pi/extensions/fm-branch-supervision.ts:232 - The required criterion is to classify validated status tails as urgent for blocked, failed, done, or needs-decision prefixes. The regex at line 232 permits only one bracketed tag before the colon, but the shared status grammar and existing rows allow multiple tags such as needs-decision [corr=...] [key=...]: ...; that signal tail returns false from statusTailIsUrgent, so urgentWake applies the coalescing delay instead of the urgent bypass. Reuse the shared status parser or accept repeated bracketed tags.

🔧 Fix: Accept repeated status tags in Pi urgency classifier
1 error still open:

  • 🚨 .pi/extensions/fm-branch-supervision.ts:232 - The required criterion is “classify validated status tails as urgent for blocked, failed, done, or needs-decision prefixes.” The added line 232 permits repeated bracketed tags via (?:\s+\[[^\]]+\])*, but misses the shared grammar’s valid unbracketed correlation token. A tail such as needs-decision corr=0123456789abcdef [key=release]: choose is reduced to needs-decision by the shared parser, yet this classifier returns false and applies the coalescing delay instead of the urgent bypass. Align this classifier with the shared corr=... grammar; the colocated test currently covers only bracketed correlation tags.
⚠️ **Test** - 1 warning
  • ⚠️ bin/fm-public-followup.sh:142 - The changed backlog crash checks passed, but a later unrelated public-followup fixture failed because PF_REGISTRY_LOCK_IDS[@] was unbound under set -u at unchanged bin/fm-public-followup.sh:142.
  • bash tests/fm-pi-branch-extension.test.sh
  • bash tests/fm-branch-supervision.test.sh
  • FM_PI_BRANCH_LIVE_E2E=1 bash tests/fm-pi-branch-live-e2e.test.sh
  • bash tests/fm-supervision-instructions.test.sh
  • bash tests/fm-pi-watch-extension.test.sh
  • bash tests/fm-backlog-handoff.test.sh (partial; changed crash checks passed)
  • git status --short --untracked-files=all && git diff --quiet
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@withally
withally force-pushed the fm/fm-pi-idle-note-absorb-f1 branch from aac1e3c to 4dc2472 Compare August 30, 2026 03:05
@withally withally changed the title fix(pi): absorb routine supervision wake noise fix(pi): suppress routine supervision wake noise Aug 30, 2026
@withally
withally merged commit e83f36d into main Aug 30, 2026
14 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