mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7005] [MERGED] fix(mari): keep Professor Mari out of build output #7425
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#7425
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7005
Author: @SpicyMarinara
Created: 10/3/2026
Status: ✅ Merged
Merged: 10/3/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/mari-no-build-output-writes📝 Commits (4)
748a134fix(mari): keep Professor Mari out of build output9501ad6fix(mari): close gaps in the build-output guard found in reviewd49c7a4Merge remote-tracking branch 'origin/staging' into fix/mari-no-build-output-writes8b6d497docs(changelog): point the build-output guard entry at its issue📊 Changes
6 files changed (+475 additions, -41 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
docs/home/professor-mari.md(+1 -0)📝
packages/server/src/services/professor-mari/workspace-agent.service.ts(+33 -13)📝
packages/server/src/services/professor-mari/workspace-change-review.service.ts(+126 -26)📝
packages/server/src/services/professor-mari/workspace-shell-sandbox.ts(+45 -1)📝
scripts/regressions/professor-mari/shell-sandbox.regression.ts(+268 -1)📄 Description
Linked issue
Closes #7003
Refs #6984. #6994 makes the launchers repair a damaged server build; this PR stops Professor Mari from damaging it.
Why this change
A Windows user's Marinara stopped starting because
packages/server/dist/services/generation/conversation-command-runtime.jsheldif(, raw) { }, a linetsccannot emit (#6984). Professor Mari is the only in-app writer that reachesdist. Her file tools are on by default in the Auto permissions mode and treateddistlike any other workspace path, and her shell sandbox let any command write there.On staging, a sandboxed command wrote that exact line into
dist/index.js, created a missing clientdist, and moved a package folder away and back. Build output is generated, so Mari should read it and change the source instead.What changed
Build output means every
packages/<pkg>/distfolder plus private builds such aspackages/server/dist-sandbox. Mari can still read it, list it, search it and copy a file out of it, but nothing she does can change it. Every refusal is one plain sentence she can pass on: "Build files are generated and must not be edited; change the source and rebuild instead."isBuildOutputPath. It folds case the way case-insensitive volumes do, so "DIST", "diſt" (long s) and ligature spellings count asdisttoo. It also resolves.., accepts both slash styles, and catches the names Windows treats asdist(dist.,dist::$INDEX_ALLOCATION, 8.3 short names).node_modules/@marinara-engine/<pkg>leads intodist. write, edit, copy (destination), move and remove are refused in every permissions mode.dist.distby path pattern, which also covers adistthat does not exist yet, and denies moving the folders that hold it.packages/and each package folder, so a package cannot be moved away and rebuilt under its old name.distare refused before they run, so the refusal is not lost insidex; echo done.docs/home/professor-mari.mdgains one trust-boundary line. #7004 tracks the translations.Not covered, by design or platform:
mari code checkstill runspnpm check, whose build step regeneratesdistfrom source. That only writes compiler output, it is Mari's only full-check command, and #6994's start-time check repairs an interrupted build.distin a package that has none yet, because a mount needs an existing folder. macOS blocks this.mvfalls back to copy and delete; a Node script callingfs.renameacross packages getsEXDEV.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Run by the agent:
pnpm checkpasses. All 29 Professor Mari regressions pass, and so do the 21 regressions that load the changed modules.scripts/regressions/professor-mari/shell-sandbox.regression.tsis extended. It covers path cases (including Unicode spellings), every file tool, link routes, staging and approval, the shell-check tables, the sandbox profile and arguments, a real-sandbox runtime proof and a speed pin. Reverting any single fix makes it fail at that fix's own assertion.if(, raw) { }intodist/index.js, createdpackages/client/dist, and movedpackages/serveraway and back. With this branch all three get "Operation not permitted" anddistis unchanged.ghcr.io/pasta-devs/marinara-engine:stagingimage with real bubblewrap 0.12. Movingpackages/serverorpackages/away now fails with "Device or resource busy". Ordinary writes and moves between packages still work.dist, the approval redirect through a swapped link, the slow command checks, the Linux package-folder swap, the guide line, and a fragile test assertion.Still to verify by hand:
packages/server/dist/services/generation/conversation-command-runtime.js. She is refused with the plain sentence and editspackages/server/srcinstead. Also trypackages/server/diſt/index.js(long s) andpackages/server/dıst/index.js(dotless i); NTFS case folding could not be tested here.mv packages/server packages/xfails with "Device or resource busy". Ordinary source edits, new files and folders, andmvbetween packages still work.package.jsonedit) still applies when nothing changed after staging. It shows "The file changed after Professor Mari staged it" when a folder on its path was replaced by a link.packages/*/distand copy a built file out to a source folder.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)docs/home/professor-mari.mdand CHANGELOG updated. #7004 is the[docs-i18n]follow-up.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.