Skip to content

chore(bin): bin/setup must install the pinned Chromium — the suite is red on a clean checkout without it #83

Description

@ivndev001

What to build

bin/setup (#82) installs bun deps and builds the dummy/web fixture, but the suite still cannot
run on a fleet box: it drives a real Chromium, and nothing installs one. Measured on the first run
after #82 landed (tsk_2d709e16…, for #80) — the gate RAN this time and went red on an unmodified
checkout (box_baseline_red):

AdapterError: browser.create failed: cannot launch Chrome — launchPersistentContext:
Chromium distribution 'chrome' is not found at /opt/google/chrome/chrome
Run "npx playwright install chrome"
    at createFailure (src/adapters/browser/launch.ts:194:10)
(fail) buildSession records the app address in story.md for a web run

So bin/setup must install the browser, and it must do it the way .github/workflows/ci.yml already
learned to — that file records two hard-won facts, do not re-learn them:

  1. Use the repo-pinned CLI, never bunx playwright. ci.yml:71-73: bunx playwright resolves an
    unpinned version and "exit 0 in 0.7s without fetching the headless shell the pinned version
    requires" (run 34583721201). The command is:
    node node_modules/playwright-core/cli.js install chromium
    
  2. No apt on any path. ci.yml:59-66: the install fetches from Playwright's CDN over HTTPS; the
    system libs install-deps would add are already on the image, and the Ubuntu mirrors are what
    flake. Do not add install-deps.

Mirror CI's bounded retry (timeout --kill-after=30 300, 3 attempts, backoff) so a wedged CDN fetch
cannot hang a box's setup indefinitely, and make it idempotent — skip when ~/.cache/ms-playwright
already holds the pinned chromium (CI caches on hashFiles('bun.lock') for the same reason).

Then reuse CI's "verify chromium launches" idea as the last step of bin/setup: prove the launch
surface is there, so a missing headless shell fails in setup with the error naming it, not as a
mystery inside bun test.

Acceptance criteria

  • After bin/setup on a clean checkout, bin/check exits 0 (the baseline is green)
  • The install uses node node_modules/playwright-core/cli.js install chromium, not bunx playwright
  • No apt / install-deps anywhere in bin/setup
  • Re-running bin/setup with the browser already present does not re-download it
  • A missing browser fails bin/setup with a message naming Chromium, before bin/check runs
  • No change to .github/workflows/ci.yml, package.json, or src/

AFK / HITL

AFK.

Affected paths

bin/setup

Blocked by

None — #82 is merged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions