fix(smoke): guard chromium.launch() at both sites (#56) #60
No reviewers
Labels
No labels
area/auth
area/backend
area/ci
area/deploy
area/e2e
area/frontend
area/shared
blocked
good-first-issue
needs-info
priority/high
priority/low
priority/medium
type/bug
type/chore
type/docs
type/feature
type/tech-debt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
celilo/lunacycle!60
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "guard-browser-launch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #56.
The defect
In
runSpaSmokethe module load is guarded and the smoke run is guarded. Thelaunch()between them was bare:Anything
launch()threw propagated out ofrunSpaSmoke, out oflunacycleHealthCheck, and out of the hook. So nosmoke_spaitem was recorded,smoke_apiandsmoke_wsnever ran, and the operator got a rawbrowserType.launch: Executable doesn't exist at …string in place of a check name. The same hook backs both the 15-minute monitor and deploy verification, so it took out both.Live today for any launch failure — a missing revision, a sandbox/seccomp refusal, OOM, a stale cache after a disk sweep. Not bump-specific.
The fix
fail, notwarn, per the issue's own reasoning: unlike "playwright-core is not installed at all", a browser that is present and will not start is a real regression on a host that is supposed to be able to run this.smoke-handler.tshad the same defect in a worse form, and it is fixed too — the dynamicimport('playwright-core')was unguarded as well, there is noaddCheckon that path at all, andmax_attempts: 1means no retry either. Both now sit inside one guard that:all smoke checks passedis not logged after a failure.The test
Exactly the one #56 predicted, using the
loadChromiumseam PR #55 added — a stub that loads fine but whoselaunch()rejects.It asserts the check list, not merely that the hook threw, because "it threw" is precisely what the bug already did:
Confirmed red before the fix (Rule 7.6): with the guard reverted, the playwright message escapes and the run stops at
smoke_login— 18 pass, 1 fail. With the guard, 19 pass.Gates
bun run test:hooks66 pass ·bun run typecheck:hooksexit 0 ·bun run lintexit 0 (pre-existing warnings only, exit code read rather than inferred).Deliberately NOT in this PR
Passing an explicit
executablePathand moving artifacts off/tmp/lunacycle-smoke. Both needresolveBrowser()andmoduleArtifactDir()from@celilo/capabilities, which are additive in celilo#897 and not yet published — so that half cannot typecheck here today. It is a clean second pass:celilo/scriptsalready depends on^2.0.0, so the release picks up with no dependency change.This half is worth landing alone regardless. It is what converts a browser failure from an escaped exception into an attributable check, which is the thing that makes the missing-browser case survivable at all — and it is independent of how the platform question settled.
🤖 Generated with Claude Code