Repository navigation
refactor(native): read planner models and project collections through native views - #1200
Merged
Merged
Conversation
kvlonge
enabled auto-merge (squash)
October 21, 2026 14:42
kvlonge
force-pushed
the
refactor/planner-native-records
branch
from
October 21, 2026 22:16
8c18aec to
5098b3c
Compare
…essor `model_reads::native_model` returns the native view behind a model object and counts every other object, a Python-built record that is read by attribute instead, in the `compiled_view_fallbacks` stage counter. Every model read helper goes through it. An integration test shows compile and plan of a native project never fall back, and a unit test shows Python-built models are still read, and counted.
…views Planner resolution, strategy, scope and change detection read a model's schema entry, config, references, inferred columns, relative path, name and dependency rows, and iterate the project's models, sources, seeds, functions and audits, through the native view helpers instead of attribute reads. Reads that serve every resource kind keep the shared attribute dispatch.
…views Planner warehouse and migration code read a model's name, destination, key, schema entry, config, references and dependency keys, and iterate the project's models, seeds, functions and sources, through the native view helpers. Reads that serve every resource kind keep the shared attribute dispatch.
…ns natively Plan entries, phases, identity metadata, scenarios, selectors and the audit, seed, test, display and clone command plans read a model's name, destination, key, schema entry, config, references and enum columns, and iterate the project's models, sources, seeds, functions, audits and SQL tests, through the native view helpers. A named collection lookup serves the callers that pick the collection by name.
kvlonge
force-pushed
the
refactor/planner-native-records
branch
from
October 22, 2026 03:05
5098b3c to
713ace3
Compare
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
Before the planner can move into a plain-Rust crate, its reads of compiled models and of the project's resource collections must go through one native path, not attribute reads. That path also needs a check that native compiles never leave it. This changes no behaviour or output.
Changes
model_reads::native_modelreturns the native view behind a model object. Any other object, such as a Python-built record, is read by attribute as before and counted in a newcompiled_view_fallbacksstage counter. Every model read helper goes through it.project_readsmodule for the project's models, sources, seeds, functions, audits and SQL tests, all with the same counted fallback.sqb planand the planner differential, plus a static sweep. Reads that serve every resource kind keep the shared attribute dispatch.Verification
make check-ci, clippy-D warnings, fensu with 0 faults; budgets unchanged.sqb planwarm and cold are at instruction-count parity with the previous head, and plan output is byte-identical.sqlbuild-pythonbuilds do 0.15–0.19% more work (instruction counts); the crate graph is unchanged.