mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7836] [MERGED] fix(release): give Playwright shards headroom and deflake CI test scripts #7960
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7960
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7836
Author: @SpicyMarinara
Created: 10/19/2026
Status: ✅ Merged
Merged: 10/19/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/ready-ci-test-infra📝 Commits (3)
428f6dcfix(release): give Playwright shards headroom and deflake CI test scriptsa2fab72fix(ci): count shard setup against the execution budget829b16aMerge branch 'staging' into fix/ready-ci-test-infra📊 Changes
6 files changed (+176 additions, -56 deletions)
View changed files
📝
.github/actions/playwright-shard/action.yml(+27 -5)📝
.github/workflows/playwright.yml(+41 -22)📝
scripts/regressions/regression-timeout-policy.regression.mjs(+82 -23)📝
scripts/regressions/termux-sharp.regression.mjs(+10 -1)📝
scripts/run-regressions.mjs(+4 -2)📝
scripts/smoke-container.mjs(+12 -3)📄 Description
Linked issue
No issue exists. This is release-readiness work from triaging full-matrix run 39258556275 (
165ee922e). Open an issue first if you want it tracked separately.Why this change
if: failure()is false for a cancelled job.scripts/smoke-container.mjsread/proc/1/statusright afterdocker run --detach. On a new volume the entrypoint (PID 1) is still root while it chowns/app/data/storage, so 1 of 4 local Lite arm64 runs failed with0 !== 65532.pnpm store path. In a checkout installed with--store-direlsewhere, that path is the empty in-checkout store, so the offline fixture install failed withERR_PNPM_NO_OFFLINE_TARBALL.ruleset-combat-directortakes 75-130 s on CI and about 176 s locally, against 180 s.native-export-memorytakes 16-23 s on CI, against 30 s.What changed
.github/workflows/playwright.ymlUpload failure evidencenow runs onfailure() || cancelled()as a backstop..github/actions/playwright-shard/action.yml: new optionalglobal-timeout-minutesinput (default0= no limit). It preserves the caller’s start timestamp, subtracts elapsed setup, and passes the remaining milliseconds as--global-timeout. The smoke suite is unchanged.scripts/smoke-container.mjs/api/healthanswers, not right afterdocker run.packages/server/dist/index.js) as well as PID 1, and all four uid fields (real, effective, saved, filesystem), not just the real uid.scripts/regressions/termux-sharp.regression.mjs: the store comes fromnode_modules/.modules.yaml(storeDir, the store the install actually used), falling back topnpm store path.scripts/run-regressions.mjs:ruleset-combat-directorgoes 180 s → 300 s, andnative-export-memorygets its own 60 s limit (was the 30 s default).scripts/regressions/regression-timeout-policy.regression.mjs: this PR changes the limits on purpose, so the existing pin moves to the new300_000and a new exact pin coversnative-export-memory. The pins stay exact. The same file also runs the action’s actual Bash command with controlled clock/pnpm fixtures to prove normal and slow setup, clock rewind, zero-as-unlimited and expired-budget behavior. These Linux-action shell cases are skipped on native Windows; the existing timeout/CLI-entry proof remains portable.Shard measurement
Each test's cost is the gap between consecutive results in the shard logs of run 39258556275, with failures and worker restarts included. Tests that run didn't reach come from the four nightly runs before it (39190973050, 39090575006, 38995433946, 38841207455). Shard assignment is Playwright 1.63's own:
pnpm exec playwright test -c playwright.config.ts --list --project=<p> --fully-parallel --shard=N/Mon9093c819d, 1,101 tests per project. Each shard also gets about 2 minutes of setup, server boot and upload."Worst case" is the heaviest run of consecutive tests at that count wherever the boundaries move, so adding or renaming tests can't push one shard past it without the suite itself growing. That leaves at least 13 minutes inside the 40-minute combined checkout/setup/test budget in this estimate.
--fully-parallel --shardsplits by test count in file order, which is why the slowgame-*specs cluster:game-experience-setup.e2e.tsalone is 16 tests and 9.4 min on WebKit. Playwright has no duration-based sharding. ItsPWTEST_SHARD_WEIGHTSis an internal, count-based test hook, so I didn't rely on it. More shards is the supported lever.Why both
--global-timeoutandcancelled()I checked the runner source (
StepsRunner.cs,JobDispatcher.cs). A job-level timeout reaches the runner as a job cancellation with a cancel grace period. Later steps are evaluated with the job statuscancelled, sofailure()is false and onlyalways()/cancelled()steps run. The old shard logs agree: afterThe operation was canceled.only the post-job cleanup ran, and no upload step.--global-timeouthandles the normal case: Playwright stops when its remaining share of the 40-minute combined budget expires, exits 1, prints the interrupted and not-run tests, and the existing failure path uploads. I checked locally on Playwright 1.63: exit 1, failed and interrupted tests keep theirtest-results/folders, and--global-timeout=0means no limit.cancelled()requests an upload on cancellation too, but the hard job deadline can still stop that upload; it does not guarantee artifact time. The setup-aware budget keeps ordinary shard execution within the earlier deadline.Validation
pnpm checkpasses locallyCONTRIBUTING.mdWhat the agent ran (boxes above are left for the human reviewer):
pnpm check: exit 0.--list --fully-parallel --shard=N/Mruns behind the table above.node scripts/smoke-container.mjs <Lite arm64 image> lite arm64, each run on a fresh volume:0 !== 65532, matching the original report.ghcr.io/pasta-devs/marinara-engine:staging): 2 of 2 runs passed.node scripts/run-regressions.mjs --filter termux-sharp:--store-dirpointing at a store outside the checkout: failed withERR_PNPM_NO_OFFLINE_TARBALLbefore the fix, passes after.node_modules/.modules.yamlstoreDirequalspnpm store path, so the store choice is unchanged there. Thecomplete-node-regressionsCI job (default in-checkout install) runs it in the full suite.Review follow-up
git diff --checkpassed.pnpm checkpassed (exit 0) ata2fab72f8dd6e5c3858121795d4828cf6e4cb736, with the existing React Hook/Vite chunk warnings. No new install was needed.actionlintwas unavailable locally; Prettier parsed both YAML files and the regression executed the real action shell. The completed aggregate local CodeRabbit review is recorded below.writeModulesManifestwritesJSON.stringify(saveModules, null, 2)to.modules.yaml; both installed checkouts’ metadata successfully parses as JSON and containsstoreDir. No YAML dependency was added.Manual verification notes
workflow_dispatchrun of this branch (linked below): no shard iscancelled, and the slowest shard finishes well under 40 minutes. Outdated-test failures owned by other release lanes may still show up. Only timing and evidence uploads matter for this PR.playwright-<project>-shard-N-failureartifact is present on that run.Completed aggregate local review
d3a4c0ee41a2ab90dfba454e2049d436d03deb0dagainst staging9565a274111ac251ade43f7a2f1f8436a16b7a86. All 26 changed files were reviewed: #7835 at163f5d11e820460e2624a2c5797c74ae51ba0062, #7836 at829b16aa7fe6d1be6b4e5fc922fbfe0fcebf5077, and #7838 atacc5ae52b3cbcdae22cda3a6fbb664008910b288.docs/installation/containers.md: add translation tracking. Dismissed because open #7839 already names that guide in its title and body and describes the changed update/rollback guidance. #7838 already links it under Linked issue and Docs and release impact. No local findings remain unresolved.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)CI and test scripts only. No product code, docs, e2e specs or
playwright.config.tschanges.UI evidence (if applicable)
Not applicable (CI and test scripts only).
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.