Repository navigation
docs(rfc): crew log wake -- a worker's write pulls the conductor's tick forward - #15671
chenmingwei23 wants to merge 1 commit into
Conversation
c9120f2 to
3f87f5c
Compare
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsFINDING -- docs/request-for-change/rfc-crew-log-wake.md:163 -- mid-fire False positive or not applicable? A repository writer can comment: |
Design Review (Fable 5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Lossy push undercuts its own payoff: once the patrol cadence stretches to hours, every drop case parks an actionable report for hours, not minutes. WatchGoal 4 ("a dropped push is caught by the next scheduled tick") is priced at today's 300 s cadence, but §3.3's conclusion is "the Suggestions
[DESIGN-REVIEWED] 3f87f5c Description read[DESCRIPTION-READ] e43716cf6b17be251fdf2eee0f02108cd2080e5d3af6b6b7cc05ae82444ebfc2 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
|
Closing: standalone RFC PRs are not wanted in this repository. The decision belongs in the implementing PR body. |
Opus 5 Review — ✅ no blocking findingsReviewed Review detailsAdvisory only — nothing blocks; the RFC's prescribed seam cannot run as written and three of its code citations are wrong. FINDING — docs/request-for-change/rfc-crew-log-wake.md:183 — "The hook runs on the eager drain thread" calling FINDING — docs/request-for-change/rfc-crew-log-wake.md:125 — " FINDING — docs/request-for-change/rfc-crew-log-wake.md:162 — "the re-arm at the end of that cycle covers the report that caused it": a dashboard-slot loop gets no end-of-cycle re-arm ( FINDING — docs/request-for-change/rfc-crew-log-wake.md:100 — " FINDING — docs/request-for-change/rfc-crew-log-wake.md:30 — "rebuilt by [OPUS-REVIEWED] 3f87f5c Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Problem / Motivation
Goal: record the decision that a worker's report, or its session's close, pulls its conductor's armed wake gate forward at once, so the conductor acts within seconds of the event instead of up to one patrol cadence later.
Today a conductor learns about its workers by ticking. The Phase 3 wake gate (
rfc-conductor-work-ledger, in flight on #12781) makes a tick that finds nothing cost no model turn, which fixes the price of patrolling. It does not fix the delay: the gate runs on the loop's cadence (300 s by default), so aquestionwritten one second after a tick waits 299 s, and a worker session closed with its item still open is noticed only after a staleness window has also elapsed on a later tick.The crew log's eager fold already sits on the append path and says in its own header that it does not push because "there is no consumer yet to need it". The conductor's armed gate is that consumer. The team discussion of 2026-09-30 reached the same gap from the product side (a conductor does not know when a session it opened ended) and weighed direct worker-to-conductor messaging against the crew log route; this document records the crew log route and names the one seam it needs.
An earlier draft of this design (2026-09-22, never in this tree) said "the ledger is the channel" and hooked
session_ledger_record. The word has since moved: the per-unit append-only file is the crew log, and the session ledger and work ledger are two folds of it. This document hooks the log, not a fold, and says so.Why it matters
A conductor fleet is only as responsive as its slowest wait. A worker parked on a
questionfor a full cadence is a worker doing nothing, and a worker that died without reporting is invisible until two timers have elapsed. Closing that gap is what lets the patrol cadence move from minutes to hours, which is where the real token saving is.Not a goal
session_sendrefusal; the worker gains no handle on its conductor.What changed (motivation -> approach -> change)
Goal -> approach: the cheapest push is one that moves a deadline the conductor already armed, because every cap, stop sentinel and the probe gate then apply unchanged.
AutoNudgeService.fire_nowis exactly that seam and its docstring states the contract. So the design adds two triggers (awork/*crew-log append from a bound worker;close_sloton a bound worker) that each resolve the binding and callfire_nowon the conductor'swork-ledgerloop, plus one probe input (worker_closed) so a close is stale at once rather than after the window. The 2026-09-22 draft's[ledger wake]envelope,deliveredmap, replay sweep and one-shot scheduler deadline are dropped: with the tick kept as fallback, a lost push is caught a cadence later and none of that machinery is needed.Change:
docs/request-for-change/rfc-crew-log-wake.md(statusdraft) and its row in the directory README with the audit note.Backwards compatibility
Compatible: documentation only.
Tests
N/A -- documentation only.
scripts/docs-lint.shpasses on the branch with the new file indexed.Manual verification
Every symbol the document cites was read at
321fd996a2:fire_nowand its three refusals inautonudge_service/firing.py,crew_log/eager.pyand its "does not push" header,work_ledger.apply_worker_report,work_ledger.read_binding,chat_handlers.close_slot, and the Phase 3 block ofrfc-conductor-work-ledger.md.Related Issues
Builds on #12781 (Phase 3 wake gate, draft) and the Phase 3 block of
rfc-conductor-work-ledger.md.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)