[PR #1880] [MERGED] [WIP] fix(otome-forge): ground chapters in authored persona facts #2012

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

📋 Pull Request Information

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

Base: staging ← Head: fix/otome-persona-grounding


📝 Commits (10+)

  • 8fd26a6 fix(otome-forge): read authored persona story fields separately from image overrides
  • 719ea29 fix(otome-forge): refresh full authored persona grounding for story generation
  • 77d1a84 fix(otome-forge): treat authored persona fields as canon
  • dedc781 Merge commit '805a000dee' into fix/otome-persona-grounding
  • b5259c6 build(otome-forge): publish authored persona grounding in 0.1.9
  • faa486c Merge commit '9533ed2f9f' into fix/otome-persona-grounding
  • dbf730d Merge commit 'de2d6562b7' into fix/otome-persona-grounding
  • 2245ac3 build(otome-forge): include chapter replay cache repair in 0.1.9
  • bae72b8 Merge commit '018b407d4b' into fix/otome-persona-grounding
  • 2e06234 Merge remote-tracking branch 'origin/staging' into fix/otome-persona-grounding

📊 Changes

22 files changed (+314 additions, -146 deletions)

View changed files

➕ artifacts/otome-forge-0.1.9.zip (+0 -0)
📝 catalog/preview/catalog.json (+6 -6)
📝 catalog/preview/notes.json (+6 -0)
📝 catalog/preview/v2/catalog.json (+6 -6)
📝 catalog/preview/v2/notes.json (+6 -0)
📝 catalog/preview/v3/catalog.json (+6 -6)
📝 catalog/preview/v3/notes.json (+6 -0)
📝 packages/otome-forge/CHANGELOG.md (+4 -0)
📝 packages/otome-forge/README.md (+3 -2)
📝 packages/otome-forge/manifest.json (+3 -3)
📝 packages/otome-forge/server.mjs (+108 -106)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/shared/api-types.ts (+2 -2)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/minigames/date-night.ts (+2 -1)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/routes/runs.ts (+7 -7)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/schemas/player.ts (+4 -2)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/setup/forge.ts (+2 -1)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/setup/prompts.ts (+32 -0)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/story/beats.ts (+2 -1)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/story/chapters.ts (+4 -1)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/story/routes-plan.ts (+2 -1)

...and 2 more files

📄 Description

Linked issue

Closes #1879. Owner: @SpicyMarinara (Codex).

Why this change

Otome chapter and scene writers previously received only the persona’s Description. A missing Personality, Backstory or Appearance let the writer invent conflicting facts about the player’s character.

What changed

  • Send the selected persona’s complete authored Description, Personality, Backstory and Appearance through the existing shared protagonist context, with an explicit canon instruction. This grounds story writers, item stories/outfit reactions, phone replies, Home notes/touch lines, Caring messages and Read Him. Scenario, greetings, example dialogue and creator metadata are excluded.
  • Refresh the current selected persona for chapter plans, scenes, setup/cast bibles, routes/repairs and dates, including existing runs and edits made after a chapter was planned. An unavailable persona retains its own saved text; another persona is never substituted.
  • Keep authored story appearance separate from the existing image-only Appearance Override. Image generation still uses that override when enabled.
  • Rebuild Otome Hearth 0.1.9 through the supported builder, including server, manifest, archive and all preview catalogs. Client bytes remain identical to 0.1.8.

Package and security impact

  • Package: otome-forge 0.1.9; existing Engine >=2.5.1 <4.0.0 and Capability API 1.386 unchanged.
  • No new permissions, entrypoints, storage schema or provider calls. The existing saved persona text is refreshed as an own-run fallback.
  • The four authored fields are sent to the configured story model provider. Package README describes those fields and image override separation.

Validation

Passed: npm check (0 errors, 815 existing warnings), strict types (78 server/shared, 125 client files), all 399 regressions (394 TypeScript + 5 rebuilt-bundle smoke checks), catalog lanes, localization, catalog/archive validation, release notes and whitespace.

The source regressions first failed on existing-run chapter/scene requests without a prior UI read. They now verify complete long fields, current edits between chapter planning and scene writing, excluded roleplay/metadata fields, separate image overrides and own-persona fallback after missing or failed resource reads. Eleven focused persona/image regressions passed.

An independent temporary harness activated the exact compiled server and drove real chapter/scene handlers. The 0.1.8 server failed the full-field guard; 0.1.9 passes, including edits after planning and exclusion of image-only overrides. An initial test string ending in whitespace was corrected with an end sentinel to reflect the existing trim behavior; its first failure is retained. This proof uses controlled model replies, not a live provider.

Final local CodeRabbit at bae72b8b2 completed with zero findings across the changed text files, with the 0.1.8 frozen candidate as baseline. The actual 0.1.8 staging ancestry merge changed no tree bytes. A later disclosure-only review repair updates README/release-note text and their generated sidecars; all payload pins remain unchanged. Dottore’s initial LOW identified that the disclosure omitted other consumers of the shared protagonist context. All aboutLine/protagonistBlock callers were traced, including item/outfit prompts as well as phone, Home, care and Read Him. README and release notes now name every context and distinguish fresh story reads from the other prompts’ saved copy. No runtime change or new provider call was needed. CodeRabbit at 4d2447c69 reviewed all five documentation/sidecar changes with zero findings after one recorded temporary service quota rejection and its permitted retry.

Independent ZIP audit verifies payload bytes/hashes, exact safe membership, all preview pins and CRC.

  • Manually verify the original saved story’s persona facts with the configured model.
  • Manually verify Engine UI package update/restart and uninstall cleanup.
  • node scripts/validate-catalog.mjs passes locally.
  • git diff --check passes locally.

Manual verification notes

No physical-device, live-provider quality, or manual Download Agents lifecycle claim. No new visual controls. The source, compiled-handler and archive proof lives in /tmp/otome-019-*.

Documentation impact

Updated package README and 0.1.9 release notes. No Engine documentation changes.

ZIP SHA256: 21c1d085fee700b7095cc552f41ff7b940f44e4eda4ddbdaf306336e85ebc7ba (1,641,564 bytes). Server: 68c5e0cd9b6b8d88a2ddf7d03225ebbdbc67374b9b24b92800d4b4425786176a. Client unchanged from 0.1.8: 688196fa523f45315cda7f3d16401bd34014bc7388d3af6b45d420d2e8aced15.


🔄 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/1880 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/otome-persona-grounding` --- ### 📝 Commits (10+) - [`8fd26a6`](https://github.com/Pasta-Devs/Marinara-Agents/commit/8fd26a628ed919065e9cd56327cbfb73ecc0d20f) fix(otome-forge): read authored persona story fields separately from image overrides - [`719ea29`](https://github.com/Pasta-Devs/Marinara-Agents/commit/719ea293cc9fa4ba89cc66154bc330510665195b) fix(otome-forge): refresh full authored persona grounding for story generation - [`77d1a84`](https://github.com/Pasta-Devs/Marinara-Agents/commit/77d1a84ecf4063a02dd73a7225660cd3878c0b72) fix(otome-forge): treat authored persona fields as canon - [`dedc781`](https://github.com/Pasta-Devs/Marinara-Agents/commit/dedc7812a2c47d8812b6238bd3b9df4a2ea5e53a) Merge commit '805a000dee7edd4bd1b08b8af156704a415c1e29' into fix/otome-persona-grounding - [`b5259c6`](https://github.com/Pasta-Devs/Marinara-Agents/commit/b5259c631b3d860b893a6d1d6c367d8662db3a88) build(otome-forge): publish authored persona grounding in 0.1.9 - [`faa486c`](https://github.com/Pasta-Devs/Marinara-Agents/commit/faa486cdd3d342da3c90e46cd566a094fb5bcda2) Merge commit '9533ed2f9f27f25eef49c2088ad8871d330f3a41' into fix/otome-persona-grounding - [`dbf730d`](https://github.com/Pasta-Devs/Marinara-Agents/commit/dbf730da31d78214c7754d489092c472f44f3fe8) Merge commit 'de2d6562b7264f618d8b4c5913c964e26500ab9b' into fix/otome-persona-grounding - [`2245ac3`](https://github.com/Pasta-Devs/Marinara-Agents/commit/2245ac3a2981b1226ee9e7f55584a57b4683fda7) build(otome-forge): include chapter replay cache repair in 0.1.9 - [`bae72b8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/bae72b8b263ad83218d1e91a55be1781b24ea440) Merge commit '018b407d4b011e169516e170cfe153545d110093' into fix/otome-persona-grounding - [`2e06234`](https://github.com/Pasta-Devs/Marinara-Agents/commit/2e062341eb91776ab779c8ad85e3ffeba2cc7103) Merge remote-tracking branch 'origin/staging' into fix/otome-persona-grounding ### 📊 Changes **22 files changed** (+314 additions, -146 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/otome-forge-0.1.9.zip` (+0 -0) 📝 `catalog/preview/catalog.json` (+6 -6) 📝 `catalog/preview/notes.json` (+6 -0) 📝 `catalog/preview/v2/catalog.json` (+6 -6) 📝 `catalog/preview/v2/notes.json` (+6 -0) 📝 `catalog/preview/v3/catalog.json` (+6 -6) 📝 `catalog/preview/v3/notes.json` (+6 -0) 📝 `packages/otome-forge/CHANGELOG.md` (+4 -0) 📝 `packages/otome-forge/README.md` (+3 -2) 📝 `packages/otome-forge/manifest.json` (+3 -3) 📝 `packages/otome-forge/server.mjs` (+108 -106) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/shared/api-types.ts` (+2 -2) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/minigames/date-night.ts` (+2 -1) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/routes/runs.ts` (+7 -7) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/schemas/player.ts` (+4 -2) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/setup/forge.ts` (+2 -1) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/setup/prompts.ts` (+32 -0) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/story/beats.ts` (+2 -1) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/story/chapters.ts` (+4 -1) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/story/routes-plan.ts` (+2 -1) _...and 2 more files_ </details> ### 📄 Description ## Linked issue Closes #1879. Owner: @SpicyMarinara (Codex). ## Why this change Otome chapter and scene writers previously received only the persona’s Description. A missing Personality, Backstory or Appearance let the writer invent conflicting facts about the player’s character. ## What changed - Send the selected persona’s complete authored Description, Personality, Backstory and Appearance through the existing shared protagonist context, with an explicit canon instruction. This grounds story writers, item stories/outfit reactions, phone replies, Home notes/touch lines, Caring messages and Read Him. Scenario, greetings, example dialogue and creator metadata are excluded. - Refresh the current selected persona for chapter plans, scenes, setup/cast bibles, routes/repairs and dates, including existing runs and edits made after a chapter was planned. An unavailable persona retains its own saved text; another persona is never substituted. - Keep authored story appearance separate from the existing image-only Appearance Override. Image generation still uses that override when enabled. - Rebuild Otome Hearth 0.1.9 through the supported builder, including server, manifest, archive and all preview catalogs. Client bytes remain identical to 0.1.8. ## Package and security impact - Package: `otome-forge` 0.1.9; existing Engine >=2.5.1 <4.0.0 and Capability API 1.386 unchanged. - No new permissions, entrypoints, storage schema or provider calls. The existing saved persona text is refreshed as an own-run fallback. - The four authored fields are sent to the configured story model provider. Package README describes those fields and image override separation. ## Validation Passed: npm check (0 errors, 815 existing warnings), strict types (78 server/shared, 125 client files), all 399 regressions (394 TypeScript + 5 rebuilt-bundle smoke checks), catalog lanes, localization, catalog/archive validation, release notes and whitespace. The source regressions first failed on existing-run chapter/scene requests without a prior UI read. They now verify complete long fields, current edits between chapter planning and scene writing, excluded roleplay/metadata fields, separate image overrides and own-persona fallback after missing or failed resource reads. Eleven focused persona/image regressions passed. An independent temporary harness activated the exact compiled server and drove real chapter/scene handlers. The 0.1.8 server failed the full-field guard; 0.1.9 passes, including edits after planning and exclusion of image-only overrides. An initial test string ending in whitespace was corrected with an end sentinel to reflect the existing trim behavior; its first failure is retained. This proof uses controlled model replies, not a live provider. Final local CodeRabbit at `bae72b8b2` completed with zero findings across the changed text files, with the 0.1.8 frozen candidate as baseline. The actual 0.1.8 staging ancestry merge changed no tree bytes. A later disclosure-only review repair updates README/release-note text and their generated sidecars; all payload pins remain unchanged. Dottore’s initial LOW identified that the disclosure omitted other consumers of the shared protagonist context. All aboutLine/protagonistBlock callers were traced, including item/outfit prompts as well as phone, Home, care and Read Him. README and release notes now name every context and distinguish fresh story reads from the other prompts’ saved copy. No runtime change or new provider call was needed. CodeRabbit at `4d2447c69` reviewed all five documentation/sidecar changes with zero findings after one recorded temporary service quota rejection and its permitted retry. Independent ZIP audit verifies payload bytes/hashes, exact safe membership, all preview pins and CRC. - [ ] Manually verify the original saved story’s persona facts with the configured model. - [ ] Manually verify Engine UI package update/restart and uninstall cleanup. - [ ] `node scripts/validate-catalog.mjs` passes locally. - [ ] `git diff --check` passes locally. ### Manual verification notes No physical-device, live-provider quality, or manual Download Agents lifecycle claim. No new visual controls. The source, compiled-handler and archive proof lives in `/tmp/otome-019-*`. ## Documentation impact Updated package README and 0.1.9 release notes. No Engine documentation changes. ZIP SHA256: `21c1d085fee700b7095cc552f41ff7b940f44e4eda4ddbdaf306336e85ebc7ba` (1,641,564 bytes). Server: `68c5e0cd9b6b8d88a2ddf7d03225ebbdbc67374b9b24b92800d4b4425786176a`. Client unchanged from 0.1.8: `688196fa523f45315cda7f3d16401bd34014bc7388d3af6b45d420d2e8aced15`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:38:44 +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#2012
No description provided.