Repository navigation
Commit 076d64f
authored
feat: complete native compiler ownership and CLI replay (#1082)
* feat(native): add the sqlbuild-refactor crate with refactoring text helpers
WIP for native sqb rename and sqb mv: code-point text edits, the lint
interpolation-site scan, MODEL and SCHEMA header edits, and YAML edits over
PyYAML-exact node marks composed by sqlbuild-config.
* feat(native): plan, stage and commit sqb rename and sqb mv natively under native-preview
Ports the model rename and move planner, the column rename walk, model
migrate_from, staging and commit with rollback into sqlbuild-refactor, binds
them for the Python shell, and runs them behind the new refactoring stage.
The refactor integration and e2e tests run under native and native-preview.
* feat: plan and apply sqb rename and sqb mv natively under native-preview
Rust planner tests for collisions, migrate_from decisions, rollback and
stale files; exact native edit-count integration test; CompiledProject
import boundary test; refactor corpus cases with full JSON goldens;
stage captures mask the refactor staging folder; fensu-clean layout.
* feat: run sqb rename and sqb mv natively and delete the Python planner
YAML marks follow PyYAML for anchors, aliases, tags and quoted scalars,
so anchored declaration files no longer defer. The cross-folder
declaration file moves are planned natively over the shared scope
placement. Refactoring is always native; the Python planner, staging,
commit and their helper tests are removed, with cases ported to Rust.
* fix: mark YAML node properties after quoted values holding a hash
Property start marks were found by walking back over comment-aware code
ends that treat ' #' inside a quoted value as a comment, so a valid
tagged source after such a value made rename raise. The composer now
records the first property while composing, scanning only between the
previous event and the node.
* refactor(compiler)!: remove the python compiler engine and its dead branches
Every native stage is shipped, so the python engine switch, the NativeStage
members it gated and their native-answer counters no longer select anything.
SQLBUILD_COMPILER_ENGINE=python and --compiler-engine python now stop with an
error that explains the removal. Python branches that only the python engine
reached are deleted: JSON SQL-test planning and chain resolution, Python
promotion conflicts, the whole-project contract fallback and the attachment
else-branches. Native deferrals still hand their inputs to the Python helpers.
The compiler differential now compares native with native-preview plus the
goldens, and the phase-CPU ratio jobs compare against the base commit.
* test(compiler): drop python-engine parity tests and keep their coverage on native
Tests that compared the removed python engine with native now either
compare native with native-preview, keeping every explicit expectation,
or compare native with the Python fallback it still defers to (project
assembly, SQL-test assembly, contracts, semantic completion, type
normalisation). Pure parity tests whose Python side was deleted are
removed; goldens and the corpus pin that output. The Rust JSON planning
entry points become test-only helpers now that their bindings are gone.
* chore(compiler): regenerate the fallback allow-list without native answer counts
The shipped stages no longer report native answers, so their
<stage>.native entries leave the allow-list. No fallback entry or count
changes and every golden is unchanged.
* feat(native): analyse models in a ref cycle in the native session
A ref cycle no longer hands the whole project to Python. Like Python's
dataflow, the session analyses every model in one unordered wave over the
shapes known up front and, like Python's completion pass on a CycleError,
keeps those analyses without enrichment or binding re-validation. The
cycle flag is part of the analysis-cache key.
* feat(native)!: normalize every type and contract natively with Python's Unicode semantics
Generated casefold/upper tables per Unicode version, the running Python's
text semantics recorded at import, all Polyglot dialects compiled in,
arbitrary-size type parameters, stack growth for deep types, and Python's
errors for unknown dialects. Deletes the Python type normalization and
per-model contract fallbacks.
* fix(native): normalize nested types on the caller's stack, reading only top-level type fields
* feat(native): analyse non-ASCII models natively and call project-local adapter nullability rules back
Python's casefold/upper in CTE facts, legacy analysis and dynamic pivot
proofs; pivot parse errors reported as Python reports them; shipped
safe_cast rule as data; an adapter's own rules run through an explicit
callback whose exceptions reach the caller, bypassing the analysis cache
as Python's did.
* feat(native): build FAST lineage natively for every dialect and restored projects
Unknown dialect names raise Python's ValueError, projects without an
analysis catalog run on a fresh analysis pool, and column references are
walked iteratively. Deletes the whole-project Python FAST lineage
fallback; the per-model handback for native failures stays.
* feat(native): report model, hook, function and source syntax errors natively
Project assembly answers per model whether its SQL parses instead of
handing the whole project back, and Python's syntax messages come from
one native validate/parse_one entry point.
* feat(native): fail compilation on internal native analysis failures
Native model analysis no longer hands models, enrichments, dynamic pivot
proofs or whole sessions back to Python. An internal native failure (a
panic or a broken invariant) raises NativeCompilerError with its context
and fails the compile; adapter rule exceptions and the ValueError
Python's analysis raised for a dialect alias keep their original types.
Non-ASCII function names now resolve declared return types natively.
Deletes the Python whole-project analysis driver, binding waves and
dataflow, the SQLite analysis cache, the Python dynamic pivot proof and
their fallback-only tests; parity tests now compare uncached, cached
and re-proven native runs.
* feat(native): fail FAST lineage on internal native failures without the wheel
A parser panic or unreadable tree in native FAST lineage raises
NativeCompilerError instead of re-parsing with the Polyglot wheel, which
aborts the process on the same input; invalid SQL keeps its unparsed
log. Deletes the per-model Python FAST builder.
Analysis-session enrichment no longer maps an analyze_query options
rejection to Python's ValueError: compile passes the alias-mapped
dialect (postgres -> postgresql), so the rejection is internal.
* test(native): pin former Python-oracle cases to recorded expected outputs
Native-vs-native cache comparisons prove cache consistency only, so the
generated analysis, FAST lineage, type and contract tests now also match
digests recorded once from the pre-port Python implementations.
Restores the deleted shared-binding tests' explicit diagnostics and
lineage expectations as native end-to-end tests, keeps postgres,
motherduck and sqlserver alias routes covered at the compile boundary,
drops tests and helpers that patched deleted Python seams, and brings the
native stubs in line with the raising session API.
* feat(native)!: complete semantic diagnostics natively for every dialect and text
Ports the semantic completion stage's remaining deferrals: Python's \w,
\d, \s, re.IGNORECASE and $ semantics, splitlines boundaries,
code-point offsets, casefold and upper beyond ASCII. A missing dialect
raises the wheel's TypeError and an unknown one its ValueError, as
Python's completion did; an internal failure (a panic, an unreadable
tree, a location outside the authored lines, a project without its
analysis catalog) raises NativeCompilerError.
Deletes Python's recover_output_types, explain_diagnostics,
recover_diagnostics, opt-out rejection and metadata checks. The native
tests now match outputs recorded from those implementations, including
non-ASCII projects and the dialects the full parser build added.
* feat(native): infer every expression-source shape natively
Untyped expression sources take Python's legacy analysis natively,
running adapter nullability rules as the session does; a project
restored without its catalog infers on a fresh one. Deletes Python's
expression-source shape inference and the deferred-shapes fixture.
* feat(native)!: infer columns outside the analysis session natively
Models native analysis cannot project (CREATE TABLE AS, INSERT ... SELECT,
deeply nested calls) keep the columns Python's parsed-tree inference gave
them; table-function bodies, SQL-test fixture interfaces, source
rebinding and planner fixture inference run the matching native analysis.
A model the session leaves unanalysed is a broken invariant and raises
NativeCompilerError.
Deletes Python's compact, parsed-tree and CTE fact analyses; the few
reference and placeholder helpers left move to reference_names,
binding_requests and cte_scopes. The CTE fact parity test matches facts
recorded from Python's recovery.
* feat(native)!: assemble every SQL test and scan every bridged macro call natively
SQL-test assembly no longer hands tests to Python: non-ASCII contents
(Python casefold, \w and re.IGNORECASE keys from generated tables),
deep CTE trees, decimal rounding/underflow/overflow under Python's
default context, reference and macro scan errors are native. Tests
mocking macros keep their model queries from the user's macros, reported
as the sql_test_glue.macro_mock_queries extension callback.
The macro bridge scans every string natively and reports where Python's
scan raises; strings with an unresolvable macro tree or a scan error
evaluate their calls in order without the memo. Deletes Python's SQL-test
assembly, scope deps and case identity.
* feat(native): carry project graph facts in the native assembly request
Models send name, directory and tags, seeds their tags, and SQL
functions their kind, name and tags, so the assembly that computes
dependencies can build the project graph.
* feat(native)!: scan macro call names natively and expand unbridged strings through native call sites
find_macro_call_names, find_nested_macro_call_names and the final macro
output check use the native scanner. Strings expanded outside compile
inputs evaluate their native call sites in order without the memo, as
bridged strings with an unresolvable tree do, so Python's top-level call
scanner and its macro_calls.unbridged_expansion fallback are deleted. The
bridge requires a supported Python, as discovery already does, instead of
falling back to the Python expansion.
* feat(native): keep typed output columns and dynamic proofs on the finished analysis session
The finished session keeps each model's output columns with their types
and nullability, not just names, and each model's dynamic pivot proof
from the session's own relation facts, so native consumers read them
without re-analysis.
* refactor(native): bring the lane's native ports in line with the structure checks
Doc comments are single summary lines; entry modules expose one function
with helpers, errors and constants in their roles; placeholder defaults
live in sqlbuild-sqltext; fallible probes match their errors. Test
helpers move out of test modules and carry no conditional control flow,
the golden comparison moves into the compiler test helpers, and the
analysis-code scan reads the contract codes from the native crate. Two
rule exceptions record the process-wide Python text semantics and the
nullability callback's manual Debug.
* feat(native): expose each model's retained session columns and dynamic proof
FinishedSession::model_analysis returns the typed columns compilation
publishes for a model the session decides (a proven pivot's fixed
columns, else a successful analysis's) and the session's dynamic proof,
borrowed from the finished session, for the native compiled-project
owner to record without re-analysis.
* feat(native)!: scan nested macro arguments natively
Each call's arguments are scanned by the native call-site scanner, which
now reports where a call's arguments start and the name of a call
Python's evaluation fails in, so every call, top level or nested, runs
from native bounds. A failing call raises its macro lookup error first,
then the scan's message, as Python's evaluation did. Python's macro call
scanner, name parser and parenthesis matching are deleted.
* feat(native): read fixture projection facts natively
Literal types, NULL literals and quoted aliases of a fixture query's
first SELECT come from the native parse instead of the wheel's
to_dict walk in Python. A golden recorded from Python's
_simple_projection_facts covers literals, structured values, quoted
non-ASCII aliases, nested and set-operation selects and parse errors.
* feat(native): substitute placeholder defaults natively for analysis
Python's regex substitute_placeholder_defaults now calls the native
placeholder substitution the syntax checks already use, so one
implementation serves both.
* refactor(compiler): delete the unused Python binding-share and qualified-reference scans
Native analysis sessions share binding results themselves, so Python's
binding-share prekeys, shared result keys and the qualified-reference
scan they used no longer run anywhere, along with the constants only
the deleted Python analyses read.
* feat(native): normalize parse and legacy query SQL inside native column inference
Per-query column inference outside the session normalizes its parse and
legacy SQL itself, in query order and with the unaliased dialect Python
used, raising the same ValueError on rejection, so Python no longer
round-trips each query through the normalizer first.
* feat(native): collect SQL-test declaration usages from the native reference scan
The usage walk for macro SQL tests now reads the native @enum/@const
scan in a mode that resumes past malformed references, as Python's walk
did, and raises the same unclosed quote or comment errors. Python's
reference start walk and its patterns are deleted. A golden recorded
from Python's walk covers malformed, quoted, commented and unclosed
text.
* feat(native): extract hard-coded relation names natively
Relation names in Python-node SQL and the runtime relation guard come
from the native parse and a port of Python's dict walk (table payloads,
CTE names and temporary tables per statement, first-seen order). An
unknown dialect still raises the wheel's ValueError and unparseable SQL
still yields None. A golden from Python's walk covers qualifiers, CTE
shadowing, temporary tables, DML, quoting and non-ASCII names; the site
recorder test now records the rule document's wheel parse.
* feat(native): read SQL-test helper CTE reads from the native parse
The helper CTE graph's parsed reads (unqualified tables naming a helper
key, minus CTEs a body defines at any depth) come from the native parse
and Python's dict walk port instead of the wheel. A golden from Python's
_parsed_reads covers qualification, shadowing, quoting, non-ASCII keys,
set operations, subqueries and parse failures.
* fix(native)!: raise native project assembly panics instead of retrying in Python
A parser panic during native project assembly or the native syntax
check used to be reported as a 'panic' deferral, so Python re-ran the
whole assembly through the wheel, which crashes the process on the same
SQL. Both now raise NativeCompilerError with their context, with no
Python retry and no deferral record.
* feat(native): compose a model's final columns natively in Python's order
ModelColumnsInput::model_columns applies the session result, the parse
fallback for a failed analysis, the session or standalone pivot proof
and type-recovery poisoning in _assemble_model's and _recovered_model's
order, so the owner store can finalize typed model columns without
Python. SessionModelAnalysis now reports whether the analysis
succeeded.
* feat(native): raise Python's project assembly errors natively without deferring
Native project assembly now reports the first source, seed or audit Python's
assembly raises at, with Python's exact CompileInputError/ValueError messages,
and renders variables only Python renders from their precomputed str() and
render_project_var_text outcomes. Python's target, dependency and fallback
helpers are deleted; the goldens record the pre-port Python outcomes.
* feat(native): scan SQL test and scenario CTEs natively for every consumer
Relationships, test CTE extraction and scenario expected names now use the
native top-level CTE scanner, which classifies identifier characters and
upper-cases keywords with Python's own string tables. The Python scanner and
its dead identifier helpers are deleted; goldens record the pre-port Python
outcomes, including Unicode identifier edges.
* feat(native): run compile's explicit-reference checks natively
Attached-audit gate cycles (P005), hook-read validation (unknown reads and
P007 cycles) and Python-SQL hard-coded relation names (P008: project-relation
index with old names, qualifier matching, temporary tables, f-string
placeholders, ownership exemptions, dedup and ordering) now run in
sqlbuild-analysis. Python only collects facts, including the literal SQL
introspected from user functions. The replaced Python routines are deleted;
a golden records the pre-port Python outcomes.
* fix(native): preserve POSIX paths in unknown hook-read diagnostics
* feat(native): lint every model from the compile's expansion behind native-preview
Early SQL lint reused the compile's expansion only for models without
variables and expanded the rest again in Python. Under the new preview stage
compile_lint_inputs, the compile hands lint each model's whole expansion,
variable pass included, so lint expands no model again. Findings and their
locations are unchanged; a new failure-corpus case and an integration test
cover a model whose finding sits after a variable and a macro.
* feat(native): build the built-in rules request natively behind native-preview
Under the new preview stage rules_request, Python hands the rules engine
typed rows read from the compiled project. Rust builds every model, SQL test
and scenario fact, the type proofs, per-model digests and the response memo
identity, then evaluates or reuses the response and decodes findings; the
exception policy is finalised over finding rows. Custom rules still run in
Python. The rows are an interim boundary until the compile holds native
project facts.
Model digests and the memo identity change, so the built-in rules cache
misses once after upgrade.
* feat(native): write compile outputs natively behind native-preview
Under the new preview stage compile_outputs, sqb compile emits its JSON
report through the orjson-compatible native emitter, writes compiled
artifacts, removes stale ones and publishes staged artifacts natively, and
takes the compile-reuse project snapshot and file digests natively.
Artifact contents are still rendered in Python. Failures raise the same
Python exceptions and messages. Native reuse digests carry their own prefix,
so entries recorded by the other engine miss once.
Also cover the natively built rules request's externally visible outcomes
under native-preview: encoder rejection before custom rules start, and a
response memo that follows the compiled-code identity.
* feat(native): reuse whole-project compiles through the native store behind native-preview
Under native-preview, compile reuse checks, replays and records the stored
compile in Rust on the shared native store: bypass decision, project and
search-path stamps, environment, provider-settings and module identity,
project-file and artifact digests, target-tree verification, entry encoding,
pruning, slot removal and retirement of the older reuse directory. Python
supplies interpreter-owned facts and prints the text.
* feat(native): ship native lint inputs, rules request, outputs and reuse; delete their Python paths
Early lint, the built-in rules request, compile JSON, artifact writes, stale
cleanup, staged publication and whole-project compile reuse now run natively
under every engine. The Python rules encoder and memo, artifact writer and
publisher, and the Python reuse entry format, project walk, identity digests
and target verification are deleted. The native walk keeps non-UTF-8 names
exactly and stamps non-Unix files, so reuse no longer falls back; JSON reports
reproduce the json.dumps fallback for wide integers and non-string keys.
* test(native): regenerate compiler baselines for the shipped output, rules and lint stages
* fix(native): keep the JSON report encoder contract natively and pin native build reuse invalidation
The error report now raises orjson's exact TypeError natively, and the full
report reproduces json.dumps errors and key text; only a lone surrogate in the
full report still uses json.dumps. Reuse host strings that are not UTF-8
(sys.path, target, runtime, module paths) cross exactly instead of failing the
check. A changed native build now has a direct integration regression.
* feat(native): write lone-surrogate JSON reports natively with json.dumps escapes
A UTF-16 leaf in the JSON emitter carries Python strings holding lone
surrogates, so full compile reports keep json.dumps escaping byte for byte
without calling a Python encoder; the stopped-compile error report keeps
orjson's TypeError. The compile_outputs.json_report fallback is deleted.
* wip(native): project graph indexes and selector resolution in sqlbuild-analysis
* fix(native): call the rules type callback by keyword and keep Python's JSON nesting limits
The native rules rows called the adapter's types_equal positionally, but its
left and right are keyword-only, so STRUCT passthrough type proofs failed with
C000. The JSON report emitter refused nesting past 128 levels; it now refuses
exactly where orjson does (255 containers, empty lists exempt) and falls back
to json.dumps up to Python's default recursion limit, as the old encoder did.
* feat(native): resolve project selectors and lineage indexes on a native project graph
The compiled project now owns a natively built graph (lineage edges, tag,
folder and name indexes) and every compile, planner, rules, lint, contract,
freshness and Python-node selection resolves on it. The Python selector
grammar, lineage edge builders and selector index builders are deleted; the
dict-based planner selector functions stay as thin boundaries for library
callers and the cached relation lineage index.
* feat(native): hold the project graph natively and build dict views only at boundaries
ProjectGraph now wraps the native graph; its dict views are converted lazily
for planner, manifest, Python-node and library callers. The compile report's
dependencies, selected counts and execution layers, DAG edges, planner scope
names and execution edge origins query the native graph directly, so an
ordinary compile converts no lineage dicts. Lone-surrogate selectors keep
their planner errors through the native grammar.
* feat(native): retain compile-input model facts in a native compiled project
The compile-input stage now records each model's identity, config, references,
schema entry and declarations into one in-memory NativeCompiledProject that
travels on CompileProjectInputs and CompiledProject. Assembly transfers each
model's typed analysis to it, and the rules request reads model rows from it
instead of rebuilding them from CompiledModel. The manifest's parent and child
maps come from the native graph, with build_manifest kept as the dict-input
compatibility wrapper.
* test(native): add the strict zero-materialization gate for ordinary compiles
A plain and a selected JSON compile must construct no CompileProjectInputs,
CompileModelInput, CompiledProject or CompiledModel. The gate is a strict
xfail until compile inputs, assembly, the planner and artifact writing hand
native facts end to end; it flips to a failure the moment it passes.
* feat(native): run the compile-input model loop natively into the owned project
NativeModelLoop now drives the compile-input model loop in order. For each
model it asks the attachment for the effective config, then finishes plain
models natively: cursor-intrinsic canonicalisation, reference scanning,
config validation, header-metadata stripping and the description schema
entry, retaining the final facts in the NativeCompiledProject directly.
Models that need macros, declarations, hooks, header columns or audits,
dbt references, an analysis opt-out or immediate validation call back into
the attachment, and the loop retains its finished input. The Python
recorder that copied every CompileModelInput into the owner is deleted.
A parity test builds a synthetic project and the neutral fixture both ways
and requires equal model inputs, expansions and retained facts.
* feat(native): attach MODEL header columns and audits in the native model loop
Models whose header declares columns or audits are now finished natively:
the loop runs the existing native header parser, builds the same contract
columns and audits, derives type enforcement and retains the schema facts.
Enum-typed columns, column migrations and header parse errors still go to
the attachment.
* feat(native): expand enum and constant references in the native model loop
The loop splices the natively scanned @enum/@const references itself:
enum member literals and character-indexed expansion spans are native,
constants are rendered through the adapter's typed-value renderer, and the
usage records come from the visibility the declaration scope resolved.
Macro detection now runs on the declaration-expanded SQL.
* feat(native): finish macro-calling models in the native model loop
The loop now hands declaration-expanded SQL with macro calls to the project's
macro expansion and keeps finishing the model natively: cursor intrinsics,
reference scanning merged with macro argument references, validation and
header attachment. A model the attachment still finishes reuses that
expansion, so project macros run once per model.
* feat(native): finish hooked models in the native model loop
Python hook checks and hook macro expansion run through the project's hook
and macro code; the loop then validates hook references with the native
validator, rejects cursor intrinsics in SQL hooks natively, and attaches the
header and retained facts from the hook-expanded config. A model the
attachment still finishes reuses the hook expansion.
* refactor(compile): run model-loop steps natively in attachment order
Native declaration expansion (shared with Python callers), native column
migration validation, analysis-gate conflicts, description checks and header
schema attachment; the native loop raises the attachment's errors itself and
hands a model over only at a feature it still finishes.
* refactor(compile): attach dynamic columns, audit factories and enum columns natively
The native model loop now parses dynamic column families (name patterns
compiled in Python's regex dialect, which the runtime matcher uses),
resolves audit factory references, and resolves enum-typed columns with
their accepted-values audits and generated usages.
* refactor(compile): decide analysis opt-outs and legacy schema matches natively
The model loop answers sql_analysis opt-outs (rejected when the SQL parses
and analysis is required), invalid reference calls and legacy schema
declarations itself. Parity tests now compare against the attachment
building every model alone.
* refactor(compile): attach named model schemas natively
The model loop resolves model_schema, checks the schema's visibility from
the model with the native scope path check (reporting S006 as before),
merges augmented header columns and resolves schema enum column types.
* refactor(compile): check dbt refs, report rejected calls and locate scan faults natively
dbt references go to the external resolver (or raise C214 without a
manifest) from the native loop; rejected reference calls report P012 at
their authored location as the attachment does; reference-scan faults are
located through the expansion passes. Parity tests compare diagnostics.
* refactor(compile): build model configs and visible declarations in the native loop
The native model loop now selects path defaults, builds and reuses model
configs (the reusable-config cache moves to Rust) and resolves each model's
visible declarations itself, removing the generic config callback.
resolve_declaration_context is implemented once natively and the Python
function delegates to it, including identity and path errors.
* refactor(compile): delete the SQLite reference cache
No normal compile reads it: the native model loop scans references itself,
and the attachment now scans its handed-over models directly. Older
releases' reference cache directories are removed like the retired fact
caches. Compile-reuse invalidation covers direct, macro-built and
variable references, and the docs say reference scans run again whenever
whole-project reuse misses.
* refactor(compile): apply model interpolation in the native loop
The loop reads each model's @@ interpolation from its row, records the
template reads and raises the interpolation error itself, removing the
interpolate callback.
* refactor: check python hooks natively in the model loop
* test: count the compiler caches left after the reference cache removal
* refactor: finish every model natively and delete the attachment fallback
* refactor: expand macros natively, keeping only macro bodies in Python
* refactor: expand model query macros natively in the model loop
* refactor: expand model SQL hooks natively in the model loop
* refactor: report macro-generated reference calls natively
* refactor: classify, look up and record macro calls natively
* test: patch the public macro bridge module observer
* refactor: evaluate model contracts from the native compiled project
* refactor: find promotion conflicts from the native compiled project
* refactor: read model inputs from native owner views instead of Python records
* refactor: assemble compiled models as native owner views
* test: align compiler regression instrumentation with native APIs
(cherry picked from commit 04462d5)
* test: count the reuse fixture's reference-cache models in analysis store misses
* refactor: assemble the compiled project as a native owner view
* refactor: hold compile inputs in a native owner view and pass the zero-materialisation gate
* test: check header metadata through the real model loop and delete the test-only native parse entry
* test: accept only known later loop validations in header parity and cover template and macro column metadata
* refactor: read model references, keys, destinations and output columns as native rows
* refactor: derive declared relation keys natively from owner model facts
* refactor: read analysis requests, coverage and lineage schemas from native model rows
* test: prove semantic shapes wait for upstream shapes before publishing a star model
* refactor: pair and assemble seeds in the native compiled project
* refactor: attach and assemble sources in the native compiled project
* refactor: attach and assemble functions in the native compiled project
* test: cover native function reference and table function arity errors
* refactor: attach and assemble audits in the native compiled project
* refactor: parse standalone measurement audit policy natively
* refactor: attach SQL tests and scenarios in the native compiled project
* refactor: report resource diagnostics from the native compiled project
* test: corrupt stored SQL-test scan values on disk to prove they recompute
* refactor: read scope relationship facts and grants natively
* refactor: open, key and save the SQL-test scan store and code identity natively
* refactor: validate declaration placement and relocations natively
* refactor: check named declaration visibility natively
* refactor: assemble compiled models from retained native analysis outcomes
* refactor: resolve schema scope usages and compile usage merge natively
* refactor: build scope lookups and resolve report visibility natively
* refactor: fingerprint, encode and verify the scope index cache natively
* Merge cleanup snapshot 73a07a0 and delete the Python RICH lineage path
Merge the committed cleanup snapshot (all Polyglot dialects compiled in, python engine and
stage tiers removed) into feat/native-rich-lineage, and finish RICH lineage on it:
- Conflicts: take the cleanup parser_dialect resolver, frontier types/constants (no
RICH_LINEAGE stage), gate tests and stage-tier test deletion; the generated fallback
allow-list is taken from the cleanup side and left stale until the combined regeneration.
- RICH lineage always runs natively: resolve the analysis dialect with the shared
parser_dialect resolver (unknown names keep Python's ValueError from _polyglot_dialect),
drop is_compiled_dialect, the deferred outcome and the per-model wheel path.
- Delete Python's polyglot RICH algorithm from rich_columns.py, keeping the dialect name
mapping and the ProjectColumnLineage assembly; drop the rich answer counter and deferral site.
- E2E RICH comparison now asserts expected lineage summaries, traces and zero wheel calls.
* refactor(scopes): order lookup keys by native Python repr for all Unicode text
* refactor(scopes): answer scope reports, browsing, move previews and projections natively
* refactor(config): resolve effective target, vars, connection and settings precedence natively
* refactor(compiler): locate YAML entries, header entries and SQL-test helpers natively
* fix(scopes): keep the IndexError contract of reports past an empty result
* refactor(config): load and validate project and local configuration natively
* feat(contracts): compile and match dynamic column name patterns natively
* refactor(discovery): project MODEL header values and locate header and output columns natively
* refactor(compiler): check resource identities and unresolved reference markers natively
* fix(config): keep tomllib nesting and int digit-limit errors in native project config loading
* refactor(discovery): validate typed SQL values, SQL test blocks and header declarations natively
* refactor(pipeline): split deferred target templates natively and drop unused context template helpers
* refactor(discovery): reject unknown and unsupported authored keys natively
* refactor(compile): check audit, SQL test and SQL hook SQL natively
* refactor(semantic-checks): check schema audits against closed model shapes natively
* refactor(compile): detect set operations natively and drop dead compiler reference patterns
* refactor(analysis): derive model reference facts and pivot SQL natively in the analysis session
* refactor(fingerprints): compute query, function definition and normalized query fingerprints natively
* refactor(discovery): match directory snapshot glob names natively
* refactor(lint): move lint-only audit parameter patterns out of compiler constants
* refactor(compile): find lone surrogates in effective vars at the native binding boundary
* refactor(project-assembly): scan target template environment names natively
* refactor(contract-adoption): edit MODEL headers and source YAML natively with the refactor text helpers
* refactor: resolve direct semantic lineage uses natively
* test: align combined compiler gates with native implementation boundaries
* fix(native): keep lone surrogates in glob entry names and Python resource docstrings
* test: refresh native compiler baselines and ownership documentation
* perf: index YAML diagnostic locations once per source file
* test: separate timing-dependent hash metrics from native ownership gates
* test: align differential harness and platform tests with native views
* build: add a fast native development workflow
* perf: share SQL text across native project views
* perf: overlap SQL lint after native build upgrades
* perf: bound lineage memory and reuse custom-rule projections
* fix: resolve compiler CI lint and lineage startup regressions
* feat(cli): add the native sqb launcher that replays unchanged compiles and hands off to Python
* build(cli): ship sqb and sqlbuild as the native sqlbuild-cli wheel
* fix(cli): keep sqb on the workspace MSRV, ship license and readme, prove hits skip Python
* fix(cli): invalidate changed startup inputs and fail on replay output errors
* test: restore migrated cache and parameter boundary coverage1 parent a06c77d commit 076d64f
1,745 files changed
Lines changed: 94082 additions & 41488 deletions
File tree
- .github/workflows
- crates
- sqlbuild-analysis
- src
- assembly
- analysis_session
- main
- tests
- project
- _helpers
- main
- tests
- binding_locations
- main
- tests
- compiled_project
- _helpers
- main
- tests
- compiler
- _helpers/sql_tests
- main
- tests
- contracts/main
- graph
- _helpers
- main
- tests
- lineage
- _helpers
- main
- tests
- resource_diagnostics
- main
- tests
- semantic_checks
- _helpers
- explanation
- metadata_checks
- resource_sql
- main
- tests
- sql_test_attachment
- _helpers
- main
- tests
- sql_tokens
- main
- sqlbuild-attachments/src
- audits
- _helpers
- main
- tests
- functions
- _helpers
- main
- tests
- reference_markers
- main
- tests
- sqlbuild-cache/src
- artifacts
- _helpers
- main
- digest
- _helpers
- main
- tests
- project_reuse
- _helpers
- main
- tests
- project_snapshot
- _helpers
- main
- sqlbuild-cli
- src
- bin
- compute_logs
- _helpers
- main
- tests
- launcher
- _helpers
- main
- tests
- replay
- _helpers
- main
- tests
- sqlbuild-config
- src
- effective
- _helpers
- main
- tests
- project
- _helpers
- main
- tests
- toml
- _helpers
- main
- tests
- yaml
- _helpers
- main
- tests
- sqlbuild-core/src
- json
- _helpers
- main
- tests
- posix_path
- main
- tests
- text
- _helpers
- main
- printable_ranges
- tests
- sqlbuild-discovery/src
- key_checks
- main
- tests
- tree
- _helpers
- main
- tests
- yaml_files
- _helpers
- main
- tests
- sqlbuild-model-config
- src
- config_presence
- _helpers
- main
- tests
- declarations
- _helpers
- main
- tests
- header_metadata
- _helpers
- main
- tests
- model_validation
- _helpers
- main
- tests
- name_patterns
- main
- tests
- resource_identities
- _helpers
- main
- tests
- sql_tests
- _helpers
- main
- tests
- sql_values
- _helpers
- main
- tests
- templates
- _helpers
- main
- sqlbuild-python
- src/bindings
- _helpers
- analysis_session
- analysis
- attachments
- boundary
- cache
- compile_outputs
- compiled_project
- contracts
- discovery
- graph
- lineage
- model_config
- project_assembly
- refactor
- render
- rules
- scopes
- semantic_checks
- sqltext
- main
- sqlbuild-refactor
- src
- refactoring
- _helpers
- contracts
- edits
- files
- planning
- scanning
- main
- tests
- sqlbuild-render
- src/macro_calls
- main
- tests
- sqlbuild-rules/src
- engine
- _helpers
- main
- tests
- sql_quality
- _helpers
- main
- sqlbuild-scopes
- src
- compile_usages
- _helpers
- main
- tests
- placement
- _helpers
- main
- tests
- relationship_names
- _helpers
- main
- tests
- scope_cache
- _helpers
- main
- tests
- scope_index
- _helpers
- main
- tests
- scope_report
- _helpers
- main
- tests
- sqlbuild-sqltext/src/compiler
- _helpers
- model_headers
- select_items
- main
- tests
- scripts
- compiler_differential
- _helpers
- comparing
- corpus
- coverage
- goldens
- refactor_corpus
- running
- classes
- native_layering
- _helpers
- python_char_table
- src/sqlbuild
- .agents/skills/sqlbuild/references/docs/cli
- cli
- commands
- _helpers
- build_planning
- compile
- contract
- dbt
- entry
- freshness
- janitor_runtime
- lineage
- lint
- refactor
- rules
- scenario_execution
- seed
- classes
- main
- dbt
- inspection
- compile_reuse
- _helpers
- classes
- entry
- _helpers
- main
- compiler
- analysis_session
- _helpers
- classes
- main
- attachments
- main
- auditing
- main
- compiled_project
- _helpers
- main
- compile
- _helpers
- analysis
- assembly
- attachment
- audit_factories
- config
- diagnostics
- explicit_references
- macro_bridge
- named_declarations
- native_stages
- refs
- render
- scenarios
- sharing
- sql_tests
- classes
- main
- contract_adoption
- _helpers
- main
- contracts
- _helpers
- main
- dag/_helpers
- discovery
- _helpers
- native
- sql
- validation
- yml
- classes
- main
- fingerprints
- _helpers
- frontier
- _helpers
- classes
- main
- graph
- _helpers
- main
- lineage
- _helpers
- main
- macro_bridge
- _helpers
- classes
- main
- manifest
- _helpers
- main
- model_config
- main
- model_loop/main
- pipeline
- _helpers
- main
- planner
- _helpers
- changes
- command_planning
- fixtures
- graph
- identity
- migrations
- output
- planning
- pruning
- resolve
- reuse
- scenario
- sql_tests
- warehouse
- classes
- main
- changes
- clone
- commands
- cursor_window
- execution
- identity
- selection
- project_assembly
- _helpers
- main
- python_nodes/_helpers
- refactoring
- _helpers
- columns
- project
- renames
- text
- main
- references
- _helpers
- main
- resource_names
- _helpers
- main
- scopes
- _helpers
- classes
- main
- semantic_checks
- _helpers
- main
- sql_test_glue
- main
- executor
- clone
- _helpers
- main
- janitor
- _helpers
- main
- old_name_views
- _helpers
- main
- integrations/dbt
- _helpers
- graph
- manifest
- pipeline
- planning
- selection
- main
- graph
- manifest
- planning
- lint
- _helpers
- main
- rule_engine
- _helpers
- engine
- host
- run
- classes
- main
- spec/contracts/_helpers
- sql_values
- _helpers
- main
- tests
- e2e
- scripts/compiler_differential
- src/sqlbuild/cli/commands/main
- build
- compile
- fast_lineage
- refactor
- scope
- goldens
- compiler
- failure
- seed
- python_oracle
- integration/src/sqlbuild
- cli
- commands
- _helpers/refactor
- main
- column_migrations
- compile_outputs
- entry
- compiler
- analysis_session
- attachments
- compiled_project
- expected
- compile
- contracts
- discovery
- explicit_references
- graph
- lineage
- model_config
- pipeline
- planner
- _helpers
- resolve
- sql_test_assembly
- main
- project_assembly
- scopes
- semantic_checks
- sql_test_glue
- executor/diff
- integrations/dbt
- lint/main
- rule_engine
- host_payload
- native_rows
- unit
- scripts
- compiler_differential/_helpers
- corpus
- coverage
- running
- native_layering/_helpers
- src/sqlbuild
- cli
- commands
- _helpers
- build_execution
- lineage
- refactor
- scenario_execution
- main
- build
- compile
- compile_reuse/_helpers
- compiler
- compile
- _helpers
- analysis
- config
- render
- contract_adoption/_helpers
- contracts
- dag/main
- discovery
- _helpers
- graph
- lineage
- macro_bridge
- _helpers
- classes
- main
- manifest
- pipeline
- _helpers
- target_validation
- main
- planner
- _helpers
- changes
- migrations
- planning
- resolve
- sql_test_assembly
- warehouse
- main
- execution
- identity
- python_nodes/_helpers
- refactoring/_helpers
- scopes
- executor
- clone/_helpers
- janitor/main
- integrations/dbt
- rule_engine
- _helpers
- engine
- host
- run
- classes
- audit_facts
- model_test_facts
- project_tree
- main
- evaluate_rule
- evaluate
- spec/contracts/main
- sql_values
- website/src/content/docs/docs/cli
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 | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
79 | | - | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
83 | | - | |
| 89 | + | |
84 | 90 | | |
85 | | - | |
| 91 | + | |
86 | 92 | | |
| 93 | + | |
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
| |||
111 | 118 | | |
112 | 119 | | |
113 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
114 | 125 | | |
115 | 126 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
120 | 134 | | |
121 | 135 | | |
122 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
| 410 | + | |
410 | 411 | | |
411 | 412 | | |
412 | 413 | | |
| |||
610 | 611 | | |
611 | 612 | | |
612 | 613 | | |
613 | | - | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
614 | 617 | | |
615 | 618 | | |
616 | 619 | | |
| |||
862 | 865 | | |
863 | 866 | | |
864 | 867 | | |
865 | | - | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
866 | 875 | | |
867 | 876 | | |
868 | 877 | | |
| |||
871 | 880 | | |
872 | 881 | | |
873 | 882 | | |
874 | | - | |
| 883 | + | |
875 | 884 | | |
876 | 885 | | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
877 | 890 | | |
878 | 891 | | |
879 | 892 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
25 | 65 | | |
26 | 66 | | |
27 | 67 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments