[PR #3868] [MERGED] fix(game): keep NPC avoid rules in negative prompt #6135

Closed
opened 2026-10-23 04:07:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3868
Author: @JurijPietrowicz
Created: 7/20/2026
Status: ✅ Merged
Merged: 7/20/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/3867-z-image-avoid-list


📝 Commits (6)

  • 78de25a fix(image): keep standalone avoid lists negative
  • 035c671 Merge branch 'staging' into fix/3867-z-image-avoid-list
  • 62551da fix(game): keep NPC avoid rules in negative prompt
  • 378ea27 Revert "fix(game): keep NPC avoid rules in negative prompt"
  • 572dca2 Address image prompt review feedback
  • 206c1de Merge branch 'staging' into fix/3867-z-image-avoid-list

📊 Changes

2 files changed (+166 additions, -7 deletions)

View changed files

📝 packages/shared/src/utils/image-prompt-compiler.ts (+94 -7)
📝 scripts/regressions/prompt.regression.ts (+72 -0)

📄 Description

Linked issue

Closes #3867

Why this change

Z-Image Turbo NPC portrait prompts leaked artifact-avoidance terms into the positive prompt because the deterministic template placed the avoid-list in the positive source text. Natural-language scope heuristics cannot safely distinguish every standalone list from affirmative or inline clauses.

What changed

  • Removed the generated NPC avoid sentence from the positive prompt template.
  • Kept the existing GAME_PORTRAIT_NEGATIVE_PROMPT as the single provider-visible artifact exclusion channel.
  • Removed the broad heuristic parser change so inline negation behavior from issue #3054 remains unchanged.
  • Retained regression coverage for the final NPC positive and negative provider prompts.

Validation

Commands run locally:

  • pnpm regression:prompt
  • pnpm check (running after this commit)

Manual browser verification was not performed because this is a shared/server prompt compiler change.

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Not applicable.


🔄 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/3868 **Author:** [@JurijPietrowicz](https://github.com/JurijPietrowicz) **Created:** 7/20/2026 **Status:** ✅ Merged **Merged:** 7/20/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/3867-z-image-avoid-list` --- ### 📝 Commits (6) - [`78de25a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/78de25a28dde9faa8e5243770dd513bb5240c67f) fix(image): keep standalone avoid lists negative - [`035c671`](https://github.com/Pasta-Devs/Marinara-Engine/commit/035c6711b5d8643f4d4395b276dbe78a0b847390) Merge branch 'staging' into fix/3867-z-image-avoid-list - [`62551da`](https://github.com/Pasta-Devs/Marinara-Engine/commit/62551da858668319730d6222eaac942c4357a504) fix(game): keep NPC avoid rules in negative prompt - [`378ea27`](https://github.com/Pasta-Devs/Marinara-Engine/commit/378ea270dd7dc86039a4b22f942a609cc981bfad) Revert "fix(game): keep NPC avoid rules in negative prompt" - [`572dca2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/572dca2abd4a5c1675edfd893596f2e03a225b37) Address image prompt review feedback - [`206c1de`](https://github.com/Pasta-Devs/Marinara-Engine/commit/206c1dee46e93cfc70c11fec417c58ddef223799) Merge branch 'staging' into fix/3867-z-image-avoid-list ### 📊 Changes **2 files changed** (+166 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `packages/shared/src/utils/image-prompt-compiler.ts` (+94 -7) 📝 `scripts/regressions/prompt.regression.ts` (+72 -0) </details> ### 📄 Description ## Linked issue Closes #3867 ## Why this change Z-Image Turbo NPC portrait prompts leaked artifact-avoidance terms into the positive prompt because the deterministic template placed the avoid-list in the positive source text. Natural-language scope heuristics cannot safely distinguish every standalone list from affirmative or inline clauses. ## What changed - Removed the generated NPC avoid sentence from the positive prompt template. - Kept the existing `GAME_PORTRAIT_NEGATIVE_PROMPT` as the single provider-visible artifact exclusion channel. - Removed the broad heuristic parser change so inline negation behavior from issue #3054 remains unchanged. - Retained regression coverage for the final NPC positive and negative provider prompts. ## Validation Commands run locally: - `pnpm regression:prompt` - `pnpm check` (running after this commit) Manual browser verification was not performed because this is a shared/server prompt compiler change. - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Not applicable. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:07:24 +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#6135
No description provided.