Skip to content

sweep(spec): 2-item "validation diagnostics don't reach the real defect" sweep — one claim, one PR, per-item checklist (#6391 #5389) #7025

Description

@os-zhuang

Sweep card per the findings-round bundling discipline (#6243 / PR #6288 precedent), packaged by the domain:spec seat with the maintainer's approval (2026-08-09 「同意」, chat). This card is the claim object; the member cards keep pm:queue but are NOT dispatch candidates while this sweep is open.

Shared criterion (what makes these one sweep)

Both members are cases where a validation failure's diagnostic cannot reach the real defect: the refusal fires, but the structure of the error hides which element/key actually failed. Both fixes improve the DIAGNOSTIC face only. The acceptance face must not move: every input that parsed before parses after, every input refused before is refused after — pinned in both directions in the PR. (A discriminator added to a union changes error SHAPE, not membership — assert exactly that; if a member turns out to require a membership change, DROP it from the sweep and report.)

Members (read each card in full before touching it; premise-first per member)

  1. spec/ui: ViewMetadataSchema 的 union 无判别式且容器成员未导出——消费方做失败诊断只能按成员序索引嵌套 errors #6391ViewMetadataSchema's union has no discriminant and its container members are unexported, so a consumer diagnosing a failure can only index nested errors by member position. Fix: discriminated dispatch where the schema family supports it + export the member schemas, so diagnostics name the branch.
  2. 休眠:invalid_key / invalid_element 把真实 issue 挂在 issue.issues 上,union 家族的三个消费者一个都不下降 #5389invalid_key / invalid_element hang the real issues on issue.issues, and the union family's three consumers do not descend into them — the surfaced message is the generic wrapper. Fix: the consumers descend (or the issue is lifted), so the author sees the leaf diagnosis.

Sweep rules (binding on the PR)

Refs: #6243 (sweep pilot), ADR-0112 (error envelope).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions