Skip to content

feat(native): plan SQL tests natively behind the preview engine - #1056

Merged
kvlonge merged 8 commits into
mainfrom
feat/native-sql-test-glue
Oct 9, 2026
Merged

kvlonge merged 8 commits into
mainfrom
feat/native-sql-test-glue

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Why

SQL-test planning sent Python-built JSON to a native planner. Under preview the request now comes straight from the compiled objects.

Changes

  • sqlbuild-analysis: public request/plan types; typed entry points for batches, chains and error messages. JSON entry points wrap them.
  • Bindings plan_compiled_sql_tests, resolve_compiled_sql_test_chains read compiled objects; Python supplies adapter facts.
  • Behind SQL_TEST_GLUE (preview): compile artifacts, sqb test planning (now using native error messages) and chains. Dead None fallback removed; JSON path kept for python/native.

Verification

  • Parity test vs the JSON path, 5 adapters, two seeded variants; native gates count only binding results.
  • Sabotage (temporary, removed): forcing the JSON path zeroes every native count; gates fail, parity holds.
  • Rust typed-vs-JSON tests prove serde losslessness, not independent parity. Failure-corpus cases; preview cases in cursor-window and test --inspect E2E.
  • Seams, cursor-window, inspect, helper-reference, fast_lineage, differential E2E; make check-ci, make test, hygiene. Earlier: cargo test, clippy/fmt 1.99.0, make compiler-differential (307), -shipped (296).

Test expectation changes

  • Seams E2E: plan_native_sql_test_artifacts None -> artifacts, one plan_compiled_sql_tests call per batch.
  • Thresholds are deterministic seeded counts. Failing variant adds helper redefinitions and unflattenable assertions, so more batches raise: planned 850->624, with errors 150->144, chains 350->398; new native-raised ≥102 covering compile_input, planner_input, sql_test_reference. Window "raised ≥40" is now a corpus floor (≥108 raised outcomes, either path).
  • New clean variant (batch ordering): 30/30 batches answered; planned ≥1068, errors ≥192, chains ≥122, native-raised ≥45.
  • The compiler reports unmocked references first (P013), so each project gets one appended unmocked assertion to reach sql_test_reference.

@kvlonge
kvlonge enabled auto-merge (squash) October 9, 2026 07:50
@kvlonge
kvlonge added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit 509d559 Oct 9, 2026
104 of 108 checks passed
@kvlonge
kvlonge deleted the feat/native-sql-test-glue branch October 9, 2026 09:50
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