Repository navigation
feat(native): validate contracts natively behind the preview engine - #1054
Merged
Merged
Conversation
# Conflicts: # tests/e2e/src/sqlbuild/cli/commands/main/compile/test_native_analysis_seams.py
… satisfy the structure rules
…mpared types The type system E2E now requires at least one native contract result that compared a typed column and no handbacks under preview, so handing typed models back to Python fails it. The parity suite takes code coverage only from natively built diagnostics and counts a model as native only when it needed evaluation.
kvlonge
enabled auto-merge (squash)
October 9, 2026 03:44
# Conflicts: # tests/e2e/src/sqlbuild/cli/commands/main/compile/test_native_analysis_seams.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
M4f ports contract validation and K011 promotion conflicts to the native crate behind
native-preview, with byte-identical diagnostics.Changes
sqlbuild-analysis::contracts: K001-K006 and K011 (dynamic proof, promotion conflicts) in Python's order; types via the M4c type system. Python only resolves source locations.CONTRACTSseam now also gatespromotion_conflict_diagnostics. Python and shipped engines unchanged.contracts/columns.py). None in the corpora; no D2 deviation. Uncached.test_native_type_system.py(three engines).Changed expectations:
test_native_analysis_seams.py: contracts seam[None]->[ANY](aContractValidationResult), new promotion seam[()]; kept feat(native): run semantic checks natively behind the preview engine #1050's semantic and analysis seams.test_native_type_system.py: now runsnativetoo and requires ≥1 native contract result that compared a typed column and 0 handbacks under preview, not "any native normalize answer" (contracts compare types in Rust now).Sabotage (temporary monkeypatch, removed): forcing every model to defer fails the parity gate (
native0 < 800) and both type-system E2E cases (0 typed comparisons, handbacks > 0). It exposed that handed-back models skipped Python's needs-evaluation check; fixed.Native comparisons skip Python's type-parse debug log.
Verification
cargo test --workspace --all-features, clippy/fmt 1.99.0fast_lineage/, semantic_checks, contract E2Emake compiler-differential(CI flags),-shipped; differential E2Emake test,make check-ci, hygiene