refactor: route voice call agent runs through session target#96539
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 24, 2026, 3:45 PM ET / 19:45 UTC. Summary PR surface: Source +1, Tests +55, Other +69. Total +125 across 4 files. Reproducibility: not applicable. This PR is an internal refactor rather than a user-reported bug. The behavior claim is verifiable through the changed Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Keep this bounded refactor open and land it after maintainer review/CI so Voice Call classic responses use the same Do we have a high-confidence way to reproduce the issue? Not applicable; this PR is an internal refactor rather than a user-reported bug. The behavior claim is verifiable through the changed Is this the best way to solve the issue? Yes; this is the narrowest maintainable fix because the embedded runner already owns AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3848b9619fdb. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +1, Tests +55, Other +69. Total +125 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
What Problem This Solves
Voice Call still routed classic auto-response agent runs through the legacy
sessionFileruntime identity path. That kept one bundled plugin on the file-backed session seam after the embedded-agent runtime already supports storage-neutral session targets.Why This Change Was Made
Path 3 is migrating runtime callers away from session transcript/file paths and toward accessor/session identity seams. Voice Call already had enough local session identity to pass
agentId,sessionId,sessionKey, andstorePathdirectly, so preserving thesessionFilecompatibility path was no longer needed for this caller.User Impact
Voice Call response behavior is intended to stay the same. The change only alters the internal identity passed to embedded OpenClaw agent runs: responses still use the same voice session key, agent, model, workspace, timeout, lane, and tool allowlist, but no longer resolve or pass a transcript file path.
Evidence
node scripts/run-vitest.mjs extensions/voice-call/src/response-generator.test.tsnode scripts/run-vitest.mjs test/scripts/check-session-accessor-boundary.test.tsnode scripts/check-session-accessor-boundary.mjspnpm exec oxfmt --check --threads=1 extensions/voice-call/src/response-generator.ts extensions/voice-call/src/response-generator.test.ts scripts/check-session-accessor-boundary.mjs test/scripts/check-session-accessor-boundary.test.tsnode scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.extensions.json extensions/voice-call/src/response-generator.ts extensions/voice-call/src/response-generator.test.tsnode scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.scripts.json scripts/check-session-accessor-boundary.mjs test/scripts/check-session-accessor-boundary.test.ts.agents/skills/autoreview/scripts/autoreview --mode branch --base upstream/main/Users/phaedrus/Projects/clawdbotate797e86dbe88ad91a3b6102ba312bbd85d16b10f:node --import tsx /tmp/path3-voice-sessiontarget-proof.mjsgenerateVoiceResponsereturned"Proof passed.", calledrunEmbeddedAgentonce, passedsessionTarget, did not passsessionFile, and did not callresolveSessionFilePath.Live proof note: this is direct runtime seam proof, not full phone/media ingress proof. The phone ingress path that reaches this classic response generator requires a streaming transcript callback; the mock Voice Call gateway methods prove plugin loading/call management but do not invoke
handleInboundResponse.