mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8807] [MERGED] Recover when Home Mari prints a lorebook lookup instead of answering #8817
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#8817
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/8807
Author: @ylli-selmani
Created: 11/4/2026
Status: ✅ Merged
Merged: 11/4/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/mari-lorebook-retry📝 Commits (4)
ce03730Retry printed Home Mari lorebook lookups once550d9f4Keep Mari's original task and permission checks intact on retryc53971bRecognize printed lookups in the tool names Mari actually receivescfd7f62Integrate staging's quick replies with printed lookup recovery📊 Changes
3 files changed (+146 additions, -1 deletions)
View changed files
📝
packages/server/src/services/professor-mari/pi-runtime.ts(+39 -1)📝
packages/server/src/services/professor-mari/workspace-agent.service.ts(+5 -0)📝
scripts/regressions/professor-mari/pi-runtime.regression.ts(+102 -0)📄 Description
Linked issue
Closes #8806
Why this change
Home Mari can finish a turn by showing the tool call she meant to make. The user sees XML, the tool never runs, and resending the request can produce the same reply. One report came from GLM 5.3 on NanoGPT. In the other, the user asked Mari to create a chat and got a printed lorebook search. Running that search would still have missed the request.
What changed
use_toolblock forlorebook entries, and atool_calls/invokeblock forlorebook search. Both blocks can use the registered identifiers (app_data,lorebook.entries,lorebook.search) or the spaced names seen in chat. Mari drops the printed arguments and asks the model to reconsider the original request. The model can answer directly or make a fresh call in the format its connection supports.Validation
Replayed both reports with synthetic buffered JSON and split SSE responses through the OpenAI-compatible provider, Home Pi and saved chat storage. On staging both remained visible as text and produced zero tool calls. The regression covers successful recovery in textual mode, stopping after one retry, negative examples, and a mixed native call. The follow-up also exercises the live draft callback and a Plan-mode write refusal on the repair turn.
Local runs passed: the Professor Mari Pi runtime regression,
pnpm regression:prompt,pnpm check, and all seven desktop Chromium smoke tests. The provider responses were fixtures. Live-model reproduction on the reporters’ connections remains unverified.pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Docs and release impact
UI evidence (if applicable)
The provider-to-Mari regression checks emitted draft events and the stored assistant reply. Reporter screenshots remain private.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.