H-6763: Improve voice preview reliability diagnostics - #9378
H-6763: Improve voice preview reliability diagnostics#9378kostandinang wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
|
|
Classify actionable voice failures without exposing provider or conversation content, correlate browser and server requests, and record privacy-safe timing diagnostics. Add focused failure and cleanup coverage plus a fully mocked voice-to-Brunch-to-speech boundary test while keeping production disabled. Co-authored-by: Kostandin Angjellari <ka@hash.ai> Amp-Thread-ID: https://ampcode.com/threads/T-01a04317-a36c-7229-b43c-ad122f989238
Co-authored-by: Cursor <cursoragent@cursor.com>
893dc08 to
d1976e9
Compare
PR SummaryMedium Risk Overview User-facing behavior replaces generic reconnect messages with actionable categories (microphone permission/device, network, timeout, abort, invalid response, unavailable). The status panel shows error code and diagnostic reference where appropriate; Brunch chat transport now sends Server voice routes attach Docs (README, Petrinaut guide, ADR-0009, steering) describe the taxonomy and clarify this is preview evidence only—not production PR 4. Coverage expands with unit tests plus a local mocked integration test across WebRTC → voice APIs → transcript → speech → playback. Reviewed by Cursor Bugbot for commit 5bf7eda. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d1976e9. Configure here.
Co-authored-by: Cursor <cursoragent@cursor.com>


🌟 What is the purpose of this PR?
This PR hardens the disabled-by-default OpenAI voice preview introduced by the lower H-6763 stack. It adds actionable, privacy-safe diagnostics and closes failure-handling gaps so developers can distinguish permission, device, network, timeout, abort, provider-response, transcription, and playback failures.
The scope is reliability and observability only. It does not enable production voice or add the authentication, distributed quotas, replay/recovery, completion, and projection contracts required for production use.
🔗 Related links
🚫 Blocked by
🔍 What does this change?
Server-Timingmetrics while explicitly excluding audio, SDP, transcripts, prompts, canonical speech, credentials, and provider response bodies from diagnostics.request-abortedwhile SDP is read or applied.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🐾 Next steps
🛡 What tests cover this?
yarn workspace @apps/petrinaut-website test:unit— 17 files and 109 tests, including the mocked browser-to-playback boundary.yarn workspace @apps/petrinaut-website lint:tscandlint:eslint— website type and lint coverage.❓ How to test this?
yarn workspace @apps/petrinaut-website test:unit.yarn workspace @apps/petrinaut-website lint:tscandyarn workspace @apps/petrinaut-website lint:eslint.📹 Demo
Not included. This PR changes reliability, diagnostics, and automated coverage rather than the interaction design, and no credentialed external voice flow was run.