mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #1806] [Issue]: Pull Request Checks spends most of its run in the Gacha Forge bundle rebuild regression #1764
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#1764
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?
Originally created by @Promansis on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1806
Summary
The Pull Request Checks job takes about 8.5 minutes, and about 6.5 of those are one command:
tests/gacha-forge-bundle-rebuild.regression.mjs. Every PR waits on it, including PRs that don't touch Gacha Forge.Affected package
catalog/repository (CI). The slow test covers
gacha-forge, and the slow code isscripts/gacha-forge-bundle-patches.mjs.Expected behavior
The rebuild regression finishes in seconds, so the Pull Request Checks run is bounded by lint, typecheck and the remaining regressions (each under a minute).
Actual behavior
In run 40664480102, the "Test and validate the packages, catalog and repository gates" step took 6 min 36 s of the 8 min 32 s job. Run locally on 4 cores, the same command hit
run-parallel.mjs's 600 s ceiling; the next slowest command waspackages/pixelforge/test-brief.mjsat 49 s.Two causes:
rebuildGachaBundlesundoes and redoes ~815 ledger edits onclient.js(1.9 MB) andserver.mjs(1.0 MB) withString.prototype.indexOfand string concatenation. The bundles hold non-ASCII text, so they are two-byte strings, and one rebuild takes ~4 s. A CPU profile puts ~3.7 s of that inswapGachaBundleText.Steps to reproduce
npm citime node tests/gacha-forge-bundle-rebuild.regression.mjsrebuildGachaBundles(new URL("packages/gacha-forge/", ...))on a clean checkout. It leaves the tree unchanged.Environment
staging8bd08a6ubuntu-latest, Node 24; reproduced locally on Node 22, 4 cores)Logs, screenshots, or video
Local
run-parallel.mjstiming, slowest commands:Additional context
Proposed fix: swap bytes (Buffers) instead of strings in the rebuild. A UTF-8 match always starts on a character boundary, so the matches and the output are the same. Also change all sources at once in the regression, each with its own proof string, so it needs 4 rebuilds instead of ~163.
Limiting the job to changed packages was considered but not proposed. This is the required merge gate, and once the rebuild test is fast the remaining time is mostly fixed costs (checkout, lint, typecheck).
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: