Repository navigation
fix(scripts): bound browser proofs and clean up Chromium - #438
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Stops runaway browser proof/capture scripts and closes their Chromium processes on success, errors, or deadline expiry. Outbreak's first-night simulation runs in Bun by default; GPU stills require
--capture.How it works
await usingbudget across 229 existing launcher files, including root, game, Lab, sky and production-smoke scripts.ARCADE_BROWSER_BUDGET_Soverride up to 300 seconds. Tracks concurrent launches and persistent contexts; early exits close browsers first.budget.finish()is idempotent and permanently prevents new launches.pacing-10m-proof.jsonfilename and Blackout's exported executable lookup.Risk
Script tooling only. Historical multi-shot captures may need narrower shot selections to fit the browser deadline. Streaming encoders count toward the deadline while Chromium is open. Long showcase renders were typechecked, not rerendered end-to-end.
The release check is not fully green: Getaway/Blackout/Outbreak have wall-clock performance/test-timeout failures in untouched tests, and the Lot readiness smoke timed out under concurrent load. An isolated follow-up on the same production build passed with both main's smoke script and this branch's budgeted script. All typechecks, production builds, deployment dry-runs, and the other nine game smoke checks passed in the release run. The first-night sweep also retains an existing co-op first-contact assertion failure; both baseline and branch fail identically before reaching GPU work.
Proof
All checks ran through HiveMind:
bunx tsc --noEmit -p games/blackout/tsconfig.scripts.jsonand the Getaway equivalent: passed after fixing the reviewed executable-lookup blocker.bun scripts/check-browser-budgets.ts: 230 launcher files passed, including the new lifecycle fixture.bun scripts/browser-budget-proof.ts: success, exception, persistent context, hung page, hung host promise, and blocked host all cleaned up their observed Chromium PIDs. A targetedphasesrun passed in 21.950 s: 10.5-second preparation and encoding phases each outlast a ten-second browser budget; relaunch after finishing is rejected.bun run verify:release: 72 steps, 473.4 s; all typechecks/builds/dry-runs passed, with the unrelated test and Lot smoke failures described above.Times exclude HiveMind admission. Cache/load differences mean the first two rows do not establish an attributable speedup.