Skip to content

fix(voice-call): retain state runtime for deferred streams - #147689

Merged
RomneyDa merged 1 commit into
mainfrom
fix/qa-voicecall-child-target
Sep 14, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/qa-voicecall-child-target

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Summary

  • bind child-owned CLI commands to the QA fixture Gateway port
  • pass the Voice Call state runtime explicitly through the manager and persistence paths
  • preserve complete issued media-stream paths and improve admission timeout diagnostics

Why

Maturity run 34681094383 exposed two stacked failures in voice-call-cli-rpc-agent-tool: the child CLI targeted the ambient Gateway, then realtime WebSocket admission lost the plugin-scoped state runtime after registration. The latter prevented call persistence and bridge creation.

Verification

  • Voice Call manager/store/realtime lifecycle tests (56/56)
  • retained-runtime compatibility restore suite (14/14), including a pre-existing record with the ambient runtime disabled
  • full voice-call-cli-rpc-agent-tool QA scenario against a real child Gateway
  • pnpm check:changed
  • autoreview P0-P2: clean

Source run: https://github.com/openclaw/openclaw/actions/runs/34681094383

Persisted-data compatibility

No persisted data model changes. The patch keeps the existing Voice Call namespace, schema, serialization, retention, and migration set unchanged. It only threads the already-created ManagedPluginRuntime into the same store operations so deferred callbacks resolve the same runtime owner as synchronous paths. Existing call records remain readable without migration; the child-Gateway E2E exercised persistence and restore across three calls.

@clawsweeper

clawsweeper Bot commented Sep 14, 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.

@RomneyDa
RomneyDa marked this pull request as ready for review September 14, 2026 01:44
@openclaw-barnacle openclaw-barnacle Bot added channel: voice-call Channel integration: voice-call extensions: qa-lab size: S maintainer Maintainer-authored PR labels Sep 14, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 13, 2026, 11:15 PM ET / September 14, 2026, 03:15 UTC (Revision 3).

ClawSweeper review

What this changes

The PR retains Voice Call’s storage runtime for deferred callbacks and corrects QA Gateway targeting, media-stream URLs, and timeout diagnostics.

Merge readiness

⛔ Blocked before merge - 1 item remains

The fix remains necessary on inspected main, and no blocking defect was found. The previous migration concern is cleared: the patch preserves the existing persistence contract.

Priority: P2
Reviewed head: 640791b832f27450ee8e29d106cafa661b4c735d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful regression coverage and no blocking findings; the earlier migration blocker does not apply.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate. Its reported child-Gateway scenario covers the changed manager persistence and WebSocket path with fixture providers; no independent runtime execution was performed here.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate. Its reported child-Gateway scenario covers the changed manager persistence and WebSocket path with fixture providers; no independent runtime execution was performed here.
Evidence reviewed 8 items Current main still lacks the fix: Inspected main constructs CallManager without passing the state runtime, although registration already supplies it to createVoiceCallRuntime. The PR passes that existing dependency into the manager.
Persistence contract remains unchanged: The store diff adds an optional runtime argument and forwards it through existing operations. Namespaces, paths, serialization, ordering, retention, and record parsing remain unchanged; no schema or migration is introduced.
Existing-record regression coverage: The new test writes a completed call, replaces the ambient runtime with a throwing implementation, and retrieves the persisted record through a manager holding the original runtime. This protects observable record access rather than implementation shape.
Findings None None.
Security None None.

How this fits together

Voice Call connects CLI commands, agent tools, carrier webhooks, and media streams to a shared call manager. That manager persists call records through the plugin’s SQLite storage runtime before publishing call-state changes.

flowchart TD
 A[CLI and agent tools] --> C[Voice Call manager]
 B[Webhooks and media streams] --> C
 D[Plugin registration] --> E[Retained storage runtime]
 C --> E
 E --> F[Existing SQLite call records]
 C --> G[Call state and voice responses]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +40, Tests +53. Total +93 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 9 71 31 +40
Tests 2 74 21 +53
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 145 52 +93

Review metrics

Metric Value Why it matters
Persisted contract changes 0 schema, namespace, serialization, or retention changes Runtime dependency threading does not require the migration gate raised by the previous review.

Stored data model

Persistent data-model change detected: serialized state: extensions/voice-call/src/manager.ts, unknown-data-model-change: extensions/voice-call/src/manager.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep deferred call operations bound to their existing plugin runtime while preserving the current storage format and shutdown lifecycle.

Do we have a high-confidence way to reproduce the issue?

Yes, source establishes the failure path: deferred callbacks can lose the ambient plugin-instance runtime before opening call storage. The retained-runtime test isolates that condition; this review did not execute it.

Is this the best way to solve the issue?

Yes. Passing the already-supplied runtime through the existing manager and storage operations is a focused repair that preserves the durable contract and avoids a competing storage owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b087e603a5c9.

Labels

Label justifications:

  • P2: This repairs a bounded Voice Call persistence failure and its QA reproduction path.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate. Its reported child-Gateway scenario covers the changed manager persistence and WebSocket path with fixture providers; no independent runtime execution was performed here.

Evidence

What I checked:

  • Current main still lacks the fix: Inspected main constructs CallManager without passing the state runtime, although registration already supplies it to createVoiceCallRuntime. The PR passes that existing dependency into the manager. (extensions/voice-call/src/runtime.ts:332, b087e603a5c9)
  • Persistence contract remains unchanged: The store diff adds an optional runtime argument and forwards it through existing operations. Namespaces, paths, serialization, ordering, retention, and record parsing remain unchanged; no schema or migration is introduced. (extensions/voice-call/src/manager/store.ts:76, 640791b832f2)
  • Existing-record regression coverage: The new test writes a completed call, replaces the ambient runtime with a throwing implementation, and retrieves the persisted record through a manager holding the original runtime. This protects observable record access rather than implementation shape. (extensions/voice-call/src/manager.restore.test.ts:120, 640791b832f2)
  • Runtime ownership and shutdown: Registration supplies api.runtime.state; the manager forwards it through reads, mutations, events, outbound admission, and finalization. Existing shutdown closes webhook/stream producers before draining manager work. The patch does not introduce another principal, grant, or authorization bypass. (extensions/voice-call/src/runtime.ts:332, 640791b832f2)
  • QA boundary and reported validation: The inspected scenario exercises real child-Gateway CLI, RPC, tool, webhook, and WebSocket entrypoints with fixture providers. The PR body reports a passing scenario and 56 focused tests plus 14 restore tests; these were not rerun during this read-only review. The contributor’s compatibility explanation is consistent with source: fix(voice-call): retain state runtime for deferred streams #147689 (comment). (test/e2e/qa-lab/runtime/voice-call-gateway.ts:402, 640791b832f2)
  • Prior review disposition: The previous completed review reported no findings and requested migration or upgrade compatibility evidence. Current source and the added existing-record test resolve that concern without changing a durable contract. The earlier reviewed revision was unavailable for direct comparison, so no unchanged-code or late-finding claim is made. (extensions/voice-call/src/manager.restore.test.ts:120, 640791b832f2)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-14T01:53:07.950Z sha b3166b0 :: blocked before merge. :: none
  • reviewed 2026-09-14T03:00:47.770Z sha b3166b0 :: blocked before merge. :: none

@RomneyDa

Copy link
Copy Markdown
Member Author

Compatibility proof: this patch does not change the Voice Call SQLite schema, stored record shape, namespaces, storage paths, serialization, retention, or migration behavior. It only retains the already-supplied storage runtime through deferred callbacks; the full child-Gateway scenario passed with persisted calls across CLI, RPC, tool, webhook, and WebSocket paths. The data-model compatibility checkbox is therefore not applicable. @clawsweeper please re-review the exact head.

@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Compatibility proof: this patch does not change the Voice Call persisted schema, namespace, serialization, retention, or migration set. It passes the already-supplied ManagedPluginRuntime into the existing store calls so deferred callbacks resolve the same store owner as synchronous paths. The exact-head child-Gateway E2E exercised persistence across three calls and bridge creation, and the focused suite passed 56 tests. Please reassess the data-model checkbox against head b3166b0b3694fa078465025a8fb2f9092fdcfa26.

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@RomneyDa
RomneyDa force-pushed the fix/qa-voicecall-child-target branch from b3166b0 to 640791b Compare September 14, 2026 03:09
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@RomneyDa
RomneyDa merged commit ff9aa36 into main Sep 14, 2026
156 of 158 checks passed
@RomneyDa
RomneyDa deleted the fix/qa-voicecall-child-target branch September 14, 2026 06:58
vincentkoc added a commit that referenced this pull request Sep 14, 2026
* commit '8e6fe8e02ddb51bfec4e80071f0f2adcae4cf098': (47 commits)
  refactor: simplify Gateway health response parsing (#147834)
  fix: avoid Gateway stalls when renaming sessions (#147869)
  refactor(plugins): reuse worker optional-method validation (#147925)
  refactor(infra): remove unreachable firewall diagnostic fallback (#147882)
  fix(ui): open attached automations from session hovercards (#147749)
  refactor(reply): share usage-bar numeric coercion (#147863)
  fix(doctor): report warnings for keyed agent configs (#123058)
  perf(plugins): reuse complete registry comparisons (#147893)
  fix(workboard): await lifecycle sweep completion in tests (#147950)
  fix: reduce stalls when browsing large session inventories (#147911)
  refactor(onboard): share custom model definition (#147915)
  feat(ios): collapse completed chat work above replies (#148002)
  fix(voice-call): retain state runtime for deferred streams (#147689)
  test(qa): compare Telegram entities semantically (#147752)
  fix(plugins): preserve runtime scope for deferred CLI actions (#147688)
  test(qa): keep Slack progress marker visible (#147748)
  test(qa): finish channel picker prompts (#147730)
  test(tui): handle auth restriction prompt (#147729)
  fix(qa): retain onboarding prompts across redraw bursts (#147687)
  fix(qa): seed Teams ambiguous timeout deterministically (#147686)
  ...
vincentkoc added a commit to SunnyShu0925/openclaw that referenced this pull request Sep 14, 2026
* commit '069710f909f0a7158777d0fc0bf1eab84e20c699': (45 commits)
  refactor(infra): consolidate update campaign reset ownership (openclaw#146555)
  refactor: simplify Gateway health response parsing (openclaw#147834)
  fix: avoid Gateway stalls when renaming sessions (openclaw#147869)
  refactor(plugins): reuse worker optional-method validation (openclaw#147925)
  refactor(infra): remove unreachable firewall diagnostic fallback (openclaw#147882)
  fix(ui): open attached automations from session hovercards (openclaw#147749)
  refactor(reply): share usage-bar numeric coercion (openclaw#147863)
  fix(doctor): report warnings for keyed agent configs (openclaw#123058)
  perf(plugins): reuse complete registry comparisons (openclaw#147893)
  fix(workboard): await lifecycle sweep completion in tests (openclaw#147950)
  fix: reduce stalls when browsing large session inventories (openclaw#147911)
  refactor(onboard): share custom model definition (openclaw#147915)
  feat(ios): collapse completed chat work above replies (openclaw#148002)
  fix(voice-call): retain state runtime for deferred streams (openclaw#147689)
  test(qa): compare Telegram entities semantically (openclaw#147752)
  fix(plugins): preserve runtime scope for deferred CLI actions (openclaw#147688)
  test(qa): keep Slack progress marker visible (openclaw#147748)
  test(qa): finish channel picker prompts (openclaw#147730)
  test(tui): handle auth restriction prompt (openclaw#147729)
  fix(qa): retain onboarding prompts across redraw bursts (openclaw#147687)
  ...
vincentkoc added a commit to nvtoroy/openclaw that referenced this pull request Sep 14, 2026
* commit '4ddb9ed21245eaca9f243e555a5ec070aaaf0dad': (113 commits)
  fix: avoid Gateway stalls when renaming sessions (openclaw#147869)
  refactor(plugins): reuse worker optional-method validation (openclaw#147925)
  refactor(infra): remove unreachable firewall diagnostic fallback (openclaw#147882)
  fix(ui): open attached automations from session hovercards (openclaw#147749)
  refactor(reply): share usage-bar numeric coercion (openclaw#147863)
  fix(doctor): report warnings for keyed agent configs (openclaw#123058)
  perf(plugins): reuse complete registry comparisons (openclaw#147893)
  fix(workboard): await lifecycle sweep completion in tests (openclaw#147950)
  fix: reduce stalls when browsing large session inventories (openclaw#147911)
  refactor(onboard): share custom model definition (openclaw#147915)
  feat(ios): collapse completed chat work above replies (openclaw#148002)
  fix(voice-call): retain state runtime for deferred streams (openclaw#147689)
  test(qa): compare Telegram entities semantically (openclaw#147752)
  fix(plugins): preserve runtime scope for deferred CLI actions (openclaw#147688)
  test(qa): keep Slack progress marker visible (openclaw#147748)
  test(qa): finish channel picker prompts (openclaw#147730)
  test(tui): handle auth restriction prompt (openclaw#147729)
  fix(qa): retain onboarding prompts across redraw bursts (openclaw#147687)
  fix(qa): seed Teams ambiguous timeout deterministically (openclaw#147686)
  refactor(mcp): load OAuth only when credentials are needed (openclaw#147884)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
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 extensions: qa-lab maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant