mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3832] [Issue]: Package uninstall leaves secondary agent state for multi-agent packages #2068
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#2068
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 @Xelvanis on GitHub (Jul 19, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3832
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Package uninstall cleanup removes chat selections and stored agent configuration using only the package ID. The documented capability contract allows one package to contribute multiple agent definitions, so any secondary agent IDs remain as stale chat references and orphaned configuration after uninstall.
No current official package is known to trigger this: all 29 packages in the current Marinara-Agents catalog contain one same-named agent. This is a latent contract bug rather than an active production regression.
Expected behavior
Uninstalling a package should remove every agent definition supplied by that package from active chat selections and delete each corresponding agent configuration/runtime record, while preserving historical chat content as documented.
Actual behavior
definition.id.metadata.activeAgentIds; configurations are stored by definition type.capabilityPackageManager.uninstall(id), which removes the package registry entry and deletes its version directory.activeAgentIdsand deletes a configuration using only the package ID.Relevant source at the audited
stagingrevision:Steps to reproduce
agent-suiteand whoseagents.jsondefines bothagent-suiteandsuite-helper.activeAgentIds.agent-suitethrough/api/capability-packages/agent-suite.agent-suiteis removed, whilesuite-helperremains referenced/configured without a live package definition.Environment
stagingrevisione2aaec9bf327a686f4471deac96c1076632994d2)Logs, screenshots, or video
A direct schema/filter check produced:
A complete database-backed uninstall was not executed during the audit; the storage and route sequence was verified statically.
Additional context
At Marinara-Agents commit
51eed186, all 29 officialagents.jsonfiles contain exactly one agent whose ID matches its package ID. The catalog validator requires a matching primary ID but permits additional definitions, so a future supported multi-agent package would expose this path.The smallest fix is to resolve and retain all package-owned definition IDs before deleting the package version directory, then clean chat selections and configurations for that full set. Uninstall should still succeed with a safe package-ID fallback if the definition file is missing or corrupt.
Adjacent agent-keyed metadata such as prompt-template selections and overrides should be considered when defining the cleanup set, without deleting historical chat messages or completed feature data.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Jul 19, 2026):
Claimed by @SpicyMarinara in draft PR #3835 for this assigned issue sweep.
@SpicyMarinara commented on GitHub (Jul 19, 2026):
Addressed in #3835: uninstall resolves every package-owned agent definition before deleting files, then cleans their chat metadata, configurations, runs, and memory with a safe package-ID fallback.