feat: reject positional args for clets that don't accept them#55
Merged
Conversation
- Add `AcceptsPositionalArgs` default-false property to `IClet` interface - Override to `true` in SelectClet, MultiSelectClet, and MarkdownClet - Add early validation in CommandLineRoot.DispatchAlias: if positional args are supplied to a clet that doesn't accept them, emit a usage error (exit 2) with a hint when a single arg was given - Add unit tests for the new validation behavior - Update specs/clet-spec.md §4.7 and add decisions log entry D-022 Agent-Logs-Url: https://github.com/gui-cs/clet/sessions/e7f45719-5f0c-4aa4-84c4-9c7436e10273 Co-authored-by: tig <585482+tig@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix clets to reject unused positional arguments
feat: reject positional args for clets that don't accept them
May 6, 2026
Member
|
@copilot resolve the merge conflicts in this pull request |
…ositionalArgs entry to D-023 Co-authored-by: tig <585482+tig@users.noreply.github.com>
Contributor
Author
Resolved in commit |
D-024 (package id) and D-023 (two-branch versioning) came from develop. This PR's AcceptsPositionalArgs decision renumbered from D-023 to D-025 to avoid collision. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tig
added a commit
that referenced
this pull request
May 6, 2026
D-024 (package id) and D-023 (two-branch versioning) came from develop. This PR's --rows decision renumbered from D-023 to D-026 to avoid collision (D-025 is taken by PR #55's AcceptsPositionalArgs). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
|
@copilot resolve the merge conflicts in this pull request |
… integrate --rows/size-cap tests Co-authored-by: tig <585482+tig@users.noreply.github.com>
Contributor
Author
Resolved in commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clets that don't consume positional args (e.g.
color,int,decimal) were silently ignoring them —clet color - bluewould open the color picker as if the args weren't there. A bare-also fell through as a positional arg with no feedback.Changes
ICletinterface — newbool AcceptsPositionalArgs { get; }default-falseproperty; new clets are safe by defaultSelectClet,MultiSelectClet,MarkdownClet— override totrue(these three are the only clets that consume positional args)CommandLineRoot.DispatchAlias— early-exit validation before TUI init: resolves the clet, checksAcceptsPositionalArgs, and emits a usage error (exit 2) if positional args were supplied to a non-consuming clet; ahint:line is shown for the single-arg case:AcceptsPositionalArgsproperty assertions on representative clets; fourCommandLineRoottests covering error message content, single-arg hint, multi-arg no-hint, and bare-rejection