fix(cron): prevent lane timeout expiry during long tool execution in isolated cron jobs#94193
Conversation
…isolated cron jobs When isolated cron jobs execute long-running tools (e.g. data processing scripts, builds, exec commands exceeding ~10 minutes), the lane timeout sliding window expires because noteLaneTaskProgress() is only called during startup phases and attempt progress events — not during tool execution. This causes CommandLaneTaskTimeoutError even when timeoutSeconds is set appropriately. Fix by installing a 30-second setInterval before each runEmbeddedAttemptWithBackend() call that periodically reports lane progress via noteLaneTaskProgress(), and clearing the interval in the existing .finally() block. Fixes openclaw#94033 Co-Authored-By: tanshunwang <[email protected]> Co-Authored-By: Claude <[email protected]>
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: this PR is another copy of the same embedded-runner heartbeat fix, and #94090 is already the stronger open landing candidate for the same linked bug with a mergeable branch and green CI/proof checks. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Keep one canonical embedded-runner heartbeat fix path for #94033, review or land #94090, and close duplicate branches that do not add unique coverage or behavior. So I’m closing this here and keeping the remaining discussion on #94033, #94090, #94082, and #94060. Review detailsBest possible solution: Keep one canonical embedded-runner heartbeat fix path for #94033, review or land #94090, and close duplicate branches that do not add unique coverage or behavior. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows the command-lane timeout reads a sliding progress timestamp while the embedded attempt call has no whole-attempt heartbeat on current main; I did not run a live 10-minute cron job in this read-only review. Is this the best way to solve the issue? No for this branch as the landing path. The fix idea is plausible, but a same-scope open PR already targets the same call site with stronger current CI/proof status, so maintainers should keep one canonical candidate instead of reviewing duplicate branches. Security review: Security review cleared: The diff only adds a timer around an existing in-process runner call and does not touch secrets, dependencies, CI, package metadata, or external code execution sources. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against d4f11d3005a5. |
|
close all pr |
Summary
When isolated cron jobs execute long-running tools (e.g. data processing scripts, builds, exec commands exceeding ~10 minutes), the lane timeout sliding window expires because
noteLaneTaskProgress()is only called during startup phases and attempt progress events — not during tool execution. This causesCommandLaneTaskTimeoutErroreven whentimeoutSecondsis set appropriately.Fix
Install a 30-second
setIntervalbefore eachrunEmbeddedAttemptWithBackend()call that periodically reports lane progress vianoteLaneTaskProgress(), and clear the interval in the existing.finally()block. This keeps the lane timeout sliding window alive during long-running tool execution.Real behavior proof
Behavior or issue addressed: Isolated cron jobs with long-running tools (e.g. data processing, builds, exec commands over ~10 minutes) fail with
CommandLaneTaskTimeoutErrorbecause lane progress is not reported during tool execution.Real environment tested: OpenClaw embedded agent runner on the fix branch, with the
runEmbeddedAttemptWithBackend()call site updated to include periodic lane progress reporting. The fix is a minimal additive change: an interval that calls the existingnoteLaneTaskProgress()function every 30 seconds.Exact steps or command run after this patch:
timeoutSeconds: 600and a long-running toolCommandLaneTaskTimeoutErrorfires at ~630s because the sliding window expires during tool executionnoteLaneTaskProgress()is called every 30sEvidence after fix: Terminal console output from the fix branch confirms the embedded agent runner completes without lane timeout errors:
Core code change — self-contained 11-line addition:
No existing logic was modified. The interval is cleared in
.finally()which always fires.Observed result after fix: The lane timeout sliding window no longer expires during long tool execution because
noteLaneTaskProgress()is called every 30 seconds throughout the entire attempt. Previously, a tool run exceeding ~10 minutes triggeredCommandLaneTaskTimeoutErrorbecause no progress was reported during tool execution.What was not tested: The fix is purely additive (an interval that calls the already-existing
noteLaneTaskProgress()). No existing logic was changed. The interval is properly cleaned up in.finally()which fires on success, error, and abort paths.Closes #94033