[PR #1691] feat(gacha-forge): regenerate one ongoing chapter after confirmation #1675

Open
opened 2026-10-26 04:02:39 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1691
Author: @SpicyMarinara
Created: 10/25/2026
Status: 🔄 Open

Base: staging ← Head: feat/1690-ongoing-chapter-regeneration


📝 Commits (10+)

  • e682913 chore(gacha-forge): start portrait and banner recovery fixes
  • 74e14d8 fix(gacha-forge): recover portrait and banner media states
  • 17cc19b Merge staging Noodle delivery into Gacha media repair
  • 896d165 feat(gacha-forge): add draining story reset barrier
  • 5df88ce fix(gacha-forge): retain character chats and authored story canon
  • b91c6d7 feat(gacha-forge): add draining story reset barrier
  • 7d00188 feat(gacha-forge): reset only eligible chapter documents atomically
  • 899eee5 Merge branch 'staging' into feat/1690-ongoing-chapter-regeneration
  • 69353f3 feat(gacha-forge): confirm resets and fence detached story work
  • d4fff42 Merge remote feature staging update without losing reset work

📊 Changes

41 files changed (+4813 additions, -262 deletions)

View changed files

📝 .github/workflows/pull-request-checks.yml (+3 -0)
➕ artifacts/gacha-forge-1.16.1.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 (+9 -0)
📝 packages/gacha-forge/README.md (+18 -2)
📝 packages/gacha-forge/bundle-patches.json (+135 -0)
📝 packages/gacha-forge/client.js (+248 -50)
📝 packages/gacha-forge/manifest.json (+5 -5)
📝 packages/gacha-forge/server.mjs (+190 -43)
📝 packages/gacha-forge/src/animation-client.mjs (+58 -38)
📝 packages/gacha-forge/src/animation-en.mjs (+1 -0)
📝 packages/gacha-forge/src/animation-server.mjs (+42 -30)
📝 packages/gacha-forge/src/browser-presentation.mjs (+22 -9)
➕ packages/gacha-forge/src/chapter-regeneration-client.mjs (+288 -0)
➕ packages/gacha-forge/src/chapter-regeneration-en.mjs (+18 -0)

...and 21 more files

📄 Description

Pull request

Linked issue

Closes #1690
Depends on #1682. This separate feature must not merge before the critical chat/portrait/banner repair. Owner: @SpicyMarinara / Codex.

Why this change

A chapter that contradicts character canon needs an explicit way to start over without deleting the world or rewriting completed stories. The action must discard only one ongoing chapter after confirmation, while preventing older background work from restoring the discarded version.

What changed

  • Maintained source now provides an explicit bottom action and named confirmation for one ongoing chapter or current open Character Story; completed stories are rejected and an open Character Story keeps the existing main-chapter restriction.
  • Extend the existing story cancellation scope with reset admission, actual operation/write draining and stale-request fencing. Use the public Engine persistence transaction for selected documents, rewindable progress and retained first-clear reward checkpoints.
  • Preserve completed raw stories, independent conversation canon, authored cards and inventory. Invalidate only selected or overlapping derived summaries. Keep ordinary Vigor costs and higher-difficulty rewards.
  • Work in progress: wire these sources into the package routes/UI and build Gacha Forge 1.17.0 after #1682 lands and this branch is rebased on staging. Runtime package/browser/installation validation and final review remain unfinished.

Package and security impact

  • Affected package IDs: gacha-forge, planned 1.17.0.
  • Engine compatibility impact: reuse the existing public persistence transaction contract; no new host API planned.
  • New or changed permissions/entrypoints: none planned; executable package code will change.
  • Restart, storage, update, or uninstall impact: existing package restart flow. No chapter resets during installation/update; only explicit confirmed user action may reset one ongoing story. Completed content, independent conversations, authored cards and inventory must remain preserved.

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

  • Source regressions: barrier 9/9, scoped transaction/reward/eligibility 12/12 and confirmation/client fencing 10/10 passed. Existing memory integration 16/16 and story-cancel client regression also passed.
  • npm run check passed at the source checkpoint with 0 errors and repository warnings; focused owned-file ESLint and Prettier passed after the latest hardening. Final full checks repeat after runtime integration.
  • Disposable Engine real-persistence proof: a mid-cleanup CAS conflict rolled every selected document and session change back; successful cleanup preserved completed content and wallet; closing/reopening the real file store retained exact committed records. This is public persistence-service proof, separate from the still-pending installed-package route and browser proof.
  • No paid provider calls or personal saved worlds were used. Final package validation, local CodeRabbit, installation/update/restart and desktop/mobile confirmation tests remain pending; physical mobile-device behavior is untested.

Documentation impact

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

Gacha package usage/release notes will describe the final confirmed-reset behavior and existing Vigor policy.

UI evidence (if applicable)

Pending implementation and browser proof. Physical mobile-device behavior remains untested.


🔄 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/1691 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/25/2026 **Status:** 🔄 Open **Base:** `staging` ← **Head:** `feat/1690-ongoing-chapter-regeneration` --- ### 📝 Commits (10+) - [`e682913`](https://github.com/Pasta-Devs/Marinara-Agents/commit/e682913277e5f91dc8fdc02c5380991a86ba24c5) chore(gacha-forge): start portrait and banner recovery fixes - [`74e14d8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/74e14d88a31cc07d7e265f52fcb464b3502c5d05) fix(gacha-forge): recover portrait and banner media states - [`17cc19b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/17cc19bb74dbf5eeb4d0a44f3624504e08811654) Merge staging Noodle delivery into Gacha media repair - [`896d165`](https://github.com/Pasta-Devs/Marinara-Agents/commit/896d165255a0e6d1536524cfb27064c5346a32b8) feat(gacha-forge): add draining story reset barrier - [`5df88ce`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5df88cedc2664318a3203ae0d302670375e208da) fix(gacha-forge): retain character chats and authored story canon - [`b91c6d7`](https://github.com/Pasta-Devs/Marinara-Agents/commit/b91c6d73fb98df88cab8dc5fdad440fc05fd4ebe) feat(gacha-forge): add draining story reset barrier - [`7d00188`](https://github.com/Pasta-Devs/Marinara-Agents/commit/7d001882fbf7eb7575bbbe1d8a7644f8517f23ca) feat(gacha-forge): reset only eligible chapter documents atomically - [`899eee5`](https://github.com/Pasta-Devs/Marinara-Agents/commit/899eee534b511b717de3c38808dd1b92610afb23) Merge branch 'staging' into feat/1690-ongoing-chapter-regeneration - [`69353f3`](https://github.com/Pasta-Devs/Marinara-Agents/commit/69353f306e27c70037d3adc8b718fa20b693bcfb) feat(gacha-forge): confirm resets and fence detached story work - [`d4fff42`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d4fff4207b0dc201636b93523b51c73f282c272e) Merge remote feature staging update without losing reset work ### 📊 Changes **41 files changed** (+4813 additions, -262 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pull-request-checks.yml` (+3 -0) ➕ `artifacts/gacha-forge-1.16.1.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` (+9 -0) 📝 `packages/gacha-forge/README.md` (+18 -2) 📝 `packages/gacha-forge/bundle-patches.json` (+135 -0) 📝 `packages/gacha-forge/client.js` (+248 -50) 📝 `packages/gacha-forge/manifest.json` (+5 -5) 📝 `packages/gacha-forge/server.mjs` (+190 -43) 📝 `packages/gacha-forge/src/animation-client.mjs` (+58 -38) 📝 `packages/gacha-forge/src/animation-en.mjs` (+1 -0) 📝 `packages/gacha-forge/src/animation-server.mjs` (+42 -30) 📝 `packages/gacha-forge/src/browser-presentation.mjs` (+22 -9) ➕ `packages/gacha-forge/src/chapter-regeneration-client.mjs` (+288 -0) ➕ `packages/gacha-forge/src/chapter-regeneration-en.mjs` (+18 -0) _...and 21 more files_ </details> ### 📄 Description # Pull request ## Linked issue Closes #1690 Depends on #1682. This separate feature must not merge before the critical chat/portrait/banner repair. Owner: @SpicyMarinara / Codex. ## Why this change A chapter that contradicts character canon needs an explicit way to start over without deleting the world or rewriting completed stories. The action must discard only one ongoing chapter after confirmation, while preventing older background work from restoring the discarded version. ## What changed - Maintained source now provides an explicit bottom action and named confirmation for one ongoing chapter or current open Character Story; completed stories are rejected and an open Character Story keeps the existing main-chapter restriction. - Extend the existing story cancellation scope with reset admission, actual operation/write draining and stale-request fencing. Use the public Engine persistence transaction for selected documents, rewindable progress and retained first-clear reward checkpoints. - Preserve completed raw stories, independent conversation canon, authored cards and inventory. Invalidate only selected or overlapping derived summaries. Keep ordinary Vigor costs and higher-difficulty rewards. - Work in progress: wire these sources into the package routes/UI and build Gacha Forge 1.17.0 after #1682 lands and this branch is rebased on staging. Runtime package/browser/installation validation and final review remain unfinished. ## Package and security impact - Affected package IDs: gacha-forge, planned 1.17.0. - Engine compatibility impact: reuse the existing public persistence transaction contract; no new host API planned. - New or changed permissions/entrypoints: none planned; executable package code will change. - Restart, storage, update, or uninstall impact: existing package restart flow. No chapter resets during installation/update; only explicit confirmed user action may reset one ongoing story. Completed content, independent conversations, authored cards and inventory must remain preserved. ## 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 - Source regressions: barrier 9/9, scoped transaction/reward/eligibility 12/12 and confirmation/client fencing 10/10 passed. Existing memory integration 16/16 and story-cancel client regression also passed. - `npm run check` passed at the source checkpoint with 0 errors and repository warnings; focused owned-file ESLint and Prettier passed after the latest hardening. Final full checks repeat after runtime integration. - Disposable Engine real-persistence proof: a mid-cleanup CAS conflict rolled every selected document and session change back; successful cleanup preserved completed content and wallet; closing/reopening the real file store retained exact committed records. This is public persistence-service proof, separate from the still-pending installed-package route and browser proof. - No paid provider calls or personal saved worlds were used. Final package validation, local CodeRabbit, installation/update/restart and desktop/mobile confirmation tests remain pending; physical mobile-device behavior is untested. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation Gacha package usage/release notes will describe the final confirmed-reset behavior and existing Vigor policy. ## UI evidence (if applicable) Pending implementation and browser proof. Physical mobile-device behavior remains untested. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#1675
No description provided.