Skip to content

feat(native): run metadata checks natively behind the preview engine - #1058

Merged
kvlonge merged 2 commits into
mainfrom
feat/native-metadata-checks
Oct 9, 2026
Merged

kvlonge merged 2 commits into
mainfrom
feat/native-metadata-checks

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Why

Under native-preview, semantic metadata checks still ran in Python, and B102/B301 UDF checks parsed models with the Polyglot wheel. This finishes the native semantic-checks stage.

Changes

  • Native metadata checks: B102 arity and B301 argument families for UDF calls; B300 config references (incl. cursor_inputs) and B301 cursor types; B300 source cursor_column; B302 SQL-test columns; Python's positions
  • Python passes data in and assembles diagnostics in Python's order. Non-ASCII folding, unsupported dialects/types or native failures fall back to Python's checks and record a deferral
  • Kept in Python as stage inputs (for M4l/M5): expression_is_true, relationships, accepted_values audits and resource SQL checks. No Python is deleted: the python engine and the fallback still use the metadata path
  • _helpers/ regrouped into four folders (pure move)
  • E2E file renamed test_native_semantic_checks_cli.py: its module name clashed with the integration file, dropping tests in combined runs

Changed expectations:

  • Harness wheel-site cases, the semantic CLI E2E and the deferred-semantic integration case drop metadata_checks metadata_validation.py, which no longer occurs. input_enrichment analysis_session stays
  • New: a parity test, a CLI E2E case, 3 failure-corpus cases, and a unit test keeping SEMANTIC_CHECKS no higher than TYPE_SYSTEM

Verification

  • Sabotage: forcing native metadata checks to defer fails the parity test, both CLI E2E cases and the harness test; reverted
  • Rust tests; parity on generated projects in 4 dialects for all B102/B300/B301/B302 families, none deferred
  • make compiler-differential (CI flags): 307 identical, coverage 56/56, no semantic deferrals, semantic wheel sites 0
  • Compile E2E for seams, lineage and semantic checks, plus tests/e2e/scripts/compiler_differential: 300 passed
  • cargo test --workspace, clippy/fmt 1.99.0, make check-ci, make test, hygiene

@kvlonge
kvlonge enabled auto-merge (squash) October 9, 2026 05:26
@kvlonge
kvlonge merged commit 9a8e410 into main Oct 9, 2026
37 checks passed
@kvlonge
kvlonge deleted the feat/native-metadata-checks branch October 9, 2026 06:28
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