mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5756] Staged sensitive file changes count as applied mutations, so a read of the unchanged file can satisfy the verification guard #3182
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#3182
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 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5756
Originally assigned to: @kolacheee on GitHub.
In one sentence: the workspace verification guard classifies every successful non-app_data mutation as applied, but
write/editon a sensitive file can succeed while only staging the change behind an approval — so a follow-up read of the (unchanged) file satisfies the guard and Mari may claim completion while the approval is still pending.The gap (flagged by CodeRabbit on #5755, pre-existing)
isAppliedWorkspaceMutation(workspace-agent.service.ts) treats any successful mutating command that isn'tapp_dataas an applied change; onlyapp_dataresults are additionally gated on"saved": true. But the sensitive-file path (workspace-change-review.service.ts) letscommandWrite/commandEditreturn success with an output saying the file was not changed and an approval is pending. A subsequent successful read then flips the verification state toverified, and the completion-claim interception won't fire — even though nothing was applied.Mitigations that keep this from being acute today: the read in that scenario returns the old content, so a model actually comparing what it reads against what it wrote sees the discrepancy; and the pending approval is prominently surfaced to the user. But the guard's own signal is wrong, and the #5754-era coaching ("a successful read after the write satisfies verification") leans on it harder.
Possible directions (maintainer's call)
isAppliedWorkspaceMutationforwrite/editon the absence of the engine-written staging marker in the output (the staging text is engine-authored, so an anchored check is available).Related: the #5754 follow-up (store read-back for app_data mutations) established the pattern of engine-verified outcomes carried structurally on results — this is the same idea applied to the staging path.
@mikemikimike commented on GitHub (Sep 2, 2026):
Status update: opened PR #5757 targeting the repository-required
stagingbranch: https://github.com/Pasta-Devs/Marinara-Engine/pull/5757The fix keeps sensitive
write/editapproval-stage results out of the applied-mutation set, so a read of an unchanged file cannot satisfy the verification guard. Regression coverage covers both staged command types and preserves ordinary applied-write behavior.Local validation: focused prompt regression 1/1 passed; server lint passed; full build passed;
git diff --checkpassed. The full Node regression suite completed 153/158, with five existing Windows/baseline failures; the changed-path regression passed. The changed-file Prettier check is blocked by the repository's existing CRLF/full-file formatting baseline, and the added sections match Prettier output.Online triage/template checks pass after retargeting to
stagingand updating the PR template. Remaining CI is subject to the repository's outside-contributor owner approval/action-required gate.@kolacheee commented on GitHub (Sep 2, 2026):
@mikemikimike Unfortunately @SpicyMarinara is on holiday and only she can merge PRs from non-contributors, so I have to clone your PR and apply fixes and such. I cannot merge it if it belongs to you. I have to close your PR but you will be credited accordingly.