mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2170] [Issue]: Bare-string context injections are silently dropped by the engine normalizer (legacy-format migration lost) #1077
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#1077
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 @Romuromylus on GitHub (Jun 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2170
Originally assigned to: @cha1latte on GitHub.
Summary
The legacy app's
normalizeContextInjectionsmigrated loose string-form injection entries into a prose-guardian-typed object. The refactor's engine-side normalizer drops any non-record entry, so a bare-stringcontextInjection(the legacy persisted shape) is silently discarded instead of migrated.Expected behavior
A request/persisted
contextInjectiongiven as a plain string is preserved and treated as a prose-guardian injection.Actual behavior
The engine-side
normalizeContextInjectionsdoesif (!isRecord(entry)) continue;, so bare-string entries fromexistingExtra.contextInjectionsare skipped. The refactor's client display normalizer still handles strings, which is what flagged the engine-side gap.Steps to reproduce
extra.contextInjectionsarray that contains bare strings (legacy cache shape) and regenerate/retry over it.Impact area
Environment
93555d4bRegression notes
Worked in legacy (main @
c49f1d95). main:packages/server/src/routes/generate/agent-normalizers.ts:9-12(maps bare string ->{ agentType: "prose-guardian", text }), exercised over persisted message extra atgenerate.routes.ts:6623andretry-agents-route.ts:1467. refactor @93555d4b:src/engine/generation/start-generation.ts:1792-1804drops non-record entries; partial survivor (client display only) atsrc/features/modes/roleplay/components/ContextInjectionPanel.tsx:52-69. Low real-world exposure since the refactor only ever writes object-shaped injections, but the defensive legacy-compat migration is gone.