[PR #1787] [MERGED] feat(gacha-forge): 1.26.0 story events in What happens next, pre-forged #1964

Closed
opened 2026-11-07 16:38:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1787
Author: @SpicyMarinara
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/gacha-forge-event-preforge


📝 Commits (4)

  • fa63669 feat(gacha-forge): 1.26.0 story events in What happens next, pre-forged (#1780)
  • 1f050fb fix(gacha-forge): 1.26.0 review fixes for event pre-forge
  • da076d7 Merge remote-tracking branch 'origin/staging' into feat/gacha-forge-event-preforge
  • cfaac5e Merge remote-tracking branch 'origin/staging' into feat/gacha-forge-event-preforge

📊 Changes

23 files changed (+1413 additions, -166 deletions)

View changed files

📝 .github/workflows/pull-request-checks.yml (+2 -0)
➕ artifacts/gacha-forge-1.26.0.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/gacha-forge/CHANGELOG.md (+5 -0)
📝 packages/gacha-forge/README.md (+8 -2)
📝 packages/gacha-forge/bundle-patches.json (+92 -0)
📝 packages/gacha-forge/client.js (+98 -21)
📝 packages/gacha-forge/docs/seasonal-story-events.md (+2 -1)
📝 packages/gacha-forge/manifest.json (+5 -5)
📝 packages/gacha-forge/server.mjs (+50 -41)
📝 packages/gacha-forge/src/chapter-regeneration-client.mjs (+0 -1)
📝 packages/gacha-forge/src/seasonal-events-adapter.mjs (+48 -39)
📝 packages/gacha-forge/src/seasonal-events-client.mjs (+79 -10)
📝 packages/gacha-forge/src/seasonal-events-en.mjs (+10 -0)
📝 packages/gacha-forge/src/story-cancel-client.mjs (+0 -1)

...and 3 more files

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.

Linked issue

Fixes #1780

Follow-up filed: #1786 (a held chapter's big choice can block an open story event; predates this PR, which makes it rarer).

Why this change

The maintainer reported: "I have preforging on, yet when I entered a seasonal event, the story generates only when I enter the first beat." They then asked: "can we make starting events in gacha forge the same way like when we select to start a character story? Basically, instead of choosing a new chapter, we should have an option to instead start an event. And pre-forging should be available for it."

  • Pre-forge never ran for events. /story-event/preforge was a stub that always answered mode: "off", and the client sent all four /preforge* calls for an event there.
  • Events were started from a separate place. The chapters list's "What happens next" card only knew the next chapter and Character Story offers, so an open event never appeared where the player picks the next story.

What changed

Package gacha-forge 1.26.0 (a feature release on top of 1.25.2).

  • The event is a "What happens next" option.
    • When the season's story event can start (the 1.24.10 rule) and the next chapter is not forged yet, the card offers it beside the next chapter and any Character Story offer.
    • It opens through the same path a Character Story takes: forge loader, plan, chapter map, pre-forge check. No new click code.
    • While the event is open, its card ("Story event · Open", n/10) takes the next chapter's place.
    • A chapter or Character Story the event holds now opens the event instead of an error.
    • Starting the event updates the list read before it, so the open card shows without a reload. A refresh of that list stopped by opening the event keeps the list it had.
    • When the next chapter is already forged but not started, or a Character Story is open, Events → Story events starts the event as before.
  • Pre-forge writes events with the main chain (5 server ledger edits, src/seasonal-events-adapter.mjs).
    • /preforge* and the /story/cancel flag accept an event-N key, like bond-*.
    • The chain loads the event plan and designs its fights with the event's own designer (designFight: the same prompt, scale, character canon and document as an opened battle). One dedupe means the chain and an opened battle share a single design.
    • An event that ended, or was switched off, reports pre-forge off, and its art chain paints nothing more. A fight being designed at that moment does not paint its enemy or place either.
    • The stub is deleted, and the client's route map sends /preforge* to the main routes.
    • Main chapters and Character Stories behave byte-identically (proved by the design's main-identical probe).
  • Copy: the loader and the chapter map name the event instead of "Chapter event-1". New English keys are in src/seasonal-events-en.mjs.
  • Release: What's new (1.25.2 pinned), CHANGELOG, README, docs/seasonal-story-events.md, manifest, artifact and catalog. New CI regressions: tests/gacha-forge-event-preforge.regression.mjs and tests/gacha-forge-event-choice.regression.mjs. The seasonal-events e2e now expects the event's pre-forge on the main route with its event key.

Package and security impact

  • Affected package IDs: gacha-forge
  • Engine compatibility impact: none.
  • New or changed permissions/entrypoints: none.
  • Restart, storage, update, or uninstall impact: none. Event pre-forge uses the same per-chapter session state and documents as chapter pre-forge.

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

Manual verification notes

Agent-side checks:

  • All 73 tests/gacha-forge-*.regression.mjs files pass locally (578 by the runner's count; the event pre-forge file runs its 14 cases as one entry). Prettier, eslint, node --check on both bundles and git diff --check are clean. validate-catalog could not run locally (sparse worktree).

  • New regressions:

    • gacha-forge-event-preforge (14 cases) drives the real server bundle: an event's scenes are written ahead at no Vigor cost; its fights are designed after the scene before them, once; Cancel and Retry; art mode; an ended or switched-off event reports pre-forge off and paints nothing more, including a fight designed at that moment; the 1.24.10 rule, the main-story hold and memory are unchanged. That main chapters and Character Stories behave byte-identically was proved separately by the design's main-identical probe, not by this file.
    • gacha-forge-event-choice (9 tests) covers the chooser: the option appears only when the event can start and the next chapter is not forged; it is hidden for ended, preparing, blocked, finished and events-off states and with a held Character Story; the open card replaces the next chapter; a started event shows its open card without a reload, even when opening it stopped a refresh of the event list.
  • An investigation workflow mapped main pre-forge, the event flow and the next-story choice, then a designer prototyped this against the real bundles. A critic re-ran every proof and added probes:

    • an event chain and a main chain at once (7 + 7 scenes, 3 + 3 fights, one model call each);
    • two restarts mid-chain;
    • Cancel, then the event ends, then Retry (no new calls);
    • Vigor charged once;
    • the same result from the chooser and from the Events screen.

    It found the stale open card, fixed here with a regression case, and the doc overclaim, reworded here.

Review:

  • CodeRabbit (local): 0 findings.
  • An adversarial review workflow (server chain, client chooser, release; a refuting verifier per finding) confirmed five low findings, fixed in the second commit or in this description:
    • fight art painted after the event ended;
    • the stopped list refresh;
    • the doc's "always offered" line;
    • What's new saying finishing a chapter "opens" the event;
    • this description crediting the regression file with the main-chain identity proof.
  • One finding was refuted: the new copy's "seven scenes and three fights" matches the plan the prompt asks for.

To verify by hand:

  • Manually verify with Pre-forge set to Story: finish a chapter while the season's story event can start, and check that Chapters → What happens next lists the event beside the next chapter.
  • Manually verify that choosing it opens the event's map with the pre-forge bar, that its first scene can be played at no Vigor cost while later scenes are written, and that its fights load.
  • Manually verify that returning to Chapters shows "Story event · Open" in place of the next chapter, and that opening the next chapter takes you to the event.
  • Manually verify that with Story and images, the event's scenes get their art, and that Cancel stops the chain.

🤖 Generated with Claude Code


🔄 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/1787 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/gacha-forge-event-preforge` --- ### 📝 Commits (4) - [`fa63669`](https://github.com/Pasta-Devs/Marinara-Agents/commit/fa636691e5aa81642e2a1fc1896a9d6c937a3b6d) feat(gacha-forge): 1.26.0 story events in What happens next, pre-forged (#1780) - [`1f050fb`](https://github.com/Pasta-Devs/Marinara-Agents/commit/1f050fbdeb1aeb6dd30f34eefce196b747d3558a) fix(gacha-forge): 1.26.0 review fixes for event pre-forge - [`da076d7`](https://github.com/Pasta-Devs/Marinara-Agents/commit/da076d728c355085a4b72914428221d605d75136) Merge remote-tracking branch 'origin/staging' into feat/gacha-forge-event-preforge - [`cfaac5e`](https://github.com/Pasta-Devs/Marinara-Agents/commit/cfaac5e9b6683a7aed3dbb03fc198a7a6d95e6ef) Merge remote-tracking branch 'origin/staging' into feat/gacha-forge-event-preforge ### 📊 Changes **23 files changed** (+1413 additions, -166 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pull-request-checks.yml` (+2 -0) ➕ `artifacts/gacha-forge-1.26.0.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/gacha-forge/CHANGELOG.md` (+5 -0) 📝 `packages/gacha-forge/README.md` (+8 -2) 📝 `packages/gacha-forge/bundle-patches.json` (+92 -0) 📝 `packages/gacha-forge/client.js` (+98 -21) 📝 `packages/gacha-forge/docs/seasonal-story-events.md` (+2 -1) 📝 `packages/gacha-forge/manifest.json` (+5 -5) 📝 `packages/gacha-forge/server.mjs` (+50 -41) 📝 `packages/gacha-forge/src/chapter-regeneration-client.mjs` (+0 -1) 📝 `packages/gacha-forge/src/seasonal-events-adapter.mjs` (+48 -39) 📝 `packages/gacha-forge/src/seasonal-events-client.mjs` (+79 -10) 📝 `packages/gacha-forge/src/seasonal-events-en.mjs` (+10 -0) 📝 `packages/gacha-forge/src/story-cancel-client.mjs` (+0 -1) _...and 3 more files_ </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. ## Linked issue Fixes #1780 Follow-up filed: #1786 (a held chapter's big choice can block an open story event; predates this PR, which makes it rarer). ## Why this change The maintainer reported: "I have preforging on, yet when I entered a seasonal event, the story generates only when I enter the first beat." They then asked: "can we make starting events in gacha forge the same way like when we select to start a character story? Basically, instead of choosing a new chapter, we should have an option to instead start an event. And pre-forging should be available for it." - **Pre-forge never ran for events.** `/story-event/preforge` was a stub that always answered `mode: "off"`, and the client sent all four `/preforge*` calls for an event there. - **Events were started from a separate place.** The chapters list's "What happens next" card only knew the next chapter and Character Story offers, so an open event never appeared where the player picks the next story. ## What changed Package `gacha-forge` 1.26.0 (a feature release on top of 1.25.2). - **The event is a "What happens next" option.** - When the season's story event can start (the 1.24.10 rule) and the next chapter is not forged yet, the card offers it beside the next chapter and any Character Story offer. - It opens through the same path a Character Story takes: forge loader, plan, chapter map, pre-forge check. No new click code. - While the event is open, its card ("Story event · Open", n/10) takes the next chapter's place. - A chapter or Character Story the event holds now opens the event instead of an error. - Starting the event updates the list read before it, so the open card shows without a reload. A refresh of that list stopped by opening the event keeps the list it had. - When the next chapter is already forged but not started, or a Character Story is open, **Events → Story events** starts the event as before. - **Pre-forge writes events with the main chain** (5 server ledger edits, `src/seasonal-events-adapter.mjs`). - `/preforge*` and the `/story/cancel` flag accept an `event-N` key, like `bond-*`. - The chain loads the event plan and designs its fights with the event's own designer (`designFight`: the same prompt, scale, character canon and document as an opened battle). One dedupe means the chain and an opened battle share a single design. - An event that ended, or was switched off, reports pre-forge off, and its art chain paints nothing more. A fight being designed at that moment does not paint its enemy or place either. - The stub is deleted, and the client's route map sends `/preforge*` to the main routes. - Main chapters and Character Stories behave byte-identically (proved by the design's `main-identical` probe). - **Copy:** the loader and the chapter map name the event instead of "Chapter event-1". New English keys are in `src/seasonal-events-en.mjs`. - **Release:** What's new (1.25.2 pinned), CHANGELOG, README, `docs/seasonal-story-events.md`, manifest, artifact and catalog. New CI regressions: `tests/gacha-forge-event-preforge.regression.mjs` and `tests/gacha-forge-event-choice.regression.mjs`. The seasonal-events e2e now expects the event's pre-forge on the main route with its event key. ## Package and security impact - Affected package IDs: `gacha-forge` - Engine compatibility impact: none. - New or changed permissions/entrypoints: none. - Restart, storage, update, or uninstall impact: none. Event pre-forge uses the same per-chapter session state and documents as chapter pre-forge. ## 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` ### Manual verification notes Agent-side checks: - All 73 `tests/gacha-forge-*.regression.mjs` files pass locally (578 by the runner's count; the event pre-forge file runs its 14 cases as one entry). Prettier, eslint, `node --check` on both bundles and `git diff --check` are clean. `validate-catalog` could not run locally (sparse worktree). - New regressions: - `gacha-forge-event-preforge` (14 cases) drives the real server bundle: an event's scenes are written ahead at no Vigor cost; its fights are designed after the scene before them, once; Cancel and Retry; art mode; an ended or switched-off event reports pre-forge off and paints nothing more, including a fight designed at that moment; the 1.24.10 rule, the main-story hold and memory are unchanged. That main chapters and Character Stories behave byte-identically was proved separately by the design's `main-identical` probe, not by this file. - `gacha-forge-event-choice` (9 tests) covers the chooser: the option appears only when the event can start and the next chapter is not forged; it is hidden for ended, preparing, blocked, finished and events-off states and with a held Character Story; the open card replaces the next chapter; a started event shows its open card without a reload, even when opening it stopped a refresh of the event list. - An investigation workflow mapped main pre-forge, the event flow and the next-story choice, then a designer prototyped this against the real bundles. A critic re-ran every proof and added probes: - an event chain and a main chain at once (7 + 7 scenes, 3 + 3 fights, one model call each); - two restarts mid-chain; - Cancel, then the event ends, then Retry (no new calls); - Vigor charged once; - the same result from the chooser and from the Events screen. It found the stale open card, fixed here with a regression case, and the doc overclaim, reworded here. Review: - CodeRabbit (local): 0 findings. - An adversarial review workflow (server chain, client chooser, release; a refuting verifier per finding) confirmed five low findings, fixed in the second commit or in this description: - fight art painted after the event ended; - the stopped list refresh; - the doc's "always offered" line; - What's new saying finishing a chapter "opens" the event; - this description crediting the regression file with the main-chain identity proof. - One finding was refuted: the new copy's "seven scenes and three fights" matches the plan the prompt asks for. To verify by hand: - Manually verify with Pre-forge set to Story: finish a chapter while the season's story event can start, and check that Chapters → What happens next lists the event beside the next chapter. - Manually verify that choosing it opens the event's map with the pre-forge bar, that its first scene can be played at no Vigor cost while later scenes are written, and that its fights load. - Manually verify that returning to Chapters shows "Story event · Open" in place of the next chapter, and that opening the next chapter takes you to the event. - Manually verify that with Story and images, the event's scenes get their art, and that Cancel stops the chain. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:38:21 +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#1964
No description provided.