fix(cron): prevent lane timeout during long tool execution#94082
Conversation
|
Codex review: needs changes before merge. Reviewed June 18, 2026, 12:14 PM ET / 16:14 UTC. Summary PR surface: Source +130, Tests +263. Total +393 across 7 files. Reproducibility: yes. Source inspection shows current main uses a sliding command-lane timeout tied to laneTaskProgressAtMs while the awaited embedded attempt has no whole-attempt heartbeat, matching the linked cron long-tool timeout report. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Stop the heartbeat before timeout release frees the lane, then keep the bounded native-lane liveness design if maintainers accept the shared queue abort/release tradeoff. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main uses a sliding command-lane timeout tied to laneTaskProgressAtMs while the awaited embedded attempt has no whole-attempt heartbeat, matching the linked cron long-tool timeout report. Is this the best way to solve the issue? No, not yet. The branch targets the right failure mode, but the timeout-release path should stop the heartbeat before freeing the lane; the broader shared queue semantics remain a maintainer availability decision. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 508594a620f2. Label changesLabel justifications:
Evidence reviewedPR surface: Source +130, Tests +263. Total +393 across 7 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
8110741 to
646d968
Compare
646d968 to
3b04ea6
Compare
|
I just closed my own attempt (#94465) after studying this implementation. The three-phase timeout control design is exactly what's needed - particularly the bounded heartbeat (delayed start + abort-signal integration) and the grace-period release mechanism. The test coverage for ignored timeout/cancellation scenarios is especially valuable and something my own PR was missing. This is a textbook example of how to properly handle liveness mechanisms with failure-path bounding. Thanks for the comprehensive solution and for working through the design with the review process. Looking forward to seeing this land! |
The lane timeout sliding window expires during long-running tool execution (e.g. exec commands >5min) because noteLaneTaskProgress() is never called during tool execution. Add a periodic 30s interval that calls noteLaneTaskProgress() while the embedded attempt runs, keeping the lane alive until the attempt completes. Closes: openclaw#94033 Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
3b04ea6 to
dc3f662
Compare
Summary
Real behavior proof
Behavior addressed: A native embedded attempt can legitimately run a tool longer than the queue liveness window; an ignored native timeout,
/stop, or restart cancellation must still free the global lane promptly.Real environment tested: AWS Crabbox Linux (
cbx_a2c6b2574248), Node 24/Pnpm project test environment.Exact steps or command run after this patch:
corepack pnpm test src/process/command-queue.test.ts src/cron/isolated-agent/run.meta-error-status.test.ts src/cron/service/timer.regression.test.ts src/agents/embedded-agent-runner/run.compaction-loop-guard.test.tsEvidence after fix: AWS Crabbox run
run_080e5fa4432fpassed 68 cron tests, 32 process queue tests, and 10 embedded-agent guard tests. The guard coverage exercises a live native heartbeat, an ignored native timeout, and an ignored explicit cancellation.Observed result after fix: Native tool activity can retain its lane past the ordinary liveness window, while timeout and cancellation paths release a stuck lane after one bounded grace period.
What was not tested: A live external tool process; the focused runner and queue tests cover the timeout, cancellation, and liveness contracts without a provider or channel dependency.
Closes #94033