mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6331] [Issue]: Prompt preview omits capability package prompt-context, so it shows a prompt the model never receives #3534
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#3534
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 @BiBoBaBe on GitHub (Sep 18, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6331
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Peek Prompt / prompt preview never includes text contributed by capability packages through
prompt-context. It shows a prompt the model does not actually receive, so a package author checking their contribution sees it missing even when it is being sent, or sees it "present" by omission when it is in fact being dropped.Expected behavior
The preview should include package
prompt-contextblocks exactly as a real generation appends them to the system message, so it shows what the model will receive.Actual behavior
POST /api/prompts/:id/previewforwards to/api/generate/dryRun(routes/generate/prompt-preview.ts), which is served byroutes/generate/dry-run-route.ts. That route is a separate assembler and never callscollectCapabilityPromptContext. Only the real path inroutes/generate.routes.tsdoes: game at themode: "game"call, and roleplay/conversation in theif (chatMode !== "game")block, both throughinjectCapabilityContexts, which appends the blocks to the system message.So for any chat where a package contributes context, the preview and the real request differ.
Verified on
stagingat7c82d9096:dry-run-route.tshas no reference tocollectCapabilityPromptContextorinjectCapabilityContexts.Steps to reproduce
prompt-contextand registers a contributor that returns a fixed marker string for a chat.POST /api/prompts/:presetId/previewwith thechatId. The marker is absent.Environment
7c82d9096(behaviour confirmed by source); observed live on a 2.4.5-based buildLogs, screenshots, or video
Diffing the preview response against a captured real request for the same chat and turn: the preview system message has no package block; the real system message has the package block appended after the preset sections.
Additional context
minP. The dry-run assembler drifting fromgenerate.routes.tslooks like a recurring risk, not a one-off.warnlog (prompt-context contributor <id> exceeded 2000ms). With the preview also omitting contributions, a package author currently has no in-app way to tell whether their context reached the model. That combination hid a contributor that was silently timing out on almost every roleplay turn.injectCapabilityContexts(or collect the samepackageBlocks) so the two assemblers cannot diverge on this.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Sep 18, 2026):
@SpicyMarinara is handling this in the current issue sweep: #6335. Implementation and regression proof are in progress.
@SpicyMarinara commented on GitHub (Sep 18, 2026):
Resolved in #6335, merged into
staging.Peek Prompt and generation now share package prompt-context collection and placement, including preset Agent Sections and the existing chat/audience filtering for roleplay events.
Regression proof captures actual requests to a local provider in all three modes, checks package placement and deactivation, and verifies that preview leaves message history unchanged and excludes private events intended for other audiences or chats.