Skip to content

saveMetaItem's DESTRUCTIVE_CHANGE 409 message inlines the same issue prose its structured issues carries — the remaining duplication of the #10524 family, different refusal class #10886

Description

@os-elon

Found while implementing #10524 (declare-then-trim on the publish refusal face). Site 3 of the PM's table there, argued OUT of that card's scope and filed instead — it is a different refusal class and its message is load-bearing in a way the INVALID_METADATA sites' were not.

Measured (at 4d7c5645eb, unchanged by the #10524 PR)

packages/metadata-protocol/src/protocol.tssaveMetaItem, Phase 3a-destructive (~:13131-13141):

Why it was not folded into #10524

  1. Different refusal class: 409 DESTRUCTIVE_CHANGE is a risk-acknowledgement flow (?force=true), not a validation refusal; its message ends with the actionable remedy (re-submit with ?force=true to proceed), and the admin UI's confirmation dialog reads the structured issues already.
  2. Different element vocabulary: { code, field?, message }, not RuntimeAuthoringIssueSchema and not the zod { path, message, code } entry — a trim needs its own declaration decision for whichever wire faces quote this message.
  3. A publish failure's error string inlines the same validation prose that issues[] already carries, so every console renders each finding twice #10524's own measurement (below) shows trims of this family are only safe after every face that quotes the message has a declared structured channel — that inventory has not been done for this site.

Prerequisite measured during #10524, which any fix here must repeat

The sibling INVALID_METADATA spec-validation message (same method, ~:13306) was trial-trimmed during #10524 and reverted: three #8333 GUARD pins proved the message is quoted on faces where it is the sole carrier (duplicatePackage's failed[].error threads no issues). The same inventory — which faces quote this 409's message, and which of them carry issues structurally — is the first step here; trimming before declaring on those faces deletes the prescription from the wire (the declare-then-trim order, violated).

Back-link: #10524 and its PR carry the measurement detail.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions