Skip to content

bug: reject unreachable CLI routes - #357

Merged
codeforester merged 1 commit into
mainfrom
bug/350-20260831-bug-reject-unreachable-cli-command-and-inherited-option-coll
Aug 31, 2026
Merged

bug: reject unreachable CLI routes#357
codeforester merged 1 commit into
mainfrom
bug/350-20260831-bug-reject-unreachable-cli-command-and-inherited-option-coll

Conversation

@codeforester

Copy link
Copy Markdown
Collaborator

Summary

  • enforce sibling-wide uniqueness across canonical command names and aliases, including duplicate aliases in one declaration
  • reject option names and tokens whose ancestor/descendant scopes overlap in either declaration order while allowing sibling reuse
  • extend base_cli_validate_model to audit canonical routes, aliases, and effective option-token reachability
  • apply the same rules to direct calls and table-driven declarations with order-permutation coverage

Validation

Impact

  • Public API: previously accepted but unreachable CLI declarations now return usage status 2 before mutation
  • Model validation: base_cli_validate_model now reports unreachable routes in addition to missing handlers
  • Compatibility: Bash 4.2-compatible associative-array and string matching only
  • Documentation: comments and changelog updated; no demo or security changes required

Fixes #350

@codeforester
codeforester force-pushed the bug/350-20260831-bug-reject-unreachable-cli-command-and-inherited-option-coll branch from 4820b66 to 7cf330c Compare August 31, 2026 04:56
@codeforester
codeforester merged commit 191a45e into main Aug 31, 2026
10 checks passed
@codeforester
codeforester deleted the bug/350-20260831-bug-reject-unreachable-cli-command-and-inherited-option-coll branch August 31, 2026 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: reject unreachable CLI command and inherited-option collisions

1 participant