Skip to content

fix(voice-call): emit canonical session keys#84199

Closed
TurboTheTurtle wants to merge 1 commit into
openclaw:mainfrom
TurboTheTurtle:fix/voice-call-canonical-session-key-83967
Closed

fix(voice-call): emit canonical session keys#84199
TurboTheTurtle wants to merge 1 commit into
openclaw:mainfrom
TurboTheTurtle:fix/voice-call-canonical-session-key-83967

Conversation

@TurboTheTurtle

Copy link
Copy Markdown
Contributor

Summary

  • Scope generated voice-call session keys under the resolved agent id (agent:<agent>:voice:*).
  • Preserve explicit session keys supplied by routes or outbound requests.
  • Update voice-call tests and docs to reflect the canonical agent-scoped keys.

Fixes #83967.

Real behavior proof

Behavior or issue addressed:
Generated voice-call session keys previously used unscoped voice:* keys, so calls could miss the canonical agent:<agent>:voice:* session namespace used by the rest of the agent runtime.

Real environment tested:
Local OpenClaw checkout on macOS using the repository source module through tsx with the bundled Node runtime.

Exact steps or command run after this patch:
PATH=/Users/andy/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH node --import tsx /private/tmp/proof-83967.mjs

Evidence after fix:

openclaw-voice-call-session-key-proof=ok
default_per_phone=agent:main:voice:15550001111
configured_agent_per_phone=agent:cards:voice:15550001111
per_call=agent:main:voice:call:call-123
explicit_session_key=meet-room-1

Observed result after fix:
Default per-phone, configured-agent per-phone, and per-call generated voice session keys are canonical agent-scoped keys, while an explicit session key is still preserved unchanged.

What was not tested:
No live telephony provider was called; the proof exercises the real OpenClaw voice-call config/session-key code path locally.

Validation

  • NODE_OPTIONS=--max-old-space-size=8192 OPENCLAW_VITEST_MAX_WORKERS=1 PATH=/Users/andy/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH node scripts/run-vitest.mjs extensions/voice-call/src/config.test.ts extensions/voice-call/src/response-generator.test.ts extensions/voice-call/src/manager/events.test.ts extensions/voice-call/src/manager/outbound.test.ts extensions/voice-call/src/runtime.test.ts --pool forks --maxWorkers 1 --vmMemoryLimit 8192MB
  • PATH=/Users/andy/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:/Users/andy/openclaw-83967/node_modules/.bin:$PATH oxfmt --check docs/plugins/voice-call.md extensions/voice-call/src/config.ts extensions/voice-call/src/config.test.ts extensions/voice-call/src/manager/events.test.ts extensions/voice-call/src/manager/outbound.test.ts extensions/voice-call/src/response-generator.test.ts extensions/voice-call/src/runtime.test.ts
  • PATH=/Users/andy/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:/Users/andy/openclaw-83967/node_modules/.bin:$PATH oxlint docs/plugins/voice-call.md extensions/voice-call/src/config.ts extensions/voice-call/src/config.test.ts extensions/voice-call/src/manager/events.test.ts extensions/voice-call/src/manager/outbound.test.ts extensions/voice-call/src/response-generator.test.ts extensions/voice-call/src/runtime.test.ts
  • git diff --check

Maintainer note

If this PR is squashed or reworked, please preserve author attribution or include:

Co-authored-by: Andy Ye <[email protected]>

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: voice-call Channel integration: voice-call size: S proof: supplied External PR includes structured after-fix real behavior proof. labels May 19, 2026
@clawsweeper

clawsweeper Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Workflow note: Future ClawSweeper reviews update this same comment in place.

How this review workflow works
  • 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.

Summary
The PR changes the Voice Call session-key resolver, docs, and tests so generated per-phone and per-call keys are agent-scoped while explicit session keys remain unchanged.

Reproducibility: yes. Source inspection shows current main and v2026.5.18 generate raw voice:* keys while the shared state canonicalizer maps raw keys under agent:<agentId>:, so the mismatch is reproducible from the resolver code without running a live carrier call.

PR rating
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Summary: Focused, well-covered bug fix with adequate terminal proof for the pure resolver path and no blocking findings.

Rank-up moves:

  • Run the listed focused Voice Call tests or the changed lane on the merge SHA before landing.
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

PR egg
✨ Hatched: 🥚 common Pearl Diff Drake

        /\     /\            
      _/  \___/  \_          
     /  ( o   o )  \         
    |      \_/      |        
    |   /\  ===  /\ |        
     \_/  \_____/  \_/       
        _/|_| |_|\_          
       /__| | | |__\         
          ' ' ' '            
         /_/     \_\         
       .-----------.         
      '-------------'        

Rarity: 🥚 common.
Trait: sniffs out flaky tests.
Share on X: post this hatch
Copy: My PR egg hatched a 🥚 common Pearl Diff Drake in ClawSweeper.

What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • How to hatch it: reach status: 👀 ready for maintainer look or status: 🚀 automerge armed; that usually means sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

Real behavior proof
Sufficient (terminal): The PR body includes after-fix terminal proof from the real repository source module showing canonical generated keys and preserved explicit keys.

Risk before merge
Why this matters: - No live telephony provider was exercised; merge confidence relies on the provider-independent resolver path, focused tests, and the supplied local source-module proof.

Maintainer options:

  1. Decide the mitigation before merge
    Land this PR or an equivalent resolver change that keeps generated Voice Call keys canonical and explicit session keys pass-through, with the focused session-key tests retained.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge
No ClawSweeper repair lane is needed because the diff is focused and no blocking review finding was identified.

Security
Cleared: The diff is limited to Voice Call resolver logic, docs, and tests; it does not touch dependencies, CI, secrets, permissions, downloads, or publishing surfaces.

Review details

Best possible solution:

Land this PR or an equivalent resolver change that keeps generated Voice Call keys canonical and explicit session keys pass-through, with the focused session-key tests retained.

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

Yes. Source inspection shows current main and v2026.5.18 generate raw voice:* keys while the shared state canonicalizer maps raw keys under agent:<agentId>:, so the mismatch is reproducible from the resolver code without running a live carrier call.

Is this the best way to solve the issue?

Yes. The PR fixes the central resolver used by inbound, outbound, classic response, and realtime consult fallback paths, and it uses the existing SDK normalizer instead of adding a parallel key scheme.

Label justifications:

  • P1: The PR addresses a live Voice Call session-state bug where generated sessions use non-canonical keys on current main and the latest release.

What I checked:

Likely related people:

  • Josh Avant: Current-main blame and path history attribute the existing raw Voice Call resolver, docs, runtime, and response-generator files to eb6dd2c in the checked-out main history. (role: available-history introducer; confidence: medium; commits: eb6dd2c65d11; files: extensions/voice-call/src/config.ts, extensions/voice-call/src/response-generator.ts, extensions/voice-call/src/runtime.ts)
  • Peter Steinberger: The related issue cites cb87603 as the earlier equivalent canonical voice-call session-key fix that did not reach main. (role: prior fix author on review branch; confidence: medium; commits: cb876030c229; files: extensions/voice-call/src/config.ts, extensions/voice-call/src/response-generator.test.ts, extensions/voice-call/src/runtime.test.ts)

Codex review notes: model gpt-5.5, reasoning high; reviewed against d0f7c8fa2805.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 May 19, 2026
@TurboTheTurtle
TurboTheTurtle deleted the fix/voice-call-canonical-session-key-83967 branch June 10, 2026 04:18
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 docs Improvements or additions to documentation proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. 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.

Follow-up: voice-call canonical session-key fix for #80064 is still not on main

1 participant