Skip to content

fix(voice-call): reuse the live runtime for gateway commands - #159147

Open
mnowrot wants to merge 12 commits into
openclaw:mainfrom
mnowrot:fix/voice-call-command-runtime-reuse
Open

mnowrot wants to merge 12 commits into
openclaw:mainfrom
mnowrot:fix/voice-call-command-runtime-reuse

Conversation

@mnowrot

@mnowrot mnowrot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Closes #159142

What Problem This Solves

Fixes: a voice-call gateway 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 is running, and falls back to ensureRuntime() only when there is no running runtime.

Evidence

Grounded in extensions/voice-call/index.ts: createVoiceCallCommandService(ensureRuntime) vs ensureRuntimeForGeneration's slot.owner !== runtimeGeneration check. pnpm tsgo:extensions passes on the branch.

Review response

Reworked on head f022c39a in response to the review:

  • A disabled/invalid registration must not act through a predecessor's live runtime. assertRuntimePolicy() is now extracted from ensureRuntimeForGeneration and applied in ensureRuntimeForCommands before 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 runtime

Command: node --import ./scripts/tsx.mjs scripts/run-vitest.mjs run extensions/voice-call/index.lifecycle.test.ts -t "reusing the predecessor" — observed 1 passed | 9 skipped.

pnpm tsgo:extensions passes on the branch.

Review response

CI check-lint-core-2 failed on the command-runtime reuse change: oxlint curly flagged the single-statement early return if (liveSlot && liveSlot.state === "running") return liveSlot.runtime;.

Fixed in 3db5eecb — expanded to a braced block; no behavior change.

  • Lint: node scripts/run-oxlint.mjs --tsconfig extensions/tsconfig.json extensions/voice-call/index.ts → Found 0 warnings and 0 errors.
  • Types: pnpm tsgo:extensions → exit 0

Review response

Reworked on head e7f9fd6 in response to the two P1 findings:

  • Reject superseded handlers before call I/O. Command handlers now assert the live coordinator registration — not a generation snapshot captured when the runtime access was created — immediately before each manager/webhook effect, including after the awaited getCallFromMemoryOrStore lookup and inside the deferred prepareContinue().run(). A superseded or retired registration is rejected with a lifecycle error before any call I/O.
  • Use the current configuration when starting a new call. voicecall.initiate routes 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 lookup
  • starts a new call with the current registration config after reload

Evidence: node scripts/run-vitest.mjs run extensions/voice-call/index.lifecycle.test.ts → Tests 12 passed (12); [test] passed 1 Vitest shard.

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().
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added channel: voice-call Channel integration: voice-call size: XS labels Sep 26, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 26, 2026
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

The 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

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch provides a coherent repair with useful regressions, but production evidence does not yet cover the changed authority boundary.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

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
Reviewed head: e2834fb45612e805b29647feb5efda272908d9ee

Before merge

  • Add real behavior proof - Authority-chain proof required: posted real-call logs prove survival of a refused reload and rejection by the existing activation guard, but do not exercise the introduced borrowed-runtime selector or superseded admission, playback, and deferred continuation fences before provider I/O. Mocked regressions are supplemental. Redacted terminal output, transport traces, or logs are appropriate; remove phone numbers, keys, IP addresses, private endpoints, and other private data. Update the PR body after adding evidence to trigger review; if needed, ask a maintainer to comment @clawsweeper re-review. No stored-data format or schema changes are introduced.
  • Resolve merge risk - The changed authority transfer remains unproven at the production effect boundary: demonstrate successful borrowed control and rejection of superseded admission, playback, and deferred continuation before provider I/O.
  • Complete next step - Add production final-effect evidence for the changed runtime-authority paths and record the required test timings in the PR body.

Findings

None.

Agent review details

How this fits together

The 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
Loading

Technical review

Best 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 options

Maintainer options:

  1. Prove the changed authority boundary (recommended)
    Supply redacted production-path traces showing authorized borrowed control and superseded-command rejection before dialing, playback, and continuation effects.

Security

None.

Evidence

What I checked:

  • Pinned introduced changes: Reviewed the six-file introduced delta from the pinned merge base to the exact original PR head. Raw head records confirm parents 222aced and 7e27d6c. The supplied test merge is stale and was not used to claim removal of current-main behavior. (e2834fb45612)
  • Current main still needs the change: Fetched main still passes ensureRuntime directly to the command service. Its generation-mismatch branch stops a retired slot owner instead of borrowing the running runtime for existing-call control. (extensions/voice-call/index.ts, 4d94a9fac61f)
  • Latest release comparison: The v2026.9.8 command service likewise uses one ensureRuntime selector and lacks the introduced registration checks. This does not establish a shipped fix. (extensions/voice-call/src/command-service.ts, fc23bc864e45)
  • Authority-bearing runtime selection: Existing-call selection can activate a newer registration while returning a predecessor-owned running runtime. The command service checks current registration and carries a live predicate into admission, playback, and continuation effects. (extensions/voice-call/index.ts:327, e2834fb45612)
  • After-await admission fence: Outbound admission rechecks registration after persistence, rejects superseded commands before provider.initiateCall, and finalizes their admitted records. Deferred continuation also carries the registration predicate through its manager operations. (extensions/voice-call/src/manager/outbound.ts:182, e2834fb45612)
  • Positive live evidence with explicit coverage limit: The redacted traces at fix(voice-call): reuse the live runtime for gateway commands #159147 (comment) and fix(voice-call): reuse the live runtime for gateway commands #159147 (comment) show a real call surviving a refused reload. The latter explicitly states that superseded rejection came from the pre-existing activation guard, not the introduced admission fence. Neither trace demonstrates successful different-owner borrowing or the new after-await rejection paths. (9767321b6562)

PR surface

Source +144, Tests +375. Total +519 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 4 182 38 +144
Tests 2 389 14 +375
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 571 52 +519

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #159142
Summary: This PR is the explicit candidate repair for the paired open lifecycle bug.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The repair targets a bounded voice-call lifecycle failure during registration changes.
  • merge-risk: 🚨 security-boundary: The PR changes which registration may control a predecessor-owned runtime, and real final-effect evidence for revoked registration authority remains incomplete.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add final-effect evidence for successful borrowed control and superseded dialing, playback, and deferred continuation.
  • Record single-worker wall time for both changed test files and available CI seconds in the PR body.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (12 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-01T06:56:50.245Z sha e7f9fd6 :: needs real behavior proof before merge. :: [P1] Revalidate registration authority after manager awaits
  • reviewed 2026-10-01T08:53:12.212Z sha e93fec4 :: needs real behavior proof before merge. :: [P1] Carry registration authority through outbound call admission
  • reviewed 2026-10-01T11:23:20.046Z sha 9767321 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-03T09:11:13.496Z sha 4c19a1d :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-03T09:41:05.445Z sha 289228d :: needs real behavior proof before merge. :: [P2] [P2] Start the service before exercising the new lifecycle scenarios
  • reviewed 2026-10-03T09:51:13.146Z sha 87b0a2e :: needs real behavior proof before merge. :: [P2] [P2] Start the service before exercising the new lifecycle scenarios
  • reviewed 2026-10-04T06:56:39.081Z sha d2f1ec4 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-04T08:26:57.320Z sha 222aced :: needs real behavior proof before merge. :: none

Reviewed October 5, 2026, 2:47 PM ET / 18:47 UTC (Revision 13).

@mnowrot

mnowrot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

@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.

@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Sep 26, 2026
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.
@mnowrot

mnowrot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 27, 2026
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
@mnowrot

mnowrot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Both P1 findings are addressed on the current head e7f9fd6:

  • Reject superseded handlers before call I/O — handlers assert the live coordinator registration (not a generation snapshot) immediately before each manager/webhook effect, including after the awaited call-store lookup and inside the deferred prepareContinue().run(). Superseded/retired registrations are rejected before any call I/O.
  • Use current configuration when starting a new call — voicecall.initiate routes through the current registration runtime, so a reload starts new calls with the new provider config; existing-call control still resolves to the live slot that owns the call.

Focused suite: node scripts/run-vitest.mjs run extensions/voice-call/index.lifecycle.test.ts → 12 passed (12).

@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. and removed P1 High-priority user-facing bug, regression, or broken workflow. labels Oct 1, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Oct 1, 2026
@mnowrot

mnowrot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Live proof on head e7f9fd600bc (build 2026.9.6-pr159147.e7f9fd600bc) — an active call survives a mid-call plugins reload (replacement refused because of the live runtime's retained work), and gateway voice_call actions land on the live runtime both before and after the refusal.

PR #159147 live proof — call across reload

  • Build: @openclaw/[email protected] (head e7f9fd600bc)
  • Realtime chunk: realtime-handler-B8qwiyi5.mjs
  • Gateway tool path used throughout (voice_call action), not the openclaw voicecall CLI.

Sequence (Europe/Zurich, 2026-10-01 ~08:44)

  1. initiate_call → callId=call-A, mode conversation.
  2. Ringing → answered (state:"answered", answeredAt captured).
  3. speak_to_user on the live call → success: true ("Hello, this line is working.").
  4. get_status → state:"speaking" (live runtime, same callId, no Call finalized).
  5. openclaw plugins reload voice-call fired mid-call:
    Plugin operation failed during prepare:
    Plugin voice-call still has active retained work; retry after the work finishes.
    Gateway generation 2: replacement not applied.
    
  6. Immediately after refusal, speak_to_user again → success: true
    ("Reload attempt was correctly blocked. This call is still alive.").
  7. get_status → still state:"speaking", same callId, providerCallId unchanged (CA<redacted>).

Verdict

  • Active call survived the reload attempt. The replacement was refused — the
    live runtime's retained work (the in-flight call) blocks re-registration, so the
    live generation is not retired out from under the call. providerCallId and
    callId remain identical before and after the refusal.
  • Gateway commands landed on the live runtime. Both speak_to_user calls (one
    before, one after the reload attempt) returned success: true against the same
    active call, with no Voice call runtime generation was superseded error and no
    Call finalized in between.

Scope note: this exercises the existing-call-across-reload path end-to-end. The
new-call selector is covered by the PR's unit tests; the superseded-handler
rejection is deterministically covered there as well.

@mnowrot

mnowrot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 1, 2026
@mnowrot

mnowrot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Fenced registration authority across the manager awaits: the live isCurrent predicate derived from assertCurrentRegistration is now threaded into manager.speak/continueCall, so a superseded registration cannot reach provider.playTts (or deferred continuation effects) after the awaited state write. Deterministic race regression added. Head e93fec47001.

@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@mnowrot

mnowrot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Fenced the remaining manager-await on the outbound admission path (head 9767321b656): the live isCurrent predicate derived from assertCurrentRegistration is now carried into manager.initiateCall and revalidated after the awaited admission persistence and immediately before provider.initiateCall. A superseded admission does not dial and is finalized cleanly (no orphan record, no leaked concurrency slot). Deterministic admission-race regression added: B's new call blocks in the awaited store write, C takes over via the existing-call selector, B is rejected without reaching the provider. 14/14 lifecycle tests green; siblings green.

@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@mnowrot

mnowrot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

Local runtime evidence + a CI blocker at head 9767321b656

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 9767321b656)

check-test-types fails on this head, in the PR's own modified test file:

extensions/voice-call/index.lifecycle.test.ts(463,44): error TS2322: Type 'Promise<{ providerCallId: string; }>' is not assignable to type 'Promise<InitiateCallResult>'.
  Property 'status' is missing in type '{ providerCallId: string; }' but required in type 'InitiateCallResult'.

The mock at line 463 resolves { providerCallId }, but InitiateCallResult also requires status.
Job: https://github.com/openclaw/openclaw/actions/runs/36854288149/job/110345014455

(checks-fast-baseline-ratchets also fails in that run, but on spawnSync rg ENOENT — a runner-image issue, unrelated to this diff.)


2 · Redacted runtime evidence

Build 2026.9.6-pr159147.9767321b656 (PR dist overlaid into the trusted plugin generation; realtime chunk realtime-handler-B1SEqmap.mjs).

Phase A — a real call survives a refused live reload (stock gateway logs)
2026-10-03T09:51:01.160+02:00 [voice-call] realtime local speech detected callId=call-A providerCallId=sid-A
2026-10-03T09:51:01.163+02:00 [voice-call] realtime outbound audio cleared by local barge-in callId=call-A providerCallId=sid-A queuedBytes=0
2026-10-03T09:51:03.283+02:00 [voice-call] realtime input transcript callId=call-A providerCallId=sid-A final=false chars=15 aggregateChars=15
2026-10-03T09:51:14.645+02:00 [reload] config change detected; evaluating reload (plugins.entries.voice-call.config.realtime.agentContext.maxChars)
2026-10-03T09:51:15.371+02:00 [reload] config reload failed: PluginRuntimeApplicationError: Plugin operation failed during prepare: Plugin voice-call still has active retained work; retry after the work finishes.
2026-10-03T09:51:34.449+02:00 [voice-call] realtime input transcript callId=call-A providerCallId=sid-A final=true chars=15 aggregateChars=15
2026-10-03T09:51:34.733+02:00 [voice-call/lifecycle] [voice-call] Call finalized callId=call-A providerCallId=sid-A endReason=completed
2026-10-03T09:51:43.201+02:00 [reload] config reload superseded: GatewayConfigReloadSupersededError: config reload superseded by a newer runtime config source

During an in-flight call, a config change to voice-call was refused at reload (… still has active retained work … Gateway generation 2: replacement not applied.); the same call kept running and finalized normally (final=true, endReason=completed). No lifecycle error and no supersession of the live call.

Phase B — live registration handoff + pre-provider-I/O superseded rejection
2026-10-03T10:12:13.867+02:00 [vcx] RESOLVE mode=full epoch=1 MINT
2026-10-03T10:12:15.715+02:00 [vcx] RESOLVE mode=discovery epoch=2 MINT
2026-10-03T10:12:17.618+02:00 [vcx] SERVICE-START epoch=1 retired=false current=0
2026-10-03T10:12:17.619+02:00 [vcx] HANDOFF prev=0 next=1
2026-10-03T10:12:43.227+02:00 [vcx] RESOLVE mode=discovery epoch=1 REUSE
2026-10-03T10:17:10.870+02:00 [vcx] HANDOFF prev=1 next=2
2026-10-03T10:17:10.870+02:00 [vcx] STOP-INVOKED genRetired=true hasSlot=true ownerSame=true
2026-10-03T10:22:08.776+02:00 [vcx] ACTIVATE-REJECT-SUPERSEDED epoch=1 current=2 genMatch=true
2026-10-03T10:22:08.778+02:00 [ws] ⇄ res ✗ voicecall.status 4ms errorCode=UNAVAILABLE errorMessage=Voice call runtime generation was superseded; use the current plugin registration conn=[redacted] id=[redacted]

[vcx] lines are read-only probes I added to the plugin dist to observe the selectors; the [ws] ⇄ res ✗ voicecall.status … superseded line is stock gateway output. Boot minted epoch 1 (full) and epoch 2 (discovery); a live re-registration produced a real HANDOFF prev=1 next=2 with the old generation retired (STOP-INVOKED genRetired=true); a read-only RPC still bound to the old registration was refused in 4 ms with zero provider I/O.

Scope (honest): the pre-I/O refusal above was emitted by the pre-existing generation guard already on main (activateVoiceCallRuntimeGeneration → ACTIVATE-REJECT-SUPERSEDED), not by this PR's new outbound-admission fence. In live runs the base guard fires first, so the PR's own FENCE-SUPERSEDED / "Call command superseded" path does not appear in a live trace; it remains covered by the deterministic test added in this PR (index.lifecycle.test.ts:276). So this is direct end-to-end evidence that the handoff and pre-I/O supersession are real, with the caveat that the live rejection currently comes from the base guard rather than the new fence.


Redacted: callId → call-A, providerCallId → sid-A; hosts, phone numbers, URIs, tokens and connection ids stripped; caller speech in text= blanked.

mnowrot and others added 6 commits October 3, 2026 11:03
… 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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: voice-call Channel integration: voice-call merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: voice-call gateway commands can retire the live runtime during an active call

1 participant