[PR #1141] [MERGED] fix(gacha-forge): 1.8.8 — a chapter already cleared stays open while a Character Story holds the main story #1311

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

📋 Pull Request Information

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

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


📝 Commits (2)

  • 0521626 fix(gacha-forge): 1.8.8 — a chapter already cleared stays open while a Character Story holds the main story
  • 57209a4 docs(gacha-forge): 1.8.8 — only the next chapter waits; there is no chapter in progress to hold

📊 Changes

12 files changed (+134 additions, -111 deletions)

View changed files

➕ artifacts/gacha-forge-1.8.8.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 (+3 -0)
📝 packages/gacha-forge/README.md (+2 -0)
📝 packages/gacha-forge/client.js (+30 -30)
📝 packages/gacha-forge/manifest.json (+5 -5)
📝 packages/gacha-forge/server.mjs (+52 -52)

📄 Description

Linked issue

Closes #1140

Why this change

staging carries Gacha Forge 1.8.7. With a Character Story (bond chapter) open, old chapters
could not be opened to finish their other difficulties: a click on a chapter already cleared dropped
the player into the Character Story instead.

The lock is intended, and it stays. A Character Story holds the main story until it ends. It
became a route guard after a real hole: drawn only as a grey card on "forge the next chapter", it
left a chapter half played next to an unfinished Character Story, and a second tab (or the Home's
Continue) walked past the card and kept going — charging 5 Vigor for it.

What was wrong is how much it shut. The three routes that advance the main story
(/chapter-plan, /story/start, /battle/start) called mainStoryHeld(runId) without saying
which chapter they were serving, and refused all of them — cleared chapters included, since the
check ran before the plan cache was read. Meanwhile:

  • the chapter list drew a cleared chapter as openable (only uncleared ones carry the "Finish X's
    Story" lock);
  • the client reads bond-chapter-open as "go to the Character Story" (so a world switch never ends
    on a wall), which is why the click bounced there;
  • and mainStoryHeld's own comment claimed "a chapter already cleared stays readable" — true in
    the list, never in the routes.

What changed

  • mainStoryHeld(runId, session, chapter) takes the chapter. One cleared on Normal
    (progress[chapter].normal >= NORMAL_NODE_COUNT, the same test the chapter list uses) is past
  • Still held: the next chapter — forging it and anything in it, the case the lock was built
    for. There is no chapter in progress to hold: a Character Story is only offered once the chapter
    before it is cleared.
  • No client change. The list already drew the right thing; the routes now agree with it.

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 stored data, no new external calls.
  • Payload: client.js 1,434,560 → 1,434,802 bytes (the player changelog line), server.mjs
    492,474 → 492,537, artifact 7,827,191 → 7,827,496. 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.8 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.8 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 25 steps cannot go stale: 24 of 25
    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 every earlier Gacha Forge PR.
  • Package's own suite: eleven probes plus a 132-script bench compared run to run, plus the phone
    probe — all green (717 s).
  • The server probe asserted the bug, and now covers both halves. Its fixture called chapter 1
    "already started" while chapter 1 was cleared (normal: 10), so two of its checks required the
    refusal this PR removes. The started chapter is now chapter 2 (normal: 3) and stays held; the
    new check opens cleared chapter 1's plan, a scene and a Hard fight with the Character Story open.
    Against the previous code it fails with
    {"plan":"bond-chapter-open","story":"bond-chapter-open","hard":"bond-chapter-open"}.

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.8 paragraph; packages/gacha-forge/CHANGELOG.md
gains 1.8.8. The repository README is unchanged.

UI evidence (if applicable)

Summary by CodeRabbit

  • Bug Fixes
    • In Gacha Forge 1.8.8, cleared chapters can now be reopened during an active Character Story, including their maps, scenes, and Hard and Very Hard battles.
    • The current Character Story chapter and the next main-story chapter remain unavailable until the Character Story ends. Replaying cleared content does not advance story progress.

🔄 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/1141 **Author:** [@SonaGat3](https://github.com/SonaGat3) **Created:** 9/29/2026 **Status:** ✅ Merged **Merged:** 9/29/2026 **Merged by:** [@SonaGat3](https://github.com/SonaGat3) **Base:** `staging` ← **Head:** `feature/gacha-forge-1.8.8` --- ### 📝 Commits (2) - [`0521626`](https://github.com/Pasta-Devs/Marinara-Agents/commit/0521626112b29c885ab70491252ec66df0198f45) fix(gacha-forge): 1.8.8 — a chapter already cleared stays open while a Character Story holds the main story - [`57209a4`](https://github.com/Pasta-Devs/Marinara-Agents/commit/57209a41da81c08b295b1d2ffe4f2ed77c4405f5) docs(gacha-forge): 1.8.8 — only the next chapter waits; there is no chapter in progress to hold ### 📊 Changes **12 files changed** (+134 additions, -111 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/gacha-forge-1.8.8.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` (+3 -0) 📝 `packages/gacha-forge/README.md` (+2 -0) 📝 `packages/gacha-forge/client.js` (+30 -30) 📝 `packages/gacha-forge/manifest.json` (+5 -5) 📝 `packages/gacha-forge/server.mjs` (+52 -52) </details> ### 📄 Description ## Linked issue Closes #1140 ## Why this change `staging` carries Gacha Forge **1.8.7**. With a Character Story (bond chapter) open, old chapters could not be opened to finish their other difficulties: a click on a chapter already cleared dropped the player into the Character Story instead. **The lock is intended, and it stays.** A Character Story holds the main story until it ends. It became a route guard after a real hole: drawn only as a grey card on "forge the next chapter", it left a chapter half played next to an unfinished Character Story, and a second tab (or the Home's Continue) walked past the card and kept going — charging 5 Vigor for it. **What was wrong is how much it shut.** The three routes that advance the main story (`/chapter-plan`, `/story/start`, `/battle/start`) called `mainStoryHeld(runId)` without saying which chapter they were serving, and refused all of them — cleared chapters included, since the check ran before the plan cache was read. Meanwhile: - the chapter list drew a cleared chapter as openable (only uncleared ones carry the "Finish X's Story" lock); - the client reads `bond-chapter-open` as "go to the Character Story" (so a world switch never ends on a wall), which is why the click bounced there; - and `mainStoryHeld`'s own comment claimed *"a chapter already cleared stays readable"* — true in the list, never in the routes. ## What changed - **`mainStoryHeld(runId, session, chapter)` takes the chapter.** One cleared on Normal (`progress[chapter].normal >= NORMAL_NODE_COUNT`, the same test the chapter list uses) is past - **Still held:** the next chapter — forging it and anything in it, the case the lock was built for. There is no chapter in progress to hold: a Character Story is only offered once the chapter before it is cleared. - **No client change.** The list already drew the right thing; the routes now agree with it. ### 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 stored data, no new external calls. - **Payload:** `client.js` 1,434,560 → 1,434,802 bytes (the player changelog line), `server.mjs` 492,474 → 492,537, artifact 7,827,191 → 7,827,496. 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.8 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.8 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 25 steps cannot go stale: **24 of 25 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 every earlier Gacha Forge PR. - **Package's own suite:** eleven probes plus a 132-script bench compared run to run, plus the phone probe — all green (717 s). - **The server probe asserted the bug, and now covers both halves.** Its fixture called chapter 1 "already started" while chapter 1 was cleared (`normal: 10`), so two of its checks required the refusal this PR removes. The started chapter is now chapter 2 (`normal: 3`) and stays held; the new check opens cleared chapter 1's plan, a scene and a Hard fight with the Character Story open. Against the previous code it fails with `{"plan":"bond-chapter-open","story":"bond-chapter-open","hard":"bond-chapter-open"}`. ## 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.8 paragraph; `packages/gacha-forge/CHANGELOG.md` gains 1.8.8. The repository README is unchanged. ## UI evidence (if applicable) <!-- not applicable: no visual change; a cleared chapter's card was already drawn openable --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * In Gacha Forge 1.8.8, cleared chapters can now be reopened during an active Character Story, including their maps, scenes, and Hard and Very Hard battles. * The current Character Story chapter and the next main-story chapter remain unavailable until the Character Story ends. Replaying cleared content does not advance story progress. <!-- 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:08:13 +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#1311
No description provided.