mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5715] [Bug]: Package assets 404 while an update awaits restart, breaking the Home tab icon #3161
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#3161
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 @Gunterlie on GitHub (Sep 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5715
Summary
After updating a capability package that declares a server entrypoint, every asset request for that package returns
404 {"error":"Active package asset not found"}until the Engine is restarted. The package's Home tab icon disappears from the running UI and comes back only after the user exits and relaunches.Reported against Slurp, but the mechanism is generic — it affects any package with
entrypoints.serverwhose update requires a restart.Reproduction
GET /api/capability-packages/slurp/assets/slurp-logo.png→ 404Active package asset not foundRoot cause
packageAsset()inpackages/server/src/services/capability-packages/package-manager.service.ts:940-942:isInstalledCapabilityReady()inpackages/shared/src/schemas/capability-package.schema.ts:543-546:The update path deliberately leaves the package un-activated. In
capability-packages.routes.ts, the install handler only activates turn-game packages:Slurp's manifest has
"kind": ["agent"], so it is never activated inline. Its status staysrestart-required, and the adjacent comment confirms this is intentional:That intent is correct for the server runtime. The bug is that the same readiness gate is applied to static asset serving, so while the old runtime keeps serving the package's UI, that UI's own images 404.
The same gate is on line 914 (the client entrypoint route), which is likely also worth reviewing under this issue.
Why the readiness gate is wrong here
readinessdescribes whether the package's server module has been loaded and activated. Servingslurp-logo.pngdoes not touch the server module at all. The bytes are on disk, declared in the manifest with a SHA-256, and re-verified on every request byreadVerifiedInstalledPackageFile(). Nothing about a pending restart makes those bytes less trustworthy.The result is a UI that is still running and still rendering, but cannot load its own declared icons.
Suggested fix
Gate asset serving on the package being installed and verified, not on runtime readiness. Concretely, in
packageAsset()replace theisInstalledCapabilityReady(installed)check with a check that the registry entry exists and is not in a failed or partially-extracted state —restart-requiredshould be servable.All the safety properties are preserved, because they are enforced further down and are independent of readiness:
tryNormalize)manifest.jsonrefusalcontributions.homeBrowserTab.iconPaths+contributions.assets.pathsmanifest.filesdeclaration lookupreadVerifiedInstalledPackageFile(), which still throws loudly on an integrity failureWhich version's asset gets served
Worth deciding explicitly as part of the fix: while an update is pending restart, the registry entry describes the new version, but the old runtime is serving the UI. If the new version renamed or removed an icon, serving from the new manifest would still 404 for the old client.
Slurp is not affected today —
slurp-logo.pngis unchanged across 1.0.23 and 1.0.24 — but the general fix should serve assets from the manifest matching the runtime that is currently active, falling back to the newly installed one. Otherwise this reappears the first time a package renames an icon.Evidence the package side is correct
The asset is present and correctly declared in the shipped artifact, so nothing needs to change in Pasta-Devs/Marinara-Agents:
packages/slurp/manifest.json:Both the allowlist and the declaration lookup in
packageAsset()would succeed. The request never reaches them because of the readiness gate on line 942.Suggested regression test
Install a package with a server entrypoint, leave it at
status: "restart-required", and assert thatGET /:id/assets/<declared icon>returns 200 with the verified bytes rather than 404.@Gunterlie commented on GitHub (Sep 1, 2026):
Scope evidence: this affects every package, not just Slurp
Checked all 13 package manifests in
Pasta-Devs/Marinara-Agents:entrypoints.serverslurp,noodle,gacha-forge)isInstalledCapabilityReady()returns false for any package with a server entrypoint whosereadiness !== "ready", and the update path deliberately leaves non-turn-game packages atrestart-required. Since every package in the catalog has a server entrypoint, every package's asset route is gated off after an update until the Engine restarts.Three of them declare a browser-tab icon, so those are where a user actually sees it: the tab icon vanishes mid-session and returns after a relaunch. The other ten have no icon to lose today, but the same latent gate would bite the moment any of them declares one.
This was originally reported as a Slurp problem. It is not Slurp-specific — Slurp is just one of the three packages currently visible enough to notice.
Separate, unrelated finding in the Agents repo
While checking this I found a second cause of the same 404 string that is not an Engine bug, so it does not belong to this issue — recording it here only so the two are not conflated during triage.
slurp-1.0.25shipsslurpagent.pnginfiles[]with a SHA-256, but the file appears in neithercontributions.homeBrowserTab.iconPathsnorcontributions.assets.paths.packageAsset()correctly refuses it via the serve-path allowlist, so it returns the sameActive package asset not foundpermanently, independent of restart state.That is a manifest problem on the package side. Fixing it needs
contributions.assets, which requiresschemaVersion: 2andcapabilityApi1.10+ — Slurp is currentlyschemaVersion: 1withengine.min2.4.3, so it is a compatibility decision for the package maintainers rather than a change here.No action needed on this issue for that one; the restart-gate fix described above stands on its own.