Skip to content

Commit e57e7c0

Browse files
committed
changeset: declare the REST /published move; docblock @throws for the two-holder refusal
The changeset's BREAKING banner gains a third FROM/TO. A bare GET /meta/:type/:name/published on a REST host with no objectQLProvider went on to its published exit and now answers 409 without candidates. The getMetaItemLayered docblock names the PackageScopedNameRefusedError it throws for a name two packages register in code. Comment and prose only. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
1 parent e516f35 commit e57e7c0

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎.changeset/32622-layers-two-holders-candidates.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ Metadata-protocol: none
1010

1111
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export changes shape. The moved answers are reads of a name two packages hold, which now refuse as the plain read of that name already did: no stored row, layer, registry key or authored value changes, so there is nothing for a migration to rewrite and no tombstone. -->
1212

13-
**BREAKING** for a reader of the layers of a name two or more served packages register in code, naming no package. Such a name has no one holder (ADR-0150 D3/D5), and the plain read already refused it. Two answers move, measured in both registration orders:
13+
**BREAKING** for a reader of the layers, or of the REST published view, of a name two or more served packages register in code, naming no package. Such a name has no one holder (ADR-0150 D3/D5), and the plain read already refused it. Three answers move, measured in both registration orders:
1414

1515
- FROM: on a host that wires no engine for the REST door chain, `GET /meta/:type/:name/layers` (and `?layers=true`) answered 200 with the layers of the holder that registered first. TO: it answers `409 RESOURCE_CONFLICT` naming both holders as `details.candidates`.
1616
- FROM: in process, the protocol's `getMetaItemLayered({ type, name })` with no `packageId` resolved the holder that registered first. TO: it throws `PackageScopedNameRefusedError` (`RESOURCE_CONFLICT`, 409) naming both, as `getMetaItem` does.
17+
- FROM: on a REST host with no `objectQLProvider`, `GET /meta/:type/:name/published` went on past its overlay read to the published exit: what the host's metadata service `getPublished` answers, or `501 NOT_IMPLEMENTED` when the host resolves no metadata service. TO: it answers `409 RESOURCE_CONFLICT`, without `details.candidates`. The dispatcher's `/published` swallows the same refusal and still serves its snapshot.
1718

1819
**Not moved.** A name one package holds, and every read naming the package (`?package=`, `packageId`), answer as before. On a host whose door chain has an engine, `/layers` already refused 409; it now also names the holders. The save and delete doors do not move.
1920

‎packages/metadata-protocol/src/protocol.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4292,6 +4292,10 @@ export class ObjectStackProtocolImplementation implements
42924292
* layer's MetadataService read reporting `degraded` with nothing
42934293
* in the registry to answer instead, carrying the failing loaders'
42944294
* messages on `cause`.
4295+
* @throws `PackageScopedNameRefusedError` — [#32914, ADR-0150 D3/D5] 409 /
4296+
* `RESOURCE_CONFLICT`, naming no package, for a name two or more
4297+
* served packages register in code: the registry's own refusal, as
4298+
* {@link getMetaItem} throws it, before any layer is read.
42954299
*
42964300
* [#29814] `opts.withDraft` adds the `draft` layer
42974301
* (`GetMetaItemLayeredResponseSchema.draft`): the pending draft row the

0 commit comments

Comments
 (0)