Skip to content

fix: ignore cast type parameters in literal rules - #705

Merged
kvlonge merged 1 commit into
mainfrom
fix/scope-authored-numeric-literals
Sep 17, 2026
Merged

kvlonge merged 1 commit into
mainfrom
fix/scope-authored-numeric-literals

Conversation

@kvlonge

@kvlonge kvlonge commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Why

SQBRDECLARATION102 matched expanded numeric comparisons to a model-wide set of authored numeric token values. Numeric precision inside CAST and TRY_CAST targets could therefore make an expanded constant with the same value appear authored.

Changes

  • exclude numeric type parameters inside CAST and TRY_CAST targets from authored comparison-literal authority
  • preserve authored expression-side numeric decisions, including values equal to cast precision
  • add regression coverage for expanded constants colliding with numeric precision

Verification

  • cargo test -p sqlbuild-rules-native
  • uv run pytest tests/unit/src/sqlbuild/rule_engine/main/evaluate/test_evaluate.py -n auto --dist loadfile
  • cargo clippy -p sqlbuild-rules-native --all-targets -- -D warnings
  • uv sync --all-extras
  • make check-ci
  • downstream static Rule evaluation across 974 models
  • downstream cache-free static compile: 974 models, 0 errors, 0 warnings
  • public repository hygiene scan

@kvlonge
kvlonge enabled auto-merge (squash) September 17, 2026 18:31
@kvlonge
kvlonge merged commit 2d2b8d5 into main Sep 17, 2026
18 of 19 checks passed
@kvlonge
kvlonge deleted the fix/scope-authored-numeric-literals branch September 17, 2026 18:43
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.

1 participant