fix(voice-call): add persisted store fallback to getCall/getCallByProviderCallId#96802
Closed
ZOOWH wants to merge 1 commit into
Closed
fix(voice-call): add persisted store fallback to getCall/getCallByProviderCallId#96802ZOOWH wants to merge 1 commit into
ZOOWH wants to merge 1 commit into
Conversation
…viderCallId
When a voice call completes, the call record is evicted from the in-memory
activeCalls map. Subsequent get_status requests return { found: false } despite
the full call record (with transcript) being persisted in the plugin state store.
Add getCallFromStore/getCallByProviderCallIdFromStore lookup helpers in store.ts
and wire them as fallback paths in CallManager.getCall/getCallByProviderCallId.
All existing callers (get_status, status mode, resolveCallMessageRequest) benefit
automatically from the manager-level fallback without caller-side changes.
Closes openclaw#96586
Contributor
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(voice-call): add persisted store fallback to getCall/getCallByProviderCallId This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Contributor
Author
|
Closing — the fix approach is materially identical to #96727. Will find a different issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
voice_calltoolget_statusreturns{ found: false }for completed calls once the in-memory call record is evicted, even though the full call record (with transcript) is persisted in the plugin state store.CallManager.getCall()andgetCallByProviderCallId()only check the in-memoryactiveCalls/providerCallIdMap— there is no fallback to the persisted call store.getCallFromStore/getCallByProviderCallIdFromStorehelpers instore.tsthat look up individual call records from the persisted plugin state store, then wire them as fallback paths inCallManager.getCall()/getCallByProviderCallId().get_status, legacystatusmode,resolveCallMessageRequest) benefit from the manager-level fallback without any caller-side changes.Closes #96586
Change Type
Scope
Root Cause
In
CallManager.getCall()andgetCallByProviderCallId(), only the in-memory maps are checked. Calls incompleted,failed,no-answer, orbusystate are classified as terminal byTerminalStatesand are not restored intoactiveCallsduringloadActiveCallsFromStore(). Once the gateway restarts or the manager evicts the call,getCall/getCallByProviderCallIdreturnundefinedfor those calls, causingget_statusto report{ found: false }.Real behavior proof
Behavior addressed:
getCall/getCallByProviderCallIdnow fall back to the persisted plugin state store when a call is not found in the in-memory active maps.Environment tested: Node 24.13.1 on Linux,
node --import tsxcalling the real call manager and store helpers from the fix branch.Steps run after the patch: Created a completed call record, persisted it to the plugin state store via
persistCallRecord(), then verified thatgetCall()andgetCallByProviderCallId()find it via store fallback.Evidence after fix:
Observed result after the fix: Completed calls that have been evicted from the in-memory
activeCallsmap are now correctly retrieved from the persisted plugin state store. Non-existent calls still returnundefined(no false positives).Not tested: Live voice-call gateway session with real Twilio/Plivo provider webhook and natural call lifecycle. The store fallback path is verified via the real production functions
persistCallRecord+getCallFromStore/getCallByProviderCallIdFromStore+getCall/getCallByProviderCallId.Security Impact