Skip to content

feat: evidence policy, strict comparator, Snowflake recorder and append-only guard - #3

Merged
kvlonge merged 11 commits into
mainfrom
feat/evidence
Oct 24, 2026
Merged

kvlonge merged 11 commits into
mainfrom
feat/evidence

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Why

CHI-832. Recorded warehouse results are the only arbiter of whether a conversion is correct, so recording, replay and the integrity controls have to exist before any rule does.

Changes

  • sqlquack-policy: the single, schema-validated sqlquack.toml, covering comparator settings, type equalities, required edge-case tags per category, and known divergences with strict/default modes.
  • sqlquack-compare: a strict comparator (exact decimals, zero-ULP floats, NULL equal only to NULL, declared type equalities).
  • sqlquack-evidence: cases, content hashes, pending, DuckDB 2.0 replay, verify and audit.
  • recorder/: a small Python tool on the official Snowflake connector that writes Arrow results unchanged. It batches cases, reruns a batch case by case when Snowflake wraps a statement error, and stores only a hash of the query ID and no warehouse error messages. It never runs in CI.
  • Append-only guard in make check-ci and CI: existing results can't change, and new results must come from the recorder.
  • First recording of the 9 neutral seed cases.

Verification

  • make check-ci, make test and the hygiene scan pass.
  • verify reports 9 refused (no rules yet) and 0 failed. The evidence guard passes on 17 added files.

@kvlonge
kvlonge merged commit f33c68c into main Oct 24, 2026
1 check passed
kvlonge added a commit that referenced this pull request Nov 4, 2026
A page that defines one name several times (per cloud, per stage kind,
per authentication method) kept only its last definition. Each variant
is now its own definition, named by the page qualifier when the page
gives one, e.g. "cloudProviderParams (for Amazon S3)", else "#2", "#3",
so every id stays <source>::<name>. A form's uses lists every variant
of a name its grammar refers to. Only ddl, dml and security_admin
change; no form grammar changes.
kvlonge added a commit that referenced this pull request Nov 4, 2026
…ons, four readings

Obligation builder (scripts/syntax_obligations/_helpers/derive.py):
- A keyword or parenthesis that occurs more than once in one production
  and branch now gets a missing-keyword negative for each occurrence
  (the later ones targeted "#2", "#3"...). Before, only the first
  occurrence was tested, for example SNAPSHOT in ALTER SNAPSHOT SET ...
  ADD SNAPSHOT.
- A repeated list option such as [ , ... ] now counts as an independent
  option for interaction_all_options, so [ DISTINCT ] <expr> [ , ... ]
  gets the row.

Readings: SYSTEM$CLUSTERING_DEPTH and _RATIO take the column list as
optional; LAST_DAY takes the date part quoted or unquoted;
WAREHOUSE_METERING_HISTORY gains a production with its named arguments in
reverse order.

Two new interaction cases repeat SQL Snowflake already rejected
(MINHASH ( v1 , DISTINCT 1 , 1 ) and ALTER DYNAMIC TABLE ... ADD SEARCH
OPTIMIZATION ON EQUALITY ( v1 ) , EQUALITY ( v1 ) EQUALITY); both are
observed under D113.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant