Skip to content

refactor: port planner identities, scopes, rules and CLI runtime to Rust - #1106

Merged
kvlonge merged 32 commits into
mainfrom
feat/native-group-7
Oct 14, 2026
Merged

kvlonge merged 32 commits into
mainfrom
feat/native-group-7

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Why

Continue the Rust-hosted compiler, CLI and planner migration while preserving compiled artifacts, persisted identities and command behavior.

Changes

  • Native planner identities, pruning, iterative deep-graph traversal, selectors, scopes and loader graphs. Existing Python executor and adapter boundaries remain.
  • Native rule catalogue, guidance, run planning, SQL-rule execution and early lint; retain custom-rule execution and its public fact views in Python.
  • Native CLI setup, observability, adapter resolution, warehouse scope, plan/rules commands, compile reuse, replay and launch-record writing.
  • Native janitor phases, runtime artifacts and coded-error rendering.
  • Stop and join live progress spinners before interpreter finalization.
  • Restore linear SQL-rule cache publication by grouping findings once; preserve ordering and cache format.
  • Movable Python decreases from 51,236 to 42,632 lines, including agreed user-code/public-API boundary classifications.

Verification

  • 11,391 unit/integration tests passed; 86 focused tests after the cache-publication fix; updated make check-ci passed.
  • Compiler differential: 371 projects with discovery/render coverage. Stateful planner differential: all 11 projects matched the existing baseline across 18 steps.
  • Cold and edited compile outputs and exit codes match the reference on synthetic and private compile-only projects.
  • Generated identity, selection and scope comparisons; pinned persisted hashes; 100,000-node graph regression tests.
  • Shutdown probe reproduced 5/5 aborts before the fix and 20/20 clean exits afterward; disabling the hook reproduced the abort.
  • Independent review found quadratic cache publication; fixed with fail-before/pass-after operation-count coverage and verified in a bounded follow-up review.

…ecution order natively

Port planner version identity hashing (model metadata JSON, declared-column,
function and seed identities, graph identity composition and honest write
hashes), selection staleness classification, execution edges and their
origins, topological order and buildability into sqlbuild-analysis
planner_identity with PyO3 glue. Change detection now calls the identity
helpers directly instead of through Python. Delete the Python modules they
replace and pin persisted identity values in Rust and Python tests.
@kvlonge
kvlonge enabled auto-merge (squash) October 14, 2026 10:35
@kvlonge
kvlonge merged commit 96fa105 into main Oct 14, 2026
40 checks passed
@kvlonge
kvlonge deleted the feat/native-group-7 branch October 14, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant