fix(voice): skip Burble auto-start under WebDriver browsers (refs #122)#127
Merged
Merged
Conversation
Lands the console-errors slice (Group C) of #122. `Main.res:162` calls `VoiceBridge.startVoice` unconditionally on game startup, which opens a `ws://localhost:6473/voice` Phoenix WebSocket via BurbleAdapter → PhoenixSocket. When the Burble voice server isn't running (CI runners, headless test environments, any user who doesn't have it installed), the browser logs five `WebSocket connection failed: net::ERR_CONNECTION_REFUSED` messages to `console.error` as Phoenix retries. That's what `tests/game-loads.spec.js:47` catches in chromium-1080p. The browser-native WebSocket error fires before any app-level error handler can intercept it, so suppressing it after the fact isn't an option — the only fix is to not open the socket. Gate auto-start on `navigator.webdriver === true`. Playwright, Selenium, and similar automation always set this to true; real user browsers leave it false. Result: - Local dev / real browsers: voice starts as before - Playwright tests: voice startup is skipped; no console errors - Burble server actually running: still works in real browsers; tests unaffected (they never expect voice in CI anyway) Refs #122 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: hyperpolymath <6759885+hyperpolymath@users.noreply.github.com>
🔍 Hypatia Security ScanFindings: 71 issues detected
View findings[
{
"reason": "Issue in boj-build.yml",
"type": "missing_timeout_minutes",
"file": "boj-build.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in build-validation.yml",
"type": "missing_timeout_minutes",
"file": "build-validation.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in cflite-pr.yml",
"type": "missing_timeout_minutes",
"file": "cflite-pr.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in codeql.yml",
"type": "missing_timeout_minutes",
"file": "codeql.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in containers.yml",
"type": "missing_timeout_minutes",
"file": "containers.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in containers.yml",
"type": "missing_timeout_minutes",
"file": "containers.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dco.yml",
"type": "missing_timeout_minutes",
"file": "dco.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lands the console-errors slice (Group C) of #122.
Main.res:162was callingVoiceBridge.startVoiceunconditionally on startup, opening aws://localhost:6473/voicePhoenix WebSocket. When the Burble voice server isn't running (CI runners, fresh checkouts, anyone without it installed), the browser logs 5× `WebSocket connection failed: net::ERR_CONNECTION_REFUSED` to console.error before Phoenix gives up — exactly what `tests/game-loads.spec.js:47` catches in chromium-1080p.The browser-native WebSocket error fires before any app-level handler can intercept it, so the only fix is to not open the socket. Gate auto-start on `navigator.webdriver === true` (Playwright/Selenium always set this; real browsers don't).
Test plan
Out of scope
Refs #122
🤖 Generated with Claude Code