mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5819] Mari reports creating characters that never appear, and the completion-claim guard only checks the run's last frame #3209
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#3209
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 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5819
Originally assigned to: @kolacheee on GitHub.
In one sentence: a user reports Mari saying she created characters that never appear, and the diagnostics record backs the report up — it says the round applied an
app_data character.createfor a character the user cannot find — with the strongest suspect being that the completion-claim guard only inspects the run's final frame, so every intermediate "created it, moving on" in a multi-character batch is never checked at all.What the user reports
Diagnostics
The last line is the useful part: the engine observed a mutating
app_data character.createand recorded the round's outcome as applied, i.e. the command reported success. The user says that character is not in the list. That is the silent-persistence-failure shape — an "it worked" that the user cannot see the result of.What their build does and doesn't contain
Verified against
f4367ec50e01:mariCLI dry-runs counted as applied, sandbox-denied writes counted as applied, symlink staging) or #5793 (appliedapp_datamutations verify themselves with a store read-back).#5793 matters most here: it is the mechanism that would have caught this exact case, because it re-reads the affected row from the store after applying and reports a mismatch instead of a clean success. A retest on a current build is therefore the first ask — not because it necessarily fixes the cause, but because it turns "she said it worked" into either a confirmed write or a loud mismatch.
Leading suspect: the guard only audits the final frame
workspaceActionNeedsVerificationbails out unless the frame has no commands, hasstop: true, and carries a completion claim:In a multi-character batch, Mari's intermediate frames look like
say: "Created Aria — now creating Bran."with the next command attached andstop: false. Every one of those skips the check completely, so a claim about character 1 is never audited; only the very last frame of the run is. That matches the report exactly ("she would move straight on to the next character without having created the previous one first"), and it means the existing protection is much thinner than it appears for exactly the batch workflows people use Mari for.Two smaller notes on the same path:
workspaceTextClaimsMutationCompletionis an English-only regex, so a claim phrased in another language is not detected even on the final frame. The reporter's phrasing suggests they may not be working in English; worth confirming.unsloth/gemma-4-26B-A4B-it-GGUF) on a custom endpoint. Small local models drop or malform command frames more often than hosted ones, which makes "says it did, didn't" more likely to originate model-side — which is precisely the case the guard exists to catch, so the guard's coverage gap and the weak model compound each other.What would pin it down
GET /api/characters(or the storage table) for the name Mari claimed, and check whether it appears after a hard refresh or restart. If the row exists, this is a list-refresh bug, not a persistence bug, and the fix is completely different.app_dataresult including the"saved"flag.Not covered here
The reporter also felt Mari acted before final approval. They did not include the "Acting on" phrase from that reply, so there is nothing to trace it with; that part needs a fresh report with the phrase before it can be looked at.
@kolacheee commented on GitHub (Sep 3, 2026):
Attempted a fix for this and withdrew it — posting the findings so the next attempt starts from the right design rather than repeating mine.
The obvious fix is to stop
workspaceActionNeedsVerificationbailing out on non-terminal frames. I did that (challenging onlynoneandmismatchmid-run, keepingunverified/stagedterminal-only, on a separate repair budget), and an adversarial review found three problems that make it worse than nothing:1. It does not catch the reported symptom.
resolveWorkspaceMutationVerificationcollapses the entire run's results into a single verdict — it answers "did anything in this run apply?", not "did the step just claimed apply?". So in the reported batch:verifiedverifiedfrom Aria → not challengedThe guard only fires when nothing at all applied in the whole run, i.e. a batch that fails on character #1. Every partially-successful batch — which is exactly what users report — stays uncovered.
2. It can create duplicates. The mid-run coaching I wrote said "carry out that step now", dropping the read-first wording the terminal
nonemessage deliberately uses ("use a read command to inspect the requested state; if it is missing, perform the mutation"). Any false positive is then answered with an instruction to write.3. Continuation runs make that concrete.
commandResultsForContinuityis declared per run, so a run resuming a task starts with an empty results array while the continuity prompt correctly tells Mari the earlier steps succeeded. Her accurate recap ("I created Aria and Bran; now creating Cass") resolves tononeand gets told to redo it — duplicating characters that already exist. Before this change that frame was never audited at all, so this would have been a regression introduced by the fix.What a correct fix needs
commandResultsForContinuity.slice(watermark), advancing the watermark on each audited claim frame — rather than over the whole run. That is what makes round 4's claim about Bran fail while round 3's claim about Aria passes.Two smaller notes for whoever picks this up:
workspaceTextClaimsMutationCompletionincludes "verified" in its verb list, so "I've verified the card looks right" reads as a completion claim; and it is an English-only regex, so none of this protects non-English sessions (relevant to the original report, whose phrasing suggests translation).The sibling UI half of that report is fixed separately in #5821.