Index source operations during history construction

This commit is contained in:
2026-12-05 17:15:50 +00:00
parent df7e0eaec5
commit a44134769f
3 changed files with 153 additions and 16 deletions

View File

@@ -198,7 +198,13 @@ restriction on inspecting rejected configuration.
## Finding 4 — Avoid repeated scans of source observations during history construction
**Status:** Open. **Priority:** P2. **Affected stages:** 3, 4 and 6 through
**Status:** Complete. Added a construction-local operation index narrowed by
path and source identity, retaining the existing complete attribution predicate.
Repeated-tier coverage verifies chronological, deduplicated history across load
outcomes. Focused history tests, `./scripts/check.sh` and `go test -race ./...`
passed.
**Priority:** P2. **Affected stages:** 3, 4 and 6 through
their shared source-history construction.
### Relevant code and complexity
@@ -305,3 +311,16 @@ performance data was collected. Production code and tests remain unchanged.
The prior successful checks apply to the unchanged runtime; this pass validates
the report's links and whitespace. No further algorithmic findings were identified
within the reviewed feature scope.
## Remediation completion
All four findings have been addressed in separate commits with their completion
markers above. Main-tier fallback preserves the applicable composition policy;
consumed selector descendants retain their inheritance event; the owning
configuration documentation distinguishes diagnostic formatting from inspection;
and source-operation lookup no longer rescans all contributions and preceding
operations for distinct-source scalar replacements. Existing attribution,
redaction, history limits and public API signatures remain in place.
Validation includes the focused regressions, the everyday check and the full
race suite. No timing thresholds or public performance guarantees were added.