mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8033] [MERGED] chore(ci): shard Node regressions, cache compiled bytecode, skip the regression harness in CodeQL #8064
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#8064
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/8033
Author: @Promansis
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @Promansis
Base:
staging← Head:chore(ci)/regression-shards📝 Commits (8)
53a1aa9chore(regressions): shard the Node regression job over three runnerse6fd61cchore(ci): cache compiled bytecode across regression processes78e9208chore(codeql): skip the Node regression harnessd82c1a1chore(ci): accept the shard verdict in the PR triage validator8c36340chore(ci): pin the shard count and the verdict's dependencies in the triage validatorf0ee64echore(ci): pin the verdict job's required check name in the triage validatorddcb757Merge branch 'staging' into chore(ci)/regression-shards38c2021Merge branch 'staging' into chore(ci)/regression-shards📊 Changes
6 files changed (+135 additions, -14 deletions)
View changed files
📝
.github/workflows/codeql.yml(+4 -0)📝
.github/workflows/playwright.yml(+43 -4)📝
CONTRIBUTING.md(+1 -1)📝
scripts/regressions/regression-timeout-policy.regression.mjs(+24 -0)📝
scripts/run-regressions.mjs(+29 -6)📝
scripts/validate-pr-triage.mjs(+34 -3)📄 Description
Linked issue
Closes #8032
Why this change
Since #7971
complete-node-regressionstakes 11–20 min (median ~16–17 over the 58 runs since merge) and, with CodeQL at 9–12 min on PRs, sets the PR wait. The job is CPU-bound on the 4-vCPU runner: pinned to 4 cores locally, 265 files take the same 177 s with--concurrency 4and8, so one runner cannot go faster. Each regression file also pays ~1.5 s of fixed start-up (tsx plus loading thesharedandserversources), about 60% of the CPU time. On the CodeQL side,scripts/regressionsis 956 files and 358k lines, about 30% of what the TypeScript extractor reads, and it is test harness code that never ships.Three independent tooling changes, one per commit so any one can be reverted alone:
scripts/run-regressions.mjsgains--shard <i>/<n>: it deals the slow-first order round-robin so each shard carries one of the slowest files (ruleset-combat-director,server-signal-shutdown, …), then runs its slice as before, including the serial retry of files that missed beside others. The CI job becomes a 3-way matrix plus a verdict job that keeps thecomplete-node-regressionsname, following the pattern the browser lanes already use. Expected job time ~5–7 min instead of 11–20.NODE_COMPILE_CACHEfor the shard step. Node 24 reuses compiled bytecode across the hundreds of child processes in one job. Measured 10–15% per file locally; a cache miss just compiles normally.paths-ignore: scripts/regressions. Expected 2.5–3.5 min off the JavaScript analysis. Theactionsleg still covers.github/workflows. There are no open CodeQL alerts under that path, so nothing is closed by this.Local
pnpm regressionis unchanged: sharding only happens when--shardis passed.What changed
scripts/run-regressions.mjs: new--shard <i>/<n>option (1-based, disjoint, slow-first dealing), usage text updated;--list --shardshows a shard's files..github/workflows/playwright.yml:node-shardsmatrix (3) runspnpm regression --shard i/3withNODE_COMPILE_CACHE;complete-node-regressionsis now the verdict job over the shards..github/workflows/codeql.yml: inlineconfigwithpaths-ignore: scripts/regressions.scripts/regressions/regression-timeout-policy.regression.mjs: shards are disjoint, cover every file, each takes one of the three slowest files; malformed--shardvalues are refused.CONTRIBUTING.md: one sentence on--shardand the CI shards.scripts/validate-pr-triage.mjs(run byopen-issues.regression.ts): accepts the verdict job'sneeds: [revision, node-shards]and applies the same no-write-permission andgithub.shacheckout rules tonode-shards. This is what failed shard 1 on the PR's first run. After review it also compares each job's exactneedsline and checks the shard matrix against the/nin the job name and run command.scripts/validate-pr-triage.mjs: accepts the verdict job'sneeds: [revision, node-shards]and applies the same no-write-permission rule tonode-shards(the first PR run failedpnpm-validateandopen-issueson exactly this assertion).Validation
pnpm checkpasses locallyCONTRIBUTING.mdRun by the author on this branch (worktree, Node 24.15, Linux):
First hosted run (
78e920864):node-regressions 2/33 min 55 s,3/35 min 26 s,1/37 min with the one validator failure above and its serial retry;complete-node-regressionscorrectly reported failure. Second run (d82c1a1aa) results are in the checks below. Second run (d82c1a1aa): shards 6 min 57 s / 5 min 50 s / 5 min 42 s, all 325 or 324 files passed with no retry, verdict success;Analyze javascript-typescript5 min 52 s. The Dottore review's two Low findings (relaxedneedsmatcher, shard count repeated without a check) are repaired in the validator in8c3634058, with each drift probed locally to fail.pnpm check: exit 0 (format, lint, e2e types, build).node scripts/run-regressions.mjs --filter regression-timeout-policy: 1/1 passed, including the new shard assertions.node scripts/run-regressions.mjs --filter game-ruleset --shard 2/3 --concurrency 4: 88/88 passed (a real sharded pool run with the serial-retry path intact).--list --shard 1/3,2/3,3/3: 325 + 325 + 324 = 974 files, disjoint; per-shard timeout budgets 169 / 167 / 164 min;ruleset-combat-directorlands in shard 1,server-signal-shutdownin shard 2.--shard 0/3is refused with the usage text.git diff --checkclean.node scripts/validate-pr-triage.mjs: passes;node scripts/run-regressions.mjs --filter open-issues: 1/1 passed;pnpm format:checkclean.Manual verification notes
To confirm on this PR's own runs, not from local numbers:
node-regressions i/3jobs each pass andcomplete-node-regressionsreports success; compare their durations with the ~13–17 min of the single job on recent PRs.ruleset-combat-directorin shard 1,server-signal-shutdownin shard 2).Analyze javascript-typescriptjob lists fewer extracted files than before (~3,564 on recent runs, ~980 of them underscripts/regressions) and its duration.scripts/regressionstoday).Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Only
CONTRIBUTING.mdchanged (not underdocs/), so nodocs-i18nfollow-up.UI evidence (if applicable)
None, tooling only.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.