mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7546] [MERGED] Professor Mari: Pi runtime reaches Classic parity and runs on every connection #7786
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#7786
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/7546
Author: @Gunterlie
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @Gunterlie
Base:
feat/mari-pi-runtime← Head:feat/mari-pi-runtime-4-parity📝 Commits (4)
9491fcaBring the pi runtime to classic parity: textual tool calls, understood-request record, final summary at the round limitb888ea8Pi runtime parity, second batch: empty-answer retry, Gemini repair, name scrub, duplicate calls, parallel reads, textual call cleanup9444f8fPi runtime review fixes: fence-safe call stripping, cut-off textual replies, text-only limit summary, settle only executed rounds5ecfe42Read DeepSeek's DSML call markup as tool calls📊 Changes
5 files changed (+609 additions, -153 deletions)
View changed files
📝
packages/server/src/services/llm/textual-tool-call-parser.ts(+90 -23)📝
packages/server/src/services/professor-mari/pi-runtime.ts(+224 -24)📝
packages/server/src/services/professor-mari/workspace-agent.service.ts(+95 -84)📝
scripts/regressions/mari-understood-request.regression.ts(+7 -11)📝
scripts/regressions/professor-mari/pi-runtime.regression.ts(+193 -11)📄 Description
Linked issue
No linked issue. This is planned work: slice 4 on the integration branch
feat/mari-pi-runtime. It is stacked on slice 3 (#7533) and targets that branch, so the diff shows only this slice.Why this change
app_datain her text, no "Acting on" line, a run that stopped after "I will read it now".What changed
<tool_call>{...}</tool_call>. The existing textual parser reads them; the call text is removed from the visible answer; history is replayed as plain text. Connections with native tool calls never parse text in the Pi adapter.resolveMariRuntimeno longer falls back to Classic.erroror an unclosed tag) run no calls, like a length cut.recordUnderstood/settleUnderstood; Classic behavior unchanged.auditWorkspaceCompletionClaim.<|DSML|tool_calls>…) as text; the run then ended with that markup as the answer (seen on production withnanogpt/deepseek/deepseek-v4-pro). The shared textual parser now reads it, matches spaced tool names ("app data") to known tools and rejoins a spaced action ("lorebook get entry" →lorebook.getEntry). Both runtimes use the parser through the provider fallback.MALFORMED_FUNCTION_CALLrecovery (shared helper);scrubInternalNameson text, chips and the summary; "say, then do" rule; "Continue the task." chip after a cut-off turn with a change; remaining chip and plan prompt rules; identical calls in one turn run once (shared dedupe); pure read tools run in parallel; raw-response debug log.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Not done by a person yet. To verify by hand:
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)docs/home/professor-mari.md(from slice 2) still says some connections use Classic; to update before the final PR intostaging.UI evidence (if applicable)
No client change.
Proof
Run by agents on commit
9444f8f50:pnpm check: exit 0. Server typecheck clean.node ./scripts/run-regressions.mjs --filter mari: 50/50 passed.scripts/regressions/professor-mari/pi-runtime.regression.ts(scripted provider): text calls on a non-native connection (notoolssent, call executes, result replayed as user text, call text removed, Manual hold), a code block kept next to a call, an unclosed tag runs nothing, empty-answer retry, Gemini repair, name scrub, "Continue" chip, duplicate skip, final summary at the limit.Read-only parity audit (Opus) of Classic versus Pi: 9 gaps, all addressed (parallel reads only partly, see limits).
Read-only adversarial review (Opus): 5 findings (code fences stripped, cut-off text reply could run part of its calls, Anthropic summary request with tool history and no tools, wrong outcome on an invalid-only round, unscrubbed summary). All fixed. Confirmed: Classic unchanged, all floors apply to text calls, only new model output is parsed, parallel runs cannot bypass a hold, every repair loop is bounded.
Local CodeRabbit: 2 findings (abort checks in the final summary, fence stripping). Both fixed.
DSML case added to the pi regression (fails without the parser change);
roleplay-function-callingandpromptregressions pass.Known limits:
app_datareads stay sequential on Pi (pi sets parallel per tool, andapp_dataalso writes). No cap of 4 on a parallel read batch.openai.provider.ts(near lines 1911 and 2121) reads<tool_call>tags and JSON fences from text when tools were sent and no native call came back. This affects both runtimes on native OpenAI-compatible connections.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.