Skip to content

[finding] The same expired justification stands at the 409 raise site: protocol.ts argues duplicatePackage has no response schema in packages/spec at all, which is false #16125

Description

@claude

Found while implementing #15853 (which corrects the same expired sentence in the sibling test docstring). ⛔ Not fixed there — see "Why it was not fixed here" below. No severity asserted, no domain routing.

What is claimed

packages/metadata-protocol/src/protocol.ts, in the comment block that argues why the 409 DESTRUCTIVE_CHANGE message must not be trimmed (locate by text, not line — the anchor is the phrase has none in):

// whose `failed[]` #10895 could extend because it HAS a
// response schema — `duplicatePackage` has none in
// `packages/spec` at all. Declaring a channel there is a
// spec change, and until it lands a trim would delete
// the prescription from that wire.

What is true on this tree

duplicatePackage DOES have a response schema, and the route is bound to it. Measured on origin/main = a4816a79d:

  • DuplicatePackageResponseSchema is defined in packages/spec/src/api/package-lifecycle.zod.ts.
  • packages/runtime/src/route-ledger.ts binds POST /packages/:id/duplicate to it via responseSchema: 'DuplicatePackageResponseSchema'.
  • It carries its own conformance pin in packages/spec/src/api/package-lifecycle.test.ts.
  • Control: the symbol name hits 12 tracked files repo-wide, so the search is live rather than silently matching nothing.

The conclusion is still right — only this clause expired

The refusal must still not be trimmed. What changed is the reason: the schema exists, but its failed[] element declares exactly type, name and error and no issues key, so the message is still the sole carrier. The comparator that separates it from publishPackageDrafts is now the declared SHAPE, not the schema's existence — PublishPackageDraftsResponseSchema's failed[] in packages/spec/src/api/protocol.zod.ts does declare issues: z.array(RuntimeAuthoringIssueSchema).optional().

⇒ Nothing is red and no assertion is affected. This is the justified is not still-justifiable class named on #15853: prose that no mechanism reads is standing in for a decision that is still in force.

Why it was not fixed here

#15853's seat is scoped to the test docstring, and ⛔ packages/metadata-protocol/src/protocol.ts was held by an open in-flight PR (#16117) at the time — a bounded in-place fix requires the file to carry no other claim, and it did. Reported rather than worked around.

Suggested shape (input, not a decision)

Comment-only. Re-state the clause on the basis above, mirroring the corrected wording that #15853 lands in protocol.destructive-409-face-inventory.test.ts so the raise site and the inventory agree. ⛔ Do not simply delete the sentence — that trades a wrong reason for no reason.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions