Skip to content

feat(nightly-v2): restore GPT Live voice - #88

Draft
saphid wants to merge 1 commit into
mainfrom
fix/ov2-voice-restore-manifest-20260923
Draft

saphid wants to merge 1 commit into
mainfrom
fix/ov2-voice-restore-manifest-20260923

Conversation

@saphid

@saphid saphid commented Sep 23, 2026

Copy link
Copy Markdown
Owner

What Changed

Puts GPT Live voice back into Fork V2 nightly builds. Voice was pulled from the V2 manifest on 2026-09-22 (#86) so release repairs would not wait on it. The deferred-features doc set the bar for restoring it: replay onto the current V2 stack and pass the affected checks. This PR does that.

  • .github/downstream-nightly-v2.json appends two patches from fix/ov2-voice-restore-20260923:
    • 4c33b55 feat(voice): restore GPT Live voice on the current V2 stack. The deferred voice patches (165f817e42f, e7bc50f535d, 5286805d436) replayed as one commit. Only pnpm-lock.yaml conflicted; it was regenerated for the jsdom test dependency.
    • 9a03101 fix(voice): close review gaps in the V2 voice restore. Fixes from two review rounds, listed below.
  • docs/operations/ov2-deferred-features.md drops the two voice entries and records the restore.

Why

Voice was deferred to unblock releases, not because it was broken. What was missing was a replay onto the current stack and typechecks passing across the voice stack. Both are done here, and the review found real lifecycle bugs worth fixing before voice ships again.

Fixes from review

  • Mic and transport leak after a failure. When a session failed or the server closed it, the mic stayed captured (OS mic indicator on) and the WebRTC client stayed open until the next connect, which then overwrote both references. Terminal client states now release both. Only the current client does this, so a detached client's late closed event cannot stop a reconnect's new mic.
  • End could hang and keep billing. close() waited indefinitely for session.closed. A stalled upstream left the peer connection open and the UI stuck in "closing". The wait is now bounded at 5s, and local WebRTC closes before broker accounting, so a slow broker cannot hold media open either.
  • Follow-up status misreported. A stale post-dispatch readback was detected by status and error text alone, so a fast follow-up that finished, or repeated the same failure, was reported as "starting". Detection now also compares run identity. A steered run that completes before readback is reported as completed.
  • UI controls always returned "unsupported". The V2 port dropped the production uiControls: createDomVoiceControlHost() wiring, so listControls and clickControl never worked. The wiring is restored.
  • Broker switch left the session on the old broker. If the selected broker environment changed while another stayed eligible, the session stayed bound to the old broker under the new broker's label. The session now ends when the selected broker's ID changes.

Known follow-ups (pre-existing in the original fork voice, not introduced here)

  • The research bridge's delegate() has no production caller, so "start research and report back" launches work but creates no delivery record.
  • A research delivery record keeps polling its thread every 2s after delivering. The path is dormant until the item above is wired.

Verification

  • Replay: cherry-picked all 16 manifest patches in order onto upstream t3code/codex-turn-mapping at 060756de5ad with no conflicts. The resulting tree is identical to the tested head 9a03101.
  • Assembler tests: node --test .github/scripts/downstream-nightly.test.mjs → 22 passed.
  • Typecheck: contracts, server and web → 0 errors.
  • Web: vp test run src/voice src/missingThreadRedirects.test.ts src/components/settings/settingsSearch.test.ts → 412 passed. Each fix has a regression test that fails without it.
  • Server: vp test run src/voice src/environment/ServerEnvironment.test.ts → 34 passed. Three pre-existing ServerEnvironment tests fail on the base as well when run inside the live T3 desktop session (they inherit T3_SERVICE_LAUNCHER_CONTEXT). With that unset, all pass.
  • Contracts: vp test run → 526 passed.
  • Lint: voice lint warnings unchanged (12 before and after).
  • Review: two rounds by GPT-6 Astra (high), a different vendor from the author. Round 1: no security findings (every /api/voice route requires orchestration:operate, settings also require access:write, and the OpenAI key never reaches clients), plus seven correctness findings. Round 2 found two regressions in the round-1 fixes; both are fixed.

UI Changes

This PR restores the voice overlay (corner button, expanded panel, minimize) and the Settings → Integrations voice section. Before/after captures have not been made for this revision yet. That gap keeps this PR in draft. On 2026-09-17 an integrated browser pass of the same voice code on the earlier V2 base covered the entry point, settings key status and models, a real broker mint against OpenAI (error mapping), and overlay expand and minimize. That pass is not evidence for this head.

Checklist

  • This PR is small and focused (manifest and doc only; the patch commits carry the code)
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Model: Claude Opus 5.5 (replay, fixes, PR) in T3 Code via Claude Code; GPT-6 Astra (review) via Codex; original V2 port by GLM 5.3 Flash via OpenCode.

🤖 Generated with Claude Code

Add the voice restore patches from fix/ov2-voice-restore-20260923 to the
V2 manifest and remove voice from the deferred-features list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Sep 23, 2026
@github-actions

Copy link
Copy Markdown

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 61ddb17.

This comment will update automatically after the next completed run.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant