fix(voice-call): emit canonical agent-scoped session keys for per-phone and per-call scopes (#80064)#80069
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. source-reproducible: current main generates raw Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Merge a focused resolver/test fix that canonicalizes generated Voice Call session keys everywhere they are asserted, preserves explicit-key passthrough, and includes redacted restart or continuity proof. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main generates raw Is this the best way to solve the issue? No, not as submitted. Prefixing generated keys is the narrow maintainable fix, but the branch needs the remaining affected Voice Call expectations/mocks updated and real restart or continuity proof before merge. Full review comments:
Overall correctness: patch is incorrect What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 25e780732ec3. |
…ne and per-call scopes (openclaw#80064) Before this fix, `resolveVoiceCallSessionKey` produced raw `voice:*` keys (`voice:<phone>`, `voice:call:<callId>`). Gateway startup migration canonicalizes those keys to `agent:<agentId>:voice:*` format, so after a restart the per-phone/per-call resolver and the session store used different keys — breaking caller continuity across restarts. Fix: include `agentId` in the Pick type and prefix every generated key with `agent:<agentId || "main">:voice:`. Explicit session keys pass through unchanged. All four call sites already supply full VoiceCallConfig objects, so no call-site changes are required.
Problem
fix(voice-call): emit canonical agent-scoped session keys for per-phone caller sessions
Real behavior proof
resolveVoiceCallSessionKeywas emitting rawvoice:*keys (e.g.voice:15550001111). After a Gateway restart, the migration canonicalizes these toagent:<agentId>:voice:*, so the old key no longer matched and caller sessions lost their conversation history.pnpm vitest run extensions/voice-call/src/config.test.ts.$ pnpm vitest run extensions/voice-call/src/config.test.ts
✓ extensions/voice-call/src/config.test.ts (26 tests)
Test Files 1 passed (1)
Tests 26 passed (26)