[GH-ISSUE #5819] Mari reports creating characters that never appear, and the completion-claim guard only checks the run's last frame #3209

Closed
opened 2026-10-21 06:00:35 +07:00 by bsakaguchi · 1 comment
Owner

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.create for 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

  • Mari "claims to be creating a character while nothing actually happens", or fails to create it on the first attempt even when told explicitly.
  • "She says she has created the character, yet the character doesn't appear in the list."
  • Creating several characters from a lorebook in one go: "she would move straight on to the next character without having created the previous one first."

Diagnostics

Marinara Engine diagnostics
Version: 2.4.5
Build: 2.4.5+f4367ec50e01
Commit: f4367ec50e01
Server OS: Windows 10.0.19045 (x64)
Server memory: heap 163.8 / 4288 MiB; RSS 186.3 MiB
Background wake lock: not reported
Last detected freeze: none detected
Client OS: Windows 10.0
Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:155.0) Gecko/20100101 Firefox/155.0
GPU: ANGLE (NVIDIA, NVIDIA GeForce RTX 3060
Active connection: Unsloth
Connection provider: custom
LLM model: unsloth/gemma-4-26B-A4B-it-GGUF
Mari last acted on: (no phrase reported) [mode: auto; applied; app_data character.create; at 2026-09-03T10:30:36.430Z]

The last line is the useful part: the engine observed a mutating app_data character.create and 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:

  • Has #5755 (the panel/permission polish batch — this is the "no longer asks every time" change they noticed) and #5775 (staged sensitive changes no longer satisfy the verification guard).
  • Does not have #5787 (#5776–#5778: bash mari CLI dry-runs counted as applied, sandbox-denied writes counted as applied, symlink staging) or #5793 (applied app_data mutations 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

workspaceActionNeedsVerification bails out unless the frame has no commands, has stop: true, and carries a completion claim:

if (action.commands.length > 0 || !action.stop || !workspaceTextClaimsMutationCompletion(action.visibleText)) {
  return null;
}

In a multi-character batch, Mari's intermediate frames look like say: "Created Aria — now creating Bran." with the next command attached and stop: 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:

  • workspaceTextClaimsMutationCompletion is 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.
  • Their model is a quantised local Gemma (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

  1. Does the character exist at all? Check 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.
  2. Retest on a build containing #5793 and report what the read-back says — a mismatch would confirm the write did not persist; a clean verified would push this toward the client.
  3. If reproducible, the server log for that round shows the app_data result 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.

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.create` for 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 - Mari "claims to be creating a character while nothing actually happens", or fails to create it on the first attempt even when told explicitly. - "She says she has created the character, yet the character doesn't appear in the list." - Creating several characters from a lorebook in one go: "she would move straight on to the next character without having created the previous one first." ## Diagnostics ``` Marinara Engine diagnostics Version: 2.4.5 Build: 2.4.5+f4367ec50e01 Commit: f4367ec50e01 Server OS: Windows 10.0.19045 (x64) Server memory: heap 163.8 / 4288 MiB; RSS 186.3 MiB Background wake lock: not reported Last detected freeze: none detected Client OS: Windows 10.0 Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:155.0) Gecko/20100101 Firefox/155.0 GPU: ANGLE (NVIDIA, NVIDIA GeForce RTX 3060 Active connection: Unsloth Connection provider: custom LLM model: unsloth/gemma-4-26B-A4B-it-GGUF Mari last acted on: (no phrase reported) [mode: auto; applied; app_data character.create; at 2026-09-03T10:30:36.430Z] ``` The last line is the useful part: the engine observed a mutating `app_data character.create` and 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`: - **Has** #5755 (the panel/permission polish batch — this is the "no longer asks every time" change they noticed) and #5775 (staged sensitive changes no longer satisfy the verification guard). - **Does not have** #5787 (#5776–#5778: bash `mari` CLI dry-runs counted as applied, sandbox-denied writes counted as applied, symlink staging) or #5793 (applied `app_data` mutations 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 `workspaceActionNeedsVerification` bails out unless the frame has **no commands**, has `stop: true`, and carries a completion claim: ```ts if (action.commands.length > 0 || !action.stop || !workspaceTextClaimsMutationCompletion(action.visibleText)) { return null; } ``` In a multi-character batch, Mari's intermediate frames look like `say: "Created Aria — now creating Bran."` **with** the next command attached and `stop: 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: - `workspaceTextClaimsMutationCompletion` is 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. - Their model is a quantised local Gemma (`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 1. Does the character exist at all? Check `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. 2. Retest on a build containing #5793 and report what the read-back says — a mismatch would confirm the write did not persist; a clean verified would push this toward the client. 3. If reproducible, the server log for that round shows the `app_data` result 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.
Author
Owner

@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 workspaceActionNeedsVerification bailing out on non-terminal frames. I did that (challenging only none and mismatch mid-run, keeping unverified/staged terminal-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. resolveWorkspaceMutationVerification collapses 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:

  • round 2 creates Aria (applies, self-verifies) → aggregate is now verified
  • round 4 claims "I created Bran" while skipping Bran entirely → aggregate is still verified from Aria → not challenged

The 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 none message 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. commandResultsForContinuity is 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 to none and 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

  • Step-scoped auditing. Judge a claim against the work done since the last audited claim — e.g. resolve verification over 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.
  • Read-first coaching, matching the terminal branch, so a false positive can never instruct a blind re-write.
  • Continuation handling, so a first frame that recaps a previous run is not treated as a claim with nothing behind it.

Two smaller notes for whoever picks this up: workspaceTextClaimsMutationCompletion includes "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.

<!-- gh-comment-id:5527676046 --> @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 `workspaceActionNeedsVerification` bailing out on non-terminal frames. I did that (challenging only `none` and `mismatch` mid-run, keeping `unverified`/`staged` terminal-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.** `resolveWorkspaceMutationVerification` collapses 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: - round 2 creates Aria (applies, self-verifies) → aggregate is now `verified` - round 4 claims "I created Bran" while skipping Bran entirely → aggregate is **still** `verified` from Aria → not challenged The 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 `none` message 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.** `commandResultsForContinuity` is 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 to `none` and 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** - **Step-scoped auditing.** Judge a claim against the work done *since the last audited claim* — e.g. resolve verification over `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. - **Read-first coaching**, matching the terminal branch, so a false positive can never instruct a blind re-write. - **Continuation handling**, so a first frame that recaps a previous run is not treated as a claim with nothing behind it. Two smaller notes for whoever picks this up: `workspaceTextClaimsMutationCompletion` includes "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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3209
No description provided.