[PR #8404] [MERGED] fix(game): resolve appearance macros for illustrations #8579

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

📋 Pull Request Information

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

Base: staging ← Head: fix/8402-game-appearance-macros


📝 Commits (4)

  • 627d745 test(game): reproduce unresolved illustration appearance macros
  • e865577 fix(game): resolve image appearances in the selected chat context
  • 474fe6d fix(game): retain party macro scope for image appearances
  • 983b672 fix(game): scope grouped image fields to their owner

📊 Changes

2 files changed (+520 additions, -13 deletions)

View changed files

📝 packages/server/src/routes/game.routes.ts (+110 -9)
📝 scripts/regressions/image-appearance-game.regression.ts (+410 -4)

📄 Description

Linked issue

Closes #8402

Why this change

Game storyboard and scene illustrations inserted raw card/persona appearance into image context, so a saved chat-variable macro such as {{getvar::quartermaster_appearance_persona}} reached the image model literally. The regular generation path already resolved it. The real Game preview/provider route reproduces the failure on staging.

What changed

  • Resolve selected character/persona appearance, including enabled imageAppearance overrides, before inserting it into the shared image asset lookups. Storyboard planning, scene preview and actual scene generation use the same resolver.
  • Reuse the existing macro-context builder and read-only preview resolver with the selected persona, saved chat variables and selected source scene clock. Character fields bind to the exact owner while the scalar party-name list stays available; grouped nested fields cannot borrow another card's traits.
  • Resolve local setters within an appearance without persisting them or changing another appearance's context. Do not execute unrelated Description defaults. Existing override selection, empty/disabled fallback, macro safety rules, reference selection and saved card data remain unchanged. No image-prompt length cap is added.

Validation

Final local candidate: 983b672de153cc035a363d553b7bb76797b8f764.

  • pnpm install completed. Final pnpm check passed, including localization/formatting, lint/type checks and production build. One existing HomeProfessorMariChat hook warning remains.
  • Final pnpm regression:prompt passed, including 206 prompt cases, attachments and context fitting. Focused appearance, chat-variable, world-clock and lorebook-include regressions passed.
  • Actual Game route/provider-capture regression: 5 plain-text + 8 macro preview/dispatch pairs and 2 historical storyboard planner requests. Covers normal/disabled/blank/enabled overrides, two character owners, full party names, nested grouped owner fields, two-chat isolation, local setters and exact saved card/persona/variable preservation. Historical planner requests use the selected 1480 scene clock instead of a newer 1600 snapshot. Existing portrait save/failure/concurrency controls also pass.
  • Final browser smoke: 7/7. Final production Chromium smoke: 1/1.
  • The original literal-macro failure, roster-scope defect and nested grouped-field defect were reproduced before their repairs. Fixture setup failures were kept separate from product failures; no assertions were skipped or timeouts increased.
  • Local CodeRabbit full review completed. Its optional large-library context-building performance note is documented as a ponytail ceiling; this patch retains the plain-text fast path and bounded loader workers rather than redesigning alias ownership. The subsequent grouped-field finding was reproduced and repaired. Final repair review completed with zero findings. Independent source review informed the owner/clock/roster fixes.

Local Docker validation is unavailable because the configured OrbStack socket does not exist. Hosted container build/runtime checks and all other required CI/Dottore gates must pass before staging merge.

Manual verification notes

  • Manually verify the reported persona/card and chat variable in Game storyboard and scene illustration generation on the reporter's installation.
  • Manually inspect a generated image with the selected real provider.

Provider requests were captured with local fixtures; no paid provider generation or physical Windows verification is claimed. Existing images are not regenerated automatically.

Docs and release impact

No UI/localization copy, documentation, storage-format, release metadata or downloadable-package changes. Existing planner/image debug logging now shows the resolved appearance text.


🔄 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-Engine/pull/8404 **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/8402-game-appearance-macros` --- ### 📝 Commits (4) - [`627d745`](https://github.com/Pasta-Devs/Marinara-Engine/commit/627d74571cadb8aaa5d23364ce5e2d39fb14c212) test(game): reproduce unresolved illustration appearance macros - [`e865577`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e8655771c43f81c2f0c17ff7629ae4480a3fd0e9) fix(game): resolve image appearances in the selected chat context - [`474fe6d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/474fe6d325f4dd07cceb8f6f7e297f4aedc507bc) fix(game): retain party macro scope for image appearances - [`983b672`](https://github.com/Pasta-Devs/Marinara-Engine/commit/983b672de153cc035a363d553b7bb76797b8f764) fix(game): scope grouped image fields to their owner ### 📊 Changes **2 files changed** (+520 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/game.routes.ts` (+110 -9) 📝 `scripts/regressions/image-appearance-game.regression.ts` (+410 -4) </details> ### 📄 Description ## Linked issue Closes #8402 ## Why this change Game storyboard and scene illustrations inserted raw card/persona appearance into image context, so a saved chat-variable macro such as `{{getvar::quartermaster_appearance_persona}}` reached the image model literally. The regular generation path already resolved it. The real Game preview/provider route reproduces the failure on staging. ## What changed - Resolve selected character/persona appearance, including enabled imageAppearance overrides, before inserting it into the shared image asset lookups. Storyboard planning, scene preview and actual scene generation use the same resolver. - Reuse the existing macro-context builder and read-only preview resolver with the selected persona, saved chat variables and selected source scene clock. Character fields bind to the exact owner while the scalar party-name list stays available; grouped nested fields cannot borrow another card's traits. - Resolve local setters within an appearance without persisting them or changing another appearance's context. Do not execute unrelated Description defaults. Existing override selection, empty/disabled fallback, macro safety rules, reference selection and saved card data remain unchanged. No image-prompt length cap is added. ## Validation Final local candidate: `983b672de153cc035a363d553b7bb76797b8f764`. - `pnpm install` completed. Final `pnpm check` passed, including localization/formatting, lint/type checks and production build. One existing HomeProfessorMariChat hook warning remains. - Final `pnpm regression:prompt` passed, including 206 prompt cases, attachments and context fitting. Focused appearance, chat-variable, world-clock and lorebook-include regressions passed. - Actual Game route/provider-capture regression: 5 plain-text + 8 macro preview/dispatch pairs and 2 historical storyboard planner requests. Covers normal/disabled/blank/enabled overrides, two character owners, full party names, nested grouped owner fields, two-chat isolation, local setters and exact saved card/persona/variable preservation. Historical planner requests use the selected 1480 scene clock instead of a newer 1600 snapshot. Existing portrait save/failure/concurrency controls also pass. - Final browser smoke: 7/7. Final production Chromium smoke: 1/1. - The original literal-macro failure, roster-scope defect and nested grouped-field defect were reproduced before their repairs. Fixture setup failures were kept separate from product failures; no assertions were skipped or timeouts increased. - Local CodeRabbit full review completed. Its optional large-library context-building performance note is documented as a `ponytail` ceiling; this patch retains the plain-text fast path and bounded loader workers rather than redesigning alias ownership. The subsequent grouped-field finding was reproduced and repaired. Final repair review completed with zero findings. Independent source review informed the owner/clock/roster fixes. Local Docker validation is unavailable because the configured OrbStack socket does not exist. Hosted container build/runtime checks and all other required CI/Dottore gates must pass before staging merge. ### Manual verification notes - [ ] Manually verify the reported persona/card and chat variable in Game storyboard and scene illustration generation on the reporter's installation. - [ ] Manually inspect a generated image with the selected real provider. Provider requests were captured with local fixtures; no paid provider generation or physical Windows verification is claimed. Existing images are not regenerated automatically. ## Docs and release impact No UI/localization copy, documentation, storage-format, release metadata or downloadable-package changes. Existing planner/image debug logging now shows the resolved appearance text. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:45: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-Engine#8579
No description provided.