Skip to content

feat(validate): accept any value in Boolean parameters - #288

Merged
Teakowa merged 1 commit into
mainfrom
feat/285-boolean-any-value
Sep 25, 2026
Merged

Teakowa merged 1 commit into
mainfrom
feat/285-boolean-any-value

Conversation

@e54-bot

@e54-bot e54-bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #285. Parent: #283. Decision: ADR-0014 (#284).

Summary

  • Canonical validation now accepts any value in a parameter whose primary declared type is Boolean (Boolean or Boolean|Number). Identity, arity, enum-domain, and reference-category checks are unchanged.
  • Number|Boolean positions are Number parameters with a Boolean alias and keep their type check; widening them has no evidence (OverPy's First Of wrapping is keyed on the Boolean parameter type).
  • Docs: control-flow.md describes the rule; source-attribution/catalog.md records the ADR-0014 / OverPy evidence.

Tests

  • New regression: non-Boolean call, literal, and variable accepted in a Boolean parameter; extra arity and an invalid inner call still rejected.
  • Existing tests that used a Boolean position to assert rejection now use Teleport's Vector parameter; conformance no longer generates wrong-type cases for Boolean parameters.
  • cargo test --workspace and cargo clippy --workspace --all-targets pass.

Not verified

The #283 probe cases depend on opy-rs emitting the reference structure.

Boolean-typed parameters (Boolean, Boolean|Number) accept any value in canonical validation per ADR-0014; structural checks are unchanged. Number|Boolean positions keep their type check.

Fixes #285

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Teakowa

This comment was marked as outdated.

@Teakowa
Teakowa merged commit 8f88128 into main Sep 25, 2026
5 checks passed
@Teakowa
Teakowa deleted the feat/285-boolean-any-value branch September 25, 2026 08:46
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.

Accept any value in Boolean parameters in canonical validation

2 participants