Skip to content

feat(native): land the reviewed M4 preview ports and speed fixes together - #1075

Merged
kvlonge merged 39 commits into
mainfrom
feat/native-m4-batch
Oct 10, 2026
Merged

kvlonge merged 39 commits into
mainfrom
feat/native-m4-batch

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Why

Nine reviewed native-compiler PRs were each waiting for a full CI run in the merge queue. This lands them as one change with one CI run. Each was independently reviewed with follow-ups closed; see the linked PRs.

Changes

Combination changes:

Verification

  • make compiler-baselines: 328 projects identical on both CI-flag differentials.
  • make test (11,995 passed after the count update); focused suites (541 passed): compiler differential E2E incl. gate sabotage, seams, analysis-session parity, SQL test glue, ratio tool, target writer.
  • clippy and fmt on 1.99.0, make check-ci, hygiene.

kvlonge added 30 commits October 9, 2026 08:39
…sh-process guard

Shared CI runners swing wall time while CPU stays flat; the CPU overhead
limits are unchanged and still catch real cache-write cost.
…tion

A seeded differential compares native CTE fact recovery with Python's over 5,000 queries and adapter profiles through a test-only oracle binding. The model-analysis CTE recovery count is relabelled as a corpus floor over Python's reference run.
…rough the native session

The finished analysis session is kept on CompiledProject.native_session and proves pivot models outside it from its own tables; without a session one batched standalone call sends the tables once. The per-model native proof path is deleted. SQL-analysis opt-out syntax checks use the native checker under the preview engine. Rule hosts drop the session before pickling.
…deserialization

Scalars skip the Expression deserialization that always failed and built a large error per call, and contract evaluation normalizes each type string once per request. Adds contracts_cpu_ms to compile timings and a same-runner python vs native-preview gate on it.
…en compile outputs

Every shipped-stage fallback reports a named site to the compiler
differential. One allow-list holds those fallbacks and the preview
analysis deferrals with exact counts per corpus, and the CI make
targets fail on new, changed or vanished entries. Golden compile
outputs cover fixtures, examples, seeds and the failure corpus, and a
shared failure-corpus list holds user-facing errors every engine must
report with the exact text.
…ate holes

Every native stage now reports the work it answered, so a stage switched
to Python makes its allow-list entries vanish and fails the gate. The
scenario expected-model scan, declaration contexts, the macro memo,
effective vars, preview stubs and type normalization count their Python
paths. Seed goldens are required inside a recorded range, fixture and
example goldens are checked by the shipped differential too, golden
inputs trigger the differential, and a failing gate says how to record
intended changes.
…sion

Type recovery and completion read each analysed model's output names and lineage from the
finished native session instead of payload rows rebuilt from CompiledProject. Models whose
analysis Python answered, failed, or whose names a dynamic pivot proof replaced keep the payload.
…d guard custom rule CPU

Native session analyses built a new InferredColumn per model column, while Python's compact
analysis shares one object per distinct column. Custom-rule hosts therefore pickled and decoded
more distinct objects under native-preview. Adds custom_rules_cpu_ms (rule thread plus host
children CPU) and a same-runner ratio entry for it.
…/native-m4-batch

# Conflicts:
#	crates/sqlbuild-analysis/src/assembly/analysis_session/constants.rs
#	tests/integration/src/sqlbuild/compiler/analysis_session/_test_types.py
#	tests/integration/src/sqlbuild/compiler/analysis_session/helpers.py
…o feat/native-m4-batch

# Conflicts:
#	crates/sqlbuild-analysis/src/assembly/analysis_session/_helpers/dynamic_pivot.rs
#	crates/sqlbuild-analysis/src/assembly/analysis_session/tests/helpers.rs
#	crates/sqlbuild-analysis/src/assembly/analysis_session/tests/test_analysis_session.rs
#	tests/integration/src/sqlbuild/compiler/analysis_session/helpers.py
…to feat/native-m4-batch

# Conflicts:
#	scripts/compiler_differential/_helpers/comparing/project_comparison.py
#	scripts/compiler_differential/_helpers/running/run.py
#	scripts/compiler_differential/models.py
#	src/sqlbuild/compiler/compile/_helpers/native_stages/assembly.py
#	src/sqlbuild/compiler/compile/_helpers/native_stages/sql_tests.py
#	tests/unit/scripts/compiler_differential/_helpers/running/_test_types.py
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