Repository navigation
Conversation
The command service was wired to ensureRuntime(), which always runs ensureRuntimeForGeneration(). When a call is already live the runtime slot is in state "running", so the extra pass can create a second runtime (and its webhook listener) instead of returning the one already serving the call. Route command-backed runtime lookups through ensureRuntimeForCommands(), which returns the running slot's runtime when present and otherwise falls back to ensureRuntime().
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThe voice-call plugin keeps existing-call commands on the live runtime, starts new calls with current configuration, and rechecks registration authority before call effects. Review scores
Merge readiness⛔ Blocked before merge - 3 items remain This remains a useful fix for the paired open bug report; current main still has the registration-bound command path. No actionable code defect was found, but the required authority-boundary proof remains incomplete. Priority: P2 Before merge
FindingsNone. Agent review detailsHow this fits togetherThe voice-call plugin translates Gateway commands and agent tool requests into phone-call operations. Its runtime coordinator selects the call manager and provider connection that handle those operations. flowchart TD
A[Gateway commands and agent requests] --> B[Voice-call command service]
B --> C[Registration and config checks]
C --> D{Existing or new call}
D --> E[Live call runtime]
D --> F[Current registration runtime]
E --> G[Call manager and provider effects]
F --> G
Technical reviewBest possible solution: Keep one voice-call command owner that preserves the live call runtime while enforcing current registration authority at every delayed provider effect. Do we have a high-confidence way to reproduce the issue? Yes from source: a command bound to registration B reaches the stop-or-error branch when runtime A owns the running slot. This review did not execute a current-main call or reload. Is this the best way to solve the issue? Yes in direction: separate existing-call and new-call selection within the existing plugin owner, and carry live registration checks through awaited effects; the remaining uncertainty is behavioral proof. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4d94a9fac61f. Merge-risk optionsMaintainer options:
SecurityNone. EvidenceWhat I checked:
PR surfaceSource +144, Tests +375. Total +519 across 6 files. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (12 earlier review cycles; latest 8 shown)
Reviewed October 5, 2026, 2:47 PM ET / 18:47 UTC (Revision 13). |
|
@clawsweeper re-review The findings from the last review have been addressed on the current head; the PR body now carries a "Review response" section with the reworked behaviour and the after-fix regression tests (names + exact command + observed result). passes on the branch. |
|
🦞👀 Re-review progress:
|
oxlint's curly rule rejects the single-statement if-return and fails the changed-extensions lint lane. Expand to a braced block; no behavior change.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Command handlers resolved authority from a generation snapshot captured when the runtime access object was created. A superseded registration could still reach manager/webhook effects, while a same-registration restart was wrongly rejected as retired. Check the live coordinator registration immediately before each call or webhook effect, including after the awaited call-store lookup and the deferred continue run. Existing-call control still resolves to the live slot that owns the call; new calls go through the current registration runtime so they use the current provider configuration. Closes openclaw#159142
|
@clawsweeper re-review Both P1 findings are addressed on the current head
Focused suite: |
|
🦞👀 Re-review progress:
|
|
Live proof on head PR #159147 live proof — call across reload
Sequence (Europe/Zurich, 2026-10-01 ~08:44)
Verdict
Scope note: this exercises the existing-call-across-reload path end-to-end. The |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Fenced registration authority across the manager awaits: the live |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Fenced the remaining manager-await on the outbound admission path (head |
|
🦞👀 Re-review progress:
|
|
Local runtime evidence + a CI blocker at head Two items for the record: the runtime evidence I collected for this PR, and a blocking CI failure on the current head. 1 · CI blocker (head
|
… tests Since openclaw#162669 a voice-call runtime is only created for a registration whose service was started, because the runtime needs the service scheduler. The borrowed-runtime tests added on this branch never started the service, so the first command failed with "Voice call service is not running" and the tests then awaited a deferred that only a live runtime resolves, hanging the shard. Start the owning registration's service, as the Gateway does, so the tests reach the superseded-registration fences they assert on. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve the command-service.ts conflict with openclaw#164582: keep the registration-authority fencing and runtime selectors, adopt main's removal of the VoiceCallStatus alias and its inferred toVoiceCallStatus return type.
…d-runtime-reuse # Conflicts: # extensions/voice-call/src/manager/outbound.ts
Closes #159142
What Problem This Solves
Fixes: a
voice-callgateway command can stop or fail against the runtime that is serving a live call, because the command service is bound to the generation captured when the plugin registered rather than to the runtime currently running.User Impact
User impact: read and control commands act on the live call's runtime and no longer risk terminating an active call when the runtime generation has changed.
Why This Change Was Made
The command service was created with the registration-time
ensureRuntime, so when the coordinator slot is owned by a different (e.g. reloaded) generation a command would retire the live runtime or throw a lifecycle error. The command service now reuses the coordinator's live runtime whenever its slot isrunning, and falls back toensureRuntime()only when there is no running runtime.Evidence
Grounded in
extensions/voice-call/index.ts:createVoiceCallCommandService(ensureRuntime)vsensureRuntimeForGeneration'sslot.owner !== runtimeGenerationcheck.pnpm tsgo:extensionspasses on the branch.Review response
Reworked on head
f022c39ain response to the review:assertRuntimePolicy()is now extracted fromensureRuntimeForGenerationand applied inensureRuntimeForCommandsbefore selecting a live runtime. A reload that disabled voice calling, or that has an invalid provider configuration, can therefore no longer issue commands through a predecessor's still-running runtime.Test added (green):
rejects a disabled registration before reusing the predecessor's live runtimeCommand:
node --import ./scripts/tsx.mjs scripts/run-vitest.mjs run extensions/voice-call/index.lifecycle.test.ts -t "reusing the predecessor"— observed1 passed | 9 skipped.pnpm tsgo:extensionspasses on the branch.Review response
CI
check-lint-core-2failed on the command-runtime reuse change: oxlintcurlyflagged the single-statement early returnif (liveSlot && liveSlot.state === "running") return liveSlot.runtime;.Fixed in
3db5eecb— expanded to a braced block; no behavior change.node scripts/run-oxlint.mjs --tsconfig extensions/tsconfig.json extensions/voice-call/index.ts→Found 0 warnings and 0 errors.pnpm tsgo:extensions→ exit 0Review response
Reworked on head
e7f9fd6in response to the two P1 findings:getCallFromMemoryOrStorelookup and inside the deferredprepareContinue().run(). A superseded or retired registration is rejected with a lifecycle error before any call I/O.voicecall.initiateroutes through the current registration's runtime, so a reload starts new calls with the new provider configuration instead of a predecessor's stale runtime/config. Existing-call control still resolves to the live slot that owns the call.Tests added (green):
rejects superseded retained handlers before call I/O and after an awaited lookupstarts a new call with the current registration config after reloadEvidence:
node scripts/run-vitest.mjs run extensions/voice-call/index.lifecycle.test.ts→Tests 12 passed (12);[test] passed 1 Vitest shard.