[PR #2005] [MERGED] fix(otome-forge): a portrait sends his full body and his avatar together #2069

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

📋 Pull Request Information

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

Base: staging ← Head: fix/otome-portrait-fullbody-refs


📝 Commits (7)

  • d89fbe8 fix(otome-forge): a portrait sends his full body and his avatar together
  • 6ed2588 chore(otome-forge): release 0.6.11 with the portrait references
  • 687a980 fix(otome-forge): the kit's declaration accepts several likenesses per subject
  • e2b3386 chore(gacha-forge): rebuild the bundle with the shared reference kit change
  • af391c3 fix(otome-forge): the resolver context is optional, matching its default
  • c6be392 chore(gacha-forge): recertify the bundle rebuilt with the shared reference kit
  • 6049603 Merge branch 'staging' into fix/otome-portrait-fullbody-refs

📊 Changes

21 files changed (+164 additions, -123 deletions)

View changed files

📝 artifacts/gacha-forge-1.27.5.zip (+0 -0)
➕ artifacts/otome-forge-0.6.11.zip (+0 -0)
📝 catalog/catalog.json (+4 -4)
📝 catalog/preview/catalog.json (+6 -6)
📝 catalog/preview/notes.json (+6 -6)
📝 catalog/preview/v2/catalog.json (+6 -6)
📝 catalog/preview/v2/notes.json (+6 -6)
📝 catalog/preview/v3/catalog.json (+6 -6)
📝 catalog/preview/v3/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+4 -4)
📝 catalog/v3/catalog.json (+4 -4)
📝 packages/gacha-forge/manifest.json (+2 -2)
📝 packages/gacha-forge/server.mjs (+8 -4)
📝 packages/otome-forge/CHANGELOG.md (+4 -0)
📝 packages/otome-forge/manifest.json (+3 -3)
📝 packages/otome-forge/server.mjs (+51 -51)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/art/image-client.ts (+16 -5)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/forge-kit.d.ts (+12 -1)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 sources/forge-kit/image-avatar-references.mjs (+8 -4)

...and 1 more files

📄 Description

Closes #2004

Why this change

A love interest made from a character card has a neutral full-body image and an avatar on that card. His painted portrait was only ever given one of them as an identity reference: the kit's subjectReference resolved a single image per subject, and the full body simply displaced the avatar when the lookup succeeded. So the portrait could never see both his build and his face, and on a card without a full-body sprite you got the avatar alone with no trace of why.

Image generation is not being changed in what it does: the portrait keeps the same prompt, matte, size and provider call. Only which likenesses accompany it changes.

What changed

The kit accepts several likenesses per subject (sources/forge-kit/image-avatar-references.mjs)

  • subjectReference may return a string (as before) or an array; the wrapper flattens them into the identity list, ahead of every outfit, exactly as it already ordered them.
  • The four-reference cap, the deduplication and the faces-before-outfits order are unchanged, so Gacha Forge and every other caller behave identically.
  • The log line reports subjects resolved rather than a raw identity count, since one subject can now contribute two.

Otome sends both for a portrait, one for a scene (art/image-client.ts)

  • generatePortrait and generateOutfit return [full body, avatar] when both exist; generateBannerArt keeps one per subject, because the four-reference budget is shared across the whole cast and doubling every subject would push people out of a scene.
  • Expressions are untouched by construction: they never pass through this wrapper — art/expressions.ts sends its own Single base reference.
  • A failed sprite lookup now writes a debug line instead of being swallowed, so a missing full body stops being indistinguishable from a broken one.

Package and security impact

  • Affected package IDs: otome-forge 0.6.11
  • Engine compatibility impact: none; only the existing sprite and avatar routes are read, with the same validated id and verified filename
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: none

Validation

  • npm run test:otome-forge: 540/540 TypeScript regressions pass.
  • node --test "tests/forge-kit-*.regression.mjs": 23/23 pass, including the wrapper's ordering, dedup and cap.
  • tests/otome-forge-image-references.regression.ts: a portrait sends [full body, avatar], a new look the same, a scene [full body, outfit], and a replaced assertion now checks the avatar accompanies the full body instead of being displaced by it.
  • npx prettier --check over the CI pattern: clean.
  • node scripts/typecheck-packages.mjs otome-forge: no syntax errors, undefined names or unresolved modules.

Test plan

  • Start a story with an LI from a card that has a neutral full-body sprite; confirm the portrait's debug log shows two identity references and the painted portrait matches both build and face.
  • Start a story with an LI whose card has no full-body sprite; confirm the portrait still paints from the avatar and the debug log names the missing full body.
  • Confirm a scene with several LIs still sends one reference per person and nobody is dropped.
  • Confirm expression faces are unchanged.

Documentation impact

  • No documentation changes needed

🤖 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/2005 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/otome-portrait-fullbody-refs` --- ### 📝 Commits (7) - [`d89fbe8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d89fbe87f3b50a14e94f9a6e71936fbac9e5e651) fix(otome-forge): a portrait sends his full body and his avatar together - [`6ed2588`](https://github.com/Pasta-Devs/Marinara-Agents/commit/6ed258879c636674e7944577d82028d4d0d8dff5) chore(otome-forge): release 0.6.11 with the portrait references - [`687a980`](https://github.com/Pasta-Devs/Marinara-Agents/commit/687a980e5692b6340fbfed35d37bf7e8f45507da) fix(otome-forge): the kit's declaration accepts several likenesses per subject - [`e2b3386`](https://github.com/Pasta-Devs/Marinara-Agents/commit/e2b3386be78519322a3edfed3da0907e8dd7be44) chore(gacha-forge): rebuild the bundle with the shared reference kit change - [`af391c3`](https://github.com/Pasta-Devs/Marinara-Agents/commit/af391c3629812bfdff607ee5286e0bb7b68f87ff) fix(otome-forge): the resolver context is optional, matching its default - [`c6be392`](https://github.com/Pasta-Devs/Marinara-Agents/commit/c6be3928f7fadb1cc000d136608484ebff7b207b) chore(gacha-forge): recertify the bundle rebuilt with the shared reference kit - [`6049603`](https://github.com/Pasta-Devs/Marinara-Agents/commit/6049603d0de4ae355c8937208bb0bb6eb82b64ff) Merge branch 'staging' into fix/otome-portrait-fullbody-refs ### 📊 Changes **21 files changed** (+164 additions, -123 deletions) <details> <summary>View changed files</summary> 📝 `artifacts/gacha-forge-1.27.5.zip` (+0 -0) ➕ `artifacts/otome-forge-0.6.11.zip` (+0 -0) 📝 `catalog/catalog.json` (+4 -4) 📝 `catalog/preview/catalog.json` (+6 -6) 📝 `catalog/preview/notes.json` (+6 -6) 📝 `catalog/preview/v2/catalog.json` (+6 -6) 📝 `catalog/preview/v2/notes.json` (+6 -6) 📝 `catalog/preview/v3/catalog.json` (+6 -6) 📝 `catalog/preview/v3/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+4 -4) 📝 `catalog/v3/catalog.json` (+4 -4) 📝 `packages/gacha-forge/manifest.json` (+2 -2) 📝 `packages/gacha-forge/server.mjs` (+8 -4) 📝 `packages/otome-forge/CHANGELOG.md` (+4 -0) 📝 `packages/otome-forge/manifest.json` (+3 -3) 📝 `packages/otome-forge/server.mjs` (+51 -51) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/art/image-client.ts` (+16 -5) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/forge-kit.d.ts` (+12 -1) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `sources/forge-kit/image-avatar-references.mjs` (+8 -4) _...and 1 more files_ </details> ### 📄 Description Closes #2004 ## Why this change A love interest made from a character card has a neutral full-body image and an avatar on that card. His painted portrait was only ever given **one** of them as an identity reference: the kit's `subjectReference` resolved a single image per subject, and the full body simply displaced the avatar when the lookup succeeded. So the portrait could never see both his build and his face, and on a card without a full-body sprite you got the avatar alone with no trace of why. Image generation is not being changed in what it does: the portrait keeps the same prompt, matte, size and provider call. Only which likenesses accompany it changes. ## What changed **The kit accepts several likenesses per subject** (`sources/forge-kit/image-avatar-references.mjs`) - `subjectReference` may return a string (as before) or an array; the wrapper flattens them into the identity list, ahead of every outfit, exactly as it already ordered them. - The four-reference cap, the deduplication and the faces-before-outfits order are unchanged, so Gacha Forge and every other caller behave identically. - The log line reports subjects resolved rather than a raw identity count, since one subject can now contribute two. **Otome sends both for a portrait, one for a scene** (`art/image-client.ts`) - `generatePortrait` and `generateOutfit` return `[full body, avatar]` when both exist; `generateBannerArt` keeps one per subject, because the four-reference budget is shared across the whole cast and doubling every subject would push people out of a scene. - **Expressions are untouched by construction**: they never pass through this wrapper — `art/expressions.ts` sends its own Single base reference. - A failed sprite lookup now writes a debug line instead of being swallowed, so a missing full body stops being indistinguishable from a broken one. ## Package and security impact - Affected package IDs: `otome-forge` 0.6.11 - Engine compatibility impact: none; only the existing sprite and avatar routes are read, with the same validated id and verified filename - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: none ## Validation - `npm run test:otome-forge`: **540/540** TypeScript regressions pass. - `node --test "tests/forge-kit-*.regression.mjs"`: **23/23** pass, including the wrapper's ordering, dedup and cap. - `tests/otome-forge-image-references.regression.ts`: a portrait sends `[full body, avatar]`, a new look the same, a scene `[full body, outfit]`, and a replaced assertion now checks the avatar accompanies the full body instead of being displaced by it. - `npx prettier --check` over the CI pattern: clean. - `node scripts/typecheck-packages.mjs otome-forge`: no syntax errors, undefined names or unresolved modules. ## Test plan - [ ] Start a story with an LI from a card that has a neutral full-body sprite; confirm the portrait's debug log shows two identity references and the painted portrait matches both build and face. - [ ] Start a story with an LI whose card has no full-body sprite; confirm the portrait still paints from the avatar and the debug log names the missing full body. - [ ] Confirm a scene with several LIs still sends one reference per person and nobody is dropped. - [ ] Confirm expression faces are unchanged. ## Documentation impact - [x] No documentation changes needed 🤖 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:13 +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#2069
No description provided.