Skip to content

test(parser): cover surplus action arguments in canonical arity validation - #439

Merged
Teakowa merged 1 commit into
mainfrom
fix/430-action-arity
Oct 13, 2026
Merged

Teakowa merged 1 commit into
mainfrom
fix/430-action-arity

Conversation

@e54-bot

@e54-bot e54-bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #430.

Wait(1, 2, 3, 4, 5) is already rejected on main: canonical validation
reports unsupported: action 'wait' expects 1..2 argument(s), got 5, and
the CLI exits 1 on parse, emit, and convert
(cli.rs::parse_rejects_noncanonical_call_arity).

The remaining gap was library-side parity: the canonical-validation test
covered missing and partial arguments but not the surplus direction. This
change adds the surplus case to
canonical_validation_enforces_declared_arity_and_enum_domain, pinning
the same named-arity diagnostic the CLI reports so library and CLI stay
in agreement.

Test plan

  • cargo test -p workshop-rs --lib canonical_validation_enforces_declared_arity — passes
  • cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, workshop-catalog-gen -- check, git diff --check

…ation

Wait(1, 2, 3, 4, 5) is already rejected with
'action \'wait\' expects 1..2 argument(s), got 5', and the CLI test covers
parse/emit/convert. Add the missing library-side case so canonical
validation and the CLI are pinned to the same diagnostic.

Fixes #430
@Teakowa
Teakowa merged commit 35d97d8 into main Oct 13, 2026
5 checks passed
@Teakowa
Teakowa deleted the fix/430-action-arity branch October 13, 2026 11:53
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.

CLI parse/emit/convert accept actions with surplus arguments

2 participants