mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #1807] [MERGED] perf(ci): cut the Gacha Forge bundle rebuild regression from minutes to seconds #1975
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#1975
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-Agents/pull/1807
Author: @Promansis
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @Promansis
Base:
staging← Head:ccr-a997ecd2-e6lxc8📝 Commits (2)
b0f53beperf(ci): cut the Forge bundle rebuild regression from ~6.5 min to seconds68575dfMerge remote-tracking branch 'origin/staging' into ccr-a997ecd2-e6lxc8📊 Changes
2 files changed (+62 additions, -43 deletions)
View changed files
📝
scripts/gacha-forge-bundle-patches.mjs(+19 -9)📝
tests/gacha-forge-bundle-rebuild.regression.mjs(+43 -34)📄 Description
Pull request
Linked issue
Closes #1806
Why this change
tests/gacha-forge-bundle-rebuild.regression.mjs. Every PR waits on it, whatever package it touches. #1806 has the timings and the profile.What changed
scripts/gacha-forge-bundle-patches.mjs:rebuildGachaBundlesreads the bundles as bytes and swaps ledger edits withBuffer.indexOf/Buffer.concat, using a new privateswapGachaBundleBytes. The bundles are 1–2 MB of non-ASCII text, and the string search made one rebuild take ~4 s; it now takes ~1 s locally. A UTF-8 match always starts on a character boundary, so the bytes match exactly where the text did. The anchor-must-occur-once rule and its error message are unchanged. The exportedswapGachaBundleTextis unchanged for the tests that call it with strings.tests/gacha-forge-bundle-rebuild.regression.mjs: changes all 54 listed sources at once, each with its own proof string (// source rebuild proof: <name>.; the trailing period keeps one proof from being a prefix of another, e.g.story-memory/story-memory-integration). It then rebuilds 4 times instead of ~163. It still asserts that each source reaches each bundle it lists, that the replay is deterministic, that restoring the sources restores both bundles byte for byte, and that an unknown bundle edit is rejected.packages/gacha-forge/client.jsandserver.mjsrebuild to the committed bytes, and no manifest, artifact, hash or catalog entry changes.Package and security impact
gacha-forge(build tooling and its regression only; the shipped package is unchanged)scripts/gacha-forge-bundle-patches.mjsbuilds the package's executableclient.js/server.mjs, and on the committed ledger it produces the same bytes as before.Validation
node scripts/validate-catalog.mjspasses locallygit diff --checkpasses locallyCONTRIBUTING.mdManual verification notes
What the agent ran in its session (Node 22, 4 cores). These notes are not a substitute for the boxes above.
node tests/gacha-forge-bundle-rebuild.regression.mjs: passes in ~5.4 s; before this change it hit the 600 srun-parallel.mjsceiling.audio-enregeneratesserver.mjsfails withaudio-en changes regenerate server.mjs.rebuildGachaBundleson the realpackages/gacha-forge/: left the working tree clean (output byte-identical to the committed bundles).tests/gacha-forge-music-prompts.regression.mjs,tests/gacha-forge-achievements.regression.mjs,tests/gacha-forge-location-ids.regression.mjs.npx prettier --checkandnpx eslinton both changed files: clean.tests/gacha-forge-animation-diagnostics.regression.mjsfails locally with and without this change. That is likely Node 22 vs CI's Node 24; CI on this PR will show.Documentation impact
UI evidence (if applicable)
Generated by Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.