diff --git a/docs/roadmap/remediation.md b/docs/roadmap/remediation.md index be671f9..a583132 100644 --- a/docs/roadmap/remediation.md +++ b/docs/roadmap/remediation.md @@ -115,7 +115,14 @@ finding 1's corrected implementation, without redefining the intended contract. ## 3. Scoped path enumeration unnecessarily copies all effective metadata -**Priority:** P3. **Status:** Open. **Plan stage:** 3 (also exercised in stage 6). +**Priority:** P3. **Status:** Complete. **Plan stage:** 3 (also exercised in stage 6). + +**Completion:** scoped HistoricalPaths now enumerates through the retained +private metadata directly, avoiding copies of unrelated effective fields and +origins. The existing enumeration still returns detached Paths, and public +Metadata() behavior is unchanged. Focused inspection/historical-path/metadata +tests and `./scripts/check.sh` passed with Go 1.27.4. No cache, inventory, +performance threshold test, or publication gate was added. **Relevant code:** `InspectionView.HistoricalPaths` in [inspection_view.go](../../internal/engine/inspection_view.go), line 62; diff --git a/internal/engine/inspection_view.go b/internal/engine/inspection_view.go index 8bd0491..7ad0624 100644 --- a/internal/engine/inspection_view.go +++ b/internal/engine/inspection_view.go @@ -59,7 +59,7 @@ func (v InspectionView) HistoricalPaths() []Path { return nil } var paths []Path - for _, path := range v.inspection.Metadata().HistoricalPaths() { + for _, path := range v.inspection.metadata.HistoricalPaths() { if pathContains(v.scope, path) { paths = append(paths, path) }