mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3561] [Issue]: Game Mode NPC portrait prompts duplicate the character description #1926
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1926
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JurijPietrowicz on GitHub (Jul 13, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3561
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Game Mode NPC portrait generation inserts the character description multiple times into the final positive image prompt. Depending on the selected style profile, either the complete description or its extracted visual traits are repeated.
Expected behavior
The resolved canonical NPC description should appear once in the final provider prompt while preserving all identity-critical visual details.
Actual behavior
The server merges identical request and metadata descriptions under different labels, preventing deduplication. The portrait compiler then prepends another canonical-description prefix after the normal prompt deduplication pass.
A single supplied description can therefore be repeated twice by the portrait builder. In the full Game Mode route, the earlier metadata/request merge can amplify the duplication further.
Steps to reproduce
Environment
Logs, screenshots, or video
Diagnostic input:
Before the fix, the server prompt builder included that exact input twice:
Diagnostic occurrence count:
2.Additional context
The first duplication point is
resolveNpcPortraitAppearance()inpackages/server/src/routes/game.routes.ts. It labels the metadata description before comparing it with the request description, so identical values are treated as different strings.The second is
compileGameImagePrompt()inpackages/server/src/services/game/game-asset-generation.ts. It prependscanonicalPrefixafter the shared compiler has already processed a prompt containing the appearance.The behavior is related to the canonical-description preservation work from #3321 and PR #3293. Commit
2f3bef60added the post-compilation canonical prefix.Implementation owner: @JurijPietrowicz.
Template check