Skip to content

Commit 9fb3815

Browse files
committed
chore(cloud-connection): changeset for the declared-rename step's resolver refusal; name the runtime the pins run over
Claude-Session: https://claude.ai/code/session_01ADHkmRXuRn93HphKp7kXEz Co-authored-by: Claude <noreply@anthropic.com>
1 parent e6e6b07 commit 9fb3815

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/cloud-connection': patch
3+
---
4+
5+
fix(cloud-connection): install-local answers a composed artifact the resolver refuses with the resolver's 422 at the declared-rename step, not a 503 telling the author to retry
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The declared-rename step of `POST /api/v1/marketplace/install-local` (step 2c″) reads every package body of a composed artifact through the artifact resolver. When the resolver refused the artifact, the step answered `503 SERVICE_UNAVAILABLE`: "the tables its declared rename(s) carry could not be read … Retry once the database answers." Examples are a `packages` that is not a list, or a package entry that carries a retired bare `indexes[].unique: true`. A retry never helps, and the author looked for the fault in the wrong place.
11+
12+
The step now resolves the bodies before it reads any table. A refusal answers with the resolver's own declared status and code: `422 INVALID_ARTIFACT_PACKAGES` or `INVALID_ARTIFACT_PACKAGE_ENTRY`, with the resolver's sentence. Nothing is written. This is the answer the `isolated`-posture unique-scope gate already gives for the same bytes, through the same reader. An undeclared throw out of the resolver, such as a dependency cycle between two packages of one artifact, is rethrown and is not relabelled. The 503 now means only that a table could not be read.
13+
14+
The door reaches this step first only on a runtime that predates the install-time code judgements (`collectJobsWithoutBody`, `collectHooksWithoutBody`). A runtime that carries them resolves the packages earlier, so its answer does not change.

‎packages/cloud-connection/src/marketplace-install-local-resolver-refusal-34432.test.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@
1111
* whose bundle is malformed was told the database was down.
1212
*
1313
* Driven through the real `POST /api/v1/marketplace/install-local` handler
14-
* under the `single` posture, where the D5e gate reads no body and 2c″ is the
15-
* first step to resolve the packages. The controls pin the rest of the
14+
* under the `single` posture, where the D5e gate reads no body, over a runtime
15+
* that predates the step-1c code judgements (`@objectstack/runtime` is mocked
16+
* without `collectJobsWithoutBody` / `collectHooksWithoutBody`, as in
17+
* `marketplace-install-local-composed-top-level-reads.test.ts`), so 2c″ is the
18+
* first step to resolve the packages. (A runtime that carries those
19+
* judgements resolves the packages at step 1c first, and the resolver's
20+
* refusal leaves the door as a throw.) The controls pin the rest of the
1621
* contract: a table that really could not be read still answers 503, and an
1722
* undeclared throw out of the resolver (its own dependency-cycle error) is
1823
* rethrown, never relabelled.

0 commit comments

Comments
 (0)