Document failed-load inspection behavior

This commit is contained in:
2026-12-05 16:15:33 +00:00
parent cb31324243
commit 729724deba
11 changed files with 96 additions and 22 deletions

View File

@@ -49,6 +49,8 @@ Implemented component owners:
engine schema builder and existing field/path bindings. Root `Inspection`
wraps an engine view borrowing the frozen inspection and canonical scope;
it reuses history enumeration, document redaction, and whole-result diff.
Both results and load errors can select a view; the error retains only frozen
reporting evidence and established passive contexts.
- `internal/document` owns the parser-independent ordered tree and cloning.
`internal/yaml` is the sole upstream YAML adapter and parser/dumper boundary.
- Engine mechanism tests own source, composition, inheritance, decoding,
@@ -182,6 +184,16 @@ pre-secret admission boundary, [`prepareInspectionHistory`](../../internal/engin
freezes that builder and counts the retained document roots before secret lookup
and validation.
On eligible failure exits, the engine freezes the latest admissible source,
decoded, or resolver-entry history prefix. Source prefixes reuse the same source
and inheritance producers without a typed baseline; failure-only fallback tries
earlier candidates when the retained-node budget prevents a newer view. The
shared finalizer in [`load_result.go`](../../internal/engine/load_result.go)
classifies sensitivity and attaches source records, contexts, diagnostics, and
known resolved references for both outcomes. Failure views use the error's
conservatively sanitized source catalog. [ADR 0025](../adr/0025-inspect-failed-configuration-loads.md)
records the decision.
The frozen model is shared by `Metadata` and `Inspection`. Its shape-aware
selection in [`history_select.go`](../../internal/engine/history_select.go)
drives metadata history, explanation, and historical-path membership; the model