Reuse origin metadata across configuration collections

This commit is contained in:
2026-10-17 13:46:58 +00:00
parent 165cef7aec
commit a1f12f3185
6 changed files with 79 additions and 23 deletions

View File

@@ -82,6 +82,9 @@ declaration; absent and null fields remain distinguishable from explicit
strings, including empty strings. It closes content-file handles before
returning and retains no source capability for public inspection.
Prompt materialization shares a lazy metadata snapshot across root and collection
resources during construction, avoiding a full metadata copy per collection.
Role and cache-control normalization is applied to execution-owned message
copies. ConfigKit v0.8.0 retains effective input message metadata and its
resource origins; recording a sequence-wide normalization in the retained

View File

@@ -1,6 +1,6 @@
# Configuration Collections Implementation Review Findings
Status: three findings open. Review completed 2026-10-17.
Status: Finding 1 completed; Findings 2–3 open. Review completed 2026-10-17.
Reviewed implementation after `89af2a1` through `0221cd4` against the accepted
[feature roadmap](configuration-collections.md), [implementation plan](implementation.md),
@@ -35,7 +35,7 @@ addresses a retained public guarantee that no longer describes scoped views.
## Finding 1: Share Origin Metadata Across Collection Materialization
Priority: P2. Status: open.
Priority: P2. Status: completed 2026-10-17.
Locations: [load.go](../../internal/configuration/load.go), lines 257–262, and
[materializePrompts](../../internal/configuration/prompts.go), lines 84–95.
@@ -78,6 +78,15 @@ one file-backed collection, and use a small scaling benchmark to verify the
repeated full-snapshot cost is removed. Do not make exact allocations, elapsed
times, or private helper call order a new contract.
Completion: prompt materialization now traverses root and collection resources
within one construction-scoped pass sharing the lazy origin metadata snapshot.
Extended the imported/inherited-content test across distinct collection resource
contexts and added a scaling benchmark without allocation or timing assertions.
At 64 collections the same benchmark dropped from 104,574,200 to 21,239,712
allocated bytes per construction in single-iteration local measurements.
Validation passed: focused origin tests and benchmark, race-enabled configuration
and public API tests, configuration vet, and `git diff --check`.
## Finding 2: Detach The Optional Label In Internal Prepared Snapshots
Priority: P3. Status: open.