Skip to content

fix: shim the headless Playwright binary too - #1540

Open
geodro wants to merge 3 commits into
mainfrom
fix/1539-headless-shell-shim
Open

fix: shim the headless Playwright binary too#1540
geodro wants to merge 3 commits into
mainfrom
fix/1539-headless-shell-shim

Conversation

@geodro

@geodro geodro commented Aug 21, 2026

Copy link
Copy Markdown
Member

Pest browser testing has been failing on a fresh setup with current Playwright. The chromium_headless_shell build ships its executable as headless_shell, a name the shim never looked for, so it stayed the glibc binary Playwright downloaded and musl could not exec it. The count guard did not notice because chrome still matched and the count stayed above zero, so the install reported success while shimming half of what it downloaded.

The failure surfaced as PlaywrightOutdatedException, which reads as a stale Playwright and sends people to reinstall it, so the wrong half of the setup got blamed.

The extractor learns the same name, otherwise the binary arrives without its executable bit.

Refs #1539

geodro added 3 commits August 19, 2026 10:51
Enabling a worker armed its systemd unit for login start no matter what the
autostart switch said. Turning autostart off disabled every unit on disk at that
moment, but anything written afterwards, a worker enabled in the dashboard, a
unit rewritten by lerd start, went back to being wanted by default.target. At
the next boot systemd started it, BindsTo pulled the FPM container up with it,
and nothing pulled up the databases and caches behind it, so the worker died on
a connection error and Restart=always looped it for as long as the session
lasted.

Arming a worker unit now goes through one place that consults the autostart flag
and disarms instead when it is off, which also clears an arming left behind by an
older build. The unit is still started by whoever asked for it, so a worker that
should be running now still runs. On macOS launchctl enable is also what lifts
the flag that blocks bootstrapping a label at all, so the gate stays out of that
path and the platform keeps its current behaviour.

Two places read "is the unit enabled" as "does the user want this worker", which
that flag no longer answers once a running worker can be disarmed. The PHP image
rebuild now snapshots which workers were up before it restarts FPM and brings
exactly those back, rather than trusting the enable state it had just invalidated.
A node runtime switch regenerates the unit of a worker that is merely running,
not only an armed one.
The arming guard now treats a running worker as installed, so it reaches for IsActive whenever IsEnabled comes back false. The double in the regeneration test only answered IsEnabled and embedded a nil manager for everything else, which left that second call landing on the nil interface and taking the process down with it.
The chromium_headless_shell build ships its executable as headless_shell, a name the shim never looked for, so it stayed the glibc binary Playwright downloaded and musl could not exec it. The count guard did not notice because chrome still matched and the count stayed above zero, so the install reported success while shimming half of what it downloaded.

The failure surfaced as PlaywrightOutdatedException, which reads as a stale Playwright and sends people to reinstall it, so the wrong half of the setup got blamed.

The extractor learns the same name, otherwise the binary arrives without its executable bit.
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