[PR #2070] [MERGED] fix(otome-forge): audit fixes and fewer wasted calls (0.6.27) #2102

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

📋 Pull Request Information

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

Base: staging ← Head: fix/otome-audit-server


📝 Commits (10+)

  • 54d7eee fix(otome-forge): two end-of-arc choices at once plan one arc and bring in one newcomer
  • f0a14c1 fix(otome-forge): daily messages wait for chapter 1, not the prologue
  • 5722988 fix(otome-forge): a cut-out refresh keeps showing the stickers she already has
  • 3fab788 fix(otome-forge): a story delete that stops part-way can be finished
  • 99ecbef fix(otome-forge): a story delete that stops for a restart still lets go of its images
  • 1e533de test(otome-forge): the cut-out refresh regression reports a failure instead of hanging
  • 5d292c2 fix(otome-forge): Close says to wait for his reply instead of "nothing to remember"
  • 9f7f4ca fix(otome-forge): every Album tab is reachable with a mouse
  • 52a23ec fix(otome-forge): the daily heartbeat no longer reads the phone and Home again for an old message
  • c518aa7 fix(otome-forge): a failed newcomer arc keeps their bible, and trying again reuses it

📊 Changes

42 files changed (+1150 additions, -489 deletions)

View changed files

➕ artifacts/otome-forge-0.6.27.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 (+7 -0)
📝 packages/otome-forge/README.md (+42 -40)
📝 packages/otome-forge/client.js (+51 -50)
📝 packages/otome-forge/manifest.json (+5 -5)
📝 packages/otome-forge/server.mjs (+133 -132)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/locales/en.json (+5 -2)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/phone/CloseAndRemember.tsx (+23 -9)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/phone/PhoneScreen.tsx (+11 -4)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/phone/Thread.tsx (+1 -1)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/story/StoryHome.tsx (+15 -4)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/theme/styles.ts (+6 -5)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/art/cg.ts (+44 -23)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/art/expressions.ts (+16 -9)

...and 22 more files

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

Why this change

An audit of Otome Hearth 0.6.23 found seven bugs and four wasted model or image calls. A second check confirmed each one.

What changed

Package: otome-forge (Otome Hearth) 0.6.27. Every fix has a test that fails without it and passes with it. No prompt wording changed.

Bugs

  • End-of-arc choice paid twice (story/chapters.ts). Two requests at once (a second tab, or a reload during the long arc plan) each paid for an arc plan, and for Someone new each wrote a newcomer. One love interest could stay in the cast with no arc to introduce them. startArc now runs as one task in the run's foreground queue. A second request waits, finds the arc planned, and gets "The next arc is already planned." without any model call.
  • Daily messages before chapter 1 (phone/daily.ts). Finishing the prologue counted as having met everyone, though no love interest appears in it. The prologue no longer counts.
  • Stickers vanishing during a cut-out refresh (art/stickers.ts). While an Engine update re-cut sticker backgrounds, painted stickers left the picker. As each came back, it showed "You unlocked a new sticker". Now the old cut-out keeps showing until the new one is ready, the same rule stage art follows.
  • A story delete that stops partway (routes/runs.ts). The index entry went first and the images went last, so a delete that stopped left documents and gallery images behind, and deleting again answered 404. Now:
    • the story stays listed until the sweep finishes, so deleting again finishes it;
    • each document's images are deleted as that document goes, so a restart mid-sweep orphans at most one document's images. A ponytail: comment names that ceiling.
  • Album tabs out of reach with a mouse (theme/styles.ts). Favourite lines, Soundtrack and Tells sat past a strip with a hidden scrollbar. With a mouse they now wrap, as Settings' tabs already did; touch scrolling is unchanged.
  • Extra refresh on open (screens/phone/PhoneScreen.tsx). The first daily-message check after opening refetched the phone, Home and a thread for a message already seen.
  • Close tooltip (screens/phone/CloseAndRemember.tsx, Thread.tsx). While a reply is on its way, Close now says to wait for the reply, not "There is nothing new to remember yet."

Wasted calls

  • A newcomer whose arc plan fails keeps their character sheet (story/introduce.ts). Trying again with the same card reuses the sheet instead of paying for a new one. While out of the cast, that newcomer is no love interest to summaries, faces or sheet edits.
  • A scene written ahead pays for its CG only once it is shown (story/beats.ts). An Ease off or Rewrite that drops it wastes no image. The Ease off dialog and the Rewrite tooltip now state their real cost.
  • A connection that refuses JSON mode is no longer sent it on every call (generation.ts). The refusal is remembered per connection and model until Marinara Engine restarts.
  • Cost notes count 2 calls where 2 are made: the first chapter of an arc, and Meet someone new. The README cost table matches.

Release: 0.6.27 with a CHANGELOG entry. The branch is merged with staging 0.6.26, so it builds on the one-file prompts and the #2061 writing rules. The rebuilt server.mjs, client.js, manifest, preview catalogs and artifacts/otome-forge-0.6.27.zip agree.

Package and security impact

  • Affected package IDs: otome-forge (0.6.26 → 0.6.27).
  • Engine compatibility impact: none.
  • New or changed permissions/entrypoints: none.
  • Restart, storage, update, or uninstall impact:
    • A newcomer whose arc failed now stays as a stored unit outside the cast, instead of being deleted.
    • Stories half-deleted by an older version are still not reconciled.

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:

  • Regression suites: all 631 Otome TypeScript regressions and 12 .mjs regressions pass on the branch merged with staging.
  • Other checks: 0 strict typecheck errors; both locale validators, Prettier and git diff --check pass.
  • Proofs: each fix was checked by reverse-applying only its diff: its test failed, then passed when re-applied.
  • Browser: the full package browser suite is running on 0.6.27, on desktop and mobile Chromium. Claw (10), connection (2), home (38) and loop (4) have passed; the rest will be posted below.
  • Reviews: independent reviews of the bug fixes and the wasted-call fixes found five defects, all fixed with proofs. They covered:
    • a restart during a story delete;
    • a regression that could hang;
    • a served scene's CG record written after it answered;
    • an out-of-cast newcomer leaking into summaries;
    • the JSON-mode memory needing the model as well as the connection.

For a human to verify:

  • Finish an arc and tap a way on, for example Someone new. While the arc is planned, go to Home and back, then tap again. Manually verify only one arc and one newcomer appear.
  • Start a story with Messages a day above 0 and read only the prologue. Manually verify no love interest texts for 2+ minutes, and that daily messages arrive after chapter 1.
  • On a PC with a mouse, manually verify every Album tab can be reached and opened.
  • In a love interest's thread, send a message and hover Close while his reply is coming. Manually verify it says to wait for his reply.
  • With images on, read a scene whose next scene has a key moment. While still on the first scene, manually verify the gallery shows no CG for the next one yet. Ease off, open the next scene, and verify its CG is painted once.
  • On an OpenAI-compatible connection that refuses JSON mode, play two scenes with debug on. Manually verify the "retrying once without the JSON hint" line appears only for the first call.
  • Delete a story from the picker. Manually verify it disappears and its portraits and CGs leave the Global Gallery.

Documentation impact

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

The package README (Ease off, the cost table, the JSON-mode note) and the CHANGELOG describe the changes.

🤖 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/2070 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/otome-audit-server` --- ### 📝 Commits (10+) - [`54d7eee`](https://github.com/Pasta-Devs/Marinara-Agents/commit/54d7eeebeda452c163f0f9669c3cb9d99639ce5b) fix(otome-forge): two end-of-arc choices at once plan one arc and bring in one newcomer - [`f0a14c1`](https://github.com/Pasta-Devs/Marinara-Agents/commit/f0a14c17fef3101d7b6b93d2767aa47e3d13111d) fix(otome-forge): daily messages wait for chapter 1, not the prologue - [`5722988`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5722988f1a6e0bdfccf8315ededd1847a796523e) fix(otome-forge): a cut-out refresh keeps showing the stickers she already has - [`3fab788`](https://github.com/Pasta-Devs/Marinara-Agents/commit/3fab788a8acd5128d69684e4b4b8764161734e58) fix(otome-forge): a story delete that stops part-way can be finished - [`99ecbef`](https://github.com/Pasta-Devs/Marinara-Agents/commit/99ecbef6cce71b98524f52630d1ee8c9d0acf5f6) fix(otome-forge): a story delete that stops for a restart still lets go of its images - [`1e533de`](https://github.com/Pasta-Devs/Marinara-Agents/commit/1e533ded7ab87578dd0b7131014548e31d788714) test(otome-forge): the cut-out refresh regression reports a failure instead of hanging - [`5d292c2`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5d292c25e9e46232aa67b175e6777b67555daf89) fix(otome-forge): Close says to wait for his reply instead of "nothing to remember" - [`9f7f4ca`](https://github.com/Pasta-Devs/Marinara-Agents/commit/9f7f4ca2199230def3764a8eb72b3f2885ba3a49) fix(otome-forge): every Album tab is reachable with a mouse - [`52a23ec`](https://github.com/Pasta-Devs/Marinara-Agents/commit/52a23ecbc194aa054573d313f9ba9787e4c2a11a) fix(otome-forge): the daily heartbeat no longer reads the phone and Home again for an old message - [`c518aa7`](https://github.com/Pasta-Devs/Marinara-Agents/commit/c518aa7c619b9272bf9b376b44bd37405dcee9d8) fix(otome-forge): a failed newcomer arc keeps their bible, and trying again reuses it ### 📊 Changes **42 files changed** (+1150 additions, -489 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/otome-forge-0.6.27.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` (+7 -0) 📝 `packages/otome-forge/README.md` (+42 -40) 📝 `packages/otome-forge/client.js` (+51 -50) 📝 `packages/otome-forge/manifest.json` (+5 -5) 📝 `packages/otome-forge/server.mjs` (+133 -132) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/locales/en.json` (+5 -2) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/phone/CloseAndRemember.tsx` (+23 -9) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/phone/PhoneScreen.tsx` (+11 -4) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/phone/Thread.tsx` (+1 -1) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/story/StoryHome.tsx` (+15 -4) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/theme/styles.ts` (+6 -5) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/art/cg.ts` (+44 -23) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/art/expressions.ts` (+16 -9) _...and 22 more files_ </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 #2065 ## Why this change An audit of Otome Hearth 0.6.23 found seven bugs and four wasted model or image calls. A second check confirmed each one. ## What changed Package: `otome-forge` (Otome Hearth) **0.6.27**. Every fix has a test that fails without it and passes with it. No prompt wording changed. **Bugs** - **End-of-arc choice paid twice** (`story/chapters.ts`). Two requests at once (a second tab, or a reload during the long arc plan) each paid for an arc plan, and for Someone new each wrote a newcomer. One love interest could stay in the cast with no arc to introduce them. `startArc` now runs as one task in the run's foreground queue. A second request waits, finds the arc planned, and gets "The next arc is already planned." without any model call. - **Daily messages before chapter 1** (`phone/daily.ts`). Finishing the prologue counted as having met everyone, though no love interest appears in it. The prologue no longer counts. - **Stickers vanishing during a cut-out refresh** (`art/stickers.ts`). While an Engine update re-cut sticker backgrounds, painted stickers left the picker. As each came back, it showed "You unlocked a new sticker". Now the old cut-out keeps showing until the new one is ready, the same rule stage art follows. - **A story delete that stops partway** (`routes/runs.ts`). The index entry went first and the images went last, so a delete that stopped left documents and gallery images behind, and deleting again answered 404. Now: - the story stays listed until the sweep finishes, so deleting again finishes it; - each document's images are deleted as that document goes, so a restart mid-sweep orphans at most one document's images. A `ponytail:` comment names that ceiling. - **Album tabs out of reach with a mouse** (`theme/styles.ts`). Favourite lines, Soundtrack and Tells sat past a strip with a hidden scrollbar. With a mouse they now wrap, as Settings' tabs already did; touch scrolling is unchanged. - **Extra refresh on open** (`screens/phone/PhoneScreen.tsx`). The first daily-message check after opening refetched the phone, Home and a thread for a message already seen. - **Close tooltip** (`screens/phone/CloseAndRemember.tsx`, `Thread.tsx`). While a reply is on its way, Close now says to wait for the reply, not "There is nothing new to remember yet." **Wasted calls** - **A newcomer whose arc plan fails keeps their character sheet** (`story/introduce.ts`). Trying again with the same card reuses the sheet instead of paying for a new one. While out of the cast, that newcomer is no love interest to summaries, faces or sheet edits. - **A scene written ahead pays for its CG only once it is shown** (`story/beats.ts`). An Ease off or Rewrite that drops it wastes no image. The Ease off dialog and the Rewrite tooltip now state their real cost. - **A connection that refuses JSON mode is no longer sent it on every call** (`generation.ts`). The refusal is remembered per connection and model until Marinara Engine restarts. - **Cost notes count 2 calls where 2 are made**: the first chapter of an arc, and Meet someone new. The README cost table matches. **Release:** 0.6.27 with a CHANGELOG entry. The branch is merged with staging 0.6.26, so it builds on the one-file prompts and the #2061 writing rules. The rebuilt `server.mjs`, `client.js`, manifest, preview catalogs and `artifacts/otome-forge-0.6.27.zip` agree. ## Package and security impact - Affected package IDs: `otome-forge` (0.6.26 → 0.6.27). - Engine compatibility impact: none. - New or changed permissions/entrypoints: none. - Restart, storage, update, or uninstall impact: - A newcomer whose arc failed now stays as a stored unit outside the cast, instead of being deleted. - Stories half-deleted by an older version are still not reconciled. ## 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: - **Regression suites:** all 631 Otome TypeScript regressions and 12 `.mjs` regressions pass on the branch merged with staging. - **Other checks:** 0 strict typecheck errors; both locale validators, Prettier and `git diff --check` pass. - **Proofs:** each fix was checked by reverse-applying only its diff: its test failed, then passed when re-applied. - **Browser:** the full package browser suite is running on 0.6.27, on desktop and mobile Chromium. Claw (10), connection (2), home (38) and loop (4) have passed; the rest will be posted below. - **Reviews:** independent reviews of the bug fixes and the wasted-call fixes found five defects, all fixed with proofs. They covered: - a restart during a story delete; - a regression that could hang; - a served scene's CG record written after it answered; - an out-of-cast newcomer leaking into summaries; - the JSON-mode memory needing the model as well as the connection. For a human to verify: - Finish an arc and tap a way on, for example Someone new. While the arc is planned, go to Home and back, then tap again. Manually verify only one arc and one newcomer appear. - Start a story with Messages a day above 0 and read only the prologue. Manually verify no love interest texts for 2+ minutes, and that daily messages arrive after chapter 1. - On a PC with a mouse, manually verify every Album tab can be reached and opened. - In a love interest's thread, send a message and hover Close while his reply is coming. Manually verify it says to wait for his reply. - With images on, read a scene whose next scene has a key moment. While still on the first scene, manually verify the gallery shows no CG for the next one yet. Ease off, open the next scene, and verify its CG is painted once. - On an OpenAI-compatible connection that refuses JSON mode, play two scenes with debug on. Manually verify the "retrying once without the JSON hint" line appears only for the first call. - Delete a story from the picker. Manually verify it disappears and its portraits and CGs leave the Global Gallery. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation The package README (Ease off, the cost table, the JSON-mode note) and the CHANGELOG describe the changes. 🤖 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:30 +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#2102
No description provided.