Repository navigation
fix(talk): bound relay transcript persistence - #117215
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 2:12 AM ET / 06:12 UTC. ClawSweeper reviewWhat this changesThe PR bounds Gateway Talk relay transcript persistence, closes an overflowed relay after draining accepted writes, and prevents stalled draining sessions from freeing admission capacity. Merge readinessThis PR remains necessary: current Priority: P1 Review scores
Verification
How this fits togetherGateway Talk relays receive provider transcript finals and persist them into durable voice-session records. This change replaces an unbounded promise chain in the relay owner with the shared bounded queue, then carries terminal and draining state through relay teardown and admission checks. flowchart LR
A[Realtime provider transcript finals] --> B[Gateway Talk relay]
B --> C[Shared bounded transcript queue]
C --> D[Durable voice transcript store]
C --> E{Overflow or close?}
E -->|Accepted prefix| D
E -->|Overflow| F[Terminal relay error and close]
F --> G[Draining relay registry]
G --> H[Relay admission limits]
Decision needed
Why: The implementation is coherent and proven, but it deliberately defines an operator-visible terminal failure contract for a previously unbounded path; the PR is also maintainer-owned and carries the protected Before merge
Agent review detailsSecurityNone. PR surfaceSource +62, Tests +259. Total +321 across 6 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the relay adoption after a responsible owner confirms that terminal close on transcript-persistence overflow is the intended Gateway Talk contract, preserving the shared policy and draining-owner admission accounting. Do we have a high-confidence way to reproduce the issue? Yes—source establishes a high-confidence path: stall Is this the best way to solve the issue? Yes—the PR fixes the leak at the relay session owner by reusing the already-merged canonical queue policy rather than creating a second limit or compensating downstream. Retaining draining owners in admission accounting closes the associated replacement-session loophole. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4caff51ff658. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
0546c98 to
b786f4a
Compare
b99f1e4 to
cdf683f
Compare
Related: #116201
Builds on the landed durable transcript foundation: #117214
What Problem This Solves
Fixes an issue where Gateway relay Talk sessions could retain an unbounded transcript-persistence backlog when durable transcript RPCs stalled.
Why This Change Was Made
Adopts the shared Talk transcript-operation policy in the relay session owner. Overflow produces one terminal persistence failure, blocks later transcript events, and still drains accepted writes before closing the durable voice session.
Terminal relays leave active lookup immediately but remain in a separate draining-owner registry until durable close settles. Existing global and per-connection relay limits count both active and draining owners, so stalled closes cannot be multiplied through replacement sessions.
Current relay construction-terminal, late-callback, disconnect, and close-error semantics remain intact.
User Impact
Gateway-relayed Talk sessions keep transcript persistence bounded while preserving accepted transcript ordering and existing relay teardown behavior.
Evidence
git diff --checkpassed.d6f6bcf2916is a two-commit relay-owner series on the landed foundation.VOICE_TRANSCRIPT_QUEUE_POLICYobject as the foundation, avoiding a second queue configuration surface.97f953addec4, tree3653c881992993c135139891af5ece90cf25e5c1; the Testbox run is https://github.com/openclaw/openclaw/actions/runs/30686161632.check:changedreached the existingOPENCLAW_*count ratchet (515below budget517); this DAG adds no environment variable or config surface.3653c881992993c135139891af5ece90cf25e5c1: relay-owned transcripts persisted, the tool-call path remained accepted, and durable close completed withvoiceStatus: closed. Run: https://github.com/openclaw/openclaw/actions/runs/30686177943.glacier, 43,200 output-audio bytes,response.done, and zero late audio after close.d6f6bcf2916passed withgpt-realtime-2.1: backend bridge connected, exact user transcript, assistant replyglacier, 45,600 output-audio bytes,response.done, zero late audio, and connected browser WebRTC with audio in 49.22 seconds.AI-assisted implementation; the maintainer reviewed the conflict resolution and current-main lifecycle invariants.