test(storage-boundary): add write-side WIT boundary test#1
Open
zacharywhitley wants to merge 1 commit into
Open
test(storage-boundary): add write-side WIT boundary test#1zacharywhitley wants to merge 1 commit into
zacharywhitley wants to merge 1 commit into
Conversation
Adds `tests/write_boundary.rs` -- the mirror-image counterpart to the read-side `tests/boundary.rs`. Loads the synthetic ducklink writer bridge (companion to sqlink's `synthetic-mutating-vtab-bridge`) and drives its exported `duckdb:extension/storage-write-dispatch@2.0.0` interface end-to-end across the WIT component boundary via wasmtime, covering the full mutating path: begin-transaction, create-table, insert-rows, update-rows, delete-rows, commit-transaction, and the rollback path. The write world is `duckdb:extension@2.0.0`; the pre-existing wit/ tree uses the unversioned `duckdb:extension` package. Rather than version-mix, the write-side WIT lives in a sibling `wit-write/` dir with its own duckdb:extension@2.0.0 dependency, keeping the two bindgen! invocations independent. Bridge wasm is located via (1) $DUCKLINK_WRITER_BRIDGE_WASM, (2) `../../artifacts/extensions/synthetic_mutating_ducklink.wasm` (the staged copy convention), or (3) the sibling checkout at `~/git/synthetic-mutating-vtab-ducklink-bridge/target/wasm32-wasip2/ release/synthetic_mutating_ducklink_bridge_dynlink.wasm`. Test panics with a clear build-me message if none of those exist.
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.
Summary
Adds
crates/storage-boundary-test/tests/write_boundary.rsand the companionwit-write/tree (256 + 242 LOC). This is the mirror-image counterpart to the read-sidetests/boundary.rs: it loads the synthetic ducklink writer bridge and drives the exportedduckdb:extension/storage-write-dispatch@2.0.0interface end-to-end across the WIT component boundary via wasmtime, covering begin-transaction, create-table, insert-rows, update-rows, delete-rows, commit-transaction, and the rollback path.The write world is
duckdb:extension@2.0.0; the pre-existingwit/tree uses the unversionedduckdb:extensionpackage. Rather than version-mix, the write-side WIT lives in a siblingwit-write/dir with its ownduckdb:extension@2.0.0dependency, keeping the twobindgen!invocations independent.Cherry-picked as a single commit from
feat/python-sdk-authoring-api(which carries unrelated Python-SDK authoring work) onto a fresh branch offmainso the review scope is just the write-boundary test.Related work
Motivating commits on the sqlink side (writer symmetry):
tegmentum/sqlink@5cfc37dc-- iVersion fixtegmentum/sqlink@6ec38652-- read/write unifyCompanion smoke-fixture repos:
tegmentum/synthetic-mutating-vtab-bridge(sqlink side)tegmentum/synthetic-mutating-vtab-ducklink-bridge(ducklink side; provides the writer wasm this test loads)Companion PR:
tegmentum/ducklink-extensionfeat/storage-write-dispatch-2.1-- adds the runtime trampolines +storage-write-dispatch@2.0.0WIT on the extension-runtime side that this test exercises.Test plan
tegmentum/synthetic-mutating-vtab-ducklink-bridgeand pointDUCKLINK_WRITER_BRIDGE_WASMat the artifact (or stage it at../../artifacts/extensions/synthetic_mutating_ducklink.wasm).cargo test -p storage-boundary-test --test write_boundary-- confirm all boundary phases (begin, create-table, insert, update, delete, commit, rollback) pass.tests/boundary.rsstill passes (no shared WIT/bindgen regressions).