[PR #5757] [CLOSED] fix(server): distinguish staged workspace changes #6918

Closed
opened 2026-10-23 04:14:53 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5757
Author: @mikemikimike
Created: 9/2/2026
Status: ❌ Closed

Base: staging ← Head: fix/5756-staged-mutation-verification


📝 Commits (8)

  • db43149 release: promote Marinara Engine v2.4.4 to main (#5535)
  • 6c6e395 chore(release): align staging with main history
  • 0f2da8a chore(release): refresh promotion validation
  • 039cb2f Merge pull request #5549 from Pasta-Devs/hotfix/v2.4.4-lineage
  • 723102b chore(release): refresh v2.4.4 credits
  • 1a29936 Merge pull request #5550 from Pasta-Devs/hotfix/v2.4.4-credits
  • 4cd32fb fix(server): distinguish staged workspace changes
  • 06501a1 Merge branch 'staging' into fix/5756-staged-mutation-verification

📊 Changes

3 files changed (+45 additions, -9 deletions)

View changed files

📝 packages/client/src/components/chat/HomeCreditsModal.tsx (+12 -9)
📝 packages/server/src/services/professor-mari/workspace-agent.service.ts (+6 -0)
📝 scripts/regressions/prompt.regression.ts (+27 -0)

📄 Description

Fixes #5756

Why this change

Sensitive write and edit operations can return success while only staging a change for user approval. The workspace verification guard treated those results as applied mutations, so a later read of the unchanged file could incorrectly satisfy the guard and let the agent claim the change was applied.

What changed

  • recognize the sensitive-file approval response for write and edit as unapplied
  • add regression coverage for staged write and edit results, while preserving ordinary applied-write behavior

Validation

  • node ./scripts/run-regressions.mjs --filter scripts/regressions/prompt.regression.ts (1/1 passed)
  • pnpm --filter @marinara-engine/server lint (passed)
  • pnpm build (passed; existing bundle-size/circular-chunk warnings only)
  • git diff --check (passed)
  • pnpm regression:node (153/158 passed; 5 existing Windows/baseline regressions)
  • Prettier check on the two changed files (blocked by the repository's existing CRLF/full-file formatting baseline; added sections match Prettier output)

Summary by CodeRabbit

  • Bug Fixes

    • Sensitive workspace write and edit actions awaiting user approval are no longer reported as completed changes.
    • Pending changes no longer trigger mutation verification or completion tracking.
    • Successfully applied changes continue to be tracked separately from staged, unapplied actions.
  • Tests

    • Added regression coverage for staged sensitive file changes and genuinely applied workspace updates.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/5757 **Author:** [@mikemikimike](https://github.com/mikemikimike) **Created:** 9/2/2026 **Status:** ❌ Closed **Base:** `staging` ← **Head:** `fix/5756-staged-mutation-verification` --- ### 📝 Commits (8) - [`db43149`](https://github.com/Pasta-Devs/Marinara-Engine/commit/db4314979b229f138a978ecc04e298cb5df19934) release: promote Marinara Engine v2.4.4 to main (#5535) - [`6c6e395`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6c6e3954c34910085f49dc5b1217aca0896f24e8) chore(release): align staging with main history - [`0f2da8a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0f2da8a72feb4308d9d50001358da80d246bbdb5) chore(release): refresh promotion validation - [`039cb2f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/039cb2f3d0b0580d13c6b3178133b60cae7c6a84) Merge pull request #5549 from Pasta-Devs/hotfix/v2.4.4-lineage - [`723102b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/723102b76474d996951e98b738621d2fc7272db1) chore(release): refresh v2.4.4 credits - [`1a29936`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1a299369ac7025028c3ce1b80cc59f47b7b0691b) Merge pull request #5550 from Pasta-Devs/hotfix/v2.4.4-credits - [`4cd32fb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4cd32fb9701c3bedba963bfeae8ebb652088576f) fix(server): distinguish staged workspace changes - [`06501a1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/06501a1df56b72a96f18667c8e41c2dea01c446c) Merge branch 'staging' into fix/5756-staged-mutation-verification ### 📊 Changes **3 files changed** (+45 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/HomeCreditsModal.tsx` (+12 -9) 📝 `packages/server/src/services/professor-mari/workspace-agent.service.ts` (+6 -0) 📝 `scripts/regressions/prompt.regression.ts` (+27 -0) </details> ### 📄 Description Fixes #5756 ## Why this change Sensitive `write` and `edit` operations can return success while only staging a change for user approval. The workspace verification guard treated those results as applied mutations, so a later read of the unchanged file could incorrectly satisfy the guard and let the agent claim the change was applied. ## What changed - recognize the sensitive-file approval response for `write` and `edit` as unapplied - add regression coverage for staged `write` and `edit` results, while preserving ordinary applied-write behavior ## Validation - [x] `node ./scripts/run-regressions.mjs --filter scripts/regressions/prompt.regression.ts` (1/1 passed) - [x] `pnpm --filter @marinara-engine/server lint` (passed) - [x] `pnpm build` (passed; existing bundle-size/circular-chunk warnings only) - [x] `git diff --check` (passed) - [ ] `pnpm regression:node` (153/158 passed; 5 existing Windows/baseline regressions) - [ ] Prettier check on the two changed files (blocked by the repository's existing CRLF/full-file formatting baseline; added sections match Prettier output) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Sensitive workspace write and edit actions awaiting user approval are no longer reported as completed changes. * Pending changes no longer trigger mutation verification or completion tracking. * Successfully applied changes continue to be tracked separately from staged, unapplied actions. * **Tests** * Added regression coverage for staged sensitive file changes and genuinely applied workspace updates. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:14:53 +07:00
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#6918
No description provided.