Preserve structured diagnostics and candidate error context
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Shared validation foundation remediation
|
||||
|
||||
Status: Remediation in progress; findings 1–3 addressed, findings 4–6 pending.
|
||||
Status: Remediation in progress; findings 1–4 addressed, findings 5–6 pending.
|
||||
|
||||
Reviewed committed implementation `f53354b`, covering the eight foundation
|
||||
commits after `0c7129a`, against the [implementation plan](implementation.md),
|
||||
@@ -130,6 +130,15 @@ reads from fully populated candidates.
|
||||
|
||||
## 4. P2: Public and CLI error presentation loses diagnostic information
|
||||
|
||||
**Resolution:** Addressed. Public errors use the internal diagnostic formatter
|
||||
with explicit conversions, including findings, targets, directives,
|
||||
measurements, and causes. Matching converted diagnostics reuse their contextual
|
||||
cause's rendering once. The CLI preserves outer wrappers, and callback errors
|
||||
retain their public identity. Regression tests cover both candidate operations
|
||||
and caller-created errors with and without causes.
|
||||
`go test . ./cmd/releasekit ./internal/validation ./internal/apicheck` and
|
||||
`go run ./internal/apicheck` passed.
|
||||
|
||||
**Owners:** [public diagnostics](../../validation_error.go),
|
||||
`ValidationError.Error` and its formatter; [CLI presentation](../../cmd/releasekit/main.go),
|
||||
`candidateFailureText`; [internal formatting](../../internal/validation/diagnostic.go).
|
||||
|
||||
Reference in New Issue
Block a user