Skip to content

fix(voice): skip Burble auto-start under WebDriver browsers (refs #122)#127

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/console-skip-voice-when-automated
Jun 1, 2026
Merged

fix(voice): skip Burble auto-start under WebDriver browsers (refs #122)#127
hyperpolymath merged 1 commit into
mainfrom
fix/console-skip-voice-when-automated

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

Lands the console-errors slice (Group C) of #122.

Main.res:162 was calling VoiceBridge.startVoice unconditionally on startup, opening a ws://localhost:6473/voice Phoenix 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

  • CI: chromium-1080p `page loads without JavaScript errors` (game-loads.spec.js:47) → pass
  • CI: chromium-1080p `no console errors during 10 seconds of gameplay` (game-loads.spec.js:222) → pass
  • Local: `deno task dev:vite` with no Burble running → voice starts, errors are still visible (expected; this is user-visible feedback)
  • Local with Burble running on :6473 → voice connects as before

Out of scope

  • Detecting Burble availability via groove discovery probe before connect (mentioned in the existing comment at `Main.res:141` but never implemented). That's a richer fix; this PR is the minimal CI-noise mitigation. Follow-up issue can track the proper groove-probe wiring.

Refs #122

🤖 Generated with Claude Code

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>
@hyperpolymath hyperpolymath enabled auto-merge (squash) June 1, 2026 19:13
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

🔍 Hypatia Security Scan

Findings: 71 issues detected

Severity Count
🔴 Critical 11
🟠 High 18
🟡 Medium 42

⚠️ Action Required: Critical security issues found!

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

@hyperpolymath hyperpolymath merged commit a8d526a into main Jun 1, 2026
28 of 31 checks passed
@hyperpolymath hyperpolymath deleted the fix/console-skip-voice-when-automated branch June 1, 2026 20:13
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