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
{{ message }}
Repository navigation
Commit 52e5af7
Browse filesBrowse the repository at this point in the historyBrowse files
fix(cloud-connection): install-local uninstall asks the registry's refusal before the ledger write
A marketplace install-local uninstall the running registry would refuse
(the base's .custom pair installed, or an ADR-0029 extended object) is
refused 409 RESOURCE_CONFLICT with the registry's own sentence before the
ledger entry is removed, so nothing moves. A non-refused uninstall keeps
the ledger-first order.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5pQqiDztRTRRHCtcay
fix(cloud-connection): a marketplace install-local uninstall the registry would refuse is refused 409 before the ledger write, naming the pair or the extender, with nothing removed (#28511)
6
+
7
+
Clause-②: no (narrowing) — `DELETE /api/v1/marketplace/install-local/:manifestId` now refuses `409 RESOURCE_CONFLICT` the uninstall of a package whose paired customization package (`ID.custom`) is installed, or that owns an object another package extends (ADR-0029), an uninstall that answered 200 before; nothing is widened.
8
+
Metadata-protocol: none
9
+
Skills-docs: none — no file under `skills/**` teaches uninstalling through the install-local door, so every taught use stays true.
10
+
11
+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export or type changes: an uninstall the running registry already refuses is now refused at the install-local door before its ledger write, with the registry's existing RESOURCE_CONFLICT / 409 refusal, so there is nothing for a migration to rewrite and no tombstone. -->
12
+
13
+
**BREAKING** accept-set narrowing at the install-local uninstall door (`@objectstack/cloud-connection`, ADR-0146 D3).
14
+
15
+
-**Before.** The door removed the ledger entry first and only then asked the registry to withdraw the package. A registry refusal (the base's `.custom` pair installed, or an extended object) was caught there and folded into a 200 with a failed `registry.uninstallPackage` entry in `cleanups`. The package stayed registered until the next restart, and the restart then dropped it from under its pair, stranding every customization the pair holds.
16
+
-**Now.** The door asks the registry the same question first, through `SchemaRegistry.assertPackageUninstallable` (the one predicate `uninstallPackage` asks, which mutates nothing). On a refusal it answers that refusal's own `409 RESOURCE_CONFLICT` and sentence, which names the pair and the extenders and opens with the way out. The ledger entry, the registration and the pair stay as they were, and no cleanup runs.
17
+
-**Unchanged.** An uninstall the registry would let go keeps the ledger-first order (the ledger entry is removed, then the package is withdrawn, then the cleanups run). An id this door never installed still answers 404. A host with no `objectql` registry, or a registry without the predicate, is not asked and behaves as before.
18
+
19
+
**The remedy.** Delete the pair (export it first to keep its customizations: `GET /api/v1/packages/PAIR/export`) or uninstall the extending packages, then uninstall the base again.
@@ -245,9 +264,11 @@ describe('#21576: an install-local uninstall withdraws the package from the runn
245
264
expect(packages.has(APP_ID)).toBe(true);
246
265
});
247
266
248
-
it('a refused withdrawal is one failed outcome on the response, the cleanups still run, and the cause stays in the log',async()=>{
267
+
it('a withdrawal refused for a cause nothing asked ahead (a registry without the predicate) is one failed outcome on the response, the cleanups still run, and the cause stays in the log',async()=>{
249
268
seedLedger();
250
-
constcause='Cannot uninstall package: an object it owns is extended by another package';
269
+
// The double carries no `assertPackageUninstallable`, so nothing is
270
+
// asked ahead and its throw is met at the withdrawal itself.
271
+
constcause='registry withdrawal failed: tasks_task is still referenced';
0 commit comments