Repository navigation
fix(cron): stopped session turns trigger failure alerts - #192550
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review Please review exact head d906f57. This is the controller terminal-outcome repair for stopped scheduled session turns; exact-head CI is running. No automation repair or merge lane is requested. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR carries controller terminal outcomes into Cron settlement so intentional interruptions avoid failure alerts while timeouts and stalls remain failures. Example: Stop a scheduled turn in agent:main:dashboard:stopped-cron with failureAlert.after set to 1.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a current cancellation-classification defect using the existing owners, and no actionable introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherScheduled conversation jobs enter ordinary session admission; the controller owns execution termination, the session-event receipt carries its outcome, and Cron applies scheduling and notification policy. flowchart LR
A[Scheduled job] --> B[Session admission]
B --> C[Reply controller]
C --> D[Session event receipt]
D --> E[Cron settlement]
E --> F[Run history and notification policy]
Technical reviewBest possible solution: Preserve controller-owned terminal facts through the receipt and let existing Cron interruption policy decide failure accounting and notifications. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the path from controller cancellation to a live caller signal and unclassified Cron error; no target code was executed during this read-only review. Is this the best way to solve the issue? The patch repairs the producer-to-consumer contract using existing terminal classification and scheduler policy, with no unnecessary owner, persistent state, or configuration surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e25fdc28da1c. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +138, Tests +85, Docs +4, Other +2. Total +229 across 9 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 4, 2026, 1:11 AM ET / 06:11 UTC (Revision 2). |
|
@clawsweeper re-review Please review exact head The prior rank-up requests are addressed: exact-head PR CI passed the six-mode real-controller terminal matrix (including frozen supersession), passive restart-drain occurrence preservation, and the real The frozen-supersession classification and stale restart-drain expectation were repaired after independent review/CI. The separate stale-target diagnostic gap is #192560. No Team deployment or live-account proof is claimed. |
|
🦞👀 Re-review progress:
|
|
Merged via squash auto-merge.
|
Fixes #192549
What Problem This Solves
Stopping a scheduled turn through its session can count as a failure and trigger an unwanted repair or failure alert.
User Impact
Stopped, restarted, and superseded scheduled turns use the existing interruption policy. Genuine deadline timeouts and stalled executions retain failure semantics. Restart guidance tells the parent how to inspect and continue retained child work without mistaking a stopped execution for a yielded pause or transferring workspace ownership.
Why This Change Was Made
The session-event owner recorded cancellation as a string while cron examined a different, still-live caller signal. Preserve the canonical terminal outcome before asynchronous settlement and cleanup, then pass its classification to cron. Scheduler policy and access rules stay with their current owners; no schema or configuration change is required.
Evidence
Candidate:
467e75e55a7cf9aaee047bd62614ce2b3e9ff2d6; tree:c7fcf2358b9f6f58e42a26078cd063ca3501d013; source base:8cb23492d6ed97d2c72eda35178fb298c40ea17c.Independent Codex P0-P2 source review passed for the original production patch. A bounded independent final-head review found frozen supersession was still misclassified; that finding is repaired and the reviewer verified the final source/test tree with no remaining P0-P2 finding. The controller matrix now also asserts supersession with an un-aborted signal. Source review does not establish runtime behavior.
Formatting and diff checks pass. Exact-head PR CI passed all selected jobs, including build, production/test types, lint, guards, UI, all three PostgreSQL conformance shards and the affected runtime regressions. No local dependency-backed test execution was attempted.
Actual Bun-backed CI proof: controller matrix passes 20/20 cases including user stop, restart, ordinary/frozen supersession, timeout and stall. Session-event handoff passes 24/24 cases including passive restart-drain outcomes. Public Stop boundary passes the real sessions.abort-to-Cron test: no failure incident, no alert, zero error streak and no extra repair turn. The containing two files pass 105/105 tests.
The earlier fixture and stale passive-drain expectation failures were repaired. Current PR CI also passes UI; no inherited-failure waiver is needed. Exact-head ClawSweeper review reports no findings and no before-merge moves. Synthetic Gateway proof does not establish deployed or live-provider behavior.
Production delta: +67 lines, for the canonical terminal fact and its propagation. Tests: +156 lines, including the cases file excluded from the counted test-line ratchet. No alternate scheduler policy, state schema, or configuration surface is added.
The separate stale-target diagnostic gap is recorded in #192560; the historical incident does not establish which authority guard fired.
No Team deployment, restart, or live-account proof is claimed. This fixes a proven classification defect; it does not establish that every historical thread failure had this cause.
Landed by squash as
f517164d87e5affe87afab6e23b48ef934ca3a48after exact-head required CI and review passed. Deployment remains separate.