Skip to content

fix: accept proven dependency wildcards - #726

Merged
kvlonge merged 1 commit into
mainfrom
fix/snowflake-contract-inference
Sep 18, 2026
Merged

kvlonge merged 1 commit into
mainfrom
fix/snowflake-contract-inference

Conversation

@kvlonge

@kvlonge kvlonge commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Why

SQBRCONTRACT105 required a dependency-import SELECT * to be expanded even when every enforced contract type was already proven from the referenced resource. Expanding that import then made the CTE transformational, conflicting with SQBRMODEL101 and removing the passthrough exemptions used by the model test/audit Rules.

Changes

  • accept a wildcard only for a plain single __ref/__source dependency import whose typed contract columns are all proven
  • preserve the existing finding for raw-table wildcards and for dependency wildcards with any unproven type
  • retain contract columns when mapping a wildcard final-CTE boundary so proof evidence is not discarded
  • add focused positive and negative Rule cases

Verification

  • cargo test -p sqlbuild-rules-native given_enforced_contract_outputs_when_evaluating_explicit_type_rule_then_returns_expected_faults
  • cargo clippy -p sqlbuild-rules-native --all-targets -- -D warnings
  • uv sync --all-extras
  • make check-ci
  • downstream static compile across 974 models: resolved the 100 wildcard findings plus the resulting 100 SQBRMODEL101, 99 SQBRTEST201, and 100 SQBRTEST202 conflicts
  • public repository hygiene scan

@kvlonge
kvlonge enabled auto-merge (squash) September 18, 2026 07:38
@kvlonge
kvlonge merged commit cb5f01e into main Sep 18, 2026
18 checks passed
@kvlonge
kvlonge deleted the fix/snowflake-contract-inference branch September 18, 2026 07:49
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