mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #4390] Professor Mari workspace loop accepts unverified 'done' (empty commands + stop=true) with no code enforcement #2383
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#2383
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 @xDanteMD on GitHub (Aug 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4390
Originally assigned to: @SpicyMarinara on GitHub.
What happens
The workspace agent JSON protocol teaches Mari that finishing with
{"say":"Done — I created it and verified it saved.","commands":[],"stop":true}is correct behavior (prompt line 537), and the loop accepts this with zero verification that any work was actually done. The "verify before claiming" rule exists only as prompt text (lines 441, 519 inworkspace-agent.service.ts) — never enforced in code.The complete no-op path (all file:line in
workspace-agent.service.ts):{"say":"Done, created the card!","commands":[],"stop":true}saytext streams to user before the loop evaluates it → user sees the lie (:1713)protocolValid=true(JSON is valid,:1167)stopdefaults totrue(:1170— empty commands + valid JSON = auto-stop)isEmptyCompletedAction→ false (has visible text) → repair path A skipped (:1750)commands.length===0 && !stop→ false (stop is true) → repair path B skipped (:1770):1798)commands.length===0→break(:1808):1880)Why it matters
Observed with DeepSeek V4 Pro, but the pattern is model-agnostic. The two repair loops (
:1750empty-response retry;:1770prose-not-JSON retry) explicitly exclude this case.commandResultsForContinuityis stored but never checked post-loop.The prompt literally trains this behavior — the completion example at line 537 shows empty commands + stop=true + claim-of-verification as the correct finishing pattern.
Proposed improvements
stop=truewith zero commands but the user request implied work and no mutating command succeeded, push one feedback turn requiring a confirmatory readparseLenientJsonValue(fence/preamble stripping, trailing-comma repair) inparseAssistantWorkspaceActionPrior art checked (no duplicates)
Why this over BashKit (#1669)
No new execution surface (triage-flagged scope-risk). Targets #1669 core complaint. Fits the triage guidance: "better existing codebase tools" is the least-risky path.