Skip to content

Commit 77da09b

Browse files
os-zhuangclaude
andauthored
docs(metadata-protocol): add the #8957 fourth decline bullet to migrateStoredMetadata's JSDoc (#9270)
* 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 * docs(metadata-protocol): narrow the scope lead-in sentence, per PM review The lead-in sentence added in the previous commit said the section documents the function's "full internal surface" -- overclaiming: the JSDoc is also missing cli.mdx's flow-conflict-refused row, which IS internal to the function (not CLI-caller-dependent), so "full" did not hold. Narrowed the claim to what is actually demonstrated (the flow-no-engine bullet specifically), and pointed the residual scope-split question at the follow-up decision card (#9271) the PM filed for it, rather than implying this sentence explains every gap between the two lists. Fixes #9196 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5d4f3d5 commit 77da09b

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

packages/metadata-protocol/src/protocol.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13090,6 +13090,14 @@ export class ObjectStackProtocolImplementation implements
1309013090
*
1309113091
* ## What it declines to touch, and says so
1309213092
*
13093+
* This section documents the function's internal surface, which is not
13094+
* always identical to what an operator running the CLI can observe:
13095+
* `os migrate meta --stored` always passes its own automation engine
13096+
* (see `canonicalizeFlow` above), so the first bullet below is never
13097+
* observed from that door. That does not by itself account for every
13098+
* difference between this list and `content/docs/deployment/cli.mdx`'s
13099+
* decline table — see #9271.
13100+
*
1309313101
* - **`flow` rows with no reachable automation engine.** Flow-node
1309413102
* conversions carry ADR-0078's open-namespace conflict guard, which
1309513103
* needs the engine's live executor registry. When one is reachable —
@@ -13120,6 +13128,17 @@ export class ObjectStackProtocolImplementation implements
1312013128
* body is a genuine contract violation, not chain-owned history. They
1312113129
* surface as `failed` with the validation message, keep reading through
1312213130
* the chain, and stay fixable in Studio.
13131+
* - **Rows stored under a non-canonical metadata type spelling** (#8957,
13132+
* {@link isNonCanonicalStoredType}). This pass canonicalizes BODIES;
13133+
* rewriting a stored type spelling is an identity move — a new
13134+
* `(org, type, name, package_id)` key, not an edit — so it is out of
13135+
* its reach. Nothing on the canonical type can see such a row — no
13136+
* registry read, no compliance query — and the batch publish refuses
13137+
* it for the same reason (`STORED_TYPE_NOT_CANONICAL`). Reported
13138+
* `skipped`, not `failed`: nothing is broken about this pass, the row
13139+
* is simply outside its reach. Re-author the item under the canonical
13140+
* type (`PUT /meta/<canonical>/<name>`) and drop the non-canonical
13141+
* row.
1312313142
*/
1312413143
async migrateStoredMetadata(request: {
1312513144
/** Write. Omitted / false = preview: reports what it would do, writes nothing. */

0 commit comments

Comments
 (0)