Skip to content

refactor(talk): remove unobserved browser event producers - #178011

Merged
steipete merged 1 commit into
mainfrom
deslop/z38-11-unobserved-talk-events-20261015
Oct 20, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/z38-11-unobserved-talk-events-20261015

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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.

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 20, 2026 04:00
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T04:07:12.054957Z ea2ce91 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 20, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR removes unused private browser Talk event envelopes and retains readiness and closure callbacks.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A coherent, source-verified cleanup with green exact-head gates and transport-level coverage, but no current live provider or device evidence.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; reported coverage exercises real transport owners with synthetic I/O, and historical images do not establish current-head live behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes
Reason: The maintainer-authored direction removes verified unused allocation and bookkeeping while preserving the consumed contracts.

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
Reviewed head: ea2ce912d7f9ac3375d7cee746c21a37d3407a50

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No current-head live browser/provider call is supplied; the inspected images show earlier voice-switching work.
Agent review details

How this fits together

Browser 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]
Loading

Technical review

Best 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

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 3a9edfe adds ui/src/pages/chat/talk/google-live.ts:97 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3a9edfe4350f; files: ui/src/pages/chat/talk/google-live.ts)
  • Vincent Koc: Raw commit 66e8a6b adds ui/src/pages/chat/realtime-talk-google-live-tools.ts:62 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 66e8a6b28b1e; files: ui/src/pages/chat/realtime-talk-google-live-tools.ts)
  • Masato Hoshino: Raw commit 82b8f59 adds ui/src/pages/chat/talk/google-live.ts:100 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 82b8f59a3ec9; files: ui/src/pages/chat/talk/google-live.ts)

PR surface

Source -304, Tests -147. Total -451 across 22 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 6 27 331 -304
Tests 16 479 626 -147
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 22 506 957 -451

Review metrics

Metric Value Why it matters
Production versus test LOC Production +27/-331; tests and support +479/-626. Production shrinks by removing the unused producer chain; test additions primarily relocate existing relay fixtures and lifecycle coverage.

Labels

Label changes:

  • add P3: This is internal cleanup with preserved user-visible behavior and no demonstrated urgent runtime defect.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is internal cleanup with preserved user-visible behavior and no demonstrated urgent runtime defect.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 20, 2026, 12:18 AM ET / 04:18 UTC.

@steipete
steipete merged commit de34731 into main Oct 20, 2026
156 of 157 checks passed
@steipete
steipete deleted the deslop/z38-11-unobserved-talk-events-20261015 branch October 20, 2026 04:36
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Oct 20, 2026
Keep provider option tags and PCM byte accounting local after #178002 and #178011 removed their external consumers. Keep the V1 TypeSafe evaluator local after #158565 moved registration to V2; exercise its retained cancellation and sanitized-error contract through the existing V2 fixture adapter.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui ci:full Keep ordinary native-locale CI selection on the next PR run. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant