mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2246] [MERGED] Fix legacy context injection normalization #5507
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#5507
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2246
Author: @cha1latte
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @cha1latte
Base:
refactor← Head:fix/issue-2170-context-injection-strings📝 Commits (4)
7629fddFix legacy context injection normalizationb284201Record PR verification metadataa19332cHarden regenerate context injection merge5d04b97Merge upstream refactor into issue 2170 fix📊 Changes
3 files changed (+198 additions, -57 deletions)
View changed files
📝
scratch/bugfix-verification.json(+56 -49)📝
src/engine/generation/start-generation.test.ts(+118 -8)📝
src/engine/generation/start-generation.ts(+24 -0)📄 Description
Linked issue
Closes #2170
Why this change
extra.contextInjectionscan contain bare strings. The refactor engine path dropped those rows during regenerate/retry merges, so legacy prose-guardian guidance could silently disappear.What changed
{ agentType: "prose-guardian", text }in the engine generation normalizer.extra, so legacy/current cached rows survive when a regenerated message receives new agent output.Refactor impact
Primary owner:
Impact areas reviewed:
src/engine/generation/start-generation.tssrc/engine/generation/start-generation.test.tsscratch/bugfix-verification.jsonBoundary notes:
src/engine; no React, Tauri, shared API, storage schema, dependency, or release metadata changes.Pressure points touched:
Validation
pnpm typecheck,pnpm build,pnpm check:architecture,pnpm check:docs, or fullpnpm checkwhen warranted)pnpm checkpasses before PR push/handoffManual verification notes
pnpm exec vitest run src\engine\generation\start-generation.test.ts --reporter=json --outputFile=scratch\issue-2170-before.jsonfailed before the fix with the legacy prose-guardian row missing.pnpm exec vitest run src\engine\generation\start-generation.test.ts --reporter=json --outputFile=scratch\issue-2170-after.jsonpassed after the fix.pnpm exec vitest run src\engine\generation\start-generation.test.ts --reporter=json --outputFile=scratch\issue-2170-after-review.jsonpassed after the review follow-up covering direct target lookup fallback.pnpm exec vitest run src\engine\generation\start-generation.test.ts --reporter=json --outputFile=scratch\issue-2170-after-conflict-resolution.jsonpassed after resolving upstream/refactor conflicts.pnpm exec vitest run src\engine\generation\active-lorebook-scanner.test.tspassed after merging upstream/refactor.node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.jsonpassed.pnpm typecheckpassed.pnpm checkpassed.Feature Discoverability
Check exactly one:
src/features/shell/discovery/because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.Reason:
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdUI evidence
scratch/bugfix-verification.json.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.