[PR #2027] [MERGED] fix(otome-forge): a love interest's sprite leaves the stage when he does (0.6.13) #2080

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/2027
Author: @SpicyMarinara
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/otome-stage-leaves-2024


📝 Commits (1)

  • 2231a0e fix(otome-forge): a love interest's sprite leaves the stage when he does (0.6.13)

📊 Changes

19 files changed (+415 additions, -172 deletions)

View changed files

➕ artifacts/otome-forge-0.6.13.zip (+0 -0)
📝 catalog/preview/catalog.json (+8 -8)
📝 catalog/preview/notes.json (+6 -6)
📝 catalog/preview/v2/catalog.json (+8 -8)
📝 catalog/preview/v2/notes.json (+6 -6)
📝 catalog/preview/v3/catalog.json (+8 -8)
📝 catalog/preview/v3/notes.json (+6 -6)
📝 packages/otome-forge/CHANGELOG.md (+4 -0)
📝 packages/otome-forge/client.js (+1 -1)
📝 packages/otome-forge/manifest.json (+5 -5)
📝 packages/otome-forge/server.mjs (+109 -109)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/lib/reader-state.ts (+9 -4)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/shared/api-types.ts (+5 -0)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/schemas/story.ts (+1 -0)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/story/beats.ts (+15 -2)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/story/prompts.ts (+7 -0)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/otome-forge-sfw-defaults.regression.ts (+10 -8)
➕ tests/otome-forge-stage-exits.regression.ts (+206 -0)

📄 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 #2024

Why this change

  • In an Otome Hearth story scene, the stage kept showing whichever love interest spoke last until the end of the beat. After he walked out, or the heroine left him and was alone, his sprite stayed on screen as if he were still there. Nothing in a scene recorded that someone had left, so the reader had no way to clear the stage.

What changed

  • Otome Hearth 0.6.13 (otome-forge).
  • Writer: segments get an optional exits list. The scene, Confrontation and Closer writers fill it in on the line where love interests leave the scene, or where the protagonist leaves them behind. This comes from one shared prompt line, with no content wording added.
  • Server: normalizeBeatBody keeps only known love interests, matched by id, full name or first name the same way speakers are. It stores them as ids, once each, and leaves the field out when nothing is left. Choice branches, Confrontations and Closers all go through the same normalizer.
  • Reader: onStageAt skips anyone who has left since they last spoke. He stays on stage for his own exit line, is gone after it, and comes back when he speaks again. Anyone still in the scene stays on stage.
  • Compatibility: beats stored before this update read back unchanged and keep their old staging. An older package version drops the unknown field, so downgrading is safe.
  • Tests: new tests/otome-forge-stage-exits.regression.ts covers the reader, the server normalizer, stored beats and the three writers. 6 of its 7 tests fail on the old code. The 7th pins the no-exits behaviour and passes both ways on purpose. The SFW story-prompt digests in tests/otome-forge-sfw-defaults.regression.ts were retaken for beat, beatWithCg, Confrontation and Closer, in both Angst and Gentle.
  • Rebuilt client.js, server.mjs, the manifest, artifacts/otome-forge-0.6.13.zip and the preview catalog entries.

Package and security impact

  • Affected package IDs: otome-forge
  • Engine compatibility impact: none
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: new beats may store an optional exits id list per segment. Nothing is migrated, and older beats are 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

Manual verification notes

What the agent ran locally:

  • npm run test:otome-forge passed: 547/547 TS regressions and 12/12 MJS regressions, including the server-bundle snapshot.
  • The strict package typecheck, npm run format:check, eslint on the changed files and git diff --check all pass.
  • The browser specs package-otome-forge-reader.e2e.ts and package-otome-forge-loop.e2e.ts passed 54/54 on desktop and mobile Chromium.
  • An independent review agent widened the exit rule to cover the protagonist leaving, not only the love interest. Local CodeRabbit then reported 0 findings.
  • validate-catalog.mjs could not run in this sparse worktree because the older artifacts aren't checked out. The required Catalog validation check covers it in CI.

For a human to verify:

  • Manually verify in the browser, after updating, that a newly written scene where a love interest walks out shows an empty stage once he leaves, and shows his sprite again if he speaks later in the same beat.
  • Manually verify that in a scene with two love interests, the one who stays remains on stage after the other leaves.
  • Manually verify that a scene written before this update still shows the last speaker as before.
  • Manually check a few real model replies, in the debug prompt log or the stored beat, to confirm the writer actually fills in exits on exit lines. How well this works depends on the model following that one instruction.

Documentation impact

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

UI evidence (if applicable)

  • Behaviour change in the reader's stage. Covered by the regression tests; no new UI.

🤖 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/2027 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/otome-stage-leaves-2024` --- ### 📝 Commits (1) - [`2231a0e`](https://github.com/Pasta-Devs/Marinara-Agents/commit/2231a0e5e2a87da20a3f907e66df6e92d8d55ee2) fix(otome-forge): a love interest's sprite leaves the stage when he does (0.6.13) ### 📊 Changes **19 files changed** (+415 additions, -172 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/otome-forge-0.6.13.zip` (+0 -0) 📝 `catalog/preview/catalog.json` (+8 -8) 📝 `catalog/preview/notes.json` (+6 -6) 📝 `catalog/preview/v2/catalog.json` (+8 -8) 📝 `catalog/preview/v2/notes.json` (+6 -6) 📝 `catalog/preview/v3/catalog.json` (+8 -8) 📝 `catalog/preview/v3/notes.json` (+6 -6) 📝 `packages/otome-forge/CHANGELOG.md` (+4 -0) 📝 `packages/otome-forge/client.js` (+1 -1) 📝 `packages/otome-forge/manifest.json` (+5 -5) 📝 `packages/otome-forge/server.mjs` (+109 -109) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/lib/reader-state.ts` (+9 -4) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/shared/api-types.ts` (+5 -0) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/schemas/story.ts` (+1 -0) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/story/beats.ts` (+15 -2) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/story/prompts.ts` (+7 -0) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/otome-forge-sfw-defaults.regression.ts` (+10 -8) ➕ `tests/otome-forge-stage-exits.regression.ts` (+206 -0) </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 #2024 ## Why this change - In an Otome Hearth story scene, the stage kept showing whichever love interest spoke last until the end of the beat. After he walked out, or the heroine left him and was alone, his sprite stayed on screen as if he were still there. Nothing in a scene recorded that someone had left, so the reader had no way to clear the stage. ## What changed - **Otome Hearth 0.6.13** (`otome-forge`). - **Writer:** segments get an optional `exits` list. The scene, Confrontation and Closer writers fill it in on the line where love interests leave the scene, or where the protagonist leaves them behind. This comes from one shared prompt line, with no content wording added. - **Server:** `normalizeBeatBody` keeps only known love interests, matched by id, full name or first name the same way speakers are. It stores them as ids, once each, and leaves the field out when nothing is left. Choice branches, Confrontations and Closers all go through the same normalizer. - **Reader:** `onStageAt` skips anyone who has left since they last spoke. He stays on stage for his own exit line, is gone after it, and comes back when he speaks again. Anyone still in the scene stays on stage. - **Compatibility:** beats stored before this update read back unchanged and keep their old staging. An older package version drops the unknown field, so downgrading is safe. - **Tests:** new `tests/otome-forge-stage-exits.regression.ts` covers the reader, the server normalizer, stored beats and the three writers. 6 of its 7 tests fail on the old code. The 7th pins the no-exits behaviour and passes both ways on purpose. The SFW story-prompt digests in `tests/otome-forge-sfw-defaults.regression.ts` were retaken for beat, beatWithCg, Confrontation and Closer, in both Angst and Gentle. - Rebuilt `client.js`, `server.mjs`, the manifest, `artifacts/otome-forge-0.6.13.zip` and the preview catalog entries. ## Package and security impact - Affected package IDs: `otome-forge` - Engine compatibility impact: none - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: new beats may store an optional `exits` id list per segment. Nothing is migrated, and older beats are unchanged. ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [ ] `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 What the agent ran locally: - `npm run test:otome-forge` passed: 547/547 TS regressions and 12/12 MJS regressions, including the server-bundle snapshot. - The strict package typecheck, `npm run format:check`, eslint on the changed files and `git diff --check` all pass. - The browser specs `package-otome-forge-reader.e2e.ts` and `package-otome-forge-loop.e2e.ts` passed 54/54 on desktop and mobile Chromium. - An independent review agent widened the exit rule to cover the protagonist leaving, not only the love interest. Local CodeRabbit then reported 0 findings. - `validate-catalog.mjs` could not run in this sparse worktree because the older artifacts aren't checked out. The required Catalog validation check covers it in CI. For a human to verify: - Manually verify in the browser, after updating, that a newly written scene where a love interest walks out shows an empty stage once he leaves, and shows his sprite again if he speaks later in the same beat. - Manually verify that in a scene with two love interests, the one who stays remains on stage after the other leaves. - Manually verify that a scene written before this update still shows the last speaker as before. - Manually check a few real model replies, in the debug prompt log or the stored beat, to confirm the writer actually fills in `exits` on exit lines. How well this works depends on the model following that one instruction. ## Documentation impact - [x] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) - Behaviour change in the reader's stage. Covered by the regression tests; no new UI. 🤖 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:39: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#2080
No description provided.