fix(voice-call): fall back to persisted call store on status misses#96624
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 30, 2026, 12:14 AM ET / 04:14 UTC. Summary PR surface: Source +84, Tests +39. Total +123 across 4 files. Reproducibility: yes. Source inspection shows terminal calls are persisted and removed from active indexes, while current status paths only query active manager lookups before returning Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Keep the status-only persisted fallback, but return the newest canonical stored record by call id or provider call id, add a multi-snapshot regression test, and require redacted runtime proof for the completed-call status flow. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows terminal calls are persisted and removed from active indexes, while current status paths only query active manager lookups before returning Is this the best way to solve the issue? No. The status-only fallback is the right layer, but the implementation must return the newest persisted snapshot rather than the first matching event. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 85ee71223f0d. Label changesLabel justifications:
Evidence reviewedPR surface: Source +84, Tests +39. Total +123 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
|
f1e9940 to
530c9c3
Compare
530c9c3 to
d4d370f
Compare
|
Thanks @palomyates516-alt. This is now superseded by #99797, landed on The landed fix keeps completed-call lookup in the persisted-store owner path, covers the affected status surfaces with 70 focused passing tests, and passed a live authenticated Gateway regression that recovered the terminal |
Fixes #96586.
What Problem This Solves
The
voice_calltool'sget_statusaction, the legacymode: "status"path, and thevoicecall.statusgateway method only check the in-memory call manager. Once a call is evicted from the active map (completion cleanup, gateway restart, or time), they return{ found: false }even though the full call record - including transcript - is still persisted in the plugin's SQLite store. Any agent workflow that "calls and reports back" silently fails at the reporting step.Evidence
get_statusreturns{ found: false }for completed calls; a manual SQLite query confirms the full persisted record (transcript + state) is present underplugin_state_entries(plugin_id=voice-call), keyed asevent:<seq6>:<sequence>:<uuid>:chunk:NNNN.a21144d8a6):index.tsget_statuscase,mode === "status", and thevoicecall.statusgateway method all usert.manager.getCall(id) || rt.manager.getCallByProviderCallId(id)(in-memory only);CallManager.getCallreads theactiveCallsmap with no persisted fallback.store.test.ts):getPersistedCallByCallId/getPersistedCallByProviderCallIdfind persisted records by id and return null on miss. Existingindex.test.ts(38) andstore.test.ts(5) unchanged.Fix
store.ts: addgetPersistedCallByCallId(storePath, callId)andgetPersistedCallByProviderCallId(storePath, providerCallId)- bounded lookups reusing the existingreadCallRecordEventspath.manager.ts(CallManager): addgetPersistedCallByCallId/getPersistedCallByProviderCallIdmethods that delegate to the store using the privatestorePath.index.ts: add afindCallWithPersistedFallback(rt, id)helper (in-memory first, then persisted by callId, then by providerCallId) and use it in all three status surfaces.Scope / non-goals
get_transcriptaction (the issue suggests it, but the ClawSweeper review flags it as "not needed to repair").Test plan
store.test.ts): by-callId and by-providerCallId hit/miss.index.test.ts(38) andstore.test.ts(5) green - no regression.pnpm tsgo+pnpm check(oxlint/oxfmt).get_statusreturnsfound: truewith the persisted record.