Repository navigation
ci: consumer-test both npm packages, before tagging and after publishing - #7
Merged
Merged
Conversation
package.yml builds the @minigraf/browser and @minigraf/wasi tarballs exactly as the release publishes them. ci.yml installs each into an empty project and runs its README quick start and the consumer contract: the browser package in headless Chromium (Playwright) with an IndexedDB reload, the WASI package under node:wasi on Linux, macOS and Windows. The release tests these tarballs at the release version and publishes exactly them; verify-published.yml installs the published versions from npm afterwards and opens a release-broken issue on failure. Fixes found by the test: both packages now ship LICENSE-MIT and LICENSE-APACHE; @minigraf/browser gets a real description instead of "wasm-pack build shim"; the README's WASI snippet uses startMinigrafWasi (the package is the REPL binary, not a library) and drops the /tmp preopen the binary never uses. readme_sync.py takes an optional heading, since this README covers two packages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz
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.
Step 6 of the binding consumer tests plan (minigraf
docs/superpowers/plans/2026-10-20-binding-consumer-tests.md).What
package.ymlbuildsdist-browser(wasm-pack, stamped name/version/description, plus licenses) anddist-wasi(core REPL forwasm32-wasip1atcore-ref,npm test, licenses). It checks the file list of each tarball.consumer-test/run.sh <browser|wasi> local <dist> <version> | <browser|wasi> registry <version>installs the package into an empty project, checks both license files, then:@minigraf/browserthrough an import map (no bundler) in headless Chromium (Playwright 1.55.0, a smallnode:httpserver). It runs the README quick start, then the contract: installed version, an in-memory transact and query, an error rejection, and an IndexedDB database written and read back acrosspage.reload().repl.mjs), run with the README'sprintf … | node repl.mjsline, then the contract: installed version, transact and query, and an error with its[XXX-NNN]code. Runs on Linux, macOS and Windows.ci.yml: thepackage,consumerandreadme-syncjobs replace the two build-only jobs.readme-syncchecks the browser and WASI sections ofREADME.mdandwasi-pkg/README.md.readme_sync.pygets an optional heading argument for that.release.yml:testpassesversion. One matrixpublishjob runsnpm publishon the tested tarball and skips a version that's already on npm, as Node does.verify-publishedruns after it.verify-published.yml: a registry-mode matrix plus therelease-brokenreport job.Fixes found by the test (both 2.0.8 packages)
LICENSE-MITorLICENSE-APACHE.@minigraf/browserdescription was "wasm-pack build shim for Minigraf browser and WASI targets".instantiateMinigrafWasiWithand pointed at "the instance exports", but the package is the REPL binary. It now usesstartMinigrafWasi, as the package README does, and says the REPL reads stdin. Both READMEs drop the/tmppreopen, which the binary never uses (on Windows the path doesn't exist).Locally, against npm 2.0.8, both packages pass everything except the license check.
Deviations from the plan
mainandv3, the WASI binary isMinigraf::in_memory()plus the REPL; it reads no--fileand no preopen. There's nothing to reopen, whichcontract.mjsnotes.node:httpserver instead ofnpx http-server, so there's no extra download, and it serves.wasmasapplication/wasm.BrowserDbrejects with the message but without the error code (Unknown command: nosuchcommand), unlike every other API. Filed as BrowserDb errors have no error code minigraf#673. The check requires a string rejection with the message, and becomes strict once the pinned core has the fix.🤖 Generated with Claude Code
https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz