mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2457] [MERGED] Fix deferred speaker macro resolution #5614
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#5614
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/2457
Author: @Promansis
Created: 6/6/2026
Status: ✅ Merged
Merged: 6/6/2026
Merged by: @Promansis
Base:
refactor← Head:issue-2446-deferred-speaker-macros📝 Commits (5)
50e4d74Fix deferred speaker macro resolutionc9e058dFix scoped deferred macro reuse8f83ac8Delete src/engine/shared/macros/macro-engine.test.tsd1c4928Delete src/engine/generation/prompt-assembly.test.ts2961041Merge branch 'refactor' into issue-2446-deferred-speaker-macros📊 Changes
2 files changed (+266 additions, -33 deletions)
View changed files
📝
src/engine/generation/prompt-assembly.ts(+89 -12)📝
src/engine/shared/macros/macro-engine.ts(+177 -21)📄 Description
Linked issue
Closes #2446
Why this change
{{char}}, character field macros, and character-dependent conditionals against the wrong speaker before provider handoff.What changed
{{char}},{{description}}, and character-dependent conditionals.Refactor impact
Primary owner:
engine generation / prompt assembly
Impact areas reviewed:
Boundary notes:
Pressure points touched:
src/engine/generation/prompt-assembly.tssrc/engine/shared/macros/macro-engine.tsValidation
pnpm typecheck,pnpm build,pnpm check:architecture,pnpm check:docs, or fullpnpm checkwhen warranted)pnpm checkpasses before PR push/handoffManual verification notes
pnpm test -- src/engine/generation/prompt-assembly.test.tspnpm typecheckpnpm check:architecturepnpm checkgit diff --checkDurable test rationale: this fixes a regression-prone prompt assembly invariant where provider-ready prompt messages must resolve speaker-scoped macros against the target character and must not leak deferred placeholders. Existing tests did not cover reused prompt context across targeted individual group turns. The new test is narrow and stays in the existing prompt assembly test file.
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
No visible UI changes.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.