Protect canonical operand prefixes from aliases

This commit is contained in:
2026-10-20 00:20:40 +00:00
parent c225a66c97
commit ccf8acd861
3 changed files with 48 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
# Alias implementation review remediation
Status: open; R-1 through R-8 require follow-up.
Status: in progress; completed issues are marked individually below.
## Review scope and evidence
@@ -27,7 +27,7 @@ or private representations unnecessarily.
## R-1: Protect prefixes of canonical operand space during installation
Status: open. Priority: P1. Category: canonical command reachability.
Status: complete. Priority: P1. Category: canonical command reachability.
**Evidence:** [traceCanonicalPath](../../registry.go#L318) uses
[acceptsOperandCount](../../registry.go#L337), which requires the source's entire
@@ -58,6 +58,12 @@ side is added later; preserve the preexisting registry on rejection. Include
multi-required and repeated operands and a valid distinct child/shortcut case
so the correction does not reserve every route beneath any runnable ancestor.
**Completed:** Installation now protects operand prefixes that can be completed
by later arguments without requiring the minimum count immediately. New
regressions failed before the correction and pass for fixed/repeated operands,
construction, both later registration orders, and rollback. Existing child and
longer-shortcut cases and the complete offline root suite passed on Go 1.26.8.
## R-2: Select canonical routing context before validating operand counts
Status: open. Priority: P2. Category: unintended parsing restriction and identity.