[PR #1633] [MERGED] fix(gacha-forge): repair story music and choice pre-generation #1635

Closed
opened 2026-10-25 04:02:20 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: fix/gacha-audio-notice-1628


📝 Commits (6)

  • 7968153 fix(gacha-forge): ship click-through audio notices as 1.12.1
  • 4ea94b7 fix(gacha-forge): retain audio notices while reading with keyboard focus
  • fe8c110 test(gacha-forge): settle notice fixture layout before freezing time
  • 214e7d1 test(gacha-forge): use supported native scrolling in mobile WebKit
  • f21a373 fix(gacha-forge): route story music and pre-generate past small choices
  • 07e0400 fix(gacha-forge): remeasure audio notices and restore dismissal

📊 Changes

19 files changed (+726 additions, -116 deletions)

View changed files

➕ artifacts/gacha-forge-1.12.1.zip (+0 -0)
📝 catalog/catalog.json (+9 -9)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+9 -9)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+9 -9)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/gacha-forge/CHANGELOG.md (+9 -0)
📝 packages/gacha-forge/README.md (+4 -2)
📝 packages/gacha-forge/bundle-patches.json (+24 -0)
📝 packages/gacha-forge/client.js (+66 -14)
📝 packages/gacha-forge/manifest.json (+6 -6)
📝 packages/gacha-forge/server.mjs (+11 -9)
📝 packages/gacha-forge/src/audio-client.mjs (+63 -11)
📝 packages/gacha-forge/src/browser-presentation.mjs (+1 -1)
📝 packages/gacha-forge/src/player-choices-server.mjs (+10 -8)
📝 tests/gacha-forge-audio.regression.mjs (+160 -5)
📝 tests/gacha-forge-player-choices.regression.mjs (+133 -15)
📝 tests/package-gacha-forge-audio.e2e.ts (+194 -0)

📄 Description

Linked issue

Closes #1628. Closes #1634. Closes #1635. @SpicyMarinara / Codex owns this work.

Why this change

Chapters and Character Stories incorrectly resolve to the Home audio cue, so they reuse its song. An unanswered small choice also blocks later shared narration, although all its alternatives are already stored. Audio notices can intercept game taps or lose scrolling and dismissal after layout or text changes.

What changed

  • Select music from the actual ready scene: Home, story mood, Character Story, combat or boss. Keep the current track during loading and prevent stale scenes from submitting generation requests.
  • Generate later shared sections before small choices are selected. Keep first canon, replay alternatives, ordered selection, big-choice locks and safe completion/compression.
  • Let short notices pass taps through; remeasure scrolling after visibility or layout changes. Pause dismissal for focused overflowing content and restore it when a long reason becomes short.
  • Rebuild Gacha Forge 1.12.1, its manifest, archive, catalogs and release notes. Preserve every previously published archive.

Each small choice's alternatives and shared continuation are written together in one section response. Playback waits for the player and then uses the stored branch. Chapters are still written in sections. A big choice remains the final beat and blocks future generation until selected. Music is cached per world, connection and cue; this does not add a new song for every beat.

Package and security impact

  • Package: gacha-forge 1.12.1; no new permissions, entrypoints or storage format.
  • Host contract remains Capability API 1.381; exact build/test baseline is Engine b9cc386e868d8ab9cdb4826939323a67d464e7bf.
  • Existing worlds retain settings, claims and progress. Update the installed package through Download Agents.

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 package through Marinara Engine
  • Checked supported modes, restart behavior and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Automated evidence for final head 07e0400e3878946af374e05b2156eb9b26d108cb:

  • Official builder, npm run check, git diff --check and all 62/62 CI commands pass.
  • Local CodeRabbit completed with zero findings for the story/choice changes at f21a373c and the final notice repair at 07e0400e; both substantive review logs are retained.
  • Fresh 33/33 browser cases pass: eleven each on desktop Chromium, phone Chromium and phone WebKit, with zero skipped, flaky or unexpected cases. Includes actual story/bond navigation, stored choices, tap-through, hidden/revealed notice scrolling, layout changes, focused replacement dismissal and cleanup.
  • Exact-archive upgrades from both 1.12.0 and 1.11.1 pass, including genuine fresh-process offline restart, preserved world/settings/rewards and uninstall cleanup.
  • All 909 released archives are unchanged. All 247 payloads match the manifest and deterministic ZIP; all catalog aliases agree. Ledger undo/replay reproduces both bundles exactly.
  • Archive SHA-256: 5aa7a7a701504038aecd39637f4b9631103531cc24f1a61c3218eb9f39e18027 (7,931,914 bytes).
  • Both notice defects from the previous Dottore examination were reproduced and repaired. The unrelated indentation preference is non-blocking; _root is verified to be the component's actual ShadowRoot.

Reproduction, review and validation receipts. Earlier checkpoints and first failures remain separately labeled. Current hosted checks and Dottore must pass before merge.

Manual verification notes

  • Manually verify separate Home, happy/tense/sad and Character Story music on a real phone.
  • Manually verify small-choice replay plays stored alternatives without a model request, while big choices remain irreversible.
  • Manually verify notice tap-through, native scrolling, focused reading and dismissal on a real phone.

Documentation impact

  • Updated package README, changelog and catalog release notes

Engine user documentation is unchanged.

UI evidence

The proof packet identifies project reports, screenshots, traces and exact source/archive hashes. Browser phone emulation does not establish physical-device or touch-gesture behavior. The browser audio fixtures use local assets and mocked requests; no additional paid provider calls were made and no API key is included.


🔄 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/1633 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/23/2026 **Status:** ✅ Merged **Merged:** 10/24/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/gacha-audio-notice-1628` --- ### 📝 Commits (6) - [`7968153`](https://github.com/Pasta-Devs/Marinara-Agents/commit/79681531f6c566afbde4256f2792f857cd58b016) fix(gacha-forge): ship click-through audio notices as 1.12.1 - [`4ea94b7`](https://github.com/Pasta-Devs/Marinara-Agents/commit/4ea94b76d937ae94eb20a06ecc4643fe281447e8) fix(gacha-forge): retain audio notices while reading with keyboard focus - [`fe8c110`](https://github.com/Pasta-Devs/Marinara-Agents/commit/fe8c1106a5d3049b7d1d31cdb1c67acea9d07684) test(gacha-forge): settle notice fixture layout before freezing time - [`214e7d1`](https://github.com/Pasta-Devs/Marinara-Agents/commit/214e7d10f33a297ba46b773e554731392c9803cc) test(gacha-forge): use supported native scrolling in mobile WebKit - [`f21a373`](https://github.com/Pasta-Devs/Marinara-Agents/commit/f21a373cfb992d16c1e16418dd1b1c74e264a6d5) fix(gacha-forge): route story music and pre-generate past small choices - [`07e0400`](https://github.com/Pasta-Devs/Marinara-Agents/commit/07e0400e3878946af374e05b2156eb9b26d108cb) fix(gacha-forge): remeasure audio notices and restore dismissal ### 📊 Changes **19 files changed** (+726 additions, -116 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/gacha-forge-1.12.1.zip` (+0 -0) 📝 `catalog/catalog.json` (+9 -9) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+9 -9) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+9 -9) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/gacha-forge/CHANGELOG.md` (+9 -0) 📝 `packages/gacha-forge/README.md` (+4 -2) 📝 `packages/gacha-forge/bundle-patches.json` (+24 -0) 📝 `packages/gacha-forge/client.js` (+66 -14) 📝 `packages/gacha-forge/manifest.json` (+6 -6) 📝 `packages/gacha-forge/server.mjs` (+11 -9) 📝 `packages/gacha-forge/src/audio-client.mjs` (+63 -11) 📝 `packages/gacha-forge/src/browser-presentation.mjs` (+1 -1) 📝 `packages/gacha-forge/src/player-choices-server.mjs` (+10 -8) 📝 `tests/gacha-forge-audio.regression.mjs` (+160 -5) 📝 `tests/gacha-forge-player-choices.regression.mjs` (+133 -15) 📝 `tests/package-gacha-forge-audio.e2e.ts` (+194 -0) </details> ### 📄 Description ## Linked issue Closes #1628. Closes #1634. Closes #1635. @SpicyMarinara / Codex owns this work. ## Why this change Chapters and Character Stories incorrectly resolve to the Home audio cue, so they reuse its song. An unanswered small choice also blocks later shared narration, although all its alternatives are already stored. Audio notices can intercept game taps or lose scrolling and dismissal after layout or text changes. ## What changed - Select music from the actual ready scene: Home, story mood, Character Story, combat or boss. Keep the current track during loading and prevent stale scenes from submitting generation requests. - Generate later shared sections before small choices are selected. Keep first canon, replay alternatives, ordered selection, big-choice locks and safe completion/compression. - Let short notices pass taps through; remeasure scrolling after visibility or layout changes. Pause dismissal for focused overflowing content and restore it when a long reason becomes short. - Rebuild Gacha Forge 1.12.1, its manifest, archive, catalogs and release notes. Preserve every previously published archive. Each small choice's alternatives and shared continuation are written together in one section response. Playback waits for the player and then uses the stored branch. Chapters are still written in sections. A big choice remains the final beat and blocks future generation until selected. Music is cached per world, connection and cue; this does not add a new song for every beat. ## Package and security impact - Package: `gacha-forge` 1.12.1; no new permissions, entrypoints or storage format. - Host contract remains Capability API 1.381; exact build/test baseline is Engine `b9cc386e868d8ab9cdb4826939323a67d464e7bf`. - Existing worlds retain settings, claims and progress. Update the installed package through Download Agents. ## 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 package through Marinara Engine - [ ] Checked supported modes, restart behavior and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` Automated evidence for final head `07e0400e3878946af374e05b2156eb9b26d108cb`: - Official builder, `npm run check`, `git diff --check` and all **62/62 CI commands** pass. - Local CodeRabbit completed with zero findings for the story/choice changes at `f21a373c` and the final notice repair at `07e0400e`; both substantive review logs are retained. - Fresh **33/33** browser cases pass: eleven each on desktop Chromium, phone Chromium and phone WebKit, with zero skipped, flaky or unexpected cases. Includes actual story/bond navigation, stored choices, tap-through, hidden/revealed notice scrolling, layout changes, focused replacement dismissal and cleanup. - Exact-archive upgrades from both 1.12.0 and 1.11.1 pass, including genuine fresh-process offline restart, preserved world/settings/rewards and uninstall cleanup. - All 909 released archives are unchanged. All 247 payloads match the manifest and deterministic ZIP; all catalog aliases agree. Ledger undo/replay reproduces both bundles exactly. - Archive SHA-256: `5aa7a7a701504038aecd39637f4b9631103531cc24f1a61c3218eb9f39e18027` (7,931,914 bytes). - Both notice defects from the previous Dottore examination were reproduced and repaired. The unrelated indentation preference is non-blocking; `_root` is verified to be the component's actual ShadowRoot. [Reproduction, review and validation receipts](https://gist.github.com/SpicyMarinara/f20945cb1b0d55f2a206be067e095379). Earlier checkpoints and first failures remain separately labeled. Current hosted checks and Dottore must pass before merge. ### Manual verification notes - [ ] Manually verify separate Home, happy/tense/sad and Character Story music on a real phone. - [ ] Manually verify small-choice replay plays stored alternatives without a model request, while big choices remain irreversible. - [ ] Manually verify notice tap-through, native scrolling, focused reading and dismissal on a real phone. ## Documentation impact - [ ] Updated package README, changelog and catalog release notes Engine user documentation is unchanged. ## UI evidence The proof packet identifies project reports, screenshots, traces and exact source/archive hashes. Browser phone emulation does not establish physical-device or touch-gesture behavior. The browser audio fixtures use local assets and mocked requests; no additional paid provider calls were made and no API key is included. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-25 04:02:20 +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#1635
No description provided.