mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6152] A lorebook Outlet entry with a blank outlet name is left out of world generation but still counted as included #3423
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#3423
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 @kolacheee on GitHub (Sep 13, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6152
Originally assigned to: @SpicyMarinara on GitHub.
If you set a lorebook entry's Position to "Outlet" but leave the outlet name box empty, and then tick that entry for world generation, its text never reaches the model. Nothing warns you: the Engine reports the entry as included, so the world picker stays silent and the finished brief quietly ignores one of the entries you chose.
How to reproduce (try it yourself)
LOG_LEVEL=debug, seedocs/CONFIGURATION.mdunder Logging Levels) so the outbound world prompt is printed to the server console.Ashfallwith a distinctive body such asUNNAMEDMARK ashfall covers the roads. Expand its drawer, set Position toOutlet, and leave theOutlet namefield that appears underneath completely blank. Save. Nothing blocks the save: the field has no required marker.Before Characterand distinctive bodies. Make sure all three entries are switched on.[debug/game/experience-generation] system message:.What you'll see: the prompt block contains the two ordinary entries and not the Outlet entry. The browser console shows no lore warning from Pixelforge, because the Engine answered
includedEntries: 3withskippedEntries: []. Nothing in the app, and nothing in the sealed brief's repair notes, records that a ticked entry never reached the model. As a control, give that same entry any outlet name (for exampleworld) and regenerate: its text now appears in the prompt block, so the blank name is what causes the loss.What should happen: either the editor should not let you save an Outlet entry without a name, or, if such an entry is ticked anyway, the reply should name it as skipped so the count and the prompt cannot disagree without a trace.
Where it is
At staging
ac14dd704:packages/server/src/services/lorebook/prompt-injector.ts:189inprocessActivatedEntries:if (entry.position !== 7 || !entry.outletName) continue;, and line 204totalEntries: budgeted.length.packages/server/src/routes/game.routes.ts:10923spreads...Object.values(lorebookResult.outlets)into the world prompt, and:10929setslorebookIncludedEntries = lorebookResult.totalEntries.packages/shared/src/schemas/lorebook.schema.ts:187:outletName: z.string().trim().max(200).default(""), with no cross-field check againstposition.packages/client/src/components/lorebooks/LorebookEntryRow.tsx:1710-1729: the outlet name input, rendered when position is 7, with norequiredattribute and no save-time guard.What's happening
An entry with position 7 and an empty name satisfies every activation gate and the budget, so it is counted in
totalEntries, which the world route reports asincludedEntries. It is then sorted into none of the buckets the world prompt is built from: the before, after and depth buckets all require a different position, and the outlet map requires a non-empty name. It falls out between the counting step and the assembly step, and because it was never refused it produces no skip record either. Pixelforge trusts the Engine's numbers rather than re-counting (packages/pixelforge/src/18-brief.js:870-880,if (included >= count && !skipped) return;), so three of three with no skips means total silence.Suggested fix
Close it at the source: make a non-empty outlet name a requirement when Position is Outlet, both in the editor (block or flag the save, matching the docs that already tell users to enter an exact, case-sensitive name) and in the schema, with a refine that rejects position 7 with an empty
outletName. Existing rows with the degenerate state would need a migration or a tolerant read path. Optionally, as a second commit, have the world route emit a skip record when a budgeted entry ends up in none of the buckets it concatenates, so that this class of disagreement between the count and the prompt can never be silent again.Context
The drop itself predates PR #5977: the position 7 name check comes from the Outlets feature commit
6f91d90b4(2026-07-27), and the count line is older still, so this behaviour is present in the shipped v2.4.4 build rather than being new on staging. PR #5977, which shipped issues #5952 and #5953, added the flattening of named outlets into the world prompt, which shrank the affected set from all outlets to blank-name outlets only, so this is a leftover rather than a regression from that PR; only that narrowing is unreleased. PR #6137 did not touch this area: its server change is confined togame.routes.tsbody limits, entry state overrides and the output headroom error, and it does not editprompt-injector.ts. Note that the reply protocol shipped with #5944 states thatskippedEntriesis not a census of refusals and that pre-budget refusals are visible only as absence fromincludedEntries, so the narrow and defensible claim here is only this: the entry is absent from the prompt while present inincludedEntries, the one combination that protocol leaves no way to detect. The maintainer regression laneexperience-lore-entriespasses at this head and covers only the named outlet case, so this path is genuinely uncovered.Found by an AI-assisted sweep and re-verified against staging
ac14dd704on 2026-09-13. Please verify before fixing.@SpicyMarinara commented on GitHub (Sep 13, 2026):
Codex is addressing this report on behalf of @SpicyMarinara in draft PR #6168 as part of the requested issue sweep. I will verify the reported path against staging and preserve existing behavior outside the narrow fix.