Skip to content

Commit bc4e632

Browse files
committed
docs+changeset: install-local uninstall refusal and audit row
Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ef3daa6 commit bc4e632

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/cloud-connection': patch
3+
'@objectstack/metadata-protocol': patch
4+
---
5+
6+
fix(cloud-connection,metadata-protocol)!: install-local's uninstall door asks the uninstall verb's guards and writes its audit row (#31283)
7+
8+
Clause-②: yes (narrowing) — both arms. Narrowing: `DELETE /api/v1/marketplace/install-local/:manifestId` refuses, with the uninstall verb's guard refusal (today the runtime's `409 PACKAGE_DISABLE_RESTRICTED_BY_VALIDATION_RULE`), an uninstall it answered `200` before: one that would withdraw a field an active validation rule of another enabled package reads. Widening: two new public members of `ObjectStackProtocolImplementation` (`@objectstack/metadata-protocol`), `runUninstallGuards` and `recordPackageUninstall`, and one new exported type, `PackageUninstallRecord`.
9+
Metadata-protocol: none
10+
Skills-docs: one move — `content/docs/deployment/marketplace-handbook.mdx` (Uninstalling) states the refusal and the audit row; no `skills/**` page teaches this door's uninstall.
11+
12+
<!-- adr-0087: not-required (no-migration-prescription) no key of any schema is added, removed or re-shaped and no stored row is read differently: the narrowing is one runtime refusal at one door, the refusal `DELETE /api/v1/packages/:id` already answers for the same package, and its remedy is the rule it names (switch the rule off or change it, or keep the package installed); the two protocol members are additions, so there is nothing for `objectstack migrate meta` to rewrite. -->
13+
14+
**BREAKING** for a caller of install-local's uninstall door that uninstalled a package another package's active validation rule depends on.
15+
16+
- **Before.** `DELETE /api/v1/marketplace/install-local/:manifestId` withdrew the package and ran the protocol's uninstall cleanups, but never went through the uninstall verb (`deletePackage`), so it skipped what the verb does before and after: the pre-uninstall guards (the runtime's dependent-rule refusal) and the package's own `package_uninstall` audit row. Uninstalling a package whose `objectExtensions` field an active rule of another package reads answered `200`; the field left the served object and the rule then failed closed on every write to it. No uninstall through this door was audited.
17+
- **Now.** The door asks the verb's guards before anything moves, through the protocol's one runner of them (`runUninstallGuards`, which `deletePackage` asks too), and answers a refusal as the guard spelled it — code, status and message — with the ledger entry, the registration and the served fields as they were. A completed uninstall writes one `package_uninstall` row through the protocol's one writer of it (`recordPackageUninstall`, which `deletePackage` calls too), naming the package, the version removed and the operator.
18+
- **Unchanged.** `deletePackage` asks the same guards and writes the same row as before. A runtime with no audit plugin writes no row; a protocol from a build without the two members is not asked, and the door behaves as before.
19+
20+
**The remedy.** Switch off or change the rule the refusal names, or keep the package installed.

‎content/docs/deployment/marketplace-handbook.mdx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,11 @@ the detail.
254254
from the running kernel and revokes its permission sets and their grants. The
255255
answer's `note` and `cleanups` say whether any part stays loaded until the
256256
next restart. **Records stored in the app's objects stay in the database.**
257+
An uninstall that would withdraw a field an active validation rule of
258+
another enabled package reads is refused with
259+
`409 PACKAGE_DISABLE_RESTRICTED_BY_VALIDATION_RULE`, naming the rule, and
260+
nothing is removed — the same refusal `DELETE /api/v1/packages/:id` answers.
261+
A completed uninstall is recorded in the audit log (`package_uninstall`).
257262

258263
## Staying current with platform versions
259264

0 commit comments

Comments
 (0)