Validate source equivalence and layered scaling

This commit is contained in:
2026-09-29 18:15:10 +00:00
parent 36362ee6af
commit 34e18c84c1
6 changed files with 423 additions and 13 deletions

View File

@@ -461,6 +461,28 @@ checker and full race suite.
## Stage 9: Validate cross-feature consistency and scaling
**Completed 2026-09-29.** A compact public matrix now checks equivalent host,
native, byte, reader, and mapping inputs; tier-local repetition versus cross-tier
reuse; reader consumption; and safe diagnostics/effective/history output after
secret replacement. Engine tests verify exact occurrence accounting across
imports, shared glob/source limits, and the mixed-source CLI ceiling. Rendering
now indexes source labels once per explanation instead of scanning all records
for every location. Loading and passive context ownership were reviewed against
ADR 0008; no handles or background work are retained by queries.
On Linux amd64 with `-benchmem` and 100 ms samples, the 512-entry assembly-only
composition measured about 3.5 ms/op (the earlier post-index baseline was about
3.3 ms), and recursive overlay about 2.2 ms/op (about 12 ms at the first-stage
handoff before subsequent provenance work). The 128-application owned assembly
remained about 0.30 ms/op versus 6.35 ms/op for copy-preserving application.
End-to-end layered measurements were about 7.15 ms/op for 512 broad catalog
entries, 2.59 ms/op for 128 small tiers, 3.27 ms/op for 128 alternating subtree
replacements, 1.86 ms/op for 64 imported native defaults, and 1.36 ms/op for
64 retained-history applications. Allocations grew roughly with these fixture
sizes. I/O, sorting, decoding, callbacks, and retained output contribute to
full-path cost; these observations are not timing gates or an unconditional
complexity guarantee. The everyday checker and full race suite passed.
1. Consolidate a small semantic equivalence matrix across host, native, bytes,
readers, and mappings, using equivalent logical inputs and contexts. Cover
strict conflict versus intentional precedence and version-path preservation;