[GH-ISSUE #3852] [Issue]: Two persisted image style profile rules are never consumed #2082

Closed
opened 2026-10-21 05:45:13 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Xelvanis on GitHub (Jul 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3852

Originally assigned to: @SpicyMarinara on GitHub.

Summary

ImageStyleProfileRules.preferTagsOverNarrative and preserveUserPhrases are normalized, persisted, and publicly exported, but the image prompt compiler never reads them. Only dedupeStrength currently affects compilation.

These fields should either gain defined behavior or be retired through an explicit compatibility decision. Removing them as ordinary dead-code cleanup would silently change persisted JSON and the public shared-package contract.

Expected behavior

Every persisted, publicly exported image-style rule should affect documented compiler behavior, or deprecated fields should have a deliberate compatibility and migration policy.

Actual behavior

Repository-wide symbol searches on origin/staging found no runtime reads of either boolean outside defaults and normalization.

A 240-scenario comparison covered every built-in profile, every image kind, both source-prompt modes, varied prompt inputs, and all four boolean combinations. prompt, negativePrompt, and diagnostics were byte-for-byte identical.

The complete CompiledImagePrompt object is not identical because it returns the normalized profile. Current in-repository consumers only use the returned profile's id or name, but external consumers may rely on the exported shape.

Steps to reproduce

  1. Toggle preferTagsOverNarrative and preserveUserPhrases through all four combinations on an otherwise identical normalized profile.
  2. Compile identical inputs with compileImagePrompt.
  3. Compare prompt, negativePrompt, and diagnostics.

Environment

  • Marinara Engine version: origin/staging at 13e523fa49883a4fe3ee397869ec52b40ebf68ec
  • Install type: source inspection
  • OS + version: not applicable
  • Browser or app shell: not applicable

Logs, screenshots, or video

Not applicable; this is a shared contract/compiler finding.

Additional context

Suggested resolution:

  1. Decide whether the fields should acquire compiler semantics or be retired.
  2. If retiring them, explicitly define compatibility for existing persisted settings and external shared-package consumers (for example, deprecate first or continue accepting legacy input during a versioned migration).
  3. Verify provider-visible compiled prompts remain byte-for-byte unchanged across current and legacy profiles.

Current runtime risk is effectively zero. The risk is unnecessary public contract surface and an unsafe future cleanup if compatibility is not considered.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Jul 20, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3852 Originally assigned to: @SpicyMarinara on GitHub. ## Summary `ImageStyleProfileRules.preferTagsOverNarrative` and `preserveUserPhrases` are normalized, persisted, and publicly exported, but the image prompt compiler never reads them. Only `dedupeStrength` currently affects compilation. These fields should either gain defined behavior or be retired through an explicit compatibility decision. Removing them as ordinary dead-code cleanup would silently change persisted JSON and the public shared-package contract. ## Expected behavior Every persisted, publicly exported image-style rule should affect documented compiler behavior, or deprecated fields should have a deliberate compatibility and migration policy. ## Actual behavior - [`ImageStyleProfileRules`](https://github.com/Pasta-Devs/Marinara-Engine/blob/staging/packages/shared/src/types/image-style-profile.ts#L19-L23) declares all three rules. - [`normalizeImageStyleProfileRules`](https://github.com/Pasta-Devs/Marinara-Engine/blob/staging/packages/shared/src/constants/image-style-profiles.ts#L321-L332) always emits both boolean fields, so they survive normalization and persistence. - [`compileImagePrompt`](https://github.com/Pasta-Devs/Marinara-Engine/blob/staging/packages/shared/src/utils/image-prompt-compiler.ts#L162-L175) reads `dedupeStrength` only. - The types, defaults, and compiler are exported through the shared package barrel. Repository-wide symbol searches on `origin/staging` found no runtime reads of either boolean outside defaults and normalization. A 240-scenario comparison covered every built-in profile, every image kind, both source-prompt modes, varied prompt inputs, and all four boolean combinations. `prompt`, `negativePrompt`, and diagnostics were byte-for-byte identical. The complete `CompiledImagePrompt` object is not identical because it returns the normalized profile. Current in-repository consumers only use the returned profile's `id` or `name`, but external consumers may rely on the exported shape. ## Steps to reproduce 1. Toggle `preferTagsOverNarrative` and `preserveUserPhrases` through all four combinations on an otherwise identical normalized profile. 2. Compile identical inputs with `compileImagePrompt`. 3. Compare `prompt`, `negativePrompt`, and diagnostics. ## Environment - Marinara Engine version: `origin/staging` at `13e523fa49883a4fe3ee397869ec52b40ebf68ec` - Install type: source inspection - OS + version: not applicable - Browser or app shell: not applicable ## Logs, screenshots, or video Not applicable; this is a shared contract/compiler finding. ## Additional context Suggested resolution: 1. Decide whether the fields should acquire compiler semantics or be retired. 2. If retiring them, explicitly define compatibility for existing persisted settings and external shared-package consumers (for example, deprecate first or continue accepting legacy input during a versioned migration). 3. Verify provider-visible compiled prompts remain byte-for-byte unchanged across current and legacy profiles. Current runtime risk is effectively zero. The risk is unnecessary public contract surface and an unsafe future cleanup if compatibility is not considered. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:45:13 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jul 20, 2026):

@SpicyMarinara is taking this. I’ll use the compatibility-safe retirement path: keep legacy persisted input accepted and normalized, explicitly deprecate the no-op fields, and lock provider-visible output with regression coverage.

<!-- gh-comment-id:5020079708 --> @SpicyMarinara commented on GitHub (Jul 20, 2026): @SpicyMarinara is taking this. I’ll use the compatibility-safe retirement path: keep legacy persisted input accepted and normalized, explicitly deprecate the no-op fields, and lock provider-visible output with regression coverage.
Author
Owner

@SpicyMarinara commented on GitHub (Jul 20, 2026):

Addressed in #3853 and merged into staging.

<!-- gh-comment-id:5020383628 --> @SpicyMarinara commented on GitHub (Jul 20, 2026): Addressed in #3853 and merged into staging.
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#2082
No description provided.