Repository navigation
test(compiler): cover every discovery input in the compiler differential - #994
Merged
Merged
Conversation
Split the flat _helpers package into comparing, corpus and running buckets so it can grow without exceeding the helpers container limit. Tests mirror the new layout with local test-case types. No behaviour change.
Add stride-forced feature blocks to the seeded project generator so any four consecutive seeds exercise incremental strategies, microbatch, snapshots, Python hooks, loaders, assets, checks, audit factories, providers, sinks, custom materializations, a project-local adapter, model schemas, list constants, cross-file macro imports, macro/udf/parameterized tests, generic audits, functions, local config, target overrides, CRLF/tab/BOM input and non-ASCII comments and strings. Seed 1 of every twelve uses a dbt ref with a synthetic manifest: compile fails with C214 by design and plan must succeed. Classify each seed's DiscoveredProjectInputs stage capture into input kinds and report coverage; --require-discovery-coverage fails the run when a kind derived from the discovery dataclass or the detail list is missing.
Add minimal failing projects for every discovery error code (D001-D009, D011-D016) across config, SQL, YAML, conflict and Python families, including BOM-prefixed TOML and SQL. Tighten the corpus gate: the expected code must be the first error the engine reports, and a case that intends a warning declares it separately. built-in-audit-shadow now expects S010 as the error and P003 as a warning. Add a helper that runs the corpus and returns the codes each case emits.
Check that a project with every feature block yields a discovery capture with every collection populated, no opaque or cyclic values and callables replaced by qualified names, and that a perturbed native discovery result is reported at the discovered_project_inputs capture. Run the failure corpus for real and assert each case emits its declared first error, walking every DiscoveryError subclass to require each code. Prove a code reported only as a warning fails the gate and that missing required coverage exits 1 without reporting success.
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
Native discovery (M2) will replace
discover_project_inputs. First the compiler differential must exercise every input discovery reads and every discovery-time diagnostic, so native differences cannot hide.Changes
--require-discovery-coverage, on in per-PR CI, fails and prints FAILED when a kind is missing. Adapter and dbt kinds are reported as config-only.DiscoveryErrorcode. The gate now requires the expected code to be the first error; warnings are declared separately.Verification
fensu check,make check-ciand the hygiene scan pass.make testpasses.