mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #2166] [MERGED] chore(ci): cache catalog parses and memoise shippedUpTo in the ruleset regression #2161
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#2161
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/2166
Author: @Promansis
Created: 11/7/2026
Status: ✅ Merged
Merged: 11/7/2026
Merged by: @Promansis
Base:
staging← Head:chore(ci)/ruleset-test-speed📝 Commits (2)
bc49138chore(ci): cache catalog parses and memoise shippedUpTo in the ruleset regression7cce2b5Merge branch 'staging' into chore(ci)/ruleset-test-speed📊 Changes
2 files changed (+46 additions, -11 deletions)
View changed files
📝
scripts/ruleset-package-checks.mjs(+27 -11)📝
scripts/tests/ruleset-package.regression.mjs(+19 -0)📄 Description
Pull request
Linked issue
Closes #2165
Why this change
scripts/tests/ruleset-package.regression.mjs) is the slowest job in CI, at about 15m42s locally. Most of that time goes to repeating the same work:assertRulesetSheetHooksre-parses every catalog file nine times per call.shippedUpTo(minor)rebuilds the whole shipped package for each of its ~500 calls, which ask for only a handful of minors.What changed
scripts/ruleset-package-checks.mjs:parsedCatalogFile(text): each catalog text is parsed once into a 64-entry cache, keyed by the text and deep-frozen. It reuses the existingdeepFreezeandPARSED_CATALOG_CACHE_SIZE. The nineJSON.parse(String(text))calls inassertRulesetSheetHooksnow use it.usesOfcounter names are now gathered once per call, lazily.scripts/tests/ruleset-package.regression.mjs:shippedUpTo(minor)is memoised per minor and returns[structuredClone(doc), new Map(sources)], so each caller still edits its own copy. Sources values are strings.VERIFY_MEMO=1rebuilds on every call, checks the memo against the fresh build withisDeepStrictEqual, and prints the number of memo checks at the end.scripts/ruleset-*.mjsand the ruleset test, so the ruleset workflow runs on it (A1's gate).Package and security impact
Validation
node scripts/validate-catalog.mjspasses locallygit diff --checkpasses locallyCONTRIBUTING.mdManual verification notes
Agent-run, local (Linux,
MARINARA_ENGINE_ROOT=/home/damo/dev/Marinara-Engine):node scripts/tests/ruleset-package.regression.mjs: exit 0, 301regression checks passedlines, 9m52s (was 15m42s).VERIFY_MEMO=1 node scripts/tests/ruleset-package.regression.mjs: exit 0, 301 lines,memo checks: 651.npm run check: exit 0.shippedUpTo(749)andshippedUpTo(813), and each matches its fresh build.assertRulesetSheetHookspasses for 749, then 813, then 749 again.catalogEntryListkeeps its own parse cache, so texts are parsed twice. It's only worth merging the two caches if CI memory becomes a problem.Documentation impact
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.