Repository navigation
test(compiler): cover every analysis input in the compiler differential - #1016
Merged
Merged
Conversation
…ifferential When SQLBUILD_ANALYSIS_RECORD_DIR is set, the guarded Polyglot proxy wraps every wheel callable it hands out and counts calls by the calling file:function and API, writing one JSON file per process at exit. With the variable unset the proxy returns exactly what it did before. The compiler differential reads these records to show which compile-path wheel sites each corpus reaches.
Add an incremental edit sequence that changes the inputs SQL analysis publishes shapes from: an upstream column type under a star chain, a contract type, a source expression, a UDF return type and a source column's declared nullability. Every step must match a --no-cache compile of the same project.
Generate SQL analysis blocks in the seeded projects: typed, untyped and star outputs over complete, published and open inputs; set operations and CTEs; a contracted model under a three-level chain; scalar and table UDFs with typed arguments; a proven dynamic pivot; quoted identifiers; metadata audits; a SQL test with a macro mock; a needed sql_analysis opt-out under require_sql_analysis; literal SQL in a Python task; and select-limited, analysis-off and rich-lineage compiles. The first seed of a run also compiles its analysis blocks under the postgres and snowflake dialects. Classify CompiledProject captures into 56 analysis kinds, crediting a kind only from analysed evidence, and add --require-analysis-coverage to the per-PR job. Add an analysis failure corpus with one case per reachable B, K, S and syntax code plus ordering cases, checking the first error's code, message, help, notes and location and every case's code order. The code set comes from the help catalogue and the analysis-stage modules; unreachable codes are listed with reasons. Each native analysis lane gets its own empty corpus module already wired into the shared list. --wheel-site-report prints and writes Polyglot wheel calls per engine, site and corpus, plus analysis deferral counts read from the same record directory; CI uploads it as an artifact. Nothing in it gates.
Reach P003 through the sql_analysis/sql_validation conflict, keep the analysis record directory and the compile-reuse switch out of compile reuse and macro-call store identity, credit hook and promotion kinds only on analysed models, mirror the product's complete binding schemas, and copy the site counter under its lock.
kvlonge
force-pushed
the
test/differential-analysis-coverage
branch
from
October 8, 2026 03:09
61c0d66 to
14e2860
Compare
kvlonge
enabled auto-merge (squash)
October 8, 2026 03:10
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
The compiler differential covered discovery and render inputs, but analysis inputs (column inference, lineage, semantic checks, contracts, SQL tests) had no measured coverage and no failure corpus. Without that, changes to analysis can go untested while the differential still passes.
Changes
CompiledProjectclassifier covering 56 analysis input kinds, plus--require-analysis-coveragewired into the per-PR gate.--select, no-analysis and rich-lineage modes.analysis_input_editsincremental edit sequence for the warm cache.--wheel-site-report: an env-gated polyglot call-site recorder, plus a harness-side deferral counter. The report is uploaded as a CI artifact. The record directory and the compile-reuse switch no longer change compile-reuse or macro-call store identity.Verification
make testandmake check-cipassed.make compiler-differentialwith the new flags (214 projects) andmake compiler-differential-shipped(208 projects) passed.