fix(cron): prevent lane timeout expiry during long tool execution in isolated cron jobs#94191
Closed
xydttsw wants to merge 1 commit into
Closed
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]>
|
Closing this PR because the author has more than 20 active PRs in this repo. Please reduce the active PR queue and reopen or resubmit once it is back under the limit. You can close your own PRs to get back under the limit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 the lane progress is not updated during tool execution — the sliding window expires even whentimeoutSecondsis set to 600s.Real environment tested: OpenClaw embedded agent runner at commit
ad3384f8e9with therunEmbeddedAttemptWithBackend()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, cleared on completion.Exact steps or command run after this patch:
timeoutSeconds: 600on the jobCommandLaneTaskTimeoutErrornoteLaneTaskProgress()was called during tool execution via the intervalEvidence after fix:
The structural change is self-contained:
Terminal output from the fix branch confirming the embedded agent runner tests pass at commit
ad3384f8e9:1 file changed, 11 insertions — all additive, no existing logic modified.
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, despitetimeoutSecondsbeing set high enough.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