[codex] Ignore stale terminal scheduler heartbeats#5240
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the turn scheduler to treat heartbeat errors against already-terminal runs as stale scheduler observations rather than new executor failures. It introduces a HeartbeatOutcome enum to distinguish between renewed, already-terminal, and failed heartbeats, preventing scheduler races from incorrectly marking completed runs as failed. A comprehensive integration test has been added to verify this behavior. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
🚅 Deployed to the ironclaw-pr-5240 environment in ironclaw-ci-preview
|
Summary
InvalidTransition { from: terminal, to: Running }as a stale terminal observation instead ofscheduler_heartbeat_failedFixes #5239.
Evidence
Railway deployment
3e28add8-824b-42c1-bea4-d2533fdddc48at commit44f063d97fcf204d78cde198c262c9881a704bb3logged this sequence for runb0628cba-5564-4542-ad77-0f506f465173:The regression test was added before the runtime patch and failed on unpatched
origin/mainwith:Validation
cargo test -p ironclaw_host_runtime scheduler_does_not_fail_completed_run_for_stale_terminal_heartbeat --test turn_scheduler_contract -- --nocapturefailed before the fix, passes aftercargo test -p ironclaw_host_runtime scheduler_records_failure_when_heartbeat_call_times_out --test turn_scheduler_contract -- --nocapturecargo fmt --checkcargo test -p ironclaw_host_runtimecargo clippy -p ironclaw_host_runtime --all-targets -- -D warningsNotes
This intentionally does not relax
ironclaw_turnstransition rules. The store should continue rejecting invalid terminal transitions; the scheduler should avoid misclassifying a stale terminal heartbeat as a new runner failure.