Skip to content

test(duckshop): edge cases for every construct translation tools refuse - #1301

Merged
kvlonge merged 6 commits into
mainfrom
test/duckshop-blocker-parity
Nov 2, 2026
Merged

kvlonge merged 6 commits into
mainfrom
test/duckshop-blocker-parity

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Why

DuckShop should exercise every construct that SQL translation tools refuse, guard or fail on, so the benchmark alone can measure translation coverage without any other project.

Changes

  • 86 new edge-case models with unit tests (160 edge models and 185 edge unit tests in total). Most place a construct refused only under strict checking before one refused by default, so one model shows both.
  • Two fan-in marts (rpt_edge_case_model_keys, rpt_edge_case_array_model_keys) read the new models, so a refusal also reaches a downstream model.
  • An open (uncontracted) source edge__supplier_notes with its loader and staging model, a SQL table function edge_basket_lines_for, and a JavaScript function created by a pre-hook.
  • relations.py also checks and drops functions that SQL hooks create.
  • Fixes sqb test on main: three core unit-test mocks now list columns in declared order (planning failed with S000 since the declared-columns change); core checksum updated (compiled tests only). A new e2e guard runs sqb test --inspect on DuckShop so fixture errors fail CI.
  • README, RUNBOOK step 7 and sqlbuild_local.toml.example describe the new group. They also note that the edge connection sets database and schema, so unqualified calls resolve to the hook-created function.

Verification

  • sqb compile: 0 errors, 0 warnings; sqb format --check clean.
  • New test --inspect guard fails before the mock fix and passes after; DuckShop compile guards and benchmarks/duckshop/tests pass.
  • Expectations captured on Snowflake under the edge target; a second capture left every file unchanged.
  • sqb test --target edge --select tag:edge_case: 185 of 185 pass.
  • make check-ci (verify hook), public-repository hygiene scan.

@kvlonge
kvlonge enabled auto-merge (squash) November 2, 2026 11:31
@kvlonge
kvlonge merged commit a7bc60e into main Nov 2, 2026
37 checks passed
@kvlonge
kvlonge deleted the test/duckshop-blocker-parity branch November 2, 2026 14:06
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