Decode typed configuration over defaults
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
## Status and ownership
|
||||
|
||||
Status: implementation in progress; Stages 1–5 are complete and later stages are
|
||||
Status: implementation in progress; Stages 1–6 are complete and later stages are
|
||||
pending.
|
||||
|
||||
Audience: a `gpt-5.6-terra` coding agent implementing one stage per prompt, in
|
||||
@@ -564,7 +564,31 @@ Acceptance:
|
||||
|
||||
## Stage 6 — Decode scalar and container values over defaults
|
||||
|
||||
Status: pending.
|
||||
Status: complete.
|
||||
|
||||
Completion evidence (2026-09-06):
|
||||
|
||||
- Added schema-driven typed decoding in [`decode.go`](../../decode.go), starting
|
||||
from the Stage 5 detached clone and returning only private typed state, input
|
||||
presence, projected baseline/final trees, and per-path default/base origins.
|
||||
- Implemented recursive mapping retention, atomic sequence replacement, exact array
|
||||
lengths, pointer-object zero allocation versus non-nil retention, nullable-shape
|
||||
clearing, strict nested map values, inline-map decoding, and unknown-field errors.
|
||||
- Added checked destination-width integers and floats, dynamic `int64`/`float64`,
|
||||
named scalars, duration strings, paired text codecs, safe value-free failures, and
|
||||
collection of independent decode errors at original semantic paths/coordinates.
|
||||
The [current configuration contract](../config.md#defaults-and-typed-decoding) and
|
||||
component inventory now own this behavior.
|
||||
- Adapted Narratio's fresh-default, presence, strict nested-type, and repeated-load
|
||||
cases, replacing custom YAML hooks and pointer/zero guesses with tree-derived
|
||||
presence; explicit empty and null are retained and equal-valued input is explicit.
|
||||
Focused coverage includes the defaults operation table, new/existing map entries,
|
||||
empty mappings/sequences, nil/non-nil pointer objects, default isolation, numeric
|
||||
range and coercion failures, integer durations, inline collisions, nested unknown
|
||||
fields, coordinates, safe codec failures, and independent repeated results.
|
||||
Verified `go test ./...`, `go vet ./...`, `go build ./...`, `go mod tidy -diff`,
|
||||
and `git diff --check` with Go 1.26.7 on linux/amd64. No deviations were required;
|
||||
public loading and schema-version checks remain later work.
|
||||
|
||||
Read: feature [defaults/null](initial.md#static-defaults-and-null) and typed decoding.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user