Skip to content

fix: Ubuntu 26.04 Playwright override is architecture-aware (#2916) - #2961

Closed
SomSamantray wants to merge 1 commit into
garrytan:mainfrom
SomSamantray:fix/2916-ubuntu2604-arm64-playwright-override
Closed

SomSamantray wants to merge 1 commit into
garrytan:mainfrom
SomSamantray:fix/2916-ubuntu2604-arm64-playwright-override

Conversation

@SomSamantray

@SomSamantray SomSamantray commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Why

On an arm64 Ubuntu 26.04 host, ./setup downloads an x86-64 Chromium
headless-shell build because the Ubuntu-26.04 Playwright platform override
(added for #2101) hardcodes ubuntu24.04-x64 with no architecture check. The
binary then fails with exec format error, which the later launch-failure
diagnostic misreports as an AppArmor sandbox problem — sending users down the
wrong debugging path entirely. This change makes the override pick the
architecture-matching build (ubuntu24.04-arm64 on aarch64/arm64, unchanged
ubuntu24.04-x64 everywhere else), fixing browser-dependent skills (/qa,
/design-review, /browse, make-pdf, /pair-agent) on arm64 Ubuntu 26.04.

Fixes #2916.

Live evidence

$ bun test test/setup-playwright-best-effort.test.ts

bun test v1.4.2 (744846f84)

 39 pass
 0 fail
 198 expect() calls
Ran 39 tests across 1 file. [26.84s]

The 4 new tests run the real detection if sliced straight out of
setup (not a reimplementation) with _os_id/_os_ver pre-set and uname
stubbed, proving the branch itself:

✓ Ubuntu 26.04 detection picks ubuntu24.04-arm64 for uname -m=aarch64 (#2916)
✓ Ubuntu 26.04 detection picks ubuntu24.04-arm64 for uname -m=arm64 (#2916)
✓ Ubuntu 26.04 detection picks ubuntu24.04-x64 for uname -m=x86_64 (#2916)
✓ Ubuntu 24.04 (not the 26.04 override path) leaves the override empty regardless of arch (#2916)

Plus a static invariant pinning the case-statement shape so a future edit
can't silently flatten it back to unconditional x64:

✓ the Ubuntu 26.04 override is architecture-aware, not hardcoded to x64 (#2916)
$ bash -n setup
syntax OK

Scope

  • Changed: setup (the Ubuntu-26.04 override, now arch-aware via a
    case "$(uname -m)") and test/setup-playwright-best-effort.test.ts (4
    new tests + 1 static invariant covering the fix).
  • Verified live by: running the full targeted test file
    (bun test test/setup-playwright-best-effort.test.ts, 39/39 pass) and a
    bash -n setup syntax check, both shown above.
  • Did NOT test: an actual Ubuntu 26.04 arm64 host end-to-end (I don't
    have one) — verification is at the shell-logic level: the exact detection
    code from setup executed with _os_id=ubuntu, _os_ver=26.04, and
    uname -m stubbed to each real-world value, asserting the exact override
    string Playwright expects. No shellcheck run locally (not installed on
    this machine); CI's quality-gate workflow covers it.

Liveness proof (required for external contributors)

Screenshot of GSTACK PR typed live into a real Terminal prompt — attached
as a comment on this PR immediately after opening it.

Checklist

…#2916)

The Ubuntu 26.04 Chromium platform override added for garrytan#2101 unconditionally
set PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=ubuntu24.04-x64, with no architecture
check. On an arm64 Ubuntu 26.04 host this downloaded an x86-64 Chromium
headless-shell build, which then failed with "exec format error" — a failure
the later launch-diagnostic misreported as an AppArmor sandbox problem,
sending users down the wrong debugging path entirely.

Make the override pick the matching ubuntu24.04 build per uname -m
(aarch64/arm64 -> ubuntu24.04-arm64, else ubuntu24.04-x64), which Playwright
publishes and which the issue reporter verified works.

Adds a targeted test (test/setup-playwright-best-effort.test.ts) that runs
the real detection `if` from setup with _os_id/_os_ver pre-set and uname
stubbed, covering aarch64, arm64, and x86_64 on the 26.04 path, plus a
24.04 regression guard that the override stays untouched off that path. A
static invariant pins the case-statement shape so it can't silently
flatten back to unconditional x64.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@trunk-io

trunk-io Bot commented Sep 24, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@SomSamantray

Copy link
Copy Markdown
Contributor Author

Liveness proof: GSTACK PR typed live into a real Terminal prompt.

gstack-pr-liveness

@capy-ai

capy-ai Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for this, @SomSamantray. The fix is now on main: setup's Ubuntu 26.04 Playwright override picks ubuntu24.04-x64 or -arm64 by architecture (setup:1669-1673) (fixed in v1.91.2.0, #2959). Closing as superseded; if you still see the problem on the latest gstack, please open an issue with ./setup --status output.

@capy-ai capy-ai Bot closed this Oct 3, 2026
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.

setup: Ubuntu 26.04 platform override hardcodes x64, breaking arm64 hosts (exec format error, misreported as AppArmor)

1 participant