Prepare subtree filter prefixes once per discovery

This commit is contained in:
2026-11-07 12:14:11 +00:00
parent 7bb7326ed1
commit 7b2dc2f2c9
3 changed files with 73 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
# Shared reporting and PromptKit adoption remediation
Status: one open finding; R1–R6 complete. R1–R3 are from the architectural review of
Status: all seven findings complete. R1–R3 are from the architectural review of
`f83866e44a8a9066db52cbd2aa5cccde0d69a839`. R4–R7 are from the algorithmic
audit of `f5b2d1f80c4720b762f3301c29d5050710c210d0`; R4 is a correctness
issue and R5–R7 are efficiency opportunities for consideration.
@@ -284,6 +284,13 @@ and forwarding, not the choice of sorting or merging mechanism.
## R7 — P3: Path discovery reparses its invariant subtree prefix
**Complete.** Discovery serializes and tokenizes the requested prefix once,
and serializes each child once. Filtering now takes O(U+L) conversion/matching
work and O(U) retained prefix storage, excluding native metadata and report work.
Command checks cover root, escaped slash/tilde, exact paths, descendants, sibling
prefixes, long unmatched prefixes, and historical/explicitness composition. The
independent ckconfig and complete aligned workspace suites pass with Go 1.27.0.
**Location:** [explain.go](../../integrations/ckconfig/explain.go),
runConfigExplanation's discovery loop and pathWithin lines 177–194.
@@ -309,6 +316,10 @@ not the planned native pointer semantics or discovery algorithm.
## Applying the fixes
All completion markers describe fixes in the current source. Publication and
released dependency alignment remain separate release work. The original
observations above retain the evidence from the audited baseline.
Keep fixes and regression coverage at the CommandKit adaptation/reporting
boundaries under the [testing policy](../policy/testing.md). These findings do
not call for reimplementation or independent verification of upstream domain