Add effective diff consumer examples

This commit is contained in:
2026-10-09 12:37:18 +00:00
parent 8ae542b3a3
commit a37e6895e1
4 changed files with 359 additions and 1 deletions

View File

@@ -352,7 +352,7 @@ and the existing nil-result/`LoadError` load contract.
## Stage 9 — Demonstrate both consumer workflows
Status: planned. Scope: maintained examples and their behavior tests.
Status: complete. Scope: maintained examples and their behavior tests.
1. Add a small complete example under `examples/consumers` that loads two caller-
selected files with one definition, handles each load error, calls `Diff`, and
@@ -374,6 +374,15 @@ Validate: `go test ./examples/consumers`, `go test . -run '^ExampleDiff$'` when
added, and the everyday check. Done: applications can implement the motivating
workflows without internal imports or their own structural comparison.
Evidence: `go test ./examples/consumers`, `go test . -run '^ExampleDiff$'`,
and `./scripts/check.sh` passed. Temporary-file coverage exercises both
caller-selected loads and base-versus-selected-overlay comparison. The overlay
case verifies a recorded derived URL after resolution, a retained lower-priority
port, bilateral redaction and `HiddenChanged` for a nested secret-reference
change, deterministic consumer formatting, and no credential disclosure. The
presenter uses snapshot presence and record membership without interpreting the
redaction marker; no full-context rendering supplements the diff records.
## Stage 10 — Reconcile documentation and audit the complete feature
Status: planned. Scope: current-behavior documentation, integration audit, and