[GH-ISSUE #1429] [Issue]: D1 — Slurp2 companions are found by display name only, not by card/tag name #724

Closed
opened 2026-10-20 17:30:06 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Gunterlie on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1429

Originally assigned to: @Gunterlie on GitHub.

Summary

D1 from the identity-tag report (D2 is #1428 — please do D2 first).

When the scene names another person (a companion) only by their card/tag name, Slurp does not see them. Slurp looks only for the companion's display name ("Umi Ryuuzaki"), while tag prompts write the card name ("ryuuzaki umi", "ryuuzaki_umi"). So in insert / both mode the companion gets no look and no name tag, the one-person negative prompt stays, and their reference picture is not added.

Affected package

slurp2 (0.3.46)

Expected behavior

A companion is "in the picture" when the final prompt contains their display name or their card name (known), in any tag spelling (_ for spaces, \(series\), upper case). Then all three things happen together: their look/tag block, the lifted one-person rule, and their reference picture.

Actual behavior

All three checks use only companion.name (the display name):

  1. slurpImageCompanionBlocks — packages/slurp2/src/engine/packages/server/src/slp/base/media/slp-image-prompt.ts (around line 360):
    .filter((companion) => companion.name.trim() && scene.includes(companion.name.toLocaleLowerCase()))
  2. companionNamed — packages/slurp2/src/engine/packages/server/src/slp/features/media/slp-images-service.ts (around line 640):
    finalPrompt.toLocaleLowerCase().includes(companion.name.toLocaleLowerCase())
  3. The companion reference pictures, right after it (resolveIllustratorCharacterReferences with name: companion.name and promptText: finalPrompt).

Suggested fix

  • Add one small exported helper in slp-image-prompt.ts, for example slurpCompanionInPrompt(prompt, companion), that returns true when the prompt has name or known. Reuse the same plain() normalisation that slurpApplyImageSubject already uses (lower case, \(→(, _/spaces → one space). Do not write a second copy of it.
  • Use that helper in all three places. Do not fix only the filter — if the three checks disagree, a companion gets a look block but the "only one person" negative prompt stays, or the other way round.
  • For (3): make sure the reference lookup still finds the companion when the prompt only has the card name (for example, pass the name that matched).
  • Natural-language prompts must keep working as today.

Test

Add cases to tests/slurp2-image-subject.regression.ts (it already imports slurpImageCompanionBlocks):

  • Tag prompt with ryuuzaki_umi, companion { name: "Umi Ryuuzaki", known: "Ryuuzaki Umi", look: "blue hair" }, mode insert → block is produced.
  • Same prompt, companion not in it → no block.
  • The new helper: display name, card name, underscore and escaped-bracket spellings → true; another name → false.

Run: npx tsx --tsconfig tests/tsconfig.regressions.json tests/slurp2-image-subject.regression.ts, then npm run test:noodle:regressions.

Release checklist (for the PR)

  • Branch from staging, PR targets staging, link this issue.
  • Patch bump only, in both scripts/build-feature-packages.mjs (the slurp2 entry) and SLURP2_VERSION in packages/slurp2/src/engine/packages/client/src/slp/features/onboarding/slp-release.ts.
  • Rebuild the package with the build script (MARINARA_ENGINE_ROOT set to a Marinara-Engine checkout). Do not hand-edit client.js, server.mjs, the zip, catalogs or hashes.
  • npm run check and the baseline commands in AGENTS.md.
  • Leave the PR's test-plan checkboxes unticked.
Originally created by @Gunterlie on GitHub (Oct 16, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1429 Originally assigned to: @Gunterlie on GitHub. ## Summary **D1** from the identity-tag report (D2 is #1428 — please do D2 first). When the scene names another person (a companion) only by their card/tag name, Slurp does not see them. Slurp looks only for the companion's **display name** ("Umi Ryuuzaki"), while tag prompts write the card name ("ryuuzaki umi", "ryuuzaki_umi"). So in `insert` / `both` mode the companion gets no look and no name tag, the one-person negative prompt stays, and their reference picture is not added. ## Affected package `slurp2` (0.3.46) ## Expected behavior A companion is "in the picture" when the final prompt contains their display name **or** their card name (`known`), in any tag spelling (`_` for spaces, `\(series\)`, upper case). Then all three things happen together: their look/tag block, the lifted one-person rule, and their reference picture. ## Actual behavior All three checks use only `companion.name` (the display name): 1. `slurpImageCompanionBlocks` — `packages/slurp2/src/engine/packages/server/src/slp/base/media/slp-image-prompt.ts` (around line 360): `.filter((companion) => companion.name.trim() && scene.includes(companion.name.toLocaleLowerCase()))` 2. `companionNamed` — `packages/slurp2/src/engine/packages/server/src/slp/features/media/slp-images-service.ts` (around line 640): `finalPrompt.toLocaleLowerCase().includes(companion.name.toLocaleLowerCase())` 3. The companion reference pictures, right after it (`resolveIllustratorCharacterReferences` with `name: companion.name` and `promptText: finalPrompt`). ## Suggested fix - Add **one** small exported helper in `slp-image-prompt.ts`, for example `slurpCompanionInPrompt(prompt, companion)`, that returns true when the prompt has `name` or `known`. Reuse the same `plain()` normalisation that `slurpApplyImageSubject` already uses (lower case, `\(`→`(`, `_`/spaces → one space). Do not write a second copy of it. - Use that helper in all three places. Do not fix only the filter — if the three checks disagree, a companion gets a look block but the "only one person" negative prompt stays, or the other way round. - For (3): make sure the reference lookup still finds the companion when the prompt only has the card name (for example, pass the name that matched). - Natural-language prompts must keep working as today. ## Test Add cases to `tests/slurp2-image-subject.regression.ts` (it already imports `slurpImageCompanionBlocks`): - Tag prompt with `ryuuzaki_umi`, companion `{ name: "Umi Ryuuzaki", known: "Ryuuzaki Umi", look: "blue hair" }`, mode `insert` → block is produced. - Same prompt, companion not in it → no block. - The new helper: display name, card name, underscore and escaped-bracket spellings → true; another name → false. Run: `npx tsx --tsconfig tests/tsconfig.regressions.json tests/slurp2-image-subject.regression.ts`, then `npm run test:noodle:regressions`. ## Release checklist (for the PR) - Branch from `staging`, PR targets `staging`, link this issue. - Patch bump only, in **both** `scripts/build-feature-packages.mjs` (the `slurp2` entry) and `SLURP2_VERSION` in `packages/slurp2/src/engine/packages/client/src/slp/features/onboarding/slp-release.ts`. - Rebuild the package with the build script (`MARINARA_ENGINE_ROOT` set to a Marinara-Engine checkout). Do not hand-edit `client.js`, `server.mjs`, the zip, catalogs or hashes. - `npm run check` and the baseline commands in `AGENTS.md`. - Leave the PR's test-plan checkboxes unticked.
bsakaguchi 2026-10-20 17:30:06 +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#724
No description provided.