Skip to content

refactor: host migration state, plan entries and SQL-test planning in Rust - #1109

Merged
kvlonge merged 22 commits into
mainfrom
feat/native-group-10
Oct 15, 2026
Merged

kvlonge merged 22 commits into
mainfrom
feat/native-group-10

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Why

Continue Rust-hosted planning while preserving migration state formats, SQL artifacts, adapter overrides and plan output.

Changes

  • Native scenario SQL and artifact planning, SQL-test plan assembly, cursor windows and fixture validation, and fixture read resolution.
  • Native audit and model plan-entry assembly, including microbatch limits.
  • Native migration presentation, discovery, old-name planning, event projections and row codecs, and migration state reads, writes and inspection. State stays append-only with unchanged formats; adapter calls remain Python callbacks.
  • Planner differential compares dates derived from the run date as offsets, so baselines no longer drift by calendar day.
  • Delete replaced Python; movable Python decreases from 33,506 to 27,784 lines.

Verification

  • 11,425 unit/integration tests passed; make check-ci passed with all optional dependencies available.
  • Compiler differential: 371 projects with discovery/render coverage and unchanged goldens.
  • Planner differential: all 11 projects across 18 stateful steps matched a baseline recorded from main.
  • Cold and edited compile outputs and exit codes match the reference on synthetic and private compile-only projects.
  • Worker before/after captures cover migration SQL, row decoding, retries and errors, fixture and SQL-test diagnostics, scenario plans and plan entries.
  • Independent combined review: no validated in-scope findings.

Move SQL-test cursor window validation and intrinsic rendering into the native SQL-test glue and delete the Python cursor window and comment-scanning helpers. Test helpers now read logical references through the native reference extractor.
Move the planner's migration state inspection and the shared read and
append orchestration of migration, column migration and old-name view
events into one native owner. Adapter execute and metadata calls remain
Python callbacks; event IDs, idempotent appends, retries and absent
column tolerance are unchanged. Delete the replaced Python wrappers and
the create-table SQL facades.
Move model plan entry assembly into native code: cursor input relations,
cursor input column validation, runtime cursor producers, microbatch
lookback defaults, seed column extraction, adapter-rendered logical DDL
and the ModelPlanEntry construction. Python keeps cursor bound, hook
and SQL resolution and calls the native assembly.
Move configured microbatch limit precedence and per-entry limit
application into native code, and resolve the effective timestamp grain
for default lookbacks inside native model entry assembly. The Python
limit helpers are deleted and their tests call the native functions.
@kvlonge
kvlonge enabled auto-merge (squash) October 15, 2026 02:22
@kvlonge
kvlonge merged commit 8232718 into main Oct 15, 2026
40 checks passed
@kvlonge
kvlonge deleted the feat/native-group-10 branch October 15, 2026 03:01
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