Reuse alias tree for discovery and help
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Consolidated audit catalog
|
||||
|
||||
Status: **11 distinct open findings: 11 P3**, consolidated from 30
|
||||
Status: **9 distinct open findings: 9 P3**, consolidated from 30
|
||||
numbered entries in seven audit documents. Reviewed audit state:
|
||||
`db732e3a1de55c844f77870e1c6db683c2685d5d`.
|
||||
|
||||
@@ -296,6 +296,10 @@ selected routing and discovery semantics.
|
||||
|
||||
## F14 — P3: Discovery-context preparation repeatedly rebuilds shared prefixes
|
||||
|
||||
**Complete.** Distinct trie prefixes are enumerated and classified once;
|
||||
focused discovery and resolver tests pass, and traversal was reviewed for
|
||||
elimination of repeated per-declaration prefix construction.
|
||||
|
||||
R alias sources sharing a depth-D proper prefix cause Θ(RD²) copying and key
|
||||
construction before result deduplication, with repeated classification as well.
|
||||
The source declarations contain only Θ(RD) tokens.
|
||||
@@ -313,12 +317,16 @@ Reuse the tree's routing-snapshot lifetime; do not introduce a parallel index or
|
||||
a cross-invocation result cache. The repeated preparation and help-time scan
|
||||
remain distinct findings. The [joint analysis](remediation-analysis.md#f14f15--joint-source-prefix-design)
|
||||
records the accepted design. The performance-testing decision under F13 applies
|
||||
to both; implementation remains pending.
|
||||
to both.
|
||||
|
||||
**Original:** [02-efficiency E3](02-efficiency.md#e3--p3-discovery-context-preparation-rebuilds-shared-prefixes-repeatedly).
|
||||
|
||||
## F15 — P3: Alias help scans the entire source catalog for each intermediate route
|
||||
|
||||
**Complete.** Help queries strict descendants from each resolution path instead
|
||||
of scanning the complete catalog. Focused alias/help tests pass, and the tree
|
||||
traversal was reviewed for the removal of unrelated source scans.
|
||||
|
||||
Help discovery examines all A alias sources at each of P rewrite paths, doing PA
|
||||
examinations and repeated copies even when there are no descendants. A valid
|
||||
single-token alias chain produces Θ(A²) work to discover an empty alias section
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Audit remediation implementation plan
|
||||
|
||||
Status: in progress; Stages 1–15 complete.
|
||||
Status: in progress; Stages 1–16 complete.
|
||||
|
||||
Baseline: `d492c7747175c01a53261206c2b4356e53453621`. Before this sprint,
|
||||
intervening changes recorded decisions and retired the completed older
|
||||
@@ -527,6 +527,12 @@ Complete when repeated suffix traversal is removed without routing changes.
|
||||
|
||||
## Stage 16 — Reuse the resolver tree for prefix discovery and help
|
||||
|
||||
**Complete.** Discovery classifies each eligible trie prefix once (F14), and
|
||||
help visits only strict descendants for each resolution path (F15). Source
|
||||
review confirms both changes use the existing resolver tree; focused alias,
|
||||
discovery, help and resolver tests pass offline with Go 1.27.0 and
|
||||
`-mod=readonly`, including returned-path ownership and exact aliases with children.
|
||||
|
||||
Findings: F14 and F15, one coordinated change. Sources:
|
||||
`internal/alias/resolver.go`, `flag_aliases.go`, and `help_view.go`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user