mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5966] Mari says an edit is done but nothing is staged: no approve/deny card, and the user's callout is then refused #3306
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#3306
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 @kolacheee on GitHub (Sep 8, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5966
Originally assigned to: @SpicyMarinara on GitHub.
Reported by a user (2026-09-07)
Models named are Kimi K3 and GLM 5.3 — non-Claude endpoints behind the OpenAI-compatible provider.
Short version
A fix for this did not go out. The completion-claim guard from #5819/#5830 (PR #5893) merged to
stagingon 2026-09-06 and has never been released — the newest stable is v2.4.4, published 2026-08-25, whose tag commit is identical to themaintip.auditWorkspaceCompletionClaimdoes not exist anywhere onmain. The issues were closed on merge, which is almost certainly why it looked shipped. Stable is also the default update channel, so a user is on v2.4.4 unless they opted out.But shipping
stagingalone would not fix this user either. The report is four independent defects stacked, and only one of them is fixed onstaging. Each is separately actionable — happy to split this into four issues if you'd rather.1. The prompt's own example tells Mari to send
apply:falsefor an editworkspace-agent.service.ts—main:739,staging:763:That example sits inside the "Direct request to make that change — act on it" block, unlabeled, directly between an
agent.createexample withapply:trueand alorebook.deleteEntryexample withapply:true. Nothing marks it as a deliberate preview.This matters because the
applydefault is inverted between creates and edits:appDataCreateApply=firstBoolean(source, ["apply"]) !== false(services/mari-db/mari-db.service.ts:955) → applies unless told otherwisesetActive/moveToFolder:firstBoolean(args, ["apply"]) === true— 20 sites on both branches → previews unless told otherwiseA dry run returns
ok:true, exit code 0, andapproval:not_required. It stages nothing, so no approve/deny card appears — and from the model's point of view the command succeeded, so it reports success. The schema the model sees is a bare undocumented boolean with onlyactionrequired.A model that copies the nearest matching example for
lorebook.updateEntrygetsapply:falseverbatim. "Creates work, edits silently don't" is exactly the shape the user describes.2. A malformed command block is dropped silently
Mari uses a text JSON protocol — no native tool calling — and JSON mode is only requested for
openrouter(staging:218-220), so nanogpt/custom/xai/mistral/arli/cohere run with no structured-output enforcement.Her own reader (
rawJsonToolCallsstaging:1187,parseJsonCommandCallsFromPayloadstaging:1196) is much stricter than the engine's tolerant salvage parser intextual-tool-call-parser.ts:commandsmust be an Array, and arguments come only fromarguments|args|input— notool, no{type:"function",function:{…}}, notool_name, noparameters. Unrecognized entries hit a barereturnatstaging:1209with no log, no status, no trace.The tolerant parser cannot rescue it, because
removeJsonActionFramesstrips the frame before it runs (staging:1367-1369), and provider-side salvage is gated onoptions.tools?.length(openai.provider.ts:1649/1848), which Mari never sets.The frame then keeps
protocolValid=trueand computesstop=true, so every repair branch is bypassed and the loop breaks having streamed "I've updated it" with zero commands executed — no card, zero repair rounds spent.Honest limit: the sub-agent verified this by running the repo's own parser against seven plausible reply shapes (five yield zero commands, one erases the payload). What is not proven is that K3 and GLM 5.3 specifically emit those shapes — nothing currently captures a raw reply, so that link is inference. A debug capture of one failing reply would settle it, and would be worth having regardless.
3. The completion-claim detector misses how these models actually talk
workspaceTextClaimsMutationCompletion(staging:1979-1996,main:2004-2012) only matchesI/we/it/that + verboris/was/has been + verbagainst a fixed verb list. Verified by executing the shipped regexes:added,applied,edited,modified,set,inserted,made,completed. So even clean English misses — "I added the entry to the lorebook." is not detected. "Added" is the most natural verb for lorebook work.Done!·Created the entry.·Updated.·Edit applied.I've created the entry.catches;I’ve created the entry.(U+2019) does not.When it misses,
staging:2089returns early and the entire guard — every branch, both escape hatches, the watermark — is skipped. The false claim streams to the user and the run ends clean. There is no independent fallback for "the user asked for an edit and no mutating command ran," so the user is the only detector in the system, which is precisely what they described.On shipped v2.4.4 it is worse: no plural copulas (
are|were|have beenabsent,main:2011),verifiedstill in the verb list so it self-trips, andmain:2019audits only the terminal frame.4. On the shipped build, the user's callout is itself refused
This is the "3 or 4 tries", and it is the sharpest of the four.
workspaceMutationAuthorizationIssue(main:1868) runs before execution and judges the active user message. Running the shipped regexes against natural retry phrasings:main:1949)main:1921)MUTATION_DENIALmain:1755, checkedmain:1895)So a user complaining that nothing happened is parsed as instructing Mari to make no changes. The only reliable escape is re-stating the original request with a mutation verb — which is exactly the "3 or 4 tries, then it posts" pattern.
The short-confirmation carve-out at
main:1910cannot help here: it requires the previous assistant message to have asked for approval. Mari's previous message was a completion claim, so it doesn't qualify.This one is already gone on
staging—workspaceMutationAuthorizationIssueandMUTATION_INTENT_PATTERNShave zero occurrences in the staging production path (they survive only inscripts/regressions/mari-edit-flow-revert.regression.ts), removed by the Permissions Mode work.Suggested order
staging. It removes defect 4 outright and materially widens the detector. This is the single biggest win and needs no new code.apply:falseexample (main:739/staging:763) — a one-word change, and my best guess at the most common real-world trigger. Worth also giving theapplyflag a schema description, and reconsidering why edits and creates default in opposite directions.staging:2071-2075already concedes the participle gap as an accepted residual; this report is evidence it is load-bearing in practice.How this was checked
Every regex and default above was executed against the actual
origin/mainandorigin/stagingblobs rather than read, and each finding was re-checked by a second pass against the cited lines. Line numbers arepackages/server/src/services/professor-mari/workspace-agent.service.tsunless stated.Nothing here is started — filing for triage.
@kolacheee commented on GitHub (Sep 8, 2026):
Related: #5967 — while tracing defect 3 above I found that the
stagingclaim audit discards a frame's real commands when that same frame also claims completion. Unreleased, but it lands on exactly the models in this report, so it is worth fixing beforestaginggoes out as the fix for this.@SpicyMarinara commented on GitHub (Sep 8, 2026):
Codex is taking this issue for @SpicyMarinara in the assigned-issue sweep, together with #5966/#5967. The fix targets
staging: preserve commands in mixed claim/command frames, repair malformed command frames, and check completion against executed results. Existing permission and preview boundaries stay in force.@SpicyMarinara commented on GitHub (Sep 8, 2026):
Fixed and merged to staging in #5973. Valid edit commands execute before the completion-claim audit, and unsupported or incomplete frames are repaired without claiming an unsaved edit.