fix(cdp): accept Chromium major-version range; e2e tests fail loud - #126
Conversation
Replaces the equality gate on `PINNED_CHROMIUM_MAJOR = 131` with a range gate `MIN_SUPPORTED_CHROMIUM_MAJOR..=MAX_SUPPORTED_CHROMIUM_MAJOR` (currently `131..=150`). The exact pin refused to run on any host without Chromium 131 — including modern Chrome / Chromium installs — which made `plumb lint <real-url>` unusable in practice. The new range keeps the determinism guarantee (browser still constrained to a re-validated set of majors) while unblocking real-URL lints. `CdpError::UnsupportedChromium` now carries `min_supported`, `max_supported`, and `found` fields. The install hint in `chromium_install_hint()` reports the supported range and no longer implies that `--executable-path` bypasses the version check — auto-detection misses are still the only thing that flag fixes. Closes #117 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The e2e-chromium tests previously caught `ChromiumNotFound` / `UnsupportedChromium` and silently returned `Ok(())`. Hosts that lost Chromium (or had it drift out of the supported range) saw the test suite report success while exercising zero real browser code. This masked broken e2e coverage. The skip path is now opt-in: hosts that genuinely don't have Chromium set `PLUMB_E2E_CHROMIUM_SKIP=1` (any value), which logs the underlying error via `tracing::warn!` and returns `Ok(())`. Without that env var the original error propagates and the test fails — surfacing the host problem instead of hiding it. Adds `tracing-subscriber` as a dev-dependency so the warn emitted on the skip path actually reaches the test writer. Closes #118 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Here is the full review. Review:
|
| # | File:Line | Severity | Issue |
|---|---|---|---|
| 1 | docs/adr/ (missing file) |
BLOCKER | No ADR for pin→range architectural change; plumb-cdp/AGENTS.md rule explicitly requires one. |
| 2 | crates/plumb-cdp/src/lib.rs:1153 |
WARNING | Hardcoded 140 literal — derive from constants to avoid silent drift. |
| 3 | docs/local/prd.md (not in diff) |
WARNING | PRD §9/§16 alignment unverifiable; assert in PR description that it was updated. |
Verdict: REQUEST_CHANGES
The e2e-chromium feature gates tests that need a real Chromium binary on the host. Its Cargo.toml comment already declares it "off in CI", but the workspace test job's `--all-features` flag silently activated it. The previous code path treated missing/unsupported Chromium as a silent pass, so the mismatch went unnoticed; now that #118 made those paths fail loudly, the Windows runner's broken Chromium launch surfaces as a CI failure on every PR. Drop `--all-features` from the workspace test job. Clippy, cargo check, and coverage still run with `--all-features` so the feature itself stays validated for compile cleanliness. Refs #117 #118 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ADR 0002 captures the decision behind PR #126 (issues #117/#118): why the exact-pin gate became MIN_SUPPORTED_CHROMIUM_MAJOR..=MAX_SUPPORTED_ CHROMIUM_MAJOR, what range bumps require, and how e2e-chromium tests fail loud by default. Adds the new ADR to the book index. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Summary
PINNED_CHROMIUM_MAJOR == 131equality check with aMIN_SUPPORTED_CHROMIUM_MAJOR..=MAX_SUPPORTED_CHROMIUM_MAJORrange (131..=150), unblockingplumb lint <real-url>on every reasonably current Chrome/Chromium release. Closes fix(cdp): hard Chromium 131 pin blocks all real-URL lints on modern systems #117.e2e-chromiumtest path fail loudly when no usable Chromium is on the host. The previous code silently treatedChromiumNotFound/UnsupportedChromiumas a pass; it now propagates the error unless the user explicitly opts into the skip viaPLUMB_E2E_CHROMIUM_SKIP=1(with atracing::warn!line). Closes test(cdp): e2e-chromium tests silently pass when Chromium is missing or wrong version #118.install-chromium.md,cli.md, runbook spec, AGENTS/CLAUDE files) to describe the new range.Test plan
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features -- -D warningscargo test --workspacecargo test -p plumb-cdp --test driver_contract --features e2e-chromium(Chromium 139 on host, in range, real e2e pass)just determinism-check— byte-identical across 3 runscargo deny check./target/debug/plumb lint https://example.com --format json— emits reala11y/touch-targetviolation against liveexample.compage (acceptance criterion for Phase 1 / [RUNBOOK] Phase 1 — Real CDP driver + foundational rules #10)🤖 Generated with Claude Code