Repository navigation
fix: closed browser Talk sessions admit new agent work - #133019
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 10:30 PM ET / August 30, 2026, 02:30 UTC. ClawSweeper reviewWhat this changesThis PR binds browser Talk provider delegation to the live client-session lifecycle, rejecting callbacks retained after close or disconnect while preserving work already accepted. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessThe branch repairs the linked closed-session delegation bug at its lifecycle owner; no introduced correctness or security defect was found, so it should remain open for normal maintainer review and exact-head CI. Priority: P1 Review scores
Verification
How this fits togetherBrowser Talk creates a provider transport that may ask Gateway to run an agent consultation. The Gateway lifecycle owner must allow that admission only while the originating browser client and voice session remain live. flowchart LR
A[Browser Talk client] --> B[Gateway session creation]
B --> C[Provider browser transport]
C --> D[Gateway lifecycle owner]
D --> E[Agent consultation]
A --> F[Close or disconnect]
F --> D
D --> G[Reject new work]
E --> H[Complete accepted work safely]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +103, Tests +386. Total +489 across 13 files. View PR surface stats
Review metrics
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 single lifecycle-owner repair once exact-head CI confirms the close, disconnect, startup, replacement, and accepted-work regressions, retaining only the additional state required to represent those distinct lifetimes. Do we have a high-confidence way to reproduce the issue? Yes. The linked issue provides a deterministic lifecycle-boundary scenario, and the added close/disconnect regressions exercise that scenario against the durable voice-session owner. Is this the best way to solve the issue? Yes. Fencing admission at the lifecycle owner and session commit boundary rejects retained callbacks without disrupting already accepted work, avoiding a downstream-only guard. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5c5747e217ab. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Maintainer follow-through on the production-growth review: the net +103 lines are retained for three distinct lifetimes the old active-only map could not represent: pending provider startup, exact active browser transport admission, and already accepted agent work after that transport closes. The patch extends the existing owner rather than adding a parallel lifecycle implementation. It also consolidates duplicated teardown and HTTP response handling. A durable-record-only check cannot reject a callback from a disconnected or replaced transport; canceling the provider's consult signal discards already accepted work. The synchronous owner fence and existing storage commit callback close those gaps without new configuration or schema. The focused close, disconnect, pending startup, replacement, queued-write, and accepted-work tests pass; independent P0–P2 review found no actionable defect. The review's recommended implementation is retained, with exact-head CI still required before landing. GPT-Live credential/entitlement limits and media-interruption follow-up remain explicit in the PR body. |
|
Merged via squash.
|
Closes #132993
What Problem This Solves
Fixes an issue where a browser Talk session could admit new agent work after closing or disconnecting, while explicitly releasing a GPT-Live browser transport could abort work already accepted.
Why This Change Was Made
Pending and active provider sessions now use the existing browser lifecycle owner. Admission checks exact connected-client and active-transport ownership, queued chat creation rechecks ownership at commit, and failed or late startup releases its provider resources. Replacement remains transactional: the old transport stays active until its replacement succeeds. Accepted GPT-Live work outlives an intentional transport release, but cannot send results back through that closed wire. Recoverable provider errors reach the owning client.
User Impact
Closing Talk prevents new delegations without discarding an accepted task. Disconnects during startup do not leave provider sessions or empty chats behind. The existing client-control negotiation, GA behavior, config, and database schema remain unchanged.
Evidence
Independent Codex review of the combined candidate completed clean at P0–P2; the PRs contain disjoint subsets of that reviewed patch.
tbx_01m185h6k7s0dnt939ehb0dtcg: https://github.com/openclaw/openclaw/actions/runs/33286432360 . The GA speech smoke also passed.63d213884daea50e4f74efc192cdc44f549b67d5covered frameless delegation, sideband closure, and normal WebSocket shutdown. No provider auth policy or payload contract is changed.Provenance: the failures were reproduced at
9d8bf3525072487320da72b6718ecf9c69dc3f4e; the exact introducing commit is not established.Follow-ups remain separate: GPT-Live audio-driven interruption needs a continuous-media ownership contract; a sideband transcript finishing does not prove its WebRTC media drained. Native phone tools and Discord forced-response/wake policies also need per-model capability follow-through. These limitations are documented, not silently treated as parity.
AI-assisted implementation and verification. Release-note context: bind browser Talk delegation admission and cleanup to its exact live transport while preserving accepted work.