You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(protocol): persist versionless package installs; drop sys_packages on delete (#2540)
* fix(protocol): persist versionless package installs; drop sys_packages on delete (#2532)
installPackage's durable half was guarded by `pkgSvc?.publish &&
manifest.version`, silently skipping every versionless runtime-created base
({id,name} from the builder/Setup) — in-memory only, gone after restart, while
metadata/tables survived. Default the version (0.1.0) instead of skipping, log
persist failures loudly, and make deletePackage drop the sys_packages row so
uninstalled packages don't resurrect at boot via service-package hydration.
Verified: unit tests (8/8) + three-boot E2E on one db — install → restart →
still listed; DELETE → restart → stays gone.
Fixes#2532
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(protocol): duplicatePackage routes through installPackage so copies persist too
The duplicate path did a bare registry.installPackage — the copied base would
vanish from GET /packages on restart, same #2532 mechanics. Route through
installPackage to get the durable sys_packages write (and version default).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(runtime,protocol): mount missing package sub-routes; duplicates are scope-less
Two more holes found browser-verifying the duplicate journey:
1. dispatcher-plugin never MOUNTED the newer handlePackages branches — duplicate
(ADR-0070 D4), adopt-orphans (D5), discard-drafts, commits / commit-revert /
rollback (ADR-0067) all 404'd at the hono layer on every serve stack despite
working handler code. Mount them all; routing only.
2. duplicatePackage copied the SOURCE manifest verbatim — including scope
(e.g. 'project'), branding the writable copy as read-only in every
writability heuristic. The duplicate's manifest is now scope-less.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* test(objectql): align install/duplicate tests with #2540 durable persistence
Two objectql protocol tests asserted the pre-#2540 behavior:
- installPackage used to SKIP sys_packages persistence for versionless
manifests (the {id,name} shape the builder/Setup create), so base
packages vanished on restart (#2532). It now defaults version to
'0.1.0' and persists. Test updated to expect persistence with the
defaulted version.
- duplicatePackage used to do a bare registry.installPackage write and
keep the source scope. It now routes through installPackage (so the
copy also lands in sys_packages) and strips scope (a duplicate must be
a writable base, not inherit the source's read-only scope). Test
updated to assert the routed call + scope stripped.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments