Skip to content

fix(voice): accept the documented GPT-Live create response and make start failures diagnosable (0.61.2) - #1772

Merged
chronoai-kai merged 3 commits into
mainfrom
fix/voice-start-diagnostics
Oct 5, 2026
Merged

chronoai-kai merged 3 commits into
mainfrom
fix/voice-start-diagnostics

Conversation

@chronoai-kai

Copy link
Copy Markdown
Contributor

Summary

Fixes the production GPT-Live voice start failure reported on nyx.chrono-ai.fun ("Voice could not start…" with the platform key, while the attempts appear in OpenAI usage for gpt-live-1).

Cause: OpenAI created and billed the session, but NyxID required session.expires_at in the create response. The documented create response does not include it, so every start was rejected after creation. expires_at is now optional; NyxID always enforces its own call deadline.

Also

  • Diagnosable failures: each start failure carries a fixed stage (flag, thread, origin, credential, billing_reservation, provider_create, provider_answer, transport).
    • Bounded provider identifiers only: HTTP status plus error.type, error.code and error.param, each at most 128 characters from a restricted set. Credential-shaped values are rejected. Provider message text and bodies are never included.
    • Recorded in one warn log, a metadata-only audit event and an additive details block on the error response. Error codes and HTTP statuses are unchanged, as is the "End the current call first" message.
  • Specific UI messages: microphone denied or missing, insufficient credits or suspended wallet, origin refusal, provider rejection with a short reason line, invalid provider answer, WebRTC negotiation failure.
  • Orphaned sessions: the documented REST hangup is SIP-only, so failed-start cleanup retries the close through recovery without recreating the session, and records close_unconfirmed when closure cannot be confirmed.
  • Session ID handling: the attach URL encodes the session ID as a single path segment, not by string interpolation.
  • ICE gathering: bounded in the browser.

Validation

  • Implementer: 55 backend voice tests at both stack sizes, including a regression fixture matching the documented create response; Rust 1.98.1 clippy --all-targets -D warnings; fmt; 4,264 frontend tests, lint and build; wizard freshness.
  • Reviewer: checked the identifier bounds, that no provider prose is exposed, that error codes and the matched message are preserved, and that the response change is additive.

chrono-kw added 3 commits October 5, 2026 14:50
…tart failures diagnosable

Production GPT-Live starts failed after OpenAI created (and billed) the
session: NyxID required session.expires_at, which the documented create
response does not include, so the start was rejected post-create. Expiry is
now optional (NyxID always enforces its own deadline).

Every start failure now carries a fixed stage (flag, thread, origin,
credential, billing_reservation, provider_create, provider_answer, transport)
with bounded provider status/type/code/param identifiers (never provider
message text or bodies) in a warn log, a metadata-only audit and an additive
error details block; error codes and statuses are unchanged. The browser shows
specific microphone, billing, origin, provider and WebRTC messages. Failed
starts retry closing the provider session through recovery and record
close_unconfirmed when closure cannot be confirmed.
…ostics

# Conflicts:
#	Cargo.lock
#	backend/Cargo.toml
#	cli/Cargo.toml
#	cli/src/wizard/bundle-meta/index.hash
#	frontend/package-lock.json
#	frontend/package.json
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

📊 Code coverage

Component Lines Threshold Status Δ vs base
Backend (nyxid) 86.95% 73% ✅ — 0.00
CLI (nyxid-cli) 69.23% 64% ✅ — 0.00
Frontend (vitest) 72.27% 15% ✅ 🔺 +0.05

Gate: line coverage must stay at or above the threshold. Ratchet plan (W21): Backend → 55%, CLI → 50%, Frontend → 30% by quarter end.

@chronoai-kai
chronoai-kai merged commit 6fc2e19 into main Oct 5, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant