Skip to content

Join changed cases to Snowflake's receipts in the coverage diff, whatever they expect - #58

Merged
kvlonge merged 3 commits into
mainfrom
fix/coverage-receipt-join
Nov 5, 2026
Merged

kvlonge merged 3 commits into
mainfrom
fix/coverage-receipt-join

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

The coverage diff's "Snowflake-parsed cases the parser now rejects" line reported 0 on #55, although #55 changed the verdict of four receipted observe cases (audit 38bed22). The snapshot took Snowflake's verdict from each case's checked phase, which the check leaves empty for every observe case, so those cases never reached the diff.

Each case result now records what Snowflake's parser did, joined by the case's SQL, setup and session hashes to every syntax receipt, whatever the case id or expectation:

  • parsed: every receipt is accepted, semantic, runtime or unsupported, with an errno other than 1003;
  • refused: every receipt is a syntax error with errno 1003 (positioned) or 921;
  • nothing for a positionless 1003 or receipts that disagree.

diff fails on a parsed case the parser now rejects (as before) and, new, on a refused case it now accepts.

Check: rebuilt at 497ad27 and 77e10ee with this change, the diff of #55 on catalogue c9ce0ff plus evidence 1c56796 now reports exactly the audit's four rows:

  • now rejects: database-role-clone.k2f294878f7ba, create-stream-clone.k6bedaffe7427, create-database-role.k9de9327a97ce
  • now accepts a syntax error: create-database.k3c0dc0ce5fe8

The new test given_receipted_cases_of_any_expectation_when_the_parser_changes_then_the_diff_flags_contradictions covers those shapes plus controls (positionless 1003, disagreeing receipts, unchanged parser), and fails with the join removed.

… whatever it expects

The snapshot took Snowflake's verdict from a case's checked phase, which is
none for every observe case, so a receipted observe case the parser stopped
accepting never reached the diff (#55's three regressions, audit 38bed22).

Each case result now carries what Snowflake's parser did, by every syntax
receipt of its SQL, setup and session whatever the case id: parsed when all
stopped after parsing with an errno other than 1003, refused when all are a
positioned 1003 or a 921, and nothing for a positionless 1003 or receipts that
disagree. The diff fails on a parsed case the parser now rejects, as before,
and also on a refused case it now accepts.
@kvlonge
kvlonge merged commit 45e21bd into main Nov 5, 2026

kvlonge commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Gate (D94) and landing record.

  • Command: make check-merge RECORDER=0 on the exact head 45e21bdb67026e1a720e5758d28b4bb97fcf6009, one build job. Exit 0.
  • The head contains main 215a679201e8aecef585806b0962c8f88925dc37 (DuckShop batch 5); merges of c793813 (fix(syntax): keep OR REPLACE and quoting on Snowflake database and schema clones #56) and 215a679 came in as merge commits, with no rebase or force-push.
  • Landed by fast-forward: main = 45e21bdb. main tree = head tree = 4120dce61393a958519398c682a3dd0a2528b4ea.
  • Coverage diff against the baseline in the gate: no regression lines, 0 forms lost, 0 obligations lost, 56 obligations gained (the same as main before; this change touches the checker only, not the parser).
  • Receipted Snowflake-parsed cases now rejected: 0. Snowflake syntax errors now accepted: 0. Both lines now join each changed case to its receipts by sql, setup and session hashes, whatever its expectation.
  • Negative check: on fix(syntax): parse Snowflake CLONE kinds and security AS REPLICA forms #55 (497ad27 → 77e10ee, catalogue c9ce0ff + evidence 1c56796) the new join flags exactly the auditor's rows: 3 now rejected (38bed22) and 1 now accepted (sf.ddl.create-database.create-database.k3c0dc0ce5fe8). report/tests/test_parser_changes.rs fails with the join removed.
  • Stale reviews: none from this change (checker only).
  • Follow-up for D135 (documented D113 flips on their own non-failing line, read from C's marks) is ready as a separate small PR on top of this.

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