[PR #565] [MERGED] feat: Gacha Forge 1.2.0 adds the Story slice and moves to staging only #1027

Closed
opened 2026-10-20 17:33:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

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


📝 Commits (3)

  • c7fbfa7 feat: Gacha Forge 1.2.0 adds the Story slice and moves to staging only
  • 260c5e9 Merge branch 'staging' into feature/gacha-forge-story
  • b433a02 Merge branch 'staging' into feature/gacha-forge-story

📊 Changes

16 files changed (+1567 additions, -419 deletions)

View changed files

📝 README.md (+2 -2)
➕ artifacts/gacha-forge-1.2.0.zip (+0 -0)
📝 catalog/catalog.json (+0 -78)
➕ catalog/preview/catalog.json (+84 -0)
➕ catalog/preview/v2/catalog.json (+84 -0)
➕ catalog/preview/v3/catalog.json (+84 -0)
📝 catalog/v2/catalog.json (+0 -78)
📝 catalog/v3/catalog.json (+0 -78)
📝 packages/gacha-forge/README.md (+15 -2)
📝 packages/gacha-forge/agents.json (+1 -1)
📝 packages/gacha-forge/client.js (+1207 -131)
📝 packages/gacha-forge/locales/en.json (+2 -2)
📝 packages/gacha-forge/manifest.json (+9 -9)
📝 packages/gacha-forge/server.mjs (+76 -35)
📝 scripts/catalog-incomplete.mjs (+1 -1)
📝 scripts/validate-catalog.mjs (+2 -2)

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #564

Why this change

  • Gacha Forge could forge a world and pull a cast out of it (1.0.0), then grow that cast by farming (1.1.0). What it could not do is the thing the cast was collected for: Story was drawn on the Home as a locked door, so a player levelled units toward a fight the mode never offered.
  • This is the third slice of the split the maintainer asked for on #542: one system per PR, each a version that works on its own.

What changed

  • Affected package: gacha-forge, 1.1.0 → 1.2.0.
  • Chapters: the model plans a chapter's nodes as a mix of story beats and fights, against the world and the cast that already exist.
  • A visual-novel narrator: each beat is read out segment by segment, with the speaker framed beside the text and a backlog of what has been read.
  • Backgrounds per location, painted once per place and reused, through the profile's own image connection.
  • Chapter combat, on the same deterministic seeded simulation the farming already used.
  • Context controls: a compression pass and the threshold that warns before it is needed, so a long run stays inside the model's window instead of degrading silently.
  • Equipment and relics, the inventory and the events tab stay drawn locked, as follow-up PRs. The Relic Vault and the Tenet Trial stay locked and refused by the server, so the screen and the route cannot hold two opinions about the same rule.

The package moves to the staging-only tier

Story is the first slice that generates long-form narration on every beat, so it is the one that most deserves testers before stable users. This adds gacha-forge to STAGING_ONLY_PACKAGE_IDS, which per CONTRIBUTING.md § Packages that are not ready for everyone means three coordinated edits, all in this PR:

  • the id in scripts/catalog-incomplete.mjs;
  • the package-count assertion in scripts/validate-catalog.mjs, since the published lanes drop from 37 to 36 (24 agents, 13 → 12 features — the package counts as a feature because it declares entrypoints.server);
  • the README tables: the Gacha Forge row moves out of Misc Agents and into In development with an availability of Staging only, and the count sentence follows.

The builder then routes the entry to the preview overlay: catalog/preview/{,v2/,v3/}catalog.json are new, and the three published lanes lose the entry. validate-catalog.mjs confirms the split — "Preview overlay valid: 1 staging-only package(s) (gacha-forge) — hidden from stable users."

It also reworks what earlier PRs already shipped

🔴 This release is not purely additive. The diff touches interfaces and economy that #542 and #559 already delivered, all of it from play reports rather than from the story work:

  • Materials (shipped in 1.1.0), three separate problems. Its body sat flush against the hoisted top bar, because the padding leaves with the header that bar takes over — the sibling screen, Inventory, already restored it under :not(:has(> .head)) and this one never did. Its type had drifted off the shared scale onto four hand-written sizes that fall between the ramp's steps, which is what made it read as belonging to a different screen. And its tier cards were stretched to fill a plate that filled the screen, so a card carrying three rows of content got a box two and a half times taller than it needed. The board now wraps into two rows, cards take their own height, and every stage's card is three rows tall — the Relic Vault's rarity table shares the figure's line rather than making its cards taller than its neighbours'.
  • The narration backlog read in the same colour as its own panel on three of the five HUD styles, because it took its text colour from a token that is a surface: light in two styles, a translucent wash in two others and a dark brown in the fifth.
  • What a farming run pays in commander rank (also 1.1.0) came from the pace of a chapter fight — its 300 XP over its 8 Vigor — so the three difficulties paid 225/300/375. Now that chapters exist, a farming run paying more than the story it was built to support reads backwards, so it pays the story ladder instead: 150/225/300. The difficulty key is derived from the same table the story already uses rather than written out a second time, so the two cannot drift.
  • Map nodes no longer pay Insight. They did when the story was the only source of materials; 1.1.0 made the farming that source, and a chapter that also hands them out removes the reason to farm. Funds, Aether and commander rank are unchanged. ⚠️ That uncovered an older gap worth calling out: the result screen's reward list read Funds and Insight and never Aether, so it had never named the Aether a cleared fight pays. It was hidden while the list came out non-empty anyway; with Insight gone, a cleared fight would have reported only Funds. The list now names it, with a regression check.

Generated outputs

All re-derived by node scripts/build-gacha-forge-package.mjs from the committed payload bytes: packages/gacha-forge/manifest.json, locales/en.json, artifacts/gacha-forge-1.2.0.zip, the three published lanes and the new preview overlay. Re-running the builder after committing leaves the tree clean, so the artifact and hashes cannot drift from what ships. The two READMEs were updated by hand.

Package and security impact

  • Affected package IDs: gacha-forge.
  • Engine compatibility impact: none. engine.min stays 2.4.4 and maxExclusive stays 4.0.0, so the same v2 and v3 lanes are addressed. builtAgainst.engineVersion is 2.4.4 and builtAgainst.engineCommit is 0790c478, the staging commit this release was actually played against.
  • New or changed permissions/entrypoints: none. Permissions stay network, routes, storage, ui; entrypoints stay agents.json, client.js, server.mjs. The new screens are the package's own surface — no new host contract is consumed.
  • Restart, storage, update, or uninstall impact: unchanged. restartRequired stays true because the package registers server routes. Storage is the same per-world capability documents the package already wrote; this release adds chapter, beat and location documents alongside them and changes no existing document's shape.
  • Repository-script changes: two one-line edits, both required by the tier and both covered by validate-catalog.mjs — the id set and the count assertion. No change to how payloads are built, hashed, zipped or routed.

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

Everything below was run against a staging checkout of Marinara Engine at 0790c478 (version 2.4.4), rebuilt from source, on Windows.

Repository checks, all green locally, in the order pull-request-checks.yml runs them: npm run check (0 errors, 70 pre-existing warnings), npx tsx tests/memory-nag-selection.regression.ts, npx tsx tests/beholder-client-contract.regression.ts, node scripts/test-catalog-lanes.mjs, node scripts/validate-package-locales.mjs, node scripts/validate-catalog.mjs, node scripts/tests/catalog-generatedat-determinism.regression.mjs, node tests/world-maps-ui-contract.regression.mjs, node tests/long-term-memory-feedback-clarity-ui.regression.mjs, node scripts/validate-pr-triage.mjs, node scripts/test-owner-approval.mjs, and git diff --check "origin/staging...HEAD" (the three-dot form the workflow uses — empty).

npm run test:security fails on Windows only and for an unrelated reason: scripts/tests/catalog-path-safety.regression.mjs:15 compares resolve("/tmp/package"), which prepends the current drive letter on Windows, against join(…), which does not. That file does not reference this package.

Install path. 1.2.0 is not published yet, so it could not be exercised through Download Agents: it was installed into the Engine's package store and activated after a restart, which covers activation, route registration and the client bundle, but not the download and checksum steps. That is why the box above is left unticked. The earlier 1.0.0 was installed through that full path from the official staging catalog, and the payload committed here is byte-identical to the one that was played — built, installed and committed hashes match for all four files.

Routes. The server registers 51 routes on activation, and the package's own contract test compares that set against the declared one in both directions, so a route cannot survive by accident or go missing unnoticed.

Story, exercised over its own HTTP routes on an existing world:

  • POST /chapter-plan forged a chapter — 10 nodes, 7 story and 3 combat — from the world's premise and cast.
  • POST /story/start charged 5 Vigor (61 → 56).
  • POST /beat returned the beat as 79 segments / 1,156 words, reporting 1,623 context tokens against the configured threshold.
  • POST /complete paid +150 commander XP (rank 2 → 3), raised the Vigor ceiling 61 → 62 and paid 500 Funds, with the before-value travelling alongside so the result screen can animate it.
  • POST /battle set up a chapter fight, 3 against 2, with its objective and opening line, and POST /battle/start charged 8 Vigor (56 → 48).

The reworked screens were re-measured on the built module inside the real shell, with the header hoisted as the game hoists it, across window sizes and all five interface-text steps: the screen itself never scrolls, nothing clips, and the tier cards of the three stage plates come out the same height at every step.

Modes and surface. The package contributes a Home browser tab and declares conversation, roleplay and game. Uninstall was exercised by removing the package from the Engine's installed set and restarting: the client bundle and every package route answered 404 and the tab was gone. Worlds stayed in capability storage and came back intact on reinstall, which is the intended behaviour for a game mode.

Documentation impact

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

UI evidence (if applicable)

image image image image

Summary by CodeRabbit

  • New Features
    • Gacha Forge 1.2.0 adds narrated visual-novel story chapters and expanded story content.
    • Updated rewards, materials layout, narration-backlog colors, and farming progression details.
  • Availability
    • Gacha Forge is available in staging catalogs for testing and excluded from the stable catalog.
    • Equipment, relics, inventory, events, and select farming stages remain locked.
  • Documentation
    • Updated package descriptions and catalog information for the new version and staging-only availability.
  • Catalog Updates
    • The stable catalog now lists 36 first-party packages and 19 Misc Agents.

🔄 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/565 **Author:** [@SonaGat3](https://github.com/SonaGat3) **Created:** 8/25/2026 **Status:** ✅ Merged **Merged:** 8/25/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feature/gacha-forge-story` --- ### 📝 Commits (3) - [`c7fbfa7`](https://github.com/Pasta-Devs/Marinara-Agents/commit/c7fbfa73ce68759cb886f4b789625840e3790ff9) feat: Gacha Forge 1.2.0 adds the Story slice and moves to staging only - [`260c5e9`](https://github.com/Pasta-Devs/Marinara-Agents/commit/260c5e99c51041900765f0540b965471f728970a) Merge branch 'staging' into feature/gacha-forge-story - [`b433a02`](https://github.com/Pasta-Devs/Marinara-Agents/commit/b433a02c706422e8836c629e1d4531c11b0294f4) Merge branch 'staging' into feature/gacha-forge-story ### 📊 Changes **16 files changed** (+1567 additions, -419 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+2 -2) ➕ `artifacts/gacha-forge-1.2.0.zip` (+0 -0) 📝 `catalog/catalog.json` (+0 -78) ➕ `catalog/preview/catalog.json` (+84 -0) ➕ `catalog/preview/v2/catalog.json` (+84 -0) ➕ `catalog/preview/v3/catalog.json` (+84 -0) 📝 `catalog/v2/catalog.json` (+0 -78) 📝 `catalog/v3/catalog.json` (+0 -78) 📝 `packages/gacha-forge/README.md` (+15 -2) 📝 `packages/gacha-forge/agents.json` (+1 -1) 📝 `packages/gacha-forge/client.js` (+1207 -131) 📝 `packages/gacha-forge/locales/en.json` (+2 -2) 📝 `packages/gacha-forge/manifest.json` (+9 -9) 📝 `packages/gacha-forge/server.mjs` (+76 -35) 📝 `scripts/catalog-incomplete.mjs` (+1 -1) 📝 `scripts/validate-catalog.mjs` (+2 -2) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #564 ## Why this change - Gacha Forge could forge a world and pull a cast out of it (1.0.0), then grow that cast by farming (1.1.0). What it could not do is the thing the cast was collected for: Story was drawn on the Home as a locked door, so a player levelled units toward a fight the mode never offered. - This is the third slice of the split the maintainer asked for on #542: one system per PR, each a version that works on its own. ## What changed - Affected package: gacha-forge, 1.1.0 → 1.2.0. - Chapters: the model plans a chapter's nodes as a mix of story beats and fights, against the world and the cast that already exist. - A visual-novel narrator: each beat is read out segment by segment, with the speaker framed beside the text and a backlog of what has been read. - Backgrounds per location, painted once per place and reused, through the profile's own image connection. - Chapter combat, on the same deterministic seeded simulation the farming already used. - Context controls: a compression pass and the threshold that warns before it is needed, so a long run stays inside the model's window instead of degrading silently. - Equipment and relics, the inventory and the events tab stay drawn locked, as follow-up PRs. The Relic Vault and the Tenet Trial stay locked and refused by the server, so the screen and the route cannot hold two opinions about the same rule. **The package moves to the staging-only tier** Story is the first slice that generates long-form narration on every beat, so it is the one that most deserves testers before stable users. This adds gacha-forge to STAGING_ONLY_PACKAGE_IDS, which per CONTRIBUTING.md § Packages that are not ready for everyone means three coordinated edits, all in this PR: - the id in scripts/catalog-incomplete.mjs; - the package-count assertion in scripts/validate-catalog.mjs, since the published lanes drop from 37 to 36 (24 agents, 13 → 12 features — the package counts as a feature because it declares entrypoints.server); - the README tables: the Gacha Forge row moves out of Misc Agents and into In development with an availability of Staging only, and the count sentence follows. The builder then routes the entry to the preview overlay: catalog/preview/{,v2/,v3/}catalog.json are new, and the three published lanes lose the entry. validate-catalog.mjs confirms the split — "Preview overlay valid: 1 staging-only package(s) (gacha-forge) — hidden from stable users." **It also reworks what earlier PRs already shipped** 🔴 This release is not purely additive. The diff touches interfaces and economy that #542 and #559 already delivered, all of it from play reports rather than from the story work: - Materials (shipped in 1.1.0), three separate problems. Its body sat flush against the hoisted top bar, because the padding leaves with the header that bar takes over — the sibling screen, Inventory, already restored it under :not(:has(> .head)) and this one never did. Its type had drifted off the shared scale onto four hand-written sizes that fall between the ramp's steps, which is what made it read as belonging to a different screen. And its tier cards were stretched to fill a plate that filled the screen, so a card carrying three rows of content got a box two and a half times taller than it needed. The board now wraps into two rows, cards take their own height, and every stage's card is three rows tall — the Relic Vault's rarity table shares the figure's line rather than making its cards taller than its neighbours'. - The narration backlog read in the same colour as its own panel on three of the five HUD styles, because it took its text colour from a token that is a surface: light in two styles, a translucent wash in two others and a dark brown in the fifth. - What a farming run pays in commander rank (also 1.1.0) came from the pace of a chapter fight — its 300 XP over its 8 Vigor — so the three difficulties paid 225/300/375. Now that chapters exist, a farming run paying more than the story it was built to support reads backwards, so it pays the story ladder instead: 150/225/300. The difficulty key is derived from the same table the story already uses rather than written out a second time, so the two cannot drift. - Map nodes no longer pay Insight. They did when the story was the only source of materials; 1.1.0 made the farming that source, and a chapter that also hands them out removes the reason to farm. Funds, Aether and commander rank are unchanged. ⚠️ That uncovered an older gap worth calling out: the result screen's reward list read Funds and Insight and never Aether, so it had never named the Aether a cleared fight pays. It was hidden while the list came out non-empty anyway; with Insight gone, a cleared fight would have reported only Funds. The list now names it, with a regression check. **Generated outputs** All re-derived by node scripts/build-gacha-forge-package.mjs from the committed payload bytes: packages/gacha-forge/manifest.json, locales/en.json, artifacts/gacha-forge-1.2.0.zip, the three published lanes and the new preview overlay. Re-running the builder after committing leaves the tree clean, so the artifact and hashes cannot drift from what ships. The two READMEs were updated by hand. ## Package and security impact - Affected package IDs: gacha-forge. - Engine compatibility impact: none. engine.min stays 2.4.4 and maxExclusive stays 4.0.0, so the same v2 and v3 lanes are addressed. builtAgainst.engineVersion is 2.4.4 and builtAgainst.engineCommit is 0790c478, the staging commit this release was actually played against. - New or changed permissions/entrypoints: none. Permissions stay network, routes, storage, ui; entrypoints stay agents.json, client.js, server.mjs. The new screens are the package's own surface — no new host contract is consumed. - Restart, storage, update, or uninstall impact: unchanged. restartRequired stays true because the package registers server routes. Storage is the same per-world capability documents the package already wrote; this release adds chapter, beat and location documents alongside them and changes no existing document's shape. - Repository-script changes: two one-line edits, both required by the tier and both covered by validate-catalog.mjs — the id set and the count assertion. No change to how payloads are built, hashed, zipped or routed. ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [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` ### Manual verification notes Everything below was run against a staging checkout of Marinara Engine at 0790c478 (version 2.4.4), rebuilt from source, on Windows. Repository checks, all green locally, in the order pull-request-checks.yml runs them: npm run check (0 errors, 70 pre-existing warnings), npx tsx tests/memory-nag-selection.regression.ts, npx tsx tests/beholder-client-contract.regression.ts, node scripts/test-catalog-lanes.mjs, node scripts/validate-package-locales.mjs, node scripts/validate-catalog.mjs, node scripts/tests/catalog-generatedat-determinism.regression.mjs, node tests/world-maps-ui-contract.regression.mjs, node tests/long-term-memory-feedback-clarity-ui.regression.mjs, node scripts/validate-pr-triage.mjs, node scripts/test-owner-approval.mjs, and git diff --check "origin/staging...HEAD" (the three-dot form the workflow uses — empty). npm run test:security fails on Windows only and for an unrelated reason: scripts/tests/catalog-path-safety.regression.mjs:15 compares resolve("/tmp/package"), which prepends the current drive letter on Windows, against join(…), which does not. That file does not reference this package. Install path. 1.2.0 is not published yet, so it could not be exercised through Download Agents: it was installed into the Engine's package store and activated after a restart, which covers activation, route registration and the client bundle, but not the download and checksum steps. That is why the box above is left unticked. The earlier 1.0.0 was installed through that full path from the official staging catalog, and the payload committed here is byte-identical to the one that was played — built, installed and committed hashes match for all four files. Routes. The server registers 51 routes on activation, and the package's own contract test compares that set against the declared one in both directions, so a route cannot survive by accident or go missing unnoticed. **Story, exercised over its own HTTP routes on an existing world:** - POST /chapter-plan forged a chapter — 10 nodes, 7 story and 3 combat — from the world's premise and cast. - POST /story/start charged 5 Vigor (61 → 56). - POST /beat returned the beat as 79 segments / 1,156 words, reporting 1,623 context tokens against the configured threshold. - POST /complete paid +150 commander XP (rank 2 → 3), raised the Vigor ceiling 61 → 62 and paid 500 Funds, with the before-value travelling alongside so the result screen can animate it. - POST /battle set up a chapter fight, 3 against 2, with its objective and opening line, and POST /battle/start charged 8 Vigor (56 → 48). The reworked screens were re-measured on the built module inside the real shell, with the header hoisted as the game hoists it, across window sizes and all five interface-text steps: the screen itself never scrolls, nothing clips, and the tier cards of the three stage plates come out the same height at every step. Modes and surface. The package contributes a Home browser tab and declares conversation, roleplay and game. Uninstall was exercised by removing the package from the Engine's installed set and restarting: the client bundle and every package route answered 404 and the tab was gone. Worlds stayed in capability storage and came back intact on reinstall, which is the intended behaviour for a game mode. ## Documentation impact - [ ] No documentation changes needed - [x] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) <img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/eaea0e7c-935e-4e52-aaa4-21c5c197bc4f" /> <img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/9f28a677-b560-49c7-9172-3a7f8d13eb3b" /> <img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/2f1b8c1a-08cf-410c-9797-5e3c31e12d44" /> <img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/a09dafaa-e2ef-49e5-ab9e-4eb7db66f150" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Gacha Forge 1.2.0 adds narrated visual-novel story chapters and expanded story content. - Updated rewards, materials layout, narration-backlog colors, and farming progression details. - **Availability** - Gacha Forge is available in staging catalogs for testing and excluded from the stable catalog. - Equipment, relics, inventory, events, and select farming stages remain locked. - **Documentation** - Updated package descriptions and catalog information for the new version and staging-only availability. - **Catalog Updates** - The stable catalog now lists 36 first-party packages and 19 Misc Agents. <!-- 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-20 17:33: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#1027
No description provided.