Memoize flag alias resolution by context

This commit is contained in:
2026-11-07 15:54:36 +00:00
parent 02cd49d6b6
commit 0d3f7299cc
4 changed files with 73 additions and 32 deletions

View File

@@ -1,6 +1,6 @@
# Audit remediation implementation plan
Status: in progress; Stages 1–14 complete.
Status: in progress; Stages 1–15 complete.
Baseline: `d492c7747175c01a53261206c2b4356e53453621`. Before this sprint,
intervening changes recorded decisions and retired the completed older
@@ -500,6 +500,12 @@ clear, with selected syntax and provenance preserved.
## Stage 15 — Memoize each context's flag-alias graph
**Complete.** Context-local traversal memoizes canonical and unavailable
endpoints, with an active stack for cycle diagnostics. Source review confirms
resolved suffixes are reused within each context. Focused alias, registration,
cycle and discovery tests passed offline with Go 1.27.0 and `-mod=readonly`,
including shared suffixes and unavailable destinations.
Findings: F13. Source: `flag_aliases.go`.
1. Replace independent suffix walks with context-local visitation and memoized