mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8394] [MERGED] fix(packages): preserve legacy validators across dependency layouts #8573
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#8573
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/8394
Author: @SpicyMarinara
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/8393-map-activation📝 Commits (7)
6389719test: reproduce package compatibility failures in hoisted installs (#8393)50da983fix(packages): resolve snapshot dependencies from the Engine manifest555e800fix(packages): preserve declared bundled dependencies in snapshots63d02f2fix(packages): recover persisted legacy-validator activation failuresa8eafc9test: compare canonical Windows paths in dependency fixtureeb165bbfix(packages): keep host dependency failures out of package rollback227890atest: pin combined host-failure return before package rollback📊 Changes
8 files changed (+536 additions, -51 deletions)
View changed files
📝
.github/workflows/pull-request-checks.yml(+4 -0)📝
docs/development/optional-agent-packages.md(+18 -9)📝
packages/server/src/services/capability-packages/capability-module-runtime.service.ts(+22 -7)📝
packages/server/src/services/capability-packages/capability-native-dependencies.service.ts(+69 -18)📝
packages/server/src/services/capability-packages/package-manager.service.ts(+17 -1)➕
scripts/regressions/capability-hoisted-dependencies.regression.ts(+205 -0)📝
scripts/regressions/capability-server-externals.regression.ts(+194 -13)📝
scripts/regressions/startup-inject-gate.regression.ts(+7 -3)📄 Description
Linked issue
Closes #8393
Why this change
The Zod 3 compatibility repair assumed that dependencies were physically present in
packages/server/node_modules. Hoisted and partially hoisted layouts can leave that folder absent or incomplete while the Engine still resolves its dependencies normally. Downloaded packages then lose their compatibility links and can load native Zod 4, reproducing the exactAt.innerType/Ct.innerTypefailures from World Maps 1.7.1 and rollback 1.6.0. An external data folder can lose the other shared imports too.There is also a persisted recovery gap: prior Zod failures are saved as terminal package errors, and startup excludes them before the repaired loader runs. Therefore an installation can remain disabled even when it already contains #8210. The actual published Maps and Slurp payloads reproduce this state with the previous loader.
The reporter's exact dependency layout is unknown. This PR fixes the reproduced loader defect; it does not assume that the reporter installed with npm or that their Engine build was stale.
What changed
Validation
pnpm installcompleted.04b45bf0d1d90041cc61d6d40e06a19c90a84130339a6d85fbddf888d66c6a82), installed it, and activated it to ready with the saved-map document unchanged. This used disposable external data and made only catalog/artifact requests to the official Agents repository.pnpm checkpassed ateb165bbe8f71ddef2893a8bb3b8817e897b854f5, including formatting, localization, lint/type checks and production build. One existing client hook warning remains. Final desktop Chromium smoke passed 7/7. The package lifecycle regression passed.Dottore's first full review at
63d02f254identified one LOW defect: a host dependency failure could roll the package back and leave it disabled after host repair. The actual activation regression failed before the repair (v2 became v1), then passed with a typed host error, v2/previous-v1 metadata preserved, and successful activation after restoring the alias. The final host-error patch preserves normal integrity/code-failure handling.The first repaired Windows run passed 13/14 layout controls; the remaining test compared an 8.3 short pathname with the equivalent long pathname before reaching its metadata-refusal assertion. Both sides now use
realpath; equality and the required-dependency negative control remain intact. Raw original logs are retained. At production headeb165bbe8, native Windows subsequently passed both steps: 14/14 layout cases plus the complete server activation/ABI regression. Dottore completed the incremental repair review with zero defects, one optional note, and automatically resolved the original finding.Manual verification notes
The source/layout, package activation and real downloader probes ran on macOS/Node with disposable data. Native Windows CI is configured to run dependency junctions and the complete server contract; final-head GitHub checks and Dottore Review remain merge gates. These are not claims of testing the reporter's physical installation or browser UI. The Discord attachments linked in the issue currently return HTTP 403.
Docs and release impact
English SDK documentation updated; #8395 tracks translations. No Engine version, storage-format, capability API or downloadable package version change. No frontend layout or user-facing control change.
Final test-only follow-up
Candidate
227890a5798e7599ab1f66177a67142967a934c5changes onlystartup-inject-gate.regression.tsfrom the reviewed production headeb165bbe8. That old structural assertion pinned the lifecycle-only condition and its exact comment; it now requires the combined lifecycle/dependency guard's complete early-return block to end before rollback. The equality/ordering requirement is preserved and strengthened; production files are unchanged.The focused regression and its local CodeRabbit review pass. The previous full Node run passed 1,122/1,123 files and identified only this stale assertion; the final candidate is rerunning the complete hosted gates. Local compiled/runtime/download proofs and pnpm check remain accurately pinned to the identical production code at
eb165bbe8.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.