Repository navigation
fix(talk): keep mode updates independent of speech startup - #138045
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 3:58 AM ET / 07:58 UTC. ClawSweeper reviewWhat this changesSeparates Talk mode synchronization from speech-provider loading and adds regression coverage for successful and rejected mode requests. Merge readiness⛔ Blocked before merge - 2 items remain This remains a useful repair absent from current main and v2026.8.2. No actionable correctness findings were found. Priority: P2 Review scores
Verification
How this fits togetherTalk clients send mode changes to the Gateway, which validates requests and broadcasts the resulting state to eligible connected clients. Speech synthesis and realtime sessions have separate responsibilities. flowchart TD
A[Talk client] --> B[Gateway authorization]
B --> C[Lazy method dispatch]
C --> D[Mode validation and node check]
D --> E[Scoped broadcast and response]
D --> F[Request error]
C --> G[Speech and realtime handlers]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +13, Tests +70, Other 0. Total +83 across 6 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one lightweight mode handler on the existing lazy dispatcher; the additional imports and registration are justified isolation overhead. Do we have a high-confidence way to reproduce the issue? Yes, source establishes that a speech-module import failure prevents current-main talk.mode dispatch; the new fault-injection cases target that boundary. The historical cold timeout's precise cause remains unproven. Is this the best way to solve the issue? Yes. Extracting the existing handler reuses established lazy dispatch and removes the unnecessary dependency without retries, duplicated policy, or client timeout changes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fa70549fe460. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
b41393e to
318bfad
Compare
|
Merged via squash.
|
Related: #135808
What Problem This Solves
Talk mode synchronization could wait for, or fail because of, unrelated speech-provider initialization. Validating a mode request and broadcasting its state must not require loading speech synthesis, provider catalogs, or realtime sessions.
Owner Repair
Move the existing handler into one lightweight lazy core family. The connected-Talk-node restriction for webchat, validation order,
operator.talkscope, broadcast, and response are unchanged. The old handler is deleted. There is no retry, larger timeout, provider fallback, new public method, configuration option, or storage change.The current-main refresh preserves the new Gateway dispatcher and request-entry preparation lifetime. The registration now lives only in the canonical
core-handlers.tstable, not the retired table inserver-methods.ts. Main's early Talk catalog agent-ownership check also remains intact. The validated parameter type removes two unnecessary assertions and tightens the old Talk assertion baseline from seven to five.Validation
Current source-bound candidate against main
3ed226a746a8efd223a35a81790014c41ff044a3:pnpm buildpassed all sixteen phases in 878.061 seconds, including public declarations, plugin runtime packaging, import checks, runtime post-build verification, and UI output. This was a fresh task-owned source/build tree with a normal frozen install reusing the package store, not a clean-cache claim. The build metadata records base3ed226a; source hashes bind the applied candidate patch.3ed226a, with the temp report including the complete committed candidate. All three passed without changing guard predicates. Refreshed-head CI and the native landing gates remain required.A real full-Gateway client probe also passed in 3.037 seconds: one authenticated
operator.talkconnection sent mode on/listening and off/idle, both successful responses exactly matched their actual broadcasts, event sequence increased, and the socket closed cleanly. The provider observer recorded zero call allocations before/after. This used the built Watch feature compositiond3b3eb72, whose mode handler, lazy registration, descriptor, dispatcher, and request-entry owner were verified byte-identical to this PR’s318bfad2head. It proves the real Talk-mode RPC/broadcast path, not physical-Watch, microphone, media, or provider-call behavior.Historical proof is retained, not relabeled current-head proof. The dependency-boundary regression produced four intended failures on the old owner with three unaffected controls, then passed unchanged after extraction. A separate four-file authentication/integration group passed all 146 tests with the feature composition, including embedded WebSocket and Watch HTTP mode requests. That is synthetic client/Gateway integration evidence, not a physical-Watch or live-provider claim. The original intermittent cold-run timeout did not identify its exact suspended RPC; the deterministic dependency-failure regression proves the owner defect independently.
The prior
b41393ecandidate completed all seven remaining canonical guards and a full local build after the aggregate changed gate hit its fixed deadline. Exact-head CI attempt two passed after retrying a transient advisory-audit network exhaustion; the original incomplete audit result is preserved, not presented as a vulnerability finding or a successful audit. These are historical results until the current composition completes its own gates.Scope and Release-note Context
Talk mode now synchronizes independently of speech-provider availability for all Talk clients. Speech synthesis, catalogs, and realtime creation still load their existing owner when requested.
Current delta: production +35/−23 (net +12), tests +70/−0, ratchet metadata +1/−1. The production growth is the separately lazy-loadable owner and its registration, absorbing the original handler rather than adding a parallel path. No dependency, lockfile, public protocol, configuration, or storage change.