Repository navigation
refactor(talk): remove unobserved browser event producers - #178011
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR removes unused private browser Talk event envelopes and retains readiness and closure callbacks. Review scores
ProductKind: Refactor · Worth it: Yes Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR removes source-confirmed unused machinery while preserving the consumed lifecycle signals; no actionable correctness or security finding remains. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherBrowser Talk transports receive provider or Gateway frames and deliver audio, transcripts, status, and lifecycle signals to the Talk session and chat UI. flowchart TD
A[Provider and Gateway frames] --> B[Browser transport owners]
B --> C[Audio transcript and status paths]
C --> D[Talk session and chat UI]
B --> E[Ready and closed callbacks]
E --> F[Session retirement and voice handoff]
Technical reviewBest possible solution: Retain this complete removal of unused private event production while keeping existing transport, transcript, and lifecycle owners. Do we have a high-confidence way to reproduce the issue? This refactor claims no user-visible bug; source inspection confirms the unused producer chain and its lifecycle-only consumers, without executing target code. Is this the best way to solve the issue? The change removes the unused chain at its producers, preserves canonical Gateway event consumption, and avoids introducing another owner or compatibility path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a58ee54526ea. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -304, Tests -147. Total -451 across 22 files. Added test files: 2. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 20, 2026, 12:18 AM ET / 04:18 UTC. |
|
Merged via squash.
|
Keep provider option tags and PCM byte accounting local after openclaw#178002 and openclaw#178011 removed their external consumers. Keep the V1 TypeSafe evaluator local after openclaw#158565 moved registration to V2; exercise its retained cancellation and sanitized-error contract through the existing V2 fixture adapter.
What Problem This Solves
Browser Talk constructs full private event envelopes and progress/transcript copies that no production reader consumes.
User Impact
No visual, text, feature, public-protocol or persisted-data change. Talk still signals readiness and closure, delivers transcripts and audio, executes tools, honors camera/microphone consent, and settles cancellation and accepted writes.
Why This Change Was Made
Keep the private callback's two consumed lifecycle signals and remove the whole unused producer chain: sequence counters, synthetic turn/session IDs, timestamps, event envelopes, tool-progress adapters and transcript/audio observations. Its only production readers handle ready/closed for transport retirement and voice switching. Plain TypeScript transport owners remain authoritative; no new state owner or adapter is introduced.
Google's interrupted-turn/interaction-status bookkeeping only grouped those discarded synthetic events. Real interruption audio stop and transcript finalization remain. Provider result/cancel/send checks, WebRTC terminal deduplication, input/output bounds, security effect boundaries, consent and cleanup stay. The relay still receives full canonical Gateway TalkEvent data and consumes its real turn IDs and final/tool-result facts; only publication to the private callback is narrowed.
Production +27/-331,304net lines removed in six files;22total changed paths. Test/support changes remove synthetic-only proof while keeping transcript ordering, provider wire outputs, visible errors, voice handoff and lifecycle/resource behavior. Existing relay fixtures and lifecycle cases move into shared test support and a focused sibling suite so the oversized original test shrinks; no retained case or assertion is dropped for the split.
Best-effort tradeoffs accepted
Private browser callbacks no longer supply ignored synthetic transcript/audio/tool progress envelopes or invented turn identities. Whole-repository production/dynamic-access searches close their consumer graph; the completed architecture/ready-close/progress work (65e1232,#146676,#158683) has no dormant activation dependent on them. Future private consumers must use the actual transcript/status callbacks or explicitly add a real contract. No public Gateway/SDK event schema is narrowed.
The old interrupted-turn grouping fix (#133365,725222dd) served only synthetic event identity; actual interruption/finalized speech remains. No runtime recovery/security guard is removed. The post-submit abort check was orphaned after its only subsequent operation (unused observation publication) disappeared. The fire-and-forget steering catch remains so errors do not become unhandled rejections.
Evidence
Frozen source SHA2566dd7e98d1ce5983e5e5ac8eb2d3080d388683d8c720897b16e9bb888ef51b995 against7330a783ae1e012df9179d63fe9d57a8522727b9. Frozen/prefer-offline install passed76.2seconds. Original focused Talk and voice-handoff proof passed384cases/25files (53.07seconds Vitest,65.68seconds wrapper),31explicit-root targeted types, suppression14/14, changed lint/format, runtime/Madge cycles0 and planner/whitespace. After the fixture-only split, both relay suites passed56cases/2files (11.97seconds Vitest,24.14seconds wrapper); those are reused cases, not additional coverage. Removed one orphan type import found by targeted types; final33explicit-root types, suppression14/14 (32.33seconds wrapper), changed lint/format, runtime/Madge cycles0, planner/whitespace and staged line-cap checks passed.
Original independent P0–P2 review was scoped-clean, correctness0.93. Fresh22-path split review reported one P1 claiming extendedThinkingModel had become unread; this is source-rejected, not a clean review: google-live.ts still reads that member in sendToolResult to preserve the provider's scheduled-response contract. The field remains. No nicer-verdict rerun; the later orphan type-import deletion does not change runtime behavior or the reviewed ownership split.
Tests use real transport owners with synthetic provider I/O; no live provider/device or browser E2E proof is claimed. No broad local build/E2E or full changed-check suite ran; hosted exact-head CI owns broad proof. All commands use isolated HOME/OpenClaw/XDG state, nice10 and one worker. No operator state, timeout, retry, skip, suppression, dependency/config/schema/protocol change.