Skip to content

Example: packaged-artifact E2E variant (wasm packaging smoke test)#166

Draft
bpapillon wants to merge 1 commit into
chris/schy-473-migrate-schematic-csharp-to-use-the-wasm-rules-enginefrom
bpapillon/e2e-packaged-wasm-smoke-test
Draft

Example: packaged-artifact E2E variant (wasm packaging smoke test)#166
bpapillon wants to merge 1 commit into
chris/schy-473-migrate-schematic-csharp-to-use-the-wasm-rules-enginefrom
bpapillon/e2e-packaged-wasm-smoke-test

Conversation

@bpapillon

Copy link
Copy Markdown
Collaborator

Stacked on #165 as a concrete example of the packaging-coverage follow-up.

The rules-engine wasm ships two ways that a source build never exercises: the
.wasm embedded in the SDK DLL at pack time, and the transitive Wasmtime native
library (libwasmtime) resolved per-RID at restore. The existing E2E testapp uses a
<ProjectReference> to local source, so its green run only proves the working tree
compiles — not that the published NuGet artifact loads and evaluates.

This adds a parallel testapp-packaged/ that consumes SchematicHQ.Client as a
NuGet PackageReference restored from a local feed (scripts/e2e-pack.sh packs it
and asserts the embedded wasm survived). Wired into the shared suite in a datastream
mode, it runs a real flag check through the packaged wasm + Wasmtime, exactly as an
end user would. App logic is shared with testapp/ via a linked Program.cs.

Caveat documented in testapp-packaged/README.md: CI runners are linux-x64 glibc —
the one RID Wasmtime ships — so this proves the pack/restore/embed chain but not
Alpine/musl, arm, Windows, or macOS. Covering those needs the packaged testapp run
inside the target base image, asserting a rule-derived value (the SDK degrades to
flag defaults on engine-init failure, so a missing native lib is otherwise silent).

Not yet wired into schematic-api/.github/workflows/sdk_e2e.yml — the matrix snippet
is in the README. Draft; needs one ./scripts/e2e-pack.sh run to confirm the guard.

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