Repository navigation
fix(cron): align lifecycle tests with controller retirement - #195026
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR updates cron diagnostic expectations and failure injection to match controller-owned retirement. Example: A cron run adopts session persisted-run-session and completes its queued input.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR repairs stale lifecycle tests while preserving controller ownership and admission-cleanup coverage; no actionable patch defects were found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe isolated cron runner prepares and executes an agent turn, publishes message diagnostics, and releases session work; the shared message lifecycle consumes queued input while the session controller owns final retirement. flowchart TD
CronJob --> IsolatedRunner
IsolatedRunner --> MessageLifecycle
MessageLifecycle --> DiagnosticEvents
IsolatedRunner --> SessionController
SessionController --> DiagnosticEvents
Technical reviewBest possible solution: Land this focused test adaptation once the required checks complete successfully. Do we have a high-confidence way to reproduce the issue? Current source deterministically emits processing during message completion and idle at controller retirement, contradicting the base test expectation; the PR reports matching base failures and passing repaired tests, which this review did not rerun. Is this the best way to solve the issue? The patch is the smallest complete repair: update the ordered diagnostic contract and move fault injection to message completion while retaining rejection and admission-release assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 43f6e303f0a0. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests -3. Total -3 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel 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 Reviewed November 7, 2026, 11:53 PM ET / November 8, 2026, 04:53 UTC. |
Preserve the processing and queue-consumption contract introduced by #194907. Assert controller retirement ordering and inject finalization failure at message completion while retaining rejection and admission-release checks. Co-authored-by: steipete <[email protected]>
4019d32 to
310d155
Compare
…#195026) Preserve the processing and queue-consumption contract introduced by openclaw#194907. Assert controller retirement ordering and inject finalization failure at message completion while retaining rejection and admission-release checks. Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: steipete <[email protected]>
What Problem This Solves
Fixes two deterministic cron test failures in scheduled main run 42442788470 after #194907 changed active-run diagnostics.
User Impact
No runtime behavior changes. Restores cron coverage of message completion, controller retirement, and admission cleanup after a finalization failure.
Why This Change Was Made
The introducer is
ee3ec605a59c(#194907), whose raw parent is the previous green scheduled head5e1a27a9bcc4. Its shared message lifecycle now consumes a completed input while preservingprocessinguntil the active controller retires. The extra event is the final controller-owned idle transition; it is not a duplicate queued input.Keep the strict ordered event assertion, now checking processing with zero queued inputs before message completion and idle with zero queued inputs after controller retirement. Inject the finalization error at queue consumption instead of the obsolete immediate-idle transition; retain the exact rejection and admission-release assertions. Scoped spy disposal replaces manual cleanup. The patch has no production changes and reduces test code by three lines, with no baseline changes. Its hunks are separate from #188301's imports and appended timeout test.
Related: #194907. This is a coordinator-requested repair of the named main failures.
Evidence
9a5df3d60f12b6c303225c50abeaa4d17bd27108, the two named files reproduced both reported failures: 2 failed, 16 passed (66.30 s including cold worker preparation).node scripts/run-vitest.mjs src/cron/isolated-agent/run.diagnostic-events.test.ts src/cron/isolated-agent/run.session-lifecycle.test.ts --maxWorkers=1: 18 passed, 2 files, 19.65 s Vitest duration / 21.49 s wrapper duration. CI seconds are pending.scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json --type-check; touched-file formatting andgit diff --checkpassed.