Skip to content

Commit 6d95288

Browse files
committed
docs(metadata-protocol): add the #8957 fourth decline bullet to migrateStoredMetadata's JSDoc
`migrateStoredMetadata`'s "What it declines to touch, and says so" JSDoc section listed three decline paths and never picked up the fourth one #8957 (PR #9059, b740440) added: a row stored under a non-canonical metadata type, reported `outcome: 'skipped'`. Mirrors the wording already written at the `isNonCanonicalStoredType` call site's own inline comment. Also adds one lead-in sentence naming the scope this JSDoc section documents (the function's full internal surface, including the no-reachable-automation-engine path no CLI caller can reach, since `os migrate meta --stored` always supplies its own engine) — measured true against this same JSDoc's own `canonicalizeFlow` parameter doc and against cli.mdx. Does not add or remove any bullet to reconcile the JSDoc's three (now four) items with cli.mdx's four items; that scope split is a maintainer question, tracked on #9196. Fixes #9196
1 parent 739fe5b commit 6d95288

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

packages/metadata-protocol/src/protocol.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13090,6 +13090,11 @@ export class ObjectStackProtocolImplementation implements
1309013090
*
1309113091
* ## What it declines to touch, and says so
1309213092
*
13093+
* This section documents the function's full internal surface, including
13094+
* paths no CLI caller can reach: `os migrate meta --stored` always passes
13095+
* its own automation engine (see `canonicalizeFlow` above), so the first
13096+
* bullet below is never observed from that door.
13097+
*
1309313098
* - **`flow` rows with no reachable automation engine.** Flow-node
1309413099
* conversions carry ADR-0078's open-namespace conflict guard, which
1309513100
* needs the engine's live executor registry. When one is reachable —
@@ -13120,6 +13125,17 @@ export class ObjectStackProtocolImplementation implements
1312013125
* body is a genuine contract violation, not chain-owned history. They
1312113126
* surface as `failed` with the validation message, keep reading through
1312213127
* the chain, and stay fixable in Studio.
13128+
* - **Rows stored under a non-canonical metadata type spelling** (#8957,
13129+
* {@link isNonCanonicalStoredType}). This pass canonicalizes BODIES;
13130+
* rewriting a stored type spelling is an identity move — a new
13131+
* `(org, type, name, package_id)` key, not an edit — so it is out of
13132+
* its reach. Nothing on the canonical type can see such a row — no
13133+
* registry read, no compliance query — and the batch publish refuses
13134+
* it for the same reason (`STORED_TYPE_NOT_CANONICAL`). Reported
13135+
* `skipped`, not `failed`: nothing is broken about this pass, the row
13136+
* is simply outside its reach. Re-author the item under the canonical
13137+
* type (`PUT /meta/<canonical>/<name>`) and drop the non-canonical
13138+
* row.
1312313139
*/
1312413140
async migrateStoredMetadata(request: {
1312513141
/** Write. Omitted / false = preview: reports what it would do, writes nothing. */

0 commit comments

Comments
 (0)