Repository navigation
fix: clarify cloud dispatch and heartbeat timeout diagnostics - #128434
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed August 23, 2026, 9:07 PM ET / August 24, 2026, 01:07 UTC. ClawSweeper reviewWhat this changesThis PR clarifies cloud-dispatch remediation and appends measured elapsed time to Crabbox heartbeat timeout warnings. Merge readinessKeep open. The heartbeat diagnostic is correctly owned and tested, but the new generic dispatch error sends cloud-only remote-exec runtimes to an unavailable paired-device route. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherGateway session dispatch selects either a cloud worker provider or a paired device based on the selected runtime’s declared capabilities. Crabbox’s provider lifecycle periodically heartbeats active leases and emits warnings when that keepalive fails. flowchart LR
A[Operator dispatch request] --> B[Gateway capability validation]
B --> C[Cloud provider or paired device]
C --> D[Worker placement]
B --> E[Actionable dispatch diagnostic]
F[Crabbox heartbeat command] --> G[Lease lifecycle manager]
G --> H[Timeout warning]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +2, Tests +33. Total +35 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Make paired-device remediation conditional on devicePlacement, while retaining the elapsed-time measurement in the heartbeat lifecycle manager. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible: a cloud-only remote-exec harness with an unsupported provider receives the new paired-device advice, then fails paired-device eligibility because it declares no devicePlacement. Is this the best way to solve the issue? No. The diagnostic should derive its remediation from the existing devicePlacement capability rather than advertising paired devices for every remote-exec runtime. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8b18d22db1f5. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Live verification of the dispatch guidance fix, real gateway built from this head (
The rejection fired before any provider allocation (no lease created), matching the pre-allocation gate's contract. The heartbeat elapsed-time addition is covered by the new provider test ( |
|
Merged via squash.
|
…aw#128434) * fix: clarify cloud dispatch and heartbeat timeout diagnostics * test(crabbox): satisfy heartbeat timeout regression lint
What Problem This Solves
Fixes an issue where operators dispatching a runtime that requires remote execution were told that SSH was mandatory, even though an approved paired device is also supported. Resolves a second operational blind spot where a timed-out Crabbox heartbeat warned that workers might be reaped without reporting how long the heartbeat actually ran.
Why This Change Was Made
Keep execution-mode guidance at the Gateway dispatch boundary aligned with the paired-device and remote-exec provider capabilities already documented and implemented. Measure heartbeat runtime inside its owning lifecycle manager and include the actual elapsed milliseconds only in timeout warnings, without changing other command-error shapes or provider behavior.
User Impact
Operators can choose an approved paired device or a provider advertising remote-exec instead of being sent down an SSH-only dead end. A Crabbox heartbeat timeout now identifies its measured duration, for example
(timeout after 60012 ms), making coordinator-idle and worker-reaping incidents diagnosable from the existing warning.Evidence
node scripts/run-vitest.mjs src/gateway/server-methods/sessions.dispatch.test.ts src/gateway/server-methods/sessions.dispatch.device.test.ts: 4 test files passed, 74 tests passed, including the existing successful paired-device dispatch coverage.node scripts/run-vitest.mjs extensions/crabbox: 3 test files passed, 125 tests passed. The timeout regression advances a fake clock by 60012 ms while the configured heartbeat timeout is 150000 ms, proving the warning uses measured elapsed time rather than its configured budget.env -u OPENCLAW_TESTBOX OPENCLAW_LOCAL_CHECK_MODE=full node scripts/check-changed.mjs: passed all selected core, core-test, plugin, and plugin-test checks; the environment overrides only prevent inherited remote routing and use the supported full-speed local scheduler..claude/skills/autoreview/scripts/autoreview --mode branch --base origin/main: clean, with no accepted or actionable findings.