[PR #1279] [MERGED] fix(noodle): 1.5.2 — keep prompt-writer instructions out of image prompts #1380

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

📋 Pull Request Information

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

Base: staging ← Head: fix/1278-noodle-image-prompt-instructions


📝 Commits (1)

  • 14294a8 fix(noodle): 1.5.2 — keep prompt-writer instructions out of image prompts (#1278)

📊 Changes

16 files changed (+514 additions, -214 deletions)

View changed files

📝 .github/workflows/pull-request-checks.yml (+2 -1)
➕ artifacts/noodle-1.5.2.zip (+0 -0)
📝 catalog/catalog.json (+6 -6)
📝 catalog/notes.json (+6 -0)
📝 catalog/v2/catalog.json (+6 -6)
📝 catalog/v2/notes.json (+6 -0)
📝 catalog/v3/catalog.json (+6 -6)
📝 catalog/v3/notes.json (+6 -0)
📝 packages/noodle/CHANGELOG.md (+5 -0)
📝 packages/noodle/manifest.json (+3 -3)
📝 packages/noodle/server.mjs (+157 -158)
📝 packages/noodle/src/engine/packages/server/src/services/noodle/noodle-image-prompt.ts (+30 -0)
📝 packages/noodle/src/engine/packages/server/src/services/noodle/noodle-public-images.service.ts (+36 -22)
📝 packages/noodle/src/engine/packages/server/src/services/prompt-overrides/registry/noodle.ts (+8 -11)
📝 scripts/build-feature-packages.mjs (+1 -1)
➕ tests/noodle-image-prompt-instructions.regression.ts (+236 -0)

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #1278

Reported in Pasta-Devs/Marinara-Engine#7318. The Engine side landed in Pasta-Devs/Marinara-Engine#7342; the Engine's mirror of the noodle.imagePost default follows in a separate Engine PR.

Why this change

  • A ComfyUI user with Danbooru-style tags (Illustrator 1.0.4, Noodle 1.5.1) found plain-English text meant for the prompt-writing model inside the prompt sent to ComfyUI: <quality tags> <model output> <instructions>. Tag-only prompts break when sentences end up in them.
  • Pasta-Devs/Marinara-Engine#7342 fixed the Engine's paths. Noodle builds its own image prompt with a frozen copy of the shared compiler, so that fix does not reach it. Noodle added this text itself in three places:
    • the noodle.imagePost default template pasted the poster's card Personality and opted-in image habits into the image prompt, although the rewrite model already gets both as character context;
    • with Interpret image prompts off, or when the rewrite failed, it appended User image instructions: <connection Image Prompting Instructions>;
    • compileImagePrompt ran without omitProfileStyleText. A style profile's Style text stayed in the prompt the rewrite model edits, although that model also gets it as style guidance. The built-in Auto instruction ("Infer a consistent visual style from the character, game, scene, and selected image model.") ended up in every Noodle image prompt.

What changed

  • noodle 1.5.1 → 1.5.2 (above every version the staging catalog has published).
  • prompt-overrides/registry/noodle.ts: the noodle.imagePost default sends the visual idea and appearance notes only. characterPersonality and characterImageInstructions stay available to custom templates; the key's and variables' descriptions say so.
  • noodle/noodle-image-prompt.ts: new compileNoodleImagePrompts compiles the prompt in the two forms the image service needs:
    • The rewrite model edits a prompt without the profile's Style text, because it gets that text as guidance.
    • The prompt sent when no rewrite runs, or when it fails, keeps a profile's Style text, as the Engine does when no prompt writer handled the style.
    • Neither form ever contains the built-in Auto instruction. Style text a user writes into Auto or a copy of it still applies, which matches Pasta-Devs/Marinara-Engine#7342.
  • noodle/noodle-public-images.service.ts: uses that helper and no longer appends User image instructions: …. Without a rewrite the image model gets the base prompt. A failed rewrite is logged with logger.warn, and instructions skipped because Interpret image prompts is off are logged in debug mode.
  • Where the poster's Personality and image habits go now: they reach the rewrite model on every path where it runs, because they make the character context non-empty and so always start the rewrite while Interpret image prompts is on. With it off there is no prompt writer, so they are no longer in the image prompt at all. A prompt the user reviewed and edited is still sent exactly as written.
  • New tests/noodle-image-prompt-instructions.regression.ts runs the real generateNoodlePostImage (sliced from the source, with storage, providers and the rewrite model stubbed) for rewrite off, rewrite on, rewrite failed, the Auto profile and a reviewed prompt. It also checks the default template and the helper, including an Auto copy with its own Style text. It fails on staging code and passes with the fix, and it is added to the PR checks next to the other Noodle regressions.
  • Rebuilt packages/noodle/{manifest.json,server.mjs}, artifacts/noodle-1.5.2.zip, catalog entries and release notes (packages/noodle/CHANGELOG.md, marked [highlight]). client.js is unchanged.
    • Built with MARINARA_ENGINE_ROOT at Engine ead04150a (detached worktree, pnpm install --frozen-lockfile). Rebuilding the unchanged package there reproduces the committed 1.5.1 artifact byte for byte (sha256 14a108ad…f3ca6, git status clean).
    • A second 1.5.2 build is identical. Artifact sha256 7fa52d296a76456c73767369bdc06cb9567b46203496b8d7e8c01f990975ec3d.

Package and security impact

  • Affected package IDs: noodle (1.5.1 → 1.5.2)
  • Engine compatibility impact: none (>=2.4.6 <4.0.0, capability API 1.35 unchanged)
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: none beyond the usual update restart prompt. No stored data changes. A user who saved a custom noodle.imagePost override keeps it.

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-run checks: npm run check (0 errors; no warnings in the changed files), node scripts/test-catalog-lanes.mjs, node scripts/validate-package-locales.mjs, node scripts/validate-catalog.mjs, node scripts/tests/catalog-release-notes.regression.mjs, git diff --check, node scripts/validate-pr-triage.mjs and node scripts/typecheck-packages.mjs noodle all pass. The new regression fails against the staging versions of the service and template and passes with the fix. All Noodle, Noodler and Slurp regressions were run one by one on this branch and on a pristine origin/staging worktree: the same 53 fail on both, and the new test is the only difference. No live install or image generation was run.

Still needed from a human:

  • Manually verify that updating Noodle 1.5.1 → 1.5.2 through Agents → Download Agents works and that the restart prompt appears.
  • Manually verify with a ComfyUI connection that has Image Prompting Instructions, a Danbooru style profile and a character whose card has a Personality: with Interpret image prompts on, let the character post an image and check the prompt in the ComfyUI queue, or in the server log with debug mode on ([debug/noodle/image] final image prompt). It should hold tags without the Personality text, the image habits, the connection's instructions or the Danbooru profile's Style sentence.
  • Manually verify the same with Interpret image prompts off: the prompt has no User image instructions: line, no Personality and no image habits, and the server log (debug mode) says the image connection's instructions were not applied.
  • Manually verify with the default Auto style profile that no Noodle image prompt contains "Infer a consistent visual style".
  • Manually verify that a copy of Auto with your own Style text (for example "watercolor") still puts that text in the Noodle image prompt.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

packages/noodle/CHANGELOG.md has the 1.5.2 entry. The README does not describe how image prompts are assembled. The Engine mirror of the noodle.imagePost default, its regression and an Engine CHANGELOG entry follow in a Pasta-Devs/Marinara-Engine PR for Pasta-Devs/Marinara-Engine#7318.

UI evidence (if applicable)

Not a UI change. The prompt-override editor (Settings → Generations → Prompt Overrides → Image Generation Prompt Overrides → Noodle Post Image) lists the Engine's copy of this key, so its description and default text change with the Engine PR, not this one.

Summary by CodeRabbit

  • New Features
    • Image-generation guidance now shapes prompt rewriting without being sent verbatim to image services. If rewriting is unavailable or disabled, image instructions are omitted; applicable style guidance still applies when rewriting is skipped.
  • Bug Fixes
    • Prevented character and connection instructions, along with the built-in Auto style note, from appearing directly in image prompts.

🔄 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/1279 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/9/2026 **Status:** ✅ Merged **Merged:** 10/9/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/1278-noodle-image-prompt-instructions` --- ### 📝 Commits (1) - [`14294a8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/14294a8eee9e0fdbd5cebf21bc1c60a4f8b3d6bc) fix(noodle): 1.5.2 — keep prompt-writer instructions out of image prompts (#1278) ### 📊 Changes **16 files changed** (+514 additions, -214 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pull-request-checks.yml` (+2 -1) ➕ `artifacts/noodle-1.5.2.zip` (+0 -0) 📝 `catalog/catalog.json` (+6 -6) 📝 `catalog/notes.json` (+6 -0) 📝 `catalog/v2/catalog.json` (+6 -6) 📝 `catalog/v2/notes.json` (+6 -0) 📝 `catalog/v3/catalog.json` (+6 -6) 📝 `catalog/v3/notes.json` (+6 -0) 📝 `packages/noodle/CHANGELOG.md` (+5 -0) 📝 `packages/noodle/manifest.json` (+3 -3) 📝 `packages/noodle/server.mjs` (+157 -158) 📝 `packages/noodle/src/engine/packages/server/src/services/noodle/noodle-image-prompt.ts` (+30 -0) 📝 `packages/noodle/src/engine/packages/server/src/services/noodle/noodle-public-images.service.ts` (+36 -22) 📝 `packages/noodle/src/engine/packages/server/src/services/prompt-overrides/registry/noodle.ts` (+8 -11) 📝 `scripts/build-feature-packages.mjs` (+1 -1) ➕ `tests/noodle-image-prompt-instructions.regression.ts` (+236 -0) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #1278 Reported in Pasta-Devs/Marinara-Engine#7318. The Engine side landed in Pasta-Devs/Marinara-Engine#7342; the Engine's mirror of the `noodle.imagePost` default follows in a separate Engine PR. ## Why this change - A ComfyUI user with Danbooru-style tags (Illustrator 1.0.4, Noodle 1.5.1) found plain-English text meant for the prompt-writing model inside the prompt sent to ComfyUI: `<quality tags> <model output> <instructions>`. Tag-only prompts break when sentences end up in them. - Pasta-Devs/Marinara-Engine#7342 fixed the Engine's paths. Noodle builds its own image prompt with a frozen copy of the shared compiler, so that fix does not reach it. Noodle added this text itself in three places: - the `noodle.imagePost` default template pasted the poster's card **Personality** and opted-in image habits into the image prompt, although the rewrite model already gets both as character context; - with **Interpret image prompts** off, or when the rewrite failed, it appended `User image instructions: <connection Image Prompting Instructions>`; - `compileImagePrompt` ran without `omitProfileStyleText`. A style profile's **Style text** stayed in the prompt the rewrite model edits, although that model also gets it as style guidance. The built-in **Auto** instruction ("Infer a consistent visual style from the character, game, scene, and selected image model.") ended up in every Noodle image prompt. ## What changed - `noodle` 1.5.1 → **1.5.2** (above every version the staging catalog has published). - `prompt-overrides/registry/noodle.ts`: the `noodle.imagePost` default sends the visual idea and appearance notes only. `characterPersonality` and `characterImageInstructions` stay available to custom templates; the key's and variables' descriptions say so. - `noodle/noodle-image-prompt.ts`: new `compileNoodleImagePrompts` compiles the prompt in the two forms the image service needs: - The rewrite model edits a prompt without the profile's Style text, because it gets that text as guidance. - The prompt sent when no rewrite runs, or when it fails, keeps a profile's Style text, as the Engine does when no prompt writer handled the style. - Neither form ever contains the built-in Auto instruction. Style text a user writes into Auto or a copy of it still applies, which matches Pasta-Devs/Marinara-Engine#7342. - `noodle/noodle-public-images.service.ts`: uses that helper and no longer appends `User image instructions: …`. Without a rewrite the image model gets the base prompt. A failed rewrite is logged with `logger.warn`, and instructions skipped because **Interpret image prompts** is off are logged in debug mode. - Where the poster's Personality and image habits go now: they reach the rewrite model on every path where it runs, because they make the character context non-empty and so always start the rewrite while **Interpret image prompts** is on. With it off there is no prompt writer, so they are no longer in the image prompt at all. A prompt the user reviewed and edited is still sent exactly as written. - New `tests/noodle-image-prompt-instructions.regression.ts` runs the real `generateNoodlePostImage` (sliced from the source, with storage, providers and the rewrite model stubbed) for rewrite off, rewrite on, rewrite failed, the Auto profile and a reviewed prompt. It also checks the default template and the helper, including an Auto copy with its own Style text. It fails on staging code and passes with the fix, and it is added to the PR checks next to the other Noodle regressions. - Rebuilt `packages/noodle/{manifest.json,server.mjs}`, `artifacts/noodle-1.5.2.zip`, catalog entries and release notes (`packages/noodle/CHANGELOG.md`, marked `[highlight]`). `client.js` is unchanged. - Built with `MARINARA_ENGINE_ROOT` at Engine `ead04150a` (detached worktree, `pnpm install --frozen-lockfile`). Rebuilding the unchanged package there reproduces the committed 1.5.1 artifact byte for byte (sha256 `14a108ad…f3ca6`, `git status` clean). - A second 1.5.2 build is identical. Artifact sha256 `7fa52d296a76456c73767369bdc06cb9567b46203496b8d7e8c01f990975ec3d`. ## Package and security impact - Affected package IDs: `noodle` (1.5.1 → 1.5.2) - Engine compatibility impact: none (`>=2.4.6 <4.0.0`, capability API 1.35 unchanged) - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: none beyond the usual update restart prompt. No stored data changes. A user who saved a custom `noodle.imagePost` override keeps it. ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [ ] `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-run checks: `npm run check` (0 errors; no warnings in the changed files), `node scripts/test-catalog-lanes.mjs`, `node scripts/validate-package-locales.mjs`, `node scripts/validate-catalog.mjs`, `node scripts/tests/catalog-release-notes.regression.mjs`, `git diff --check`, `node scripts/validate-pr-triage.mjs` and `node scripts/typecheck-packages.mjs noodle` all pass. The new regression fails against the staging versions of the service and template and passes with the fix. All Noodle, Noodler and Slurp regressions were run one by one on this branch and on a pristine `origin/staging` worktree: the same 53 fail on both, and the new test is the only difference. No live install or image generation was run. Still needed from a human: - Manually verify that updating Noodle 1.5.1 → 1.5.2 through **Agents → Download Agents** works and that the restart prompt appears. - Manually verify with a ComfyUI connection that has **Image Prompting Instructions**, a **Danbooru** style profile and a character whose card has a Personality: with **Interpret image prompts** on, let the character post an image and check the prompt in the ComfyUI queue, or in the server log with debug mode on (`[debug/noodle/image] final image prompt`). It should hold tags without the Personality text, the image habits, the connection's instructions or the Danbooru profile's Style sentence. - Manually verify the same with **Interpret image prompts** off: the prompt has no `User image instructions:` line, no Personality and no image habits, and the server log (debug mode) says the image connection's instructions were not applied. - Manually verify with the default **Auto** style profile that no Noodle image prompt contains "Infer a consistent visual style". - Manually verify that a copy of **Auto** with your own **Style text** (for example "watercolor") still puts that text in the Noodle image prompt. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation `packages/noodle/CHANGELOG.md` has the 1.5.2 entry. The README does not describe how image prompts are assembled. The Engine mirror of the `noodle.imagePost` default, its regression and an Engine CHANGELOG entry follow in a Pasta-Devs/Marinara-Engine PR for Pasta-Devs/Marinara-Engine#7318. ## UI evidence (if applicable) Not a UI change. The prompt-override editor (**Settings → Generations → Prompt Overrides → Image Generation Prompt Overrides → Noodle Post Image**) lists the Engine's copy of this key, so its description and default text change with the Engine PR, not this one. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Image-generation guidance now shapes prompt rewriting without being sent verbatim to image services. If rewriting is unavailable or disabled, image instructions are omitted; applicable style guidance still applies when rewriting is skipped. * **Bug Fixes** * Prevented character and connection instructions, along with the built-in Auto style note, from appearing directly in image prompts. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:10:07 +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#1380
No description provided.