Repository navigation
feat(scenarios): reject quoted and materialized scenario CTE names like SQL tests - #1052
Merged
Merged
Conversation
…ke SQL tests Scenarios and macro-test scope scans no longer fall back to a Polyglot re-parse. Quoted CTE names and AS [NOT] MATERIALIZED are located compile errors with help on every engine, matching SQL tests.
kvlonge
enabled auto-merge (squash)
October 9, 2026 01:41
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
Scenarios and macro-test scope scans still fell back to a Polyglot re-parse when the CTE scanner failed. That accepted quoted CTE names and
AS [NOT] MATERIALIZED, rewrote the bodies, and kept a Python-only path. SQL tests already reject these forms (#1026).Accepted-input changes (no external users, so no shim; no project in the repo or differential corpus uses these forms):
AS MATERIALIZED/AS NOT MATERIALIZEDare errors in SQL tests, scenarios and macro tests.café), previously accepted, are errors (ASCII-only, as for SQL tests).2024_orders) get the located name error with help.Changes
analysis/ctes.py) from scenario extraction, unclassified SQL-test CTEs and macro-test relationship scans. The native scenario outcome has oneerror.path:line:column) and the SQL-test help.must use AS (...).testing.mdxandscenarios.mdxdocument the rules; the skill reference is regenerated.Verification
make check-ci, hygiene.