Skip to content

Stop two tests failing on machines without Chrome - #19

Merged
ryanduguid merged 2 commits into
mainfrom
ryan/tests-own-their-chrome
Oct 30, 2026
Merged

ryanduguid merged 2 commits into
mainfrom
ryan/tests-own-their-chrome

Conversation

@ryanduguid

@ryanduguid ryanduguid commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Two tests failed on any machine without Chrome because they relied on the host's Chrome without saying so. They now get a stand-in executable through CHROME_PATH, so they give the same result on every host. No assertion or production code changes.

 bridge_doctor_accepts_and_ignores_verbose_like_commander
+  CHROME_PATH = the alcuin test binary
 McpChild::spawn (every MCP child in stdio_and_cli.rs)
+  CHROME_PATH = the alcuin test binary

The failures were correct production behaviour: bridge doctor exits 1 without Chrome, and MCP refuses a browser consult before creating a session. The no-Chrome refusal keeps its own test in tests/mcp_service_parity.rs.

Evidence

  • Before, on clean f12ebe9, Windows without Chrome:
    bridge_doctor_accepts_and_ignores_verbose_like_commander fails at plain.status.code() with left: Some(1) right: Some(0). Doctor prints No Chrome installation detected.
    local_browser_cli_and_mcp_admit_foreground_and_detached_rust_workers fails in public_session with left: 0 right: 1.
    After: both pass.
  • CI on f12ebe9 and on Keep waiting for the answer when a page read stalls after the send #17's head: both tests pass on ubuntu-latest. On windows-latest they pass on Keep waiting for the answer when a page read stalls after the send #17's head; on f12ebe9 that job stopped at a timing failure in the unit tests before reaching them. This is why only local runs showed the failures.
  • The stand-in is never launched: a recording executable used in its place left no trace across all 43 tests in tests/stdio_and_cli.rs.
  • Checks: cargo build, cargo clippy --all-targets --locked -- -D warnings and cargo fmt --check pass. cargo test --locked --no-fail-fast: 923 passed, 0 failed, 15 ignored, on the first commit. The second commit changes only a comment; after it, cargo fmt --check and the admission test pass.

Merge danger

Door: two-way. Blast radius: tests

These tests no longer exercise real Chrome discovery on the host. src/browser_detect.rs has its own unit tests for discovery order.

Unverified

bridge doctor and MCP browser admission both refuse when the host has no
Chrome, so these tests failed on any machine without it. Give them a
stand-in executable through CHROME_PATH; their assertions do not change.
@sonarqubecloud

sonarqubecloud Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

@ryanduguid
ryanduguid merged commit 05ba399 into main Oct 30, 2026
11 checks passed
@ryanduguid
ryanduguid deleted the ryan/tests-own-their-chrome branch October 30, 2026 23:21
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