{"id":52029387,"url":"https://github.com/tegmentum/shim-bridge-smoke-tests","last_synced_at":"2026-08-01T11:03:49.100Z","repository":{"id":367216858,"uuid":"1279494674","full_name":"tegmentum/shim-bridge-smoke-tests","owner":"tegmentum","description":"End-to-end smoke tests for DataFission shim bridges (sqlink, ducklink). Runs query suites through sqlite3 + duckdb CLIs.","archived":false,"fork":false,"pushed_at":"2026-07-08T02:05:26.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-08T02:14:48.525Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tegmentum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-24T18:36:31.000Z","updated_at":"2026-07-08T02:05:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tegmentum/shim-bridge-smoke-tests","commit_stats":null,"previous_names":["zacharywhitley/shim-bridge-smoke-tests","tegmentum/shim-bridge-smoke-tests"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tegmentum/shim-bridge-smoke-tests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tegmentum%2Fshim-bridge-smoke-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tegmentum%2Fshim-bridge-smoke-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tegmentum%2Fshim-bridge-smoke-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tegmentum%2Fshim-bridge-smoke-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tegmentum","download_url":"https://codeload.github.com/tegmentum/shim-bridge-smoke-tests/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tegmentum%2Fshim-bridge-smoke-tests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36154738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-08-01T02:00:05.789Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-08-01T11:03:48.397Z","updated_at":"2026-08-01T11:03:49.086Z","avatar_url":"https://github.com/tegmentum.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/tegmentum/sqlink\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/tegmentum/sqlink/main/sqlink_logo.png\" alt=\"SQLink\" width=\"320\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# shim-bridge-smoke-tests\n\nEnd-to-end smoke test suite for DataFission shim bridges.\nCatches regressions during bridge-codegen development by\nrunning query suites through `sqlite3`, `duckdb`, and\n`ducklink` (wasm-component DuckDB host) against generated\nbridges.\n\n**Fleet index**: [SHIM-BRIDGES.md](SHIM-BRIDGES.md) —\ncanonical map of every generated bridge (extension × host),\nper-sub compose:dynlink model documentation, and the\nregeneration recipes for both the legacy `wac plug`\nmonolithic path and the current Phase B/9.1/9.3 dynlink\nper-sub / shared-shim / monolithic paths.\n\n## What it tests\n\nFor each (target, bridge artifact, composed shim wasm) tuple,\nthe runner:\n\n1. Loads the bridge into the target's CLI.\n2. Sets the `\u003cEXT\u003e_SHIM_WASM` env var so the bridge can find\n   its composed wasm.\n3. Runs each `\u003ccase\u003e.sql` file in the case directory.\n4. Diffs the actual output against `\u003ccase\u003e.expected`.\n5. Reports per-case PASS/FAIL.\n\n## Usage\n\n```sh\n# SQLite via sqlink (wasm-component host; the current default path)\nscripts/run.sh sqlite \\\n    /path/to/postgis-sqlink-loadable.wasm \\\n    /path/to/postgis-shim-composed.wasm \\\n    cases/postgis\n\n# DuckDB via ducklink (wasm-component host)\nDUCKLINK=~/git/ducklink/target/release/ducklink scripts/run.sh ducklink \\\n    /path/to/postgis-ducklink-loadable.wasm \\\n    /path/to/postgis-shim-composed.wasm \\\n    cases/postgis\n\n# DuckDB via native cdylib (legacy path; the -duckdb-bridge repos\n# are archived — kept runnable for regression comparison only)\nDUCKDB=/opt/homebrew/bin/duckdb scripts/run.sh duckdb \\\n    /path/to/postgis_duckdb_bridge.duckdb_extension \\\n    /path/to/postgis-shim-composed.wasm \\\n    cases/postgis\n```\n\n### Ducklink runtime prerequisites\n\nThe `ducklink` target requires the ducklink host binary AND\nits two wasm components:\n\n```sh\ncd ~/git/ducklink\ncargo build --release -p ducklink-host --bin ducklink\n# Also builds ~/git/ducklink/target/wasm32-wasip2/release/{ducklink_core,ducklink_cli}.wasm\n# via the same crate's wasm workspace members.\n```\n\nThe runner copies the composed loadable to a scratch\n`--extensions-dir` under its canonical extension name\n(`\u003cext\u003e.wasm` — derived from the `-ducklink-loadable.wasm`\nsuffix) and issues `LOAD \u003cext\u003e;` inside the guest DuckDB CLI.\nNo `\u003cEXT\u003e_SHIM_WASM` env var is needed — the shim wasm is\nalready inlined into the composed loadable via `wac plug`.\n\n## Case design\n\n`cases/postgis/` holds **portable cases** that run on both\nSQLite and DuckDB. Every query returns an integer (typically\n0 or 1 from a `CASE WHEN \u003cpredicate\u003e THEN 1 ELSE 0 END`)\nbecause SQL formatting differs across targets:\n\n| | SQLite `.mode list` | DuckDB `.mode csv` |\n|---|---|---|\n| Boolean | `1` / `0` | `true` / `false` |\n| String with commas | `LINESTRING(0 0,1 1)` | `\"LINESTRING(0 0,1 1)\"` |\n| NULL | empty | `NULL` |\n| Integer | `1` | `1` |\n\nIntegers are the lowest-common-denominator output that's\nidentical everywhere. Wrapping boolean and string predicates\nin `CASE WHEN ... THEN 1 ELSE 0 END` keeps the cases portable.\n\nFor features that only one target supports (e.g. UDTFs which\nsqlink ships but ducklink scaffolds), cases live under\n`cases/\u003cshim\u003e-\u003ctarget\u003e-only/`. Run with the matching target.\n\n## Adding a new case\n\n```sh\n# cases/postgis/06-clusters.sql\nSELECT CASE WHEN ST_NumGeometries(\n    ST_ClusterIntersecting(\u003cset of geoms\u003e)\n) = 2 THEN 1 ELSE 0 END;\n\n# cases/postgis/06-clusters.expected\n1\n```\n\nThe runner normalises trailing whitespace on each line and\ntrailing empty lines, so `.expected` files are forgiving to\nhand-edit.\n\n## Status\n\nVerified 2026-06-24 on:\n\n- SQLite v3.53.1 (brew) — 5/5 cases pass\n- DuckDB v1.5.2 — 4/4 portable cases pass (UDTF cases are\n  sqlink-only)\n\nAdding new shims is a matter of writing one more case\ndirectory. The runner is shim-agnostic; it just needs to know\nthe env var name for the shim wasm path (currently hardcoded\nto `POSTGIS_SHIM_WASM` — see `scripts/run.sh` for the\nextension point).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftegmentum%2Fshim-bridge-smoke-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftegmentum%2Fshim-bridge-smoke-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftegmentum%2Fshim-bridge-smoke-tests/lists"}