Repository navigation
Commit dc8cdcd
authored
test(compiler): cover every analysis input in the compiler differential (#1016)
* test(compiler): record Polyglot wheel calls by calling site for the differential
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.
* test(compiler): compare analysis input edits with uncached compiles
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.
* test(compiler): cover every analysis input in the compiler differential
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.
* test(compiler): address differential coverage review findings
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.1 parent 79a5b45 commit dc8cdcd
51 files changed
Lines changed: 3232 additions & 27 deletions
File tree
- .github/workflows
- scripts/compiler_differential
- _helpers
- analysis_corpus
- comparing
- corpus
- coverage
- running
- classes
- main
- src/sqlbuild
- cli/compile_reuse
- compiler
- frontier
- macro_bridge
- sql_analysis
- _helpers
- tests
- e2e
- scripts/compiler_differential
- src/sqlbuild/cli/commands/main/compile
- integration/src/sqlbuild/compiler/sql_analysis
- unit/scripts/compiler_differential/_helpers
- corpus
- coverage
- running
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
298 | 307 | | |
299 | 308 | | |
300 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments