Repository navigation
refactor: port CLI commands, progress and output, rules pieces and cursor arithmetic to the native extension - #1101
Merged
Merged
Conversation
…tively Move the lifecycle progress projector, the connection and planning progress reporters, the verbose inspection writer, execution headers and SQL expectation rows into the native extension and delete the Python they replace.
Load the offline scope index, qualify bare targets, run the scope query and render its text in Rust, route sqb scope to the native handler, and delete the Python command, target and output modules.
Header scanning, body ranges, the header lint rules (parse, description presence and length, trailing whitespace) and the header formatting fixes (whitespace, leading-comment relocation, description and audit wrapping) run natively in sqlbuild-rules, reproducing Python's textwrap and string semantics. Header values are still parsed by parse_header_values. Delete the Python header scanner and native header rules.
…ively Rules result text and JSON rendering and the SQBRSQL044 duplicate-literal hints run natively in sqlbuild-rules, with PurePosixPath ordering and json.dumps output reproduced exactly. Delete the Python implementations.
Select relation and column lineage, read and write the structural cache, and render tree, list and JSON output in Rust, route sqb lineage to the native handler, resolve rename and move targets with the native target reader, and delete the Python lineage command, selection, cache and output modules.
Read the target, build planner facts and the declaration placement host, plan, stage, verify, migrate and commit in Rust, render the edit tree, the layer-move suggestion and the JSON report natively, route rename and mv to the native handler, and delete the Python command, facts, output, target and plan-decoding modules. The offline compile stays in Python.
Resolve the invocation and settings, render the plan preview, --as preview framing, confirmation prompt and completion summary in Rust, and route sqb janitor to the native handler. Compilation, warehouse connection, planning and cleanup stay in the Python janitor runtime.
Custom-rule import closures, implementation fingerprints and statically associated harness test cases are read natively with the CPython-mirrored ruff tree in sqlbuild-pysource. Loading and running custom rules stays in Python. Delete the Python evidence module.
The typed authored-config readers (string, boolean, integer, string tuple and cursor bound) run natively and raise the same ConfigValueTypeError. Delete the Python helper and its five public wrappers; callers import the readers from sqlbuild._native.
… boundary ratchet
Cursor parsing, rendering, comparison, grain flooring and stepping, observed partitions, interval clamping, merging, batch splitting, caps, interval validation and calendar durations run in the new plain-Rust sqlbuild-cursor crate with thin bindings. Python datetime objects stay at the boundary: results keep the input's datetime type and tzinfo, fixed offsets are computed natively and other zones are resolved through the input tzinfo. The cursor value models, sentinels and grain constants stay in Python; callers import the functions from sqlbuild._native.
kvlonge
enabled auto-merge (squash)
October 13, 2026 15:08
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
Rust-hosted SQLBuild port (CHI-585), second combined PR: Phase 3 (CHI-592) CLI commands and output, plus Phase 1 (CHI-589) rules/lint pieces and the first Phase 4 (CHI-593) piece.
Changes
sqb scope,lineage,rename/mv,janitor,freshness,debug,playground(templates moved tosrc/sqlbuild/playground_templates/),skills; command connection and warehouse resolution; cost store and reports; presentation helpers.sqlbuild-cursorcrate for microbatch cursor and range arithmetic.Intentional differences: some traceback frames on error paths;
--depthrejects1_0; stricterrun.jsonreading; integer cursors above ~1.7e38 overflow; internal Python APIs removed or renamed.Verification
make check-ci.