Repository navigation
feat(native): resolve declaration contexts and references natively in the preview model loop - #1012
Merged
Merged
Conversation
kvlonge
enabled auto-merge (squash)
October 7, 2026 20:48
kvlonge
force-pushed
the
feat/native-model-loop
branch
from
October 7, 2026 21:38
67933b4 to
805afc8
Compare
kvlonge
force-pushed
the
feat/native-model-loop
branch
from
October 7, 2026 22:19
805afc8 to
7a14a99
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
The preview engine still resolves each model's declarations in Python. Working out which enums,
constants and macros a model can see, and finding its
@enum/@constreferences, is lookup andtext-scanning work that the native scope index and SQL scanner can do without changing results.
Changes
model_loop, for the model compile loop.private, local, inherited and relationship-granted declarations) and build the same Python
context objects. Unindexed paths, and path targets the scope query reads as qualified
identities, keep the Python resolver and its errors.
@enum/@constreferences of every model in one native batch using Python's quote,comment and dollar-quote rules. Values are still rendered in Python; malformed references,
unclosed text, Unicode word boundaries, unknown names and render errors fall back to the
Python expansion, which reports the exact error.
NativeStageMismatchError.the compiler differential.
Verification
make compiler-differentialandmake compiler-differential-shippedidentical; compilerdifferential e2e tests pass.
for folder-private references and a model folder containing
:.make check-ci,make test, Rust clippy, fmt and workspace tests.