Index mappings while assembling configuration reports
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Configuration comparison review remediation
|
||||
|
||||
Status: four open findings. This document records required follow-up work; it
|
||||
does not implement the fixes.
|
||||
Status: one finding complete; three open. This document tracks required
|
||||
follow-up work and its completion evidence.
|
||||
|
||||
## Review baseline and scope
|
||||
|
||||
@@ -39,7 +39,7 @@ caller-owned aliases/caches are deliberate choices and require no remediation.
|
||||
|
||||
## R-1: Avoid repeated full scans when assembling wide report mappings
|
||||
|
||||
**Status:** Open. **Priority:** Medium. **Category:** Code quality / efficiency.
|
||||
**Status:** Complete. **Priority:** Medium. **Category:** Code quality / efficiency.
|
||||
|
||||
**Evidence:** [diff_report.go](../../integrations/ckconfig/diff_report.go),
|
||||
`placeYAMLValue` and `mappingKeyIndex` (lines 59 and 98 at the review baseline).
|
||||
@@ -62,6 +62,15 @@ the accumulated mapping. Existing semantic-path, YAML-type, ordering, and native
|
||||
safe-value behavior remains intact. Any additional measurement should be focused
|
||||
on this lookup cost; a numerical performance gate is not required.
|
||||
|
||||
**Completed 2026-10-12:** A private, report-local `yamlValuePlacer` now indexes
|
||||
each encountered mapping once and updates that index as keys are appended.
|
||||
Subsequent placements reuse key positions while YAML content keeps insertion
|
||||
order. Root values, native regions, and incompatible-ancestor failures retain
|
||||
their handling. Existing helper tests use the same placer across placements.
|
||||
`go test ./...` passed in `integrations/ckconfig`, including the simple consumer;
|
||||
the diff and whitespace review passed. No public API, limits, global cache,
|
||||
benchmark, or performance gate was added.
|
||||
|
||||
## R-2: Scope CLI guarantees to the actual provider and delivery boundaries
|
||||
|
||||
**Status:** Open. **Priority:** Medium. **Category:** Inadvertently strengthened
|
||||
|
||||
Reference in New Issue
Block a user