[PR #1833] [MERGED] fix(gacha-forge): 1.27.1 image references send the avatar and the worn outfit #1989

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

📋 Pull Request Information

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

Base: staging ← Head: fix/forge-kit-outfit-references


📝 Commits (2)

  • 97f005a fix(gacha-forge): 1.27.1 image references send the avatar and the worn outfit (#1832)
  • 7b8b0ad Merge remote-tracking branch 'origin/staging' into fix/forge-kit-outfit-references

📊 Changes

18 files changed (+492 additions, -102 deletions)

View changed files

📝 .github/workflows/pull-request-checks.yml (+1 -0)
➕ artifacts/gacha-forge-1.27.1.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/gacha-forge/CHANGELOG.md (+7 -0)
📝 packages/gacha-forge/README.md (+6 -0)
📝 packages/gacha-forge/bundle-patches.json (+40 -0)
📝 packages/gacha-forge/client.js (+2 -2)
📝 packages/gacha-forge/manifest.json (+5 -5)
📝 packages/gacha-forge/server.mjs (+58 -22)
📝 sources/forge-kit/image-avatar-references.mjs (+55 -19)
➕ tests/forge-kit-image-references.regression.mjs (+154 -0)
📝 tests/forge-kit-options.regression.mjs (+3 -3)
📝 tests/gacha-forge-image-avatar-references.regression.mjs (+119 -9)

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.

Linked issue

Fixes #1832

Why this change

The maintainer asked whether image generation sends "the character's avatar and their current outfit as a reference (if any outfit is on)". The shared kit sent only one reference per person: the card avatar whenever there was one. So a character card's worn outfit never reached the image model. A character without a card sent its worn outfit as its face, which leaked the old outfit into new portraits and outfits.

What changed

Gacha Forge 1.27.1, and the shared kit:

  • sources/forge-kit/image-avatar-references.mjs:
    • Identity: each person's identity reference is the card avatar, else the persona avatar, else the saved portrait, else avatarPath. It never uses the worn outfit.
    • Outfit (scenes and banners only): generateBannerArt also adds the worn outfit's image, looked up from wornOutfit and outfits.
    • Order and limit: every face first, then the outfits, deduplicated, at most 4: the Engine's avatar route keeps the first 4. Outfits are dropped first, with a warning.
    • Unchanged rule, now enforced: generatePortrait and generateOutfit send identity only.
  • Gacha Forge call sites (server ledger):
    • A scene subject keeps wornOutfit only when the picture paints that outfit, so the image never contradicts the prompt.
    • Banners and Bond backgrounds now build their subject like chat photos, painting the worn outfit while Outfits is on.
  • Release: manifest, client and server ledger entries, What's new (1.27.0 pinned), CHANGELOG, README, catalog and artifact. The catalog notes drop 1.23.0 to stay within the 20-version limit.
  • Tests:
    • New tests/forge-kit-image-references.regression.mjs, wired into Pull Request Checks. It covers ordering, dedupe, the limit and its log, identity-only portrait and outfit, the removed-card fallback, and unsafe outfit paths.
    • Route tests in gacha-forge-image-avatar-references:
      • a CG for a carded unit wearing an outfit sends [card avatar, persona avatar, outfit];
      • with the setting off, or when the scene describes the clothes, no outfit is sent;
      • portrait and outfit redo send the face alone.
    • Against the old bundle, 4 of these fail.

For the maintainer

  • Scenes and key images follow "The story uses worn outfits", which is off by default. With it off, they paint default clothes and send faces only. Passing the outfit anyway would override what that setting is for. Say if "an outfit is on" should win.
  • Banners and Bond backgrounds for a unit with an outfit on are now built from its identity and outfit tags, like chat photos, so they lose its pose tags. Banner art already painted is cached and not repainted.
  • Otome Hearth imports this kit. Its CGs start passing the worn look in its M4 milestone (#1827).

Package and security impact

  • Affected package IDs: gacha-forge (1.27.1). otome-forge picks up the kit at its next rebuild.
  • Engine compatibility impact: none; uses the existing avatar-generation route and its 4-reference limit.
  • New or changed permissions/entrypoints: none.
  • Restart, storage, update, or uninstall impact: none.

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

Agent-side checks:

  • node --test tests/gacha-forge-*.regression.mjs tests/forge-kit-*.regression.mjs: 628 pass, including the bundle rebuild proof.
  • npm run test:otome-forge and Otome's strict typecheck pass.
  • npm run check, both locale validators, test-catalog-lanes and git diff --check are clean.
  • Builds are byte-identical.

Please verify by hand:

  • Manually verify, with a carded unit wearing an outfit and Outfits on, that a banner or Bond background shows that outfit (the request's references are the avatar, then the outfit).
  • Manually verify a new outfit for a unit already wearing one does not copy the old outfit.

🤖 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/1833 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/forge-kit-outfit-references` --- ### 📝 Commits (2) - [`97f005a`](https://github.com/Pasta-Devs/Marinara-Agents/commit/97f005affaf32937b2bc3eac2760345b9ca92367) fix(gacha-forge): 1.27.1 image references send the avatar and the worn outfit (#1832) - [`7b8b0ad`](https://github.com/Pasta-Devs/Marinara-Agents/commit/7b8b0add0e193ea37532a2a9f8646e1b746d09a4) Merge remote-tracking branch 'origin/staging' into fix/forge-kit-outfit-references ### 📊 Changes **18 files changed** (+492 additions, -102 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pull-request-checks.yml` (+1 -0) ➕ `artifacts/gacha-forge-1.27.1.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/gacha-forge/CHANGELOG.md` (+7 -0) 📝 `packages/gacha-forge/README.md` (+6 -0) 📝 `packages/gacha-forge/bundle-patches.json` (+40 -0) 📝 `packages/gacha-forge/client.js` (+2 -2) 📝 `packages/gacha-forge/manifest.json` (+5 -5) 📝 `packages/gacha-forge/server.mjs` (+58 -22) 📝 `sources/forge-kit/image-avatar-references.mjs` (+55 -19) ➕ `tests/forge-kit-image-references.regression.mjs` (+154 -0) 📝 `tests/forge-kit-options.regression.mjs` (+3 -3) 📝 `tests/gacha-forge-image-avatar-references.regression.mjs` (+119 -9) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. ## Linked issue Fixes #1832 ## Why this change The maintainer asked whether image generation sends "the character's avatar and their current outfit as a reference (if any outfit is on)". The shared kit sent only one reference per person: the card avatar whenever there was one. So a character card's worn outfit never reached the image model. A character without a card sent its worn outfit as its face, which leaked the old outfit into new portraits and outfits. ## What changed Gacha Forge 1.27.1, and the shared kit: - **`sources/forge-kit/image-avatar-references.mjs`:** - **Identity:** each person's identity reference is the card avatar, else the persona avatar, else the saved portrait, else `avatarPath`. It never uses the worn outfit. - **Outfit (scenes and banners only):** `generateBannerArt` also adds the worn outfit's image, looked up from `wornOutfit` and `outfits`. - **Order and limit:** every face first, then the outfits, deduplicated, at most 4: the Engine's avatar route keeps the first 4. Outfits are dropped first, with a warning. - **Unchanged rule, now enforced:** `generatePortrait` and `generateOutfit` send identity only. - **Gacha Forge call sites (server ledger):** - A scene subject keeps `wornOutfit` only when the picture paints that outfit, so the image never contradicts the prompt. - Banners and Bond backgrounds now build their subject like chat photos, painting the worn outfit while **Outfits** is on. - **Release:** manifest, client and server ledger entries, What's new (1.27.0 pinned), CHANGELOG, README, catalog and artifact. The catalog notes drop 1.23.0 to stay within the 20-version limit. - **Tests:** - New `tests/forge-kit-image-references.regression.mjs`, wired into Pull Request Checks. It covers ordering, dedupe, the limit and its log, identity-only portrait and outfit, the removed-card fallback, and unsafe outfit paths. - Route tests in `gacha-forge-image-avatar-references`: - a CG for a carded unit wearing an outfit sends [card avatar, persona avatar, outfit]; - with the setting off, or when the scene describes the clothes, no outfit is sent; - portrait and outfit redo send the face alone. - Against the old bundle, 4 of these fail. ### For the maintainer - **Scenes and key images follow "The story uses worn outfits",** which is off by default. With it off, they paint default clothes and send faces only. Passing the outfit anyway would override what that setting is for. Say if "an outfit is on" should win. - **Banners and Bond backgrounds** for a unit with an outfit on are now built from its identity and outfit tags, like chat photos, so they lose its pose tags. Banner art already painted is cached and not repainted. - **Otome Hearth** imports this kit. Its CGs start passing the worn look in its M4 milestone (#1827). ## Package and security impact - Affected package IDs: `gacha-forge` (1.27.1). `otome-forge` picks up the kit at its next rebuild. - Engine compatibility impact: none; uses the existing avatar-generation route and its 4-reference limit. - New or changed permissions/entrypoints: none. - Restart, storage, update, or uninstall impact: none. ## 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 Agent-side checks: - `node --test tests/gacha-forge-*.regression.mjs tests/forge-kit-*.regression.mjs`: 628 pass, including the bundle rebuild proof. - `npm run test:otome-forge` and Otome's strict typecheck pass. - `npm run check`, both locale validators, `test-catalog-lanes` and `git diff --check` are clean. - Builds are byte-identical. Please verify by hand: - [ ] Manually verify, with a carded unit wearing an outfit and Outfits on, that a banner or Bond background shows that outfit (the request's references are the avatar, then the outfit). - [ ] Manually verify a new outfit for a unit already wearing one does not copy the old outfit. 🤖 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:38:33 +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#1989
No description provided.