Skip to content

fix(test): the browser and a11y lanes find no Chromium in a routine #557

Backlog

Description

@sydevs-bot

Summary

pnpm test:browser and pnpm test:a11y both fail to launch a browser in a cloud session, and
every run that needs one discovers this by burning a build first. @playwright/test is pinned
exact at 1.65.1, which resolves Chromium revision 1255; the image ships chromium-1243 and
chromium. 22 loop sessions over five days (22–28 Nov) hit it, and derived five different
workarounds between them.

Approach

Two launch sites, with different gaps:

  • playwright.config.ts:29 sets channel: 'chromium', which resolves chromium-1255. Line 39
    already honours PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH — nothing sets it, so the first run
    always fails and package.json's test:browser passes no value.
  • scripts/check-a11y.mjs:687 calls chromium.launch({ channel: 'chromium' }) with no
    executablePath option at all, so the variable docs/testing.md offers is not a hatch here.
    Two sessions found this the hard way and fell back to symlinking /opt/pw-browsers/chromium-1255
    at the expected path; a third ran playwright install and pulled ~325 MB.

A CI runner is unaffected: it installs the pinned revision. The decision is which seam to fix, and
one answer should serve both lanes — the measured cost is that each session re-derives its own.

Open questions

Which seam resolves the executable?

  • A (recommended) — one resolver both launch sites read: prefer
    PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH, else /opt/pw-browsers/chromium when it exists, else let
    Playwright resolve. scripts/check-a11y.mjs gains an executablePath; playwright.config.ts:39
    keeps its override and gains the fallback. No pin moves and CI is untouched.
  • B — set the variable in package.json's two scripts. Smallest diff, but it hard-codes a
    sandbox path into commands a developer also runs on their own machine.
  • C — stop pinning @playwright/test exact, so a resolve can match the image. Changes what CI
    tests and what scripts/ci-workflows.test.ts asserts about the pin; likely wrong.

Acceptance criteria

  • pnpm test:browser launches and passes in a cloud session with no variable set by hand
  • pnpm test:a11y launches and passes in a cloud session with no variable set by hand
  • PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH, where set, still wins over any fallback
  • CI's own gate, browser and a11y jobs are unchanged in what browser they run
  • docs/testing.md states what each lane resolves, and stops offering a variable one lane ignores

Verification checklist

  • pnpm build:browser && pnpm test:browser from a fresh clone, with env | grep PLAYWRIGHT empty
  • pnpm test:a11y after pnpm ladle:build, with env | grep PLAYWRIGHT empty
  • ls /opt/pw-browsers and the pinned version agree with what the fallback assumes
  • PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/nonexistent pnpm test:browser fails, proving the override still binds
  • pnpm test:run scripts/ci-workflows.test.ts green

Notes

Found by the weekly loop reflection, not by an audit sweep: this is a defect 22 sessions tripped
over while doing other work, so it is filed over ceilings.maxOpenProposals under run-audit's
incidental-finding rule.

Occurrences by day, from the loop journals — 11-22 #461 · 11-24 #466, #467, #471 ×2, #476 ×2, #318
· 11-25 #481, #466 ×2, #488, #489, #490 ×2, #492, #493 · 11-27 #538, #552, #555 · 11-28 #556, #555.

Adjacent and closed, all CI-side rather than local: #459/#461 (the gate's Chromium cache key) and
#462/#464 (one reader for the pinned version).

🤖 Written by the sydevs autonomous loop — see what this is

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

    proposal

    Type

    Fields

    Priority

    High

    Hold Until

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions