Skip to content

Commit 2c8e7ea

Browse files
claude[bot]claude
andauthored
docs(metadata-protocol): re-state row 6's trim justification on its live basis (#16131)
The face-inventory docstring argued that `duplicatePackage` has "no response schema in `packages/spec` at all". That clause has expired: `DuplicatePackageResponseSchema` exists in `packages/spec/src/api/package-lifecycle.zod.ts` and `packages/runtime/src/route-ledger.ts` binds `POST /packages/:id/duplicate` to it. The verdict does not change, but its axis does. The schema is a describe-only transcription of the inline return: its `failed[]` element declares exactly `type`, `name` and `error` and no `issues`. The comparator that separates row 6 from `publishPackageDrafts` is therefore the declared SHAPE, not the schema's existence -- `PublishPackageDraftsResponseSchema`'s `failed[]` does declare `issues: z.array(RuntimeAuthoringIssueSchema).optional()`, and that declared channel is what the message was trimmed against there. So the declare-then-trim order is still unsatisfied on row 6, and the bar is higher than the old wording implied: declaring `issues` now moves a published, route-bound spec schema with its own conformance pin, not just an inline type. Prose only. No assertion changed. Claude-Session: https://claude.ai/code/session_01ARYe3yQTQCUFm5qPYNgKaJ Co-authored-by: Claude <noreply@anthropic.com>
1 parent b5f0836 commit 2c8e7ea

1 file changed

Lines changed: 32 additions & 6 deletions

File tree

packages/metadata-protocol/src/protocol.destructive-409-face-inventory.test.ts

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,39 @@
5959
*
6060
* `duplicatePackage` reports a per-item failure as **response DATA on a 200**
6161
* (`POST /packages/:id/duplicate`), so no HTTP boundary is involved and
62-
* `details.issues` never exists. And unlike `publishPackageDrafts` — whose
63-
* `failed[]` #10895 could extend because `PublishPackageDraftsResponseSchema`
64-
* exists — `duplicatePackage` has **no response schema in `packages/spec` at
65-
* all**; its `failed[]` is typed inline as
62+
* `details.issues` never exists. Its declared return types `failed[]` inline as
6663
* `Array<{ type: string; name: string; error: string }>` and the push adds no
67-
* `issues` key. Declaring a structured channel there is a `packages/spec`
68-
* change and is deliberately NOT part of this card.
64+
* `issues` key — section 3 pins exactly that, at runtime, on a real refusal.
65+
*
66+
* ⚠️ [#15853] The contrast with `publishPackageDrafts` is REAL, but it is
67+
* **not** 「one has a response schema and the other has none」. This block used
68+
* to argue that `duplicatePackage` had *no response schema in `packages/spec`
69+
* at all*. That clause has EXPIRED — re-measured on `a4816a79d`, it is FALSE,
70+
* and the live argument runs on the declared SHAPE instead:
71+
*
72+
* - `DuplicatePackageResponseSchema` DOES exist
73+
* (`packages/spec/src/api/package-lifecycle.zod.ts`) and the route IS bound
74+
* to it (`packages/runtime/src/route-ledger.ts`). But it is a describe-only
75+
* TRANSCRIPTION of the inline return above: its `failed[]` element declares
76+
* exactly `type`, `name` and `error` — **no `issues`**, and no `code`.
77+
* - `PublishPackageDraftsResponseSchema`'s `failed[]`
78+
* (`packages/spec/src/api/protocol.zod.ts`) DOES declare
79+
* `issues: z.array(RuntimeAuthoringIssueSchema).optional()`. That DECLARED
80+
* channel is what #10524 / #10895 trimmed the message against.
81+
*
82+
* ⇒ The verdict is unchanged and the axis is sharper: #10524's order —
83+
* declare a structured channel, and only then trim — is still unsatisfied
84+
* here, because what row 6 lacks is a declared `issues`, not a schema. The
85+
* schema's existence does not supply the missing channel; it FREEZES its
86+
* absence into a published, route-bound surface. That RAISES the bar rather
87+
* than lowering it: declaring `issues` here now moves a spec schema carrying
88+
* its own conformance pin (`packages/spec/src/api/package-lifecycle.test.ts`)
89+
* as well as the inline producer type, and is deliberately NOT part of this
90+
* card.
91+
*
92+
* ⚠️ The same expired sentence still stands at the RAISE SITE, in
93+
* `protocol.ts`'s comment on the 409 refusal. Filed as #16125 and deliberately
94+
* not touched here — that file was held by another in-flight claim.
6995
*
7096
* ⚠️ Row 6's reachability was MEASURED, not argued, and the obvious first
7197
* attempt says the wrong thing: a plain duplicate re-namespaces every object

0 commit comments

Comments
 (0)