Repository navigation
fix(talk): bind realtime delegation ownership - #129186
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 8, 2026, 1:55 PM ET / 17:55 UTC (Revision 16). ClawSweeper reviewWhat this changesBinds realtime voice tasks to their Talk session and agent run, steers subsequent requests into that run, and permits completion or failure delivery only once. Merge readiness✅ Ready for maintainer review This remains a useful, distinct fix: current main lacks the completion-ownership boundary. The retained prior findings are addressed, supplied production-path proof supports the ownership checks, and no new actionable defect was found. Priority: P1 Review scores
Verification
How this fits togetherTalk sends spoken requests through the Gateway to an agent and returns its answer through the realtime provider. This change connects session ownership, backend registration, steering, and final provider delivery. flowchart LR
A[Spoken request] --> B[Provider delegation]
B --> C[Gateway session owner]
C --> D[Register or steer agent run]
D --> E[Agent completion or failure]
E --> F{Current owner and unused claim?}
F -->|Yes| G[Provider reply]
F -->|No| H[Suppress stale reply]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +680, Tests +1728. Total +2408 across 23 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep authorization in the existing Gateway and run lifecycle owners, with provider delivery consuming their final claim and ordinary consultations remaining reusable. Do we have a high-confidence way to reproduce the issue? Yes, source identifies the late-completion and replacement paths, and the supplied evidence exercises valid and invalid owners. This review did not execute a current-main reproduction. Is this the best way to solve the issue? Yes. The patch extends existing admission and run-control owners, preserves ordinary callback compatibility, and checks authority immediately before steering and provider output. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 746e53f21fe9. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (15 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
8aac70e to
abee880
Compare
|
@clawsweeper re-review Exact-head evidence and review disposition are refreshed in the PR body for |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
What Problem This Solves
New spoken delegation could start competing embedded work or deliver a late result after the authoritative Talk owner had been cancelled, replaced, or revoked.
Related: #129144, #121894, #118499, #118505
Stack: 2/3. The prerequisite privacy layer has landed. The next layer adds yielded subagent completion reattachment.
Why This Change Was Made
User Impact
Realtime voice remains responsive while the parent agent works. New speech steers the accepted run, valid completion returns exactly once, and stale work cannot speak through a successor.
Root Cause And Owner
Run correlation was being treated as delivery authority across asynchronous Gateway startup, replacement, and teardown. The canonical owner is the Gateway operational run instance plus its closure-bound Talk owner. This change carries that authority through backend registration and revalidates it synchronously at steering, startup registration, and final provider append.
Evidence
1a790bdd2cdd2290ded104285eacbba463dda196Sanitized real-socket proof:
Invalid owner cases:
Valid owner cases:
Dependency Contract
Direct inspection of
openai/codex@9a3af22d01bc9abcafb1e3aa01cb4738a2caf37aconfirmed:codex-rs/core/src/tools/handlers/multi_agents_v2/spawn.rs:207-269codex-rs/core/src/tools/handlers/multi_agents_v2/wait.rs:45-116codex-rs/core/src/session/turn_input.rs:424codex-rs/core/src/session/turn_input.rs:527-543codex-rs/app-server/src/request_processors/turn_processor.rs:1006-1074codex-rs/core/tests/suite/subagent_notifications.rs:928-955Review Disposition
ClawSweeper findings at prior heads are addressed:
Independent autoreview found and this head fixes one additional P1: generic plain consult runners were incorrectly required to publish completion claims, causing successful delegation output to be dropped. The controller now requires claims only after explicit adoption; lifecycle-bound runners remain fail-closed.
Final review found and this head fixes a second P1: a stale separate runner could revoke the active replacement's completion claim before validating current ownership. Claim installation now follows relay/client registration, and browser ownership is revalidated immediately before global claim mutation. The pre-fix replacement claim failed; the exact-head regression preserves the active claim and rejects the stale runner.
Review Metrics
+742/-62(net+680)+1799/-71(net+1728)The production growth establishes one cross-layer lifecycle authority boundary. A consumer-only guard cannot safely cover backend publication, exact caller projection, startup failure, relay replacement, retry steering, plain-runner compatibility, and one-shot final delivery.
ClawSweeper Rank-Up Moves