[PR #1076] [MERGED] fix(gacha-forge): 1.8.7 — the character card library is read page by page, all of it #1280

Closed
opened 2026-10-21 05:07:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1076
Author: @SonaGat3
Created: 9/25/2026
Status: ✅ Merged
Merged: 9/25/2026
Merged by: @SonaGat3

Base: staging ← Head: feature/gacha-forge-1.8.7


📝 Commits (1)

  • 51432aa fix(gacha-forge): 1.8.7 — the character card library is read page by page, all of it

📊 Changes

12 files changed (+254 additions, -230 deletions)

View changed files

➕ artifacts/gacha-forge-1.8.7.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -0)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -0)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -0)
📝 packages/gacha-forge/CHANGELOG.md (+4 -0)
📝 packages/gacha-forge/README.md (+2 -0)
📝 packages/gacha-forge/client.js (+115 -115)
📝 packages/gacha-forge/manifest.json (+5 -5)
📝 packages/gacha-forge/server.mjs (+86 -86)

📄 Description

Linked issue

Closes #1075

Why this change

staging carries Gacha Forge 1.8.6. A player with just over 200 character cards could only use
about half of them: "it only loads up until about M… If I go and delete a character from ME
entirely and go back to the cast list, the next card does show up."
Cards past that point showed in
their cast as "No longer in your library", and they were about to start deleting cards from
their Engine library to work around it.

The package asked for a page and treated it as the library. It read
/api/characters/catalog?limit=500, and the Engine caps any limit at LIBRARY_PAGE_LIMIT (100) in
packages/server/src/utils/list-pagination.ts. Measured against a running Engine: asked for 500,
answered limit: 100, hasMore: true. Sorted name-asc, a 200-card library therefore ends around
the letter M — exactly where the player saw it end.

The renaming puzzle is the same bug, not a second one. The cast stores card IDs and resolves
each name against that list, so a card outside the first hundred cannot be found and is drawn as a
ghost. Renaming Victoria to Avictoria moves her into the page and she reappears; renaming her
back moves her out. Leo, an L, was inside the page all along, which is why he always tracked
correctly.

And the same single page fed the preset pruning, which decides what the Engine still holds when
a preset is loaded. Its guard — a page that came back FULL is not the whole library — compared the
page against the 500 that was asked for, not the 100 that arrived, so it never fired. For this
player, loading a preset would have silently dropped every card past the hundredth as "no longer in
the Engine".

What changed

  • readCardCatalog() walks every page and now lives in api.js, the module that owns the pipe
    to the Engine: limit=100&offset=…&sort=name-asc until hasMore clears.
  • A walk that cannot FINISH rejects. Half a library is indistinguishable from a whole one, so
    handing it over is worse than handing over none: the wizard keeps the list already on screen and
    its "could not read your character cards" notice, and the preset pruning drops nothing — the same
    rule 1.8.5 already applied to a list that could not be read at all.
  • A hasMore that never clears stops on its own after 60 pages (6,000 cards) — and stops by
    rejecting, under the rule above.
  • An Engine that answers a plain array is still read in one call: that response is the whole
    library, and there is no next page to ask for.

Generated outputs

packages/gacha-forge/client.js, server.mjs, manifest.json, the artifact zip, the catalog
family and the release-notes sidecars were re-derived by
node scripts/build-gacha-forge-package.mjs from the committed payload bytes. Nothing was
hand-edited; re-running the builder after the commit leaves the tree clean.

Package and security impact

  • capabilityApi, the engine range, permissions, contribution slots, assets, builtAgainst and
    restartRequired are unchanged.
    The only manifest field that moved is version, verified by
    diffing against the staging manifest with the hash lines filtered out.
  • Routes: 121 → 121. None added, none removed.
  • No new external services and no new stored data. The reads are the same loopback calls to the
    Engine's own catalog route that the package already made — now asked for in pages instead of one
    oversized page. A library of 200 cards costs two extra calls, each with the same 2 s ceiling.
  • Payload: client.js 1,433,941 → 1,434,560 bytes, server.mjs 492,116 → 492,474, artifact
    7,826,214 → 7,827,191. All art is byte-identical (245 of 247 payload files unchanged).

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

⚠️ Why the fourth box is unticked. 1.8.7 is not published, so it cannot be installed through
the Engine's download path. The same bytes were installed by sideload into a staging Engine,
which was then restarted (this release changes server.mjs): the Engine pings 1.8.7 and the game
opens with no console errors.

Manual verification notes

  • Branch hygiene. Branched from the current origin/staging; git ls-files --eol | grep -c w/crlf → 0; git diff --check "origin/staging...HEAD" clean; the build is reproducible.
  • The catalog zip matches what the Engine actually ran, file by file: 247 of 248 entries are
    byte-identical to the sideloaded install; only manifest.json differs, which every installer
    rewrites.
  • Repo checks run locally, in the workflow's own order — the script is generated from
    pull-request-checks.yml at origin/staging, so its 24 steps cannot go stale: 23 of 24
    green
    . ⚠️ npm run test:security fails on Windows for a reason unrelated to this change
    (catalog-path-safety.regression.mjs expects a POSIX path and gets
    D:\tmp\package\assets\icon.png); its log never names gacha-forge, and it failed identically on a
    clean staging checkout for the 1.8.2, 1.8.5 and 1.8.6 PRs.
  • Package's own suite: eleven probes plus a 132-script bench compared run to run, plus the phone
    probe — all green (734 s).
  • The new checks were each verified failing against the previous code. Client: a fake Engine
    serving three pages (100 + 100 + 2) is read as 202 cards in 3 calls; a second page that 500s
    rejects the whole read; an endless hasMore stops and rejects; a plain array is read once. Server:
    a preset whose card sits on the SECOND page keeps that card — against the old code the probe
    reports {"cards":[],"dropped":2,"paginas":[0]}, that is, one page read and both cards pruned,
    including the one that exists.

Documentation impact

  • Updated this README catalog and package guidance
  • No documentation changes needed
  • Updated linked Marinara Engine documentation

packages/gacha-forge/README.md gains the 1.8.7 paragraph; packages/gacha-forge/CHANGELOG.md
gains 1.8.7. The repository README is unchanged.

UI evidence (if applicable)

Summary by CodeRabbit

  • Bug Fixes
    • World creation now lists character cards beyond the first 100.
    • Preset loading checks the full card library, preventing later cards from being incorrectly treated as missing.
  • Updates
    • Gacha Forge updated to version 1.8.7.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/1076 **Author:** [@SonaGat3](https://github.com/SonaGat3) **Created:** 9/25/2026 **Status:** ✅ Merged **Merged:** 9/25/2026 **Merged by:** [@SonaGat3](https://github.com/SonaGat3) **Base:** `staging` ← **Head:** `feature/gacha-forge-1.8.7` --- ### 📝 Commits (1) - [`51432aa`](https://github.com/Pasta-Devs/Marinara-Agents/commit/51432aa7d48ad37ef156aa4350e3e459b6c4d895) fix(gacha-forge): 1.8.7 — the character card library is read page by page, all of it ### 📊 Changes **12 files changed** (+254 additions, -230 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/gacha-forge-1.8.7.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -0) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -0) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -0) 📝 `packages/gacha-forge/CHANGELOG.md` (+4 -0) 📝 `packages/gacha-forge/README.md` (+2 -0) 📝 `packages/gacha-forge/client.js` (+115 -115) 📝 `packages/gacha-forge/manifest.json` (+5 -5) 📝 `packages/gacha-forge/server.mjs` (+86 -86) </details> ### 📄 Description ## Linked issue Closes #1075 ## Why this change `staging` carries Gacha Forge **1.8.6**. A player with just over 200 character cards could only use about half of them: *"it only loads up until about M… If I go and delete a character from ME entirely and go back to the cast list, the next card does show up."* Cards past that point showed in their cast as **"No longer in your library"**, and they were about to start deleting cards from their Engine library to work around it. **The package asked for a page and treated it as the library.** It read `/api/characters/catalog?limit=500`, and the Engine caps any limit at `LIBRARY_PAGE_LIMIT` (100) in `packages/server/src/utils/list-pagination.ts`. Measured against a running Engine: asked for 500, answered `limit: 100, hasMore: true`. Sorted `name-asc`, a 200-card library therefore ends around the letter M — exactly where the player saw it end. **The renaming puzzle is the same bug, not a second one.** The cast stores card IDs and resolves each name against that list, so a card outside the first hundred cannot be found and is drawn as a ghost. Renaming *Victoria* to *Avictoria* moves her into the page and she reappears; renaming her back moves her out. *Leo*, an L, was inside the page all along, which is why he always tracked correctly. **And the same single page fed the preset pruning**, which decides what the Engine still holds when a preset is loaded. Its guard — a page that came back FULL is not the whole library — compared the page against the 500 that was asked for, not the 100 that arrived, so it never fired. For this player, loading a preset would have silently dropped every card past the hundredth as "no longer in the Engine". ## What changed - **`readCardCatalog()` walks every page** and now lives in `api.js`, the module that owns the pipe to the Engine: `limit=100&offset=…&sort=name-asc` until `hasMore` clears. - **A walk that cannot FINISH rejects.** Half a library is indistinguishable from a whole one, so handing it over is worse than handing over none: the wizard keeps the list already on screen and its "could not read your character cards" notice, and the preset pruning drops nothing — the same rule 1.8.5 already applied to a list that could not be read at all. - **A `hasMore` that never clears stops on its own** after 60 pages (6,000 cards) — and stops by rejecting, under the rule above. - **An Engine that answers a plain array is still read in one call**: that response *is* the whole library, and there is no next page to ask for. ### Generated outputs `packages/gacha-forge/client.js`, `server.mjs`, `manifest.json`, the artifact zip, the catalog family and the release-notes sidecars were **re-derived** by `node scripts/build-gacha-forge-package.mjs` from the committed payload bytes. Nothing was hand-edited; re-running the builder after the commit leaves the tree clean. ## Package and security impact - **`capabilityApi`, the `engine` range, permissions, contribution slots, assets, `builtAgainst` and `restartRequired` are unchanged.** The only manifest field that moved is `version`, verified by diffing against the `staging` manifest with the hash lines filtered out. - **Routes: 121 → 121.** None added, none removed. - **No new external services and no new stored data.** The reads are the same loopback calls to the Engine's own catalog route that the package already made — now asked for in pages instead of one oversized page. A library of 200 cards costs two extra calls, each with the same 2 s ceiling. - **Payload:** `client.js` 1,433,941 → 1,434,560 bytes, `server.mjs` 492,116 → 492,474, artifact 7,826,214 → 7,827,191. All art is byte-identical (245 of 247 payload files unchanged). ## Validation - [x] `node scripts/validate-catalog.mjs` passes locally - [x] `git diff --check` passes locally - [x] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [x] Checked supported modes, restart behavior, and uninstall cleanup - [x] Read and followed `CONTRIBUTING.md` > ⚠️ **Why the fourth box is unticked.** 1.8.7 is not published, so it cannot be installed *through* > the Engine's download path. The same bytes were installed by sideload into a `staging` Engine, > which was then restarted (this release changes `server.mjs`): the Engine pings 1.8.7 and the game > opens with no console errors. ### Manual verification notes - **Branch hygiene.** Branched from the current `origin/staging`; `git ls-files --eol | grep -c w/crlf` → **0**; `git diff --check "origin/staging...HEAD"` clean; the build is reproducible. - **The catalog zip matches what the Engine actually ran**, file by file: 247 of 248 entries are byte-identical to the sideloaded install; only `manifest.json` differs, which every installer rewrites. - **Repo checks run locally, in the workflow's own order** — the script is generated from `pull-request-checks.yml` at `origin/staging`, so its 24 steps cannot go stale: **23 of 24 green**. ⚠️ `npm run test:security` fails on Windows for a reason unrelated to this change (`catalog-path-safety.regression.mjs` expects a POSIX path and gets `D:\tmp\package\assets\icon.png`); its log never names gacha-forge, and it failed identically on a clean `staging` checkout for the 1.8.2, 1.8.5 and 1.8.6 PRs. - **Package's own suite:** eleven probes plus a 132-script bench compared run to run, plus the phone probe — all green (734 s). - **The new checks were each verified failing against the previous code.** Client: a fake Engine serving three pages (100 + 100 + 2) is read as 202 cards in 3 calls; a second page that 500s rejects the whole read; an endless `hasMore` stops and rejects; a plain array is read once. Server: a preset whose card sits on the SECOND page keeps that card — against the old code the probe reports `{"cards":[],"dropped":2,"paginas":[0]}`, that is, one page read and both cards pruned, including the one that exists. ## Documentation impact - [x] Updated this README catalog and package guidance - [ ] No documentation changes needed - [ ] Updated linked Marinara Engine documentation `packages/gacha-forge/README.md` gains the 1.8.7 paragraph; `packages/gacha-forge/CHANGELOG.md` gains 1.8.7. The repository README is unchanged. ## UI evidence (if applicable) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * World creation now lists character cards beyond the first 100. * Preset loading checks the full card library, preventing later cards from being incorrectly treated as missing. * **Updates** * Gacha Forge updated to version 1.8.7. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:07:37 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1280
No description provided.