Fix isolated cron cold runner setup timeout#86893
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close this PR as superseded: the useful cron setup-timeout idea is now covered by a newer clean replacement that implements the change in the current watchdog owner with telemetry and proof, while this branch is conflicting and targets the old Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this branch and let maintainers review or land #96219 as the clean canonical implementation if they accept the availability tradeoff. So I’m closing this here and keeping the remaining discussion on #96219. Review detailsBest possible solution: Close this branch and let maintainers review or land #96219 as the clean canonical implementation if they accept the availability tradeoff. Do we have a high-confidence way to reproduce the issue? Yes. Current main source still uses a fixed 60s pre-runner setup watchdog while isolated agentTurn jobs can have much larger timeout budgets; the PR body also supplies after-fix runtime output. Is this the best way to solve the issue? No. The idea is valid, but this branch is no longer the best implementation path because #96219 applies the same fix in the current watchdog owner and carries telemetry/proof. Security review: Security review cleared: The diff only changes cron timeout logic and tests; no dependency, secret, CI, package, or supply-chain surface was introduced. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against eac1d3349c29. |
|
ClawSweeper PR egg: ✨ hatched ✨ glimmer Cosmic Shellbean. Rarity: ✨ glimmer. Trait: polishes edge cases. DetailsShare on X: post this hatch
About:
|
634e73c to
2c96985
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
2c96985 to
e864cf5
Compare
|
ClawSweeper applied the proposed close for this PR.
|
Summary
Tests
node scripts/run-vitest.mjs src/cron/service/timer.regression.test.tsReal behavior proof
Behavior addressed: isolated cron agent-turn setup no longer aborts at the old fixed 60s runner-start watchdog when the job has a longer timeout budget; the run stays alive past 60s and then reaches the new bounded setup timeout.
Real environment tested: local OpenClaw cron runtime on PR head
2c969858b6389c7e3e056c1a5e51ab894868bc6b, macOS, Node 26.0.0, isolated temp cron store, no external credentials or network services.Exact steps or command run after this patch: ran a real-time
node --import tsx --input-type=modulescript from the PR checkout that instantiatedCronService, created an isolatedagentTurncron job withtimeoutSeconds: 130, started a manual run, withheld the runner-start signal, sampled state after 61s, then let cron reach the derived setup bound.Evidence after fix: copied terminal output from the real-time cron runtime run:
{ "openclawHead": "2c969858b6389c7e3e056c1a5e51ab894868bc6b", "scenario": "isolated cron agent-turn waits before runner start", "configuredTimeoutSeconds": 130, "expectedPatchedSetupBoundMs": 65000, "after61s": { "elapsedMs": 61035, "runnerHookEnteredMs": 41, "abortObserved": false, "cleanupCalls": 0 }, "final": { "elapsedMs": 65067, "abortObservedAtMs": 65044, "cleanupCalls": 1, "cleanupTimeoutMs": 130000, "runResult": { "ok": true, "ran": true }, "lastRunStatus": "error", "lastStatus": "error", "lastError": "cron: isolated agent setup timed out before runner start", "persistedJobs": 1 }, "events": [ { "action": "started", "elapsedMs": 34, "jobId": "2ddaca0a-a12e-4b7c-b7d9-2ab0746ee121" }, { "elapsedMs": 65061, "level": "warn", "message": "cron: job run returned error status", "payload": { "jobId": "2ddaca0a-a12e-4b7c-b7d9-2ab0746ee121", "jobName": "PR 86893 live setup-window proof", "error": "cron: isolated agent setup timed out before runner start", "diagnosticsSummary": "cron: isolated agent setup timed out before runner start" } }, { "action": "finished", "elapsedMs": 65062, "jobId": "2ddaca0a-a12e-4b7c-b7d9-2ab0746ee121", "status": "error", "error": "cron: isolated agent setup timed out before runner start", "durationMs": 65014 } ] }Observed result after fix: at 61.035s cron had not aborted and cleanup had not run; at about 65.044s cron aborted the pre-runner setup phase and recorded
cron: isolated agent setup timed out before runner start, matching the patched derived bound for a 130s isolated job instead of the previous fixed 60s abort.What was not tested: a full external Codex provider cold start with live model credentials was not run; this proof isolates the cron watchdog path before runner start, which is the changed runtime behavior.