Repository navigation
fix(voice-call): bound replay memory during long-running calls - #117437
Conversation
* origin/main: docs: generate docs map at publish time (#117398) refactor(plugins): move plugin contributions into the registry bundle (#117372) fix(tui): keep PTY progress and lifecycle truthful (#117402) test(xai): type realtime sent item payloads fix(qa): preserve Slack fallback evidence (#117420) fix(qa): satisfy update lane execution contracts (#117388) fix(qa): Matrix replies disappear after final replacement (#117390) test(xai): prove rejected tool call continuation fix(xai): complete rejected realtime tool calls test(xai): add live tool argument probe test(xai): cover rejected realtime tool arguments fix(xai): validate realtime tool arguments before dispatch fix(xai): skip tool call when rawArgs JSON parse fails instead of silently falling back to empty args
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 10:17 AM ET / 14:17 UTC. ClawSweeper reviewWhat this changesBounds voice-call manager and persisted per-call replay identifiers so long-running calls cannot retain replay metadata indefinitely. Merge readinessKeep this maintainer-owned PR open for normal review. Current main has unbounded manager and per-call replay collections, while the branch moves the bounds into the voice-call owner, preserves the asynchronous reject-hangup ownership invariant, and adds focused persistence/restore coverage; no actionable patch defect or security concern was found in the inspected changes. Priority: P1 Review scores
Verification
How this fits togetherVoice-call webhooks enter the voice-call manager, which deduplicates events, may issue an inbound-policy hangup, and persists call snapshots through plugin state. The replay collections protect this event path from duplicates across a running process and after restore, so their ownership and retention directly affect call lifecycle behavior. flowchart LR
A[Carrier webhook event] --> B[Voice-call manager]
B --> C[Replay ownership check]
C --> D[Inbound policy or call lifecycle]
D --> E[Persisted call snapshot]
E --> F[Restart restore]
F --> C
Before merge
Agent review detailsSecurityNone. PR surfaceSource +102, Tests +223. Total +325 across 9 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep replay retention owned by the voice-call manager and persisted call snapshot boundary, with the documented bounded-window tradeoff and focused lifecycle/restore regression coverage. Do we have a high-confidence way to reproduce the issue? Yes, by source inspection: current main appends each committed replay key to unbounded manager and per-call collections in Is this the best way to solve the issue? Yes. The branch places the cap at the two replay-state owners, bounds persisted snapshots during storage and restore, and uses reservation tokens so a late failed hangup cannot erase newer ownership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a172857acc75. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Maintainer owner review complete for exact head ClawSweeper's only P2 step is satisfied: the 10,000 manager and 500 per-call replay windows, oldest-entry eviction, and possible replay beyond the retained window are accepted as the explicit bounded-memory policy. The voice-call plugin is the correct owner boundary. The stored-data flag does not require a migration. This changes no schema, version, or serialized shape; existing oversized rows still parse and cache-like replay identities are normalized to the retained suffix on load and storage. Native review, 58/58 focused tests, production dead-code checks, exact-head autoreview, and exact-head GitHub CI are green. |
…law#117437) * origin/fix/voice-call-replay-bounds-20260801: fix(voice-call): keep replay caps production-owned test(voice-call): share replay cap constants test(voice-call): assert replay collection bounds test(voice-call): cover replay ownership bounds fix(voice-call): bound manager replay ownership
Related: #116201
What Problem This Solves
Fixes an issue where long-running voice-call managers could retain processed
event IDs and rejected inbound-call reservations without a bound. Persisted
per-call replay histories could also grow indefinitely across restarts.
Why This Change Was Made
Adds one voice-call-owned replay-key helper with explicit caps: 10,000 keys for
manager-wide replay ownership, matching the existing voice-call webhook replay
window, and 500 keys per persisted call. Rejected inbound reservations use
generation tokens so a late async failure cannot delete newer ownership, and
restore processes the newest call snapshots before applying the manager cap.
This does not add config, environment variables, storage schemas, provider
behavior, or plugin SDK surface.
User Impact
Long-running voice-call processes and restored calls now have bounded replay
metadata. Events older than the retained replay window may be processed again;
that is the explicit bounded-memory tradeoff.
Evidence
lifecycle tests passed.
confidence.
oxfmt --checkpassed on the changed helper and tests.git diff --checkpassed.dead-code, boundary, security, and real-behavior gates:
https://github.com/openclaw/openclaw/actions/runs/30703289286
fix(voice-call): bound replay memory during long-running calls #117437 (comment)
ownership and persistence bounds, not carrier protocols or call flows.
Storage compatibility: there is no schema, version, or serialized shape change.
Existing oversized call records continue to parse and their cache-like replay
identity arrays are normalized to the retained suffix during load and storage;
no migration is required.