Skip to content

refactor: write sqb compile output, artifacts and reuse records natively - #1098

Merged
kvlonge merged 4 commits into
mainfrom
feat/native-compile-command
Oct 13, 2026
Merged

kvlonge merged 4 commits into
mainfrom
feat/native-compile-command

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Why

Rust-hosted SQLBuild port: Phase 3 (CHI-592) moves the sqb compile command's output and artifact handling into Rust; Phase 1 (CHI-589) continues with discovery.

Changes

  • sqb compile text and JSON reports, semantic-check notice and diagnostics rendering moved to sqlbuild-core (cli_text).
  • target/ writing (compiled/run SQL, manifest, SQL test artifacts and their cache), artifact staging and atomic publish (PreparedCompileArtifacts), and compile-reuse recording are native; the compile driver calls them directly.
  • Deleted cli/commands/_helpers/compile/, prepared_compile_artifacts.py, native_artifact_batch.py and the full-compile recording pieces of cli/compile_reuse/.
  • Discovery: the D016 project Python path check and model header value parsing are native.
  • Four Python entry modules called only from Rust get a leading _.
  • Movable Python: 120,834 → 118,042 lines.

Intentional differences: the artifact-write recorder is passed explicitly per compile instead of a global registry; the header parse cache clears when full instead of evicting LRU; header syntax errors no longer chain their cause.

Verification

  • Old vs new on 372 project copies (cold, reuse hit, manifest/DAG, forced colour, lineage modes, select/exclude, edits): no differences.
  • Compiler differential: 371 projects as expected; byte-identical compile output on a 1k-model project and a large private project.
  • 8,499 focused tests including compile-reuse and rule-gate e2e; make check-ci; hygiene scan.
  • Independent review: no findings.

Port the sqb compile report (text, JSON and stopped-compile JSON), the
semantic-check notice, compile lineage selection, the static and planned
target writers, the SQL-test artifact cache, background artifact
preparation and staged publication, and the full-compile reuse recording
to Rust. The compile driver calls them directly; the artifact-write
recorder is passed explicitly instead of through a global registry.
The Python implementations are removed.
@kvlonge
kvlonge enabled auto-merge (squash) October 13, 2026 06:49
@kvlonge
kvlonge merged commit 39562f8 into main Oct 13, 2026
40 checks passed
@kvlonge
kvlonge deleted the feat/native-compile-command branch October 13, 2026 07:17
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