Skip to content

fix(daemon): the quiet nudge ladder keeps read credit and escalates once - #837

Open
bllshttng wants to merge 2 commits into
mainfrom
feature/x-b1bc-quiet-worker-nudge-repeats
Open

bllshttng wants to merge 2 commits into
mainfrom
feature/x-b1bc-quiet-worker-nudge-repeats

Conversation

@bllshttng

Copy link
Copy Markdown
Contributor

Summary

  • The quiet-recovery ladder could never climb past its first nudge: the episode reset at the top of action() fired on the same pass the nudge's own accepted-new-turn delivery landed in the transcript, wiping read_stage before the read could be credited, so an unchanged worker was re-nudged at stage 1 every ~15 minutes.
  • The help handoff marked episode.escalated only after help() succeeded, so a failed team-owner resolution re-decided Help and re-emitted quiet_worker_error on every 60s pass.
  • Resolve the pending read before the reset and take the contact as the new activity; persist the escalation intent with the state save, before the handoff runs. Measured premises with verdicts live in the bound plan (7231 quiet_worker_nudge and 19751 quiet_worker_error rows in 7d, sliding window, event-journal read 2026-12-02).

Changes

  • crates/fno-agent/src/runtime/codex_watch/quiet.rs: action() resolves a read-confirmed pending before the activity reset and syncs episode.activity to the contact; a real advance after the read still resets on a later pass. The Recover-failure and Help arms set escalated before the state save, so the handoff fires once per episode.
  • crates/fno-agent/src/runtime/codex_watch/quiet_tests.rs: two pins - read credit survives the delivery's own activity advance (next nudge is stage 2, not a stage-1 repeat), and a help handoff that cannot resolve its owner errors emits exactly once, then holds.

Test Plan

  • CI: the fno-agent quiet suite green on the PR head (cargo test quiet paths; D3323 gates local runs off)
  • cargo fmt --check clean (run locally, pass)
  • bash scripts/ci/check-file-budget.sh clean on the committed head (run locally, pass)

Audited owners: crates/fno-agent/src/runtime/codex_watch/quiet.rs (no cut: quiet_tests.rs is its owner fixture set; this PR adds the two missing contract pins, and the existing fixtures each guard a distinct ladder, quota, stop or shield contract, read under the test-value angle this round)

Test delta

Language Added Removed Net
Python 0 0 0
Rust 2 0 2
Shell 0 0 0
Total 2 0 +2

Serves: internal - the fleet leads and workers hit by quiet-worker nudge noise (node x-8050 / x-b1bc why, answered part by part).

  • "Repeated nudges with no state change are the noise leads and workers see": met - the ladder now climbs (a read-confirmed stage 1 is followed by stage 2, not a stage-1 repeat), so an unchanged worker is no longer re-nudged every ~15 minutes.
  • "7231 nudges and 19766 quiet_worker_error rows in 7 days": met for the error half - the help handoff now persists its escalation intent before the attempt, so a failed owner resolution emits one quiet_worker_error and holds instead of re-firing on every 60s pass (measured 19751 rows on the same 7d read; sliding-window drift since the filing).
  • The cited per-node 1d counts (x-bf3a 184, x-de45 182, x-96cc 182, x-ff1f 166): met as measured and answered - the loop is confirmed from the event rows, but those exact figures do not reproduce as single-window 1d counts (the event reader prints a 50-row sample and one session's cadence ceiling is ~96/day); the verdicts live in the bound plan under ## Premises.

Review

Reviewed at 30be8e6: 1 rounds, 0 findings disposed.

Fixes x-8050 (x-b1bc)

The nudge's own delivery writes the transcript: the accepted turn's harness rows advance tail.activity one pass behind the read, so the episode reset wiped read_stage on the very pass the read landed and the ladder re-nudged stage 1 every ~15 min (7231 quiet_worker_nudge rows and 19751 quiet_worker_error rows in 7d). Resolve the pending read before the reset and take the contact as the new activity; real output after the read still opens a fresh episode. Persist the escalation intent with the state save before the handoff runs, so a failed owner resolution emits one quiet_worker_error and holds instead of re-deciding Help on every 60s pass.

Task 1.1: Repair the ladder decision (read credit plus escalate-once)
Task 1.2: Pin the two contracts with ladder tests

@bllshttng bllshttng left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fno review: level=medium round=1 findings=0 verdict=pass head=30be8e6a

…dead branch reaches Recover

A gone transcript reads Tail::default(), whose zero activity holds the ladder at its activity-0 guard; without the seed the fixture never reaches Recover and counts zero errors.

This branch has not been deployed

No deployments
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