Repository navigation
feat(native): report SQL test and scenario errors natively - #1046
Merged
Merged
Conversation
Scenario extraction, scope relationship scans and macro-test CTE scans return Python's exact scanner and classification errors from one native port of Python's top-level CTE scanner, under the adapter's lexical rules. Scenario source checks no longer fall back to Python on a reference error. Only Polyglot steps and non-ASCII classification still run in Python.
kvlonge
added a commit
that referenced
this pull request
Oct 9, 2026
kvlonge
added a commit
that referenced
this pull request
Oct 9, 2026
* feat(native): analyse models natively behind the preview engine Run the uncached model analysis as a native session: compact batches, dataflow waves, shape publication, deferred binding validation and expression-source shapes. Legacy analyses and input enrichment defer to Python per model and are recorded. * test(native): count only lineage deferrals in the fast lineage engine test * test(native): use the native attachment entry field after #1043 and #1046 * fix(native): compare catalog shapes on cold compiles and record deferrals after the session Keep the binding catalog's schemas and analysis shapes in captures and ignore them only on warm stages, where Python's analysis cache skips catalog preparation. Record per-model deferrals once the session completes, and fall back to Python when provide or finish panics.
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
Native engines still re-ran Python to raise SQL test, scenario and scope-relationship errors: native scenario extraction and the relationship scans returned
Noneon any error, and scenario source checks fell back on a reference error. Native should raise Python's exact error itself so the Python copy can go.Changes
sqlbuild-scopes) now returns names and bodies, Python's exact scanner errors (context, file, unclosed text, duplicate,AS, trailing statement, bare__expected__), or a deferral.bridge_independent.Kept deferrals:
SELECT 1SELECT 1detection (not an error path)No mismatch cross-checks exist in this family. Parity is enforced by tests.
Verification
CompileInputErrorlifecycle type, no bridge re-runs. New cases are in the failure corpus.cargo test --workspace --all-features, clippy and fmt on 1.99.0,make compiler-differential(CI flags),-shipped,tests/e2e/scripts/compiler_differential,make check-ci,make test, hygiene scan.