Skip to content

feat: switch voices during Talk and Discord calls - #146676

Merged
steipete merged 12 commits into
mainfrom
codex/agent-voice-selection
Sep 16, 2026
Merged

steipete merged 12 commits into
mainfrom
codex/agent-voice-selection

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Asking the assistant to change its voice did not change an active Talk or Discord call. This adds in-call voice selection for browser Talk, iOS WebRTC and Gateway relay, Android Gateway relay, and supported Discord realtime calls.

User Impact

Ask the assistant to list available voices and switch to one. Browser Talk also offers a picker beside the call controls. The brief reconnect preserves the conversation and accepted agent work. Discord applies the voice to current and subsequent speakers in the room. Saved voice defaults stay unchanged.

Discord switching requires an owner-authorized voice turn, access to talk_voice, a voice catalog, and a provider that supports native delegation or suppressed tool results. Google Live reports switching as unavailable; change its configured voice and rejoin. Android retains its existing realtime model gate, and native speech/TTS fallback retains its existing settings.

If a mobile or browser replacement fails, the call reports the failure. Discord keeps or restores the previous voice where possible and requests a rejoin if restoration fails. Ending a call or changing its Gateway prevents a delayed replacement from reviving it.

Why This Change Was Made

The authenticated talk_voice tool and browser picker use one Gateway selection operation. The existing transport owners manage replacement and cleanup. They wait for finalized transcripts and the source close acknowledgement before creating a fresh provider session with bounded conversation history. Success requires the replacement connection to be ready.

Mobile clients now negotiate voice-selection and consume talk.voice.change, replacing the iOS/Android coverage exclusions. iOS waits for WebRTC readiness, preserves accepted consults, and keeps the selected voice across a same-Gateway reconnect. Android retains the captured Gateway lease and conversation and waits for the current microphone, including when push-to-talk pauses and resumes during the handoff. Current caller/run authority is revalidated at the Gateway. Existing client permissions suffice; there is no saved configuration or storage migration.

Native apps negotiate switching from the methods advertised by the same Gateway connection used to start the call. Older Gateways keep receiving their original startup payloads, so updating the app before the Gateway does not break existing calls. iOS covers direct WebRTC creation, prefetch, and relay; Android covers relay creation.

Discord prepares muted replacements, carries unheard speech and final transcript history forward, and delivers late accepted answers through the current connection. Talk handlers and browser transport code are grouped under their existing owners, with superseded import paths removed.

Related: #146370.

Evidence

  • Android: 188/188 voice and connection tests, Kotlin lint, and PlayDebug packaging pass on Testbox. The original capability/recorder regressions and the PTT resume race each fail on the earlier code. The older-Gateway regression also fails before the repair with a rejected startup request; afterward, absent, partial, and complete method advertisements produce the correct startup payloads. Reconnect coverage verifies that each captured lease keeps its own method snapshot. Independent review is clean through P2.
  • iOS/shared: 49 shared Swift tests and 64 iOS simulator tests pass, including the real Gateway event-to-manager path, close ordering, Stop, failed startup, transcript drain, and accepted work. All nine old/partial/current Gateway startup cases pass across prefetch, direct WebRTC, and relay; the old code produces six expected failures. The full simulator app/Watch build, SwiftFormat, and SwiftLint pass. Independent review of the compatibility repair is clean through P2.
  • Mobile protocol coverage passes with both exclusions removed. Native localization source verification passes; the two Android failure messages are registered in the source inventory. The repository’s locale-refresh workflow owns generated translations and platform catalogs.
  • Current Talk Voice plugin tests: 20 passed. Earlier browser/Discord implementation proof includes 238 Discord tests and 231 focused Gateway/browser history and lifecycle tests, including demonstrated regressions for transcript drain, retained history, Stop, and accepted work.
  • Existing browser E2E and inspected captures show Marin → Alloy, retained captions, and agent work continuing across replacement. Discord proof uses its registered runtime with mocked external transport. Native/device audible-provider verification is not claimed.
  • Required CI tracks the current PR head. The rebase retains the canonical main branch's alias and worktree-diagnostics fixtures without an incidental PR change.

Before: call controls without a speaker voice picker

After: speaker voice picker beside call controls

After: available voices in the open picker

Browser handoff proof

Before switching: Marin and active agent work

After switching: Alloy, retained captions, and active agent work

@steipete steipete self-assigned this Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: android App: android app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts extensions: talk-voice extensions: openai plugin: workboard size: XL maintainer Maintainer-authored PR labels Sep 13, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 15, 2026, 10:56 PM ET / September 16, 2026, 02:56 UTC (Revision 16).

ClawSweeper review

What this changes

Adds voice switching during browser, iOS, Android, and supported Discord calls while preserving conversation history, accepted agent work, and saved voice defaults.

Merge readiness

⛔ Blocked before merge - 2 items remain

The previous mobile startup compatibility finding is resolved. Current main still lacks in-call voice selection, and this maintainer-sponsored PR remains useful; no new blocking defect was found in the reviewed paths.

Priority: P2
Reviewed head: 0e3d1ab06c8b2976d8e6c0e64652fa9bf6c4f8a2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful implementation with focused lifecycle coverage and a repaired compatibility blocker; supplied visual evidence has clearly bounded scope.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The maintainer-authored exemption applies. Inspected screenshots demonstrate browser picker presentation, while reported native and Discord validation covers startup and handoff boundaries; audible provider switching is explicitly unclaimed, and screenshots do not establish runtime authorization.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored exemption applies. Inspected screenshots demonstrate browser picker presentation, while reported native and Discord validation covers startup and handoff boundaries; audible provider switching is explicitly unclaimed, and screenshots do not establish runtime authorization.
Evidence reviewed 11 items Previous finding resolved at the pinned head: The pinned head adds connected-Gateway method negotiation to Android relay startup and iOS prefetch, direct WebRTC, and relay startup. GitHub confirms the head's recorded parent and the focused compatibility repair. The earlier reviewed SHA was unavailable locally, so no unchanged-code or late-finding attribution is inferred.
Released startup contract: The v2026.9.4 client-create schema accepts voice-transcript but excludes voice-selection; its relay-create schema has no capabilities property. Current mobile code preserves those payloads when any required voice method is absent.
Compatibility regression coverage: Android coverage exercises missing, empty, partial, and complete method advertisements through startup. iOS coverage exercises three advertisement states across prefetch, WebRTC, and relay. The PR body reports passing native validation and failures before the repair; this review inspected source without executing tests.
Findings None None.
Security None None.

How this fits together

Talk connects browser and mobile audio clients to realtime providers through the Gateway; Discord manages provider connections within its voice room. Voice requests enter through the Talk Voice tool or browser picker, and the existing call owners replace connections and report readiness or failure.

flowchart TD
  A[Spoken voice request] --> C[Talk Voice tool]
  B[Browser voice picker] --> D[Gateway selection and authority checks]
  C --> D
  D --> E[Browser or mobile call owner]
  D --> F[Discord room owner]
  E --> G[Replacement provider connection]
  F --> G
  G --> H[Ready confirmation or visible failure]
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Protocol surface 3 new RPC methods; 1 new call event Mobile clients negotiate all three methods before advertising voice-selection support.
Code balance Production/tooling +3,051 net lines; tests/support +4,649 net lines Production growth supports the documented multi-transport handoff and lifecycle behavior, with more added regression coverage than production code.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep active-call selection centralized at the Gateway, with transport-owned replacement, current authority checks, and independently preserved saved defaults.

Do we have a high-confidence way to reproduce the issue?

Not applicable to the feature itself. The previous startup incompatibility is source-verifiable against v2026.9.4 and is now addressed by capability negotiation; no runtime reproduction was executed here.

Is this the best way to solve the issue?

Yes. Extending the existing Talk Voice plugin and call owners avoids a competing settings mechanism, and negotiation preserves mobile startup against older Gateways.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b68264d1d7c3.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored exemption applies. Inspected screenshots demonstrate browser picker presentation, while reported native and Discord validation covers startup and handoff boundaries; audible provider switching is explicitly unclaimed, and screenshots do not establish runtime authorization.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded improvement to active voice calls, with the previously identified mobile startup regression repaired.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored exemption applies. Inspected screenshots demonstrate browser picker presentation, while reported native and Discord validation covers startup and handoff boundaries; audible provider switching is explicitly unclaimed, and screenshots do not establish runtime authorization.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The maintainer-authored exemption applies. Inspected screenshots demonstrate browser picker presentation, while reported native and Discord validation covers startup and handoff boundaries; audible provider switching is explicitly unclaimed, and screenshots do not establish runtime authorization.

Evidence

What I checked:

  • Previous finding resolved at the pinned head: The pinned head adds connected-Gateway method negotiation to Android relay startup and iOS prefetch, direct WebRTC, and relay startup. GitHub confirms the head's recorded parent and the focused compatibility repair. The earlier reviewed SHA was unavailable locally, so no unchanged-code or late-finding attribution is inferred. (apps/ios/Sources/Voice/TalkModeManager.swift:2443, 0e3d1ab06c8b)
  • Released startup contract: The v2026.9.4 client-create schema accepts voice-transcript but excludes voice-selection; its relay-create schema has no capabilities property. Current mobile code preserves those payloads when any required voice method is absent. (packages/gateway-protocol/src/schema/channels.ts:194, 3a9d69db306c)
  • Compatibility regression coverage: Android coverage exercises missing, empty, partial, and complete method advertisements through startup. iOS coverage exercises three advertisement states across prefetch, WebRTC, and relay. The PR body reports passing native validation and failures before the repair; this review inspected source without executing tests. (apps/android/app/src/test/java/ai/openclaw/app/voice/TalkModeManagerTest.kt:2546, 0e3d1ab06c8b)
  • Still necessary on current main: Current-main documentation describes saved provider-scoped voice selection through the existing command, not active-call replacement. The main-tree search finds neither the new selection RPC implementation nor the channel selection registration. The related merged caption/confirmation PR, fix: stop GPT Live caption repeats and honor spoken confirmations #146370, addresses distinct behavior. Public docs: docs/nodes/talk/realtime-sessions.md. (docs/nodes/talk/realtime-sessions.md:12, b68264d1d7c3)
  • Live authority and replacement ownership: The Gateway resolves the exact call before authorizing session participation and rechecks caller, run binding, and storage target during replacement. Channel bindings expire with their run or call; Discord rechecks the supplied authority before creating candidates and adopting output. Tests cover foreign targets and retired run, binding, call, speaker, and Gateway authority. (src/gateway/talk/handlers/voice.ts:25, 0e3d1ab06c8b)
  • Plugin boundary and saved settings: The existing Talk Voice plugin gains the active-call tool while retaining its saved-configuration command. The channel registration uses the already private-local realtime-voice seam, documented in the SDK subpath reference; it does not introduce a public third-party subpath or rewrite saved defaults. (src/plugin-sdk/realtime-voice.ts:1, 0e3d1ab06c8b)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • eleqtrizit: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (15 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-15T23:23:14.682Z sha b01a219933ca5847cb2ffc43aa8cfe10e4cc4f73 :: blocked before merge. :: none
  • reviewed 2026-09-16T00:03:03.478Z sha b01a219933ca5847cb2ffc43aa8cfe10e4cc4f73 :: blocked before merge. :: none
  • reviewed 2026-09-16T00:55:50.007Z sha 7fd3bd716ad8e88e2466d114c30591ff45ccb51f :: blocked before merge. :: [P1] [P1] Negotiate voice-selection support before mobile Talk startup
  • reviewed 2026-09-16T01:12:00.820Z sha 16347567331a56de3b7ba73dc8a84bebadee99b6 :: blocked before merge. :: [P1] [P1] Negotiate voice-selection support before mobile Talk startup
  • reviewed 2026-09-16T01:20:28.310Z sha d7e417464c17980eaa70c242bab49411f7ececa2 :: blocked before merge. :: [P1] [P1] Negotiate voice-selection support before mobile Talk startup
  • reviewed 2026-09-16T01:36:39.872Z sha cd63703b71d8bbbe2579e7dffb37dcf106873f16 :: blocked before merge. :: [P1] Negotiate voice-selection support before mobile Talk startup
  • reviewed 2026-09-16T01:59:25.494Z sha 7a2ccb5f4e26da067490204466f1d139ca06ea7c :: blocked before merge. :: [P1] Negotiate voice-selection support before mobile Talk startup
  • reviewed 2026-09-16T02:21:32.739Z sha cf588e21971828acdce454940dd7d7643c42881f :: blocked before merge. :: [P1] Negotiate voice-selection support before mobile Talk startup

@steipete
steipete force-pushed the codex/agent-voice-selection branch from 172bfb3 to 4856816 Compare September 13, 2026 03:52
@steipete steipete changed the title feat: change the voice during a Talk call feat: change voices during browser Talk and Discord calls Sep 15, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 15, 2026
@steipete
steipete force-pushed the codex/agent-voice-selection branch from 4856816 to 056d25d Compare September 15, 2026 19:58
@steipete
steipete marked this pull request as ready for review September 15, 2026 20:00
@steipete
steipete requested a review from a team as a code owner September 15, 2026 20:00
@openclaw-barnacle openclaw-barnacle Bot added the channel: discord Channel integration: discord label Sep 15, 2026
@steipete
steipete force-pushed the codex/agent-voice-selection branch from ca1e2a4 to bca6cfa Compare September 15, 2026 21:58
steipete added a commit that referenced this pull request Oct 15, 2026
Continue the y01 largest-owner, export/caller and duplicate-helper audit.
Delegate composer mounting to the canonical interop boundary while retaining
field equality, keyed renderer identity and foreground picker cleanup. Remove
test-only panel refresh methods and commit counters; exercise the actual view,
polling and committed DOM instead. Trust admitted immutable composer metadata
and the full tool-stream owner contract. Narrow sidebar traversal to its
normalized single column and simplify browser/Gateway realtime decoding.

Both shipping Lit/Solid paths and rendered markup remain unchanged. No config,
protocol, storage, dependency, security-boundary or Phase E backend changes.

Best-effort tradeoffs accepted

- Malformed internal tool-stream hosts: #158032 introduced shape probes during
  a bookkeeping refactor, not a human incident. Real owners have complete state;
  a broken internal caller now fails rather than silently skipping cleanup.
  #125197's human steering/order report still justifies the unchanged causal
  reconciliation algorithm; no report ties malformed-host probes to that bug.
- In-place mutation of admitted draft metadata: #158335 added reply persistence
  and #166682 moved the annotation copies, without a mutation incident. Actual
  editors replace records/arrays. A future in-place mutator must follow that
  contract or it may alter a pending snapshot. Durable receipts/revisions stay.
- Non-JSON relay events: #146676 added transport machinery without a human
  cyclic-frame incident. Frames already crossed JSON decoding; an impossible
  internal cycle or BigInt now throws. Activation count/byte bounds remain.
- Older Gateway close-disposition support: #171377 added a compatibility path,
  but UI/Gateway ship together and the current server advertises the field.
  Unsupported skew now rejects. Accepted-answer durability from the real human
  report #171310 and fixes #171377/#172159 remains intact.
- Blob/typed-array/arbitrary Google message representations: c399fb7
  added these alternate decoder branches without a linked human report. The
  browser WebSocket is configured as arraybuffer before listeners. Unsupported
  synthetic representations are ignored; actual strings/ArrayBuffers still
  decode, and removal of the artificial await needs no post-await stale check.
- Extra sidebar columns after normalization: #123874 flattened the flexible
  #113712 layout to one tabbed panel. A broken internal producer is no longer
  searched as a multi-column layout; persisted legacy flattening still runs.

The earlier commit records the original eight accepted best-effort scenarios.
Coverage and remaining justified owners are logged in .local/y01-ledger.md for
coordinator bundling. Combined candidate removes 416 net production lines
against 5716bb1 (tests/support excluded).
steipete added a commit that referenced this pull request Oct 15, 2026
Continue the y01 largest-owner, export/caller and duplicate-helper audit.
Delegate composer mounting to the canonical interop boundary while retaining
field equality, keyed renderer identity and foreground picker cleanup. Remove
test-only panel refresh methods and commit counters; exercise the actual view,
polling and committed DOM instead. Trust admitted immutable composer metadata
and the full tool-stream owner contract. Narrow sidebar traversal to its
normalized single column and simplify browser/Gateway realtime decoding.

Both shipping Lit/Solid paths and rendered markup remain unchanged. No config,
protocol, storage, dependency, security-boundary or Phase E backend changes.

Best-effort tradeoffs accepted

- Malformed internal tool-stream hosts: #158032 introduced shape probes during
  a bookkeeping refactor, not a human incident. Real owners have complete state;
  a broken internal caller now fails rather than silently skipping cleanup.
  #125197's human steering/order report still justifies the unchanged causal
  reconciliation algorithm; no report ties malformed-host probes to that bug.
- In-place mutation of admitted draft metadata: #158335 added reply persistence
  and #166682 moved the annotation copies, without a mutation incident. Actual
  editors replace records/arrays. A future in-place mutator must follow that
  contract or it may alter a pending snapshot. Durable receipts/revisions stay.
- Non-JSON relay events: #146676 added transport machinery without a human
  cyclic-frame incident. Frames already crossed JSON decoding; an impossible
  internal cycle or BigInt now throws. Activation count/byte bounds remain.
- Older Gateway close-disposition support: #171377 added a compatibility path,
  but UI/Gateway ship together and the current server advertises the field.
  Unsupported skew now rejects. Accepted-answer durability from the real human
  report #171310 and fixes #171377/#172159 remains intact.
- Blob/typed-array/arbitrary Google message representations: c399fb7
  added these alternate decoder branches without a linked human report. The
  browser WebSocket is configured as arraybuffer before listeners. Unsupported
  synthetic representations are ignored; actual strings/ArrayBuffers still
  decode, and removal of the artificial await needs no post-await stale check.
- Extra sidebar columns after normalization: #123874 flattened the flexible
  #113712 layout to one tabbed panel. A broken internal producer is no longer
  searched as a multi-column layout; persisted legacy flattening still runs.

The earlier commit records the original eight accepted best-effort scenarios.
Coverage and remaining justified owners are logged in .local/y01-ledger.md for
coordinator bundling. Combined candidate removes 416 net production lines
against 5716bb1 (tests/support excluded).
steipete added a commit that referenced this pull request Oct 15, 2026
* refactor(ui): consolidate chat owners and remove obsolete adapters

Keep both live rendering routes and the existing DOM, text, persisted shapes,
security boundaries, draft durability, and ordinary session concurrency.
Consolidate effective-tool loading, header registration, transcript refs,
history target capture, and PCM output ownership. Remove unused adapters
after their completed native-control cutovers and redundant internal work.

Best-effort tradeoffs accepted:
- Pending-page/live-update overlap: #145240 records synthetic request-order
  proof, not a cited human incident. Displayed disposition can briefly lag
  until the next ordinary refresh; durable receipts remain authoritative.
- Synchronous rail self-retirement: #153245 records a synthetic benchmark,
  not a cited human incident. Focus restoration is best effort in that case.
- Obsolete intersection callbacks: #142227 records synthetic E2E proof, not
  a cited stale-delivery incident. Target maps ignore retired rows; a late
  callback can request redundant layout.
- Obsolete mutation callbacks: the same #142227 provenance. Native disconnect
  remains; a late delivery can resample the current scroller.
- Obsolete resize callbacks: #162617 records synthetic performance traces,
  not a cited stale-delivery incident. Native cleanup remains; a late callback
  can sample current layout.
- Wrong bundled Gateway PR identity: #148070/#147952 describe the feature,
  not a wrong-target incident. The producer constructs the exact requested
  target; a contract violation now displays its returned result.
- Cross-tab prefetch election: #125128 covered a retired five-session idle
  sweep with synthetic performance proof. Two tabs can now redundantly read
  one explicitly hover/focus-intended target; per-tab limits remain.
- Malformed internal sidebar maps: #113712 introduced feature normalization,
  not a cited incident. Settings validates load/save and all callers use that
  output; impossible malformed typed values are not repaired at every update.

* refactor(ui): consolidate chat lifecycle and internal state paths

Continue the y01 largest-owner, export/caller and duplicate-helper audit.
Delegate composer mounting to the canonical interop boundary while retaining
field equality, keyed renderer identity and foreground picker cleanup. Remove
test-only panel refresh methods and commit counters; exercise the actual view,
polling and committed DOM instead. Trust admitted immutable composer metadata
and the full tool-stream owner contract. Narrow sidebar traversal to its
normalized single column and simplify browser/Gateway realtime decoding.

Both shipping Lit/Solid paths and rendered markup remain unchanged. No config,
protocol, storage, dependency, security-boundary or Phase E backend changes.

Best-effort tradeoffs accepted

- Malformed internal tool-stream hosts: #158032 introduced shape probes during
  a bookkeeping refactor, not a human incident. Real owners have complete state;
  a broken internal caller now fails rather than silently skipping cleanup.
  #125197's human steering/order report still justifies the unchanged causal
  reconciliation algorithm; no report ties malformed-host probes to that bug.
- In-place mutation of admitted draft metadata: #158335 added reply persistence
  and #166682 moved the annotation copies, without a mutation incident. Actual
  editors replace records/arrays. A future in-place mutator must follow that
  contract or it may alter a pending snapshot. Durable receipts/revisions stay.
- Non-JSON relay events: #146676 added transport machinery without a human
  cyclic-frame incident. Frames already crossed JSON decoding; an impossible
  internal cycle or BigInt now throws. Activation count/byte bounds remain.
- Older Gateway close-disposition support: #171377 added a compatibility path,
  but UI/Gateway ship together and the current server advertises the field.
  Unsupported skew now rejects. Accepted-answer durability from the real human
  report #171310 and fixes #171377/#172159 remains intact.
- Blob/typed-array/arbitrary Google message representations: c399fb7
  added these alternate decoder branches without a linked human report. The
  browser WebSocket is configured as arraybuffer before listeners. Unsupported
  synthetic representations are ignored; actual strings/ArrayBuffers still
  decode, and removal of the artificial await needs no post-await stale check.
- Extra sidebar columns after normalization: #123874 flattened the flexible
  #113712 layout to one tabbed panel. A broken internal producer is no longer
  searched as a multi-column layout; persisted legacy flattening still runs.

The earlier commit records the original eight accepted best-effort scenarios.
Coverage and remaining justified owners are logged in .local/y01-ledger.md for
coordinator bundling. Combined candidate removes 416 net production lines
against 5716bb1 (tests/support excluded).

* test(ui): align talk fixtures with transport contracts

Require detach disposition when append rejection closes the relay. The UI and
Gateway ship together; the prior fallback's omitted field is no longer valid.

Close the Google socket before start settles when testing startup rejection.
Synchronous frame decoding removed the fixture's former artificial decode
microtask; waiting one turn now settles start before the close. Preserve all
error, callback, microphone, socket and timer assertions.

No production change or new best-effort tradeoff. The preceding commit records
the accepted transport assumptions and their provenance.

* refactor(agents): consolidate runner lifecycle plumbing

Share lifecycle hook capture, native policy loops and gated diagnostic content
construction. Combine initial session metadata updates through the existing
writer and reuse the persisted-input notifier. Keep delivery evidence in a
typed WeakMap without mutating or wrapping frozen error objects.

Security checks, public contracts, transcript durability, parallel tool
correlation and ordinary shutdown settlement remain. No schema, configuration,
dependency, protocol or public SDK signature changes. The standalone session
memory backend and its lifecycle machinery are untouched.

Best-effort tradeoffs accepted:
- Reusing the same engine during active disposal no longer has a WeakRef
  tombstone rejection. #168789 cites synthetic #143426/#143592 disposal cases,
  not a human production report. Misuse may fail in the engine normally;
  closing admission and actual resource settlement remain.
- Fresh bounded primitive diagnostics are not redundantly cloned before
  publication (#108304). Listener egress still isolates its payloads.
- Internal delivery-evidence readers receive the attachment-time snapshot,
  not another defensive copy (0ea0807). No human mutation report was found;
  unsupported internal mutation could affect a later reader. Confirmed-send
  suppression and attachment-time copying remain.

Lane y08: 105 net production lines removed (165 added / 270 removed), excluding
tests; tests add 67 net lines. Below-500 branch-only handoff for coordinator
bundling after recent, older and largest-owner audits found no further sound
candidate. No PR or hosted-CI success is claimed.

Proof: production and affected test types, changed-file lint/format, runtime
and madge cycles (zero), lint-suppressions (3/3), and independent P2 review
passed. Maintenance resources (6/6), CLI spawn (40/40), and restart recovery
(33/33) completed. Support proof was stopped after ten minutes without an
assertion result; Gateway cancellation timed out during startup/imports with
no assertion result, and deletion was not reached. CLI reliability was only
partially exercised in an earlier interrupted selection. These are unresolved
proof gaps, not attributed main failures.

* refactor(agents): remove duplicate runner preparation work

Trust canonical inline model modalities and waiter-owned cleanup. Fold the
sole-caller HTTP setup wrapper and stage warning predicate into their owners,
and remove an unused diagnostic clock option.

This pass removes 32 net production lines; the branch total is 137. Core and
affected test types, lint, format, cycle checks, stage timing and suppression
tests pass. Independent P2 review is clean. Wider focused runtime selections
remain incomplete under host load; coordinator bundling needs broad CI proof.

* refactor: withdraw inconclusive stream cleanup and repair bundle ratchets

Retain current main stream-state contracts after the UI failure replay could not establish an exact-main comparison. Shrink the delivery-evidence assertion allowance and keep its frozen/primitive regression intact in a focused unit file.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
…w#173015)

* refactor(ui): consolidate chat owners and remove obsolete adapters

Keep both live rendering routes and the existing DOM, text, persisted shapes,
security boundaries, draft durability, and ordinary session concurrency.
Consolidate effective-tool loading, header registration, transcript refs,
history target capture, and PCM output ownership. Remove unused adapters
after their completed native-control cutovers and redundant internal work.

Best-effort tradeoffs accepted:
- Pending-page/live-update overlap: openclaw#145240 records synthetic request-order
  proof, not a cited human incident. Displayed disposition can briefly lag
  until the next ordinary refresh; durable receipts remain authoritative.
- Synchronous rail self-retirement: openclaw#153245 records a synthetic benchmark,
  not a cited human incident. Focus restoration is best effort in that case.
- Obsolete intersection callbacks: openclaw#142227 records synthetic E2E proof, not
  a cited stale-delivery incident. Target maps ignore retired rows; a late
  callback can request redundant layout.
- Obsolete mutation callbacks: the same openclaw#142227 provenance. Native disconnect
  remains; a late delivery can resample the current scroller.
- Obsolete resize callbacks: openclaw#162617 records synthetic performance traces,
  not a cited stale-delivery incident. Native cleanup remains; a late callback
  can sample current layout.
- Wrong bundled Gateway PR identity: openclaw#148070/openclaw#147952 describe the feature,
  not a wrong-target incident. The producer constructs the exact requested
  target; a contract violation now displays its returned result.
- Cross-tab prefetch election: openclaw#125128 covered a retired five-session idle
  sweep with synthetic performance proof. Two tabs can now redundantly read
  one explicitly hover/focus-intended target; per-tab limits remain.
- Malformed internal sidebar maps: openclaw#113712 introduced feature normalization,
  not a cited incident. Settings validates load/save and all callers use that
  output; impossible malformed typed values are not repaired at every update.

* refactor(ui): consolidate chat lifecycle and internal state paths

Continue the y01 largest-owner, export/caller and duplicate-helper audit.
Delegate composer mounting to the canonical interop boundary while retaining
field equality, keyed renderer identity and foreground picker cleanup. Remove
test-only panel refresh methods and commit counters; exercise the actual view,
polling and committed DOM instead. Trust admitted immutable composer metadata
and the full tool-stream owner contract. Narrow sidebar traversal to its
normalized single column and simplify browser/Gateway realtime decoding.

Both shipping Lit/Solid paths and rendered markup remain unchanged. No config,
protocol, storage, dependency, security-boundary or Phase E backend changes.

Best-effort tradeoffs accepted

- Malformed internal tool-stream hosts: openclaw#158032 introduced shape probes during
  a bookkeeping refactor, not a human incident. Real owners have complete state;
  a broken internal caller now fails rather than silently skipping cleanup.
  openclaw#125197's human steering/order report still justifies the unchanged causal
  reconciliation algorithm; no report ties malformed-host probes to that bug.
- In-place mutation of admitted draft metadata: openclaw#158335 added reply persistence
  and openclaw#166682 moved the annotation copies, without a mutation incident. Actual
  editors replace records/arrays. A future in-place mutator must follow that
  contract or it may alter a pending snapshot. Durable receipts/revisions stay.
- Non-JSON relay events: openclaw#146676 added transport machinery without a human
  cyclic-frame incident. Frames already crossed JSON decoding; an impossible
  internal cycle or BigInt now throws. Activation count/byte bounds remain.
- Older Gateway close-disposition support: openclaw#171377 added a compatibility path,
  but UI/Gateway ship together and the current server advertises the field.
  Unsupported skew now rejects. Accepted-answer durability from the real human
  report openclaw#171310 and fixes openclaw#171377/openclaw#172159 remains intact.
- Blob/typed-array/arbitrary Google message representations: 2a4c20f
  added these alternate decoder branches without a linked human report. The
  browser WebSocket is configured as arraybuffer before listeners. Unsupported
  synthetic representations are ignored; actual strings/ArrayBuffers still
  decode, and removal of the artificial await needs no post-await stale check.
- Extra sidebar columns after normalization: openclaw#123874 flattened the flexible
  openclaw#113712 layout to one tabbed panel. A broken internal producer is no longer
  searched as a multi-column layout; persisted legacy flattening still runs.

The earlier commit records the original eight accepted best-effort scenarios.
Coverage and remaining justified owners are logged in .local/y01-ledger.md for
coordinator bundling. Combined candidate removes 416 net production lines
against 7f7310a (tests/support excluded).

* test(ui): align talk fixtures with transport contracts

Require detach disposition when append rejection closes the relay. The UI and
Gateway ship together; the prior fallback's omitted field is no longer valid.

Close the Google socket before start settles when testing startup rejection.
Synchronous frame decoding removed the fixture's former artificial decode
microtask; waiting one turn now settles start before the close. Preserve all
error, callback, microphone, socket and timer assertions.

No production change or new best-effort tradeoff. The preceding commit records
the accepted transport assumptions and their provenance.

* refactor(agents): consolidate runner lifecycle plumbing

Share lifecycle hook capture, native policy loops and gated diagnostic content
construction. Combine initial session metadata updates through the existing
writer and reuse the persisted-input notifier. Keep delivery evidence in a
typed WeakMap without mutating or wrapping frozen error objects.

Security checks, public contracts, transcript durability, parallel tool
correlation and ordinary shutdown settlement remain. No schema, configuration,
dependency, protocol or public SDK signature changes. The standalone session
memory backend and its lifecycle machinery are untouched.

Best-effort tradeoffs accepted:
- Reusing the same engine during active disposal no longer has a WeakRef
  tombstone rejection. openclaw#168789 cites synthetic openclaw#143426/openclaw#143592 disposal cases,
  not a human production report. Misuse may fail in the engine normally;
  closing admission and actual resource settlement remain.
- Fresh bounded primitive diagnostics are not redundantly cloned before
  publication (openclaw#108304). Listener egress still isolates its payloads.
- Internal delivery-evidence readers receive the attachment-time snapshot,
  not another defensive copy (8c995fb). No human mutation report was found;
  unsupported internal mutation could affect a later reader. Confirmed-send
  suppression and attachment-time copying remain.

Lane y08: 105 net production lines removed (165 added / 270 removed), excluding
tests; tests add 67 net lines. Below-500 branch-only handoff for coordinator
bundling after recent, older and largest-owner audits found no further sound
candidate. No PR or hosted-CI success is claimed.

Proof: production and affected test types, changed-file lint/format, runtime
and madge cycles (zero), lint-suppressions (3/3), and independent P2 review
passed. Maintenance resources (6/6), CLI spawn (40/40), and restart recovery
(33/33) completed. Support proof was stopped after ten minutes without an
assertion result; Gateway cancellation timed out during startup/imports with
no assertion result, and deletion was not reached. CLI reliability was only
partially exercised in an earlier interrupted selection. These are unresolved
proof gaps, not attributed main failures.

* refactor(agents): remove duplicate runner preparation work

Trust canonical inline model modalities and waiter-owned cleanup. Fold the
sole-caller HTTP setup wrapper and stage warning predicate into their owners,
and remove an unused diagnostic clock option.

This pass removes 32 net production lines; the branch total is 137. Core and
affected test types, lint, format, cycle checks, stage timing and suppression
tests pass. Independent P2 review is clean. Wider focused runtime selections
remain incomplete under host load; coordinator bundling needs broad CI proof.

* refactor: withdraw inconclusive stream cleanup and repair bundle ratchets

Retain current main stream-state contracts after the UI failure replay could not establish an exact-main comparison. Shrink the delivery-evidence assertion allowance and keep its frozen/primitive regression intact in a focused unit file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android app: ios App: ios app: web-ui App: web-ui channel: discord Channel integration: discord docs Improvements or additions to documentation extensions: openai extensions: qa-lab extensions: talk-voice gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. plugin: workboard proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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