Filing gate ①: a product defect with a named location and a reproduction. finding, class a. reach: measured at a public door.
Reader who acts: triage, for the first grade. protocol.ts is a domain:engine file (packages/metadata*); service-package, whose delete reports the failure, is domain:services. Triage routes.
Dedupe: mcp__github__search_issues for "deletePackage sys_packages delete failure swallowed package resurrects after restart uninstall success" returned 7 hits. None of them is this defect. The nearest are #21243 (the same family at the install and edit doors, now PR #21273), #20492 (closed: a dispatcher 400 that leaves the uninstall half applied) and #7970 (closed: namespace released before a verb that can refuse).
Source
The #21243 dev's report (PR #21273, out_of_scope_findings[0]), measured on that PR's head 2d05b458a.
reach:
SQLite, with a trigger that refuses DELETE on sys_packages (a forced store refusal, the same forcing #21243's door pins use):
| step |
answer |
DELETE /api/v1/packages/:id |
200, success: true |
GET /api/v1/packages/:id, same process |
404 |
GET /api/v1/packages/:id, after a restart |
200: the package resurrects |
Location (source read on main 2791138cb)
packages/metadata-protocol/src/protocol.ts, deletePackage (at :20659–:20671): await pkgSvc.delete(request.packageId) discards the returned value, so a returned { success: false } reads as success. A thrown failure is caught and only console.warned ("sys_packages cleanup skipped"). The registry half has already been applied by then, and the door answers success.
Direction (for triage; not a ruling)
Probably the same shape #21243's triage ruling gave install and edit: a failed sys_packages delete answers the failure instead of success. Whether the registry withdrawal is then undone, or the door instead refuses before withdrawing anything, is triage's call. The uninstall cleanups (registerUninstallCleanup) and the sys_metadata row deletes that run earlier in the same verb make the undo more complex than at install.
Pins: a forced sys_packages delete refusal answers an error, and after a restart the package is in the state the door reported. The ordinary delete is the control and stays unchanged.
Serial
Same file as PR #21273 (#21243), which rewrites the persist handling of installPackage / updatePackage in protocol.ts. This card starts after that PR lands.
Generated by Claude Code · domain:services seat 2 (#21118) · session_01DiCSbmJrkzNhuEAier4VoJ · https://claude.ai/code/session_01DiCSbmJrkzNhuEAier4VoJ
Filing gate ①: a product defect with a named location and a reproduction.
finding, class a.reach:measured at a public door.Reader who acts: triage, for the first grade.
protocol.tsis adomain:enginefile (packages/metadata*);service-package, whosedeletereports the failure, isdomain:services. Triage routes.Dedupe:
mcp__github__search_issuesfor "deletePackage sys_packages delete failure swallowed package resurrects after restart uninstall success" returned 7 hits. None of them is this defect. The nearest are #21243 (the same family at the install and edit doors, now PR #21273), #20492 (closed: a dispatcher 400 that leaves the uninstall half applied) and #7970 (closed: namespace released before a verb that can refuse).Source
The #21243 dev's report (PR #21273,
out_of_scope_findings[0]), measured on that PR's head2d05b458a.reach:SQLite, with a trigger that refuses
DELETEonsys_packages(a forced store refusal, the same forcing #21243's door pins use):DELETE /api/v1/packages/:id200,success: trueGET /api/v1/packages/:id, same process404GET /api/v1/packages/:id, after a restart200: the package resurrectsLocation (source read on
main2791138cb)packages/metadata-protocol/src/protocol.ts,deletePackage(at:20659–:20671):await pkgSvc.delete(request.packageId)discards the returned value, so a returned{ success: false }reads as success. A thrown failure is caught and onlyconsole.warned ("sys_packages cleanup skipped"). The registry half has already been applied by then, and the door answers success.Direction (for triage; not a ruling)
Probably the same shape #21243's triage ruling gave install and edit: a failed
sys_packagesdelete answers the failure instead of success. Whether the registry withdrawal is then undone, or the door instead refuses before withdrawing anything, is triage's call. The uninstall cleanups (registerUninstallCleanup) and thesys_metadatarow deletes that run earlier in the same verb make the undo more complex than at install.Pins: a forced
sys_packagesdelete refusal answers an error, and after a restart the package is in the state the door reported. The ordinary delete is the control and stays unchanged.Serial
Same file as PR #21273 (#21243), which rewrites the persist handling of
installPackage/updatePackageinprotocol.ts. This card starts after that PR lands.Generated by Claude Code ·
domain:servicesseat 2 (#21118) ·session_01DiCSbmJrkzNhuEAier4VoJ· https://claude.ai/code/session_01DiCSbmJrkzNhuEAier4VoJ