Skip to content

Commit 8e9d1bf

Browse files
committed
docs(spec,cloud-connection): the install-mode comments say what holds — the copy is the environment's own metadata, a shipped _lock carried; the walled refusal follows 1b-1c
Comments only, per the seat's round-3 order before the second contract review: - packages/spec/src/kernel/manifest.zod.ts, the INSTALL_MODES TSDoc (it ships in the .d.ts): "editable like anything authored there" becomes the environment's own metadata that the next save edits, with the _lock exception named in one clause, as the changeset says. - marketplace-install-local-plugin.ts, the header docblock: the same edit for "editable and followed by no upgrade", and the walled refusal's order stated as the door has it — after the payload check and steps 1b-1c, none of which writes, before any write. The import comment and the 1e step comment carried the same "before anything else about the package" claim and say the same now. Claude-Session: https://claude.ai/code/session_01KNKBCRDJCu5tGy3TEbvtrF Co-authored-by: Claude <noreply@anthropic.com>
1 parent 57b4f4f commit 8e9d1bf

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

‎packages/cloud-connection/src/marketplace-install-local-plugin.ts‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,15 @@
5454
* naming the base, before any write.
5555
* - `unmanaged`: the package's metadata is copied ONCE into a new
5656
* writable base in the environment ledger
57-
* (`importUnmanagedPackage`), editable and followed by no upgrade;
57+
* (`importUnmanagedPackage`): the environment's own metadata,
58+
* which the next save edits (an item shipped with an authored
59+
* `_lock` keeps that lock on the copy), followed by no upgrade;
5860
* nothing is registered, ledgered or rehydrated under the
5961
* package's id, and its sample data is not loaded. Refused
6062
* `409 UNMANAGED_INSTALL_WALLED_POSTURE` on a deployment whose
61-
* REQUESTED tenancy posture walls organizations, before anything
62-
* else about the package is judged.
63+
* REQUESTED tenancy posture walls organizations: after the
64+
* payload check and steps 1b–1c (package id, protocol
65+
* handshake; none of them writes), before any write.
6366
* A mode the package's `installModes` does not permit answers
6467
* `422 INSTALL_MODE_NOT_PERMITTED`, before any write.
6568
*
@@ -170,8 +173,8 @@ import type {
170173
} from '@objectstack/metadata-protocol';
171174
// [ADR-0131 D6] The `unmanaged` install mode's two shared judgements, imported
172175
// from their producer rather than restated: the walled-posture refusal the
173-
// import verb raises (answered here before anything else about the package is
174-
// judged), the read-only-package rule (a namespace held by a WRITABLE base is
176+
// import verb raises (answered here after the payload, id and handshake checks,
177+
// before any write), the read-only-package rule (a namespace held by a WRITABLE base is
175178
// this environment's own metadata), and the client-facing sentence rule.
176179
import { unmanagedInstallPostureRefusal, isWritablePackage, clientFacingFailureText } from '@objectstack/metadata-protocol';
177180
import { resolveThrownHttpError } from '@objectstack/types';
@@ -1275,8 +1278,9 @@ export class MarketplaceInstallLocalPlugin implements Plugin {
12751278
}, refusal.status);
12761279
}
12771280

1278-
// 1e. [ADR-0131 D6] ⭐ THE INSTALL MODE — before anything else about the
1279-
// package is judged, because nothing an author changes in the
1281+
// 1e. [ADR-0131 D6] ⭐ THE INSTALL MODE — after the payload, id and
1282+
// handshake checks and before every other judgement of the package
1283+
// and any write, because nothing an author changes in the
12801284
// package answers either refusal:
12811285
// - the package must PERMIT the requested mode: its manifest's
12821286
// `installModes`, parsed by reference

‎packages/spec/src/kernel/manifest.zod.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,10 @@ export function manifestIdRefusal(key: string, input: unknown): string {
406406
* it (an environment overlay, disable + clone, extend).
407407
* - `unmanaged`: every metadata item is copied ONCE into the environment
408408
* ledger, under a new writable base whose id differs from the package's.
409-
* From then on it is the environment's own metadata — editable like
410-
* anything authored there — and it follows no upgrade. A deployment whose
409+
* From then on it is the environment's own metadata and the next save
410+
* edits it, except that an item shipped with an authored protection lock
411+
* (`_lock`) keeps that lock on the copy (an open question on #15213); it
412+
* follows no upgrade. A deployment whose
411413
* tenancy posture walls organizations (`group`, `isolated`) refuses it,
412414
* whatever the package permits.
413415
*

0 commit comments

Comments
 (0)