Repository navigation
refactor: move compile assembly, lint and planner state to native data - #1120
Merged
Merged
Conversation
…der constants natively - Compile-input attachment and assembly call their native stages directly instead of through _native lookups, functools.partial and keyword dictionaries; the frontier produces native stages without Python stage callables. - Declaration expansion renders constants with a native ConstantRendering instead of a per-model pathlib.Path, functools.partial and Python callback host. - Lane module strings for compile, auditing, reference and shared-error types resolve through the host table. - SQL test classification runs without the GIL on a bounded worker pool.
…ts natively Declared relations, standalone pivot checks, native resource facts and cursor roles read a native model input's attached schema and reference rows from its owner record instead of building its SchemaModelEntry and CompileSqlReference projections; hand-built inputs still read their record fields.
…e's own path The schema facts of a model's header columns compare each column location against the discovered model file's relative path object instead of a pathlib.Path built per model, and skip the Python path comparison when the location carries that same object.
Dynamic-family indexes, model analysis rows and resource SQL checks read a native model input's attached schema and a native audit's reference rows from the owner record instead of building SchemaModelEntry and CompileSqlReference projections.
…atting Header rules, header formatting and table-function argument names parse DSL header values with the native header parser and compare them as their Python projections compare, instead of calling parse_header_values through Python; the formatter no longer warms the Python header cache.
…int on a native thread Lint now scans headers, plans and prepares bodies, lints SQL and applies suppressions over Rust rows, calling into Python only to expand user macros. Early SQL lint runs on a native thread with an atomic stop instead of a Python executor and context-variable stop event, and SQL rules consume its outcome, cache entries, keys and duplicate-literal hints as Rust rows, building Finding records once at the end. Expansion inputs, relation keys, rules config and compiled expansions are read natively; LintViolation, LintRunResult and SqlExpansionContext remain projections for the Python-facing functions. Seam tests that patched the removed native lookups now exercise the native paths.
Rust callers of model entry assembly, SQL resolution, cursor bounds and inputs, change detection, relation contexts, source freshness, plan entry results, migration planning, audit planning, SQL-test planning and scenario relation plans now pass typed request structs instead of keyword dicts. Python-facing wrappers parse keywords into the same structs; wrappers no Python code calls are removed.
Change reconciliation, model entry results, plan output inputs and model, column and old-name migration planning results are Rust structs passed between phases instead of native records read back by attribute name. The no-op execution-scope pruning step is gone; plan output metadata is unchanged. Removes the unused build_plan_output, prune and reconcile entry points and their records.
PlannerRuntime and PlannerWarehouseState are frozen native classes with typed fields instead of generic native records. Planner phases read their fields directly rather than by attribute name; Python still constructs and reads them with the same keywords and attributes. The unused class-call record default is removed.
…out the Windows verbatim prefix
kvlonge
enabled auto-merge (squash)
October 16, 2026 15:19
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
Compile assembly, rules and the planner still passed internal data through Python objects, attribute lookups and keyword dictionaries between native stages.
Changes
Verification