mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2449] [Issue]: 12-PROMPT-RUNTIME-regex-prompt-transforms skips prompt messages #1203
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#1203
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 @Promansis on GitHub (Jun 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2449
Originally assigned to: @Promansis on GitHub.
Summary
12-PROMPT-RUNTIME-regex-prompt-transforms: prompt-only regex scripts do not transform refactor prompt/injection messages, and late group turn prompt messages are appended after the regex pass.Linked target: #2442.
Expected behavior
Legacy applies macro-aware prompt regex scripts to every mapped prompt message after prompt macro context exists and before provider send.
Actual behavior
Refactor applies prompt regex during prompt assembly, but skips messages marked
contextKind: "prompt"or"injection". It also appends group turn prompt messages after the regex pass, so those messages cannot be transformed.Steps to reproduce
Impact area
Environment
refactor@54a9ffd3scan targetLogs, screenshots, or video
Proof:
main:packages/server/src/routes/generate.routes.ts:2334.main:packages/server/src/services/regex/regex-application.ts:108.src/engine/generation/prompt-assembly.ts:3421.contextKind: "prompt"and"injection"atsrc/engine/generation-core/regex/regex-application.ts:113.src/engine/generation/prompt-assembly.ts:869andsrc/engine/generation-core/lorebooks/prompt-injector.ts:105.src/engine/generation/prompt-assembly.ts:3425; the group turn prompt builders are atsrc/engine/generation/prompt-assembly.ts:2839.Files inspected:
main:packages/server/src/routes/generate.routes.ts:2334main:packages/server/src/services/regex/regex-application.ts:71main:packages/client/src/hooks/use-apply-regex.ts:41src/engine/generation/prompt-assembly.ts:3421src/engine/generation-core/regex/regex-application.ts:69src/engine/generation/regex-runtime.ts:20src/engine/generation-core/lorebooks/prompt-injector.ts:98Regression notes
Legacy behavior on
mainapplies prompt regex scripts to all prompt messages in the mapped generation prompt. Refactor omits prompt/injection messages and late group turn prompts from that transform.Additional context
Acceptance criteria:
Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: