Skip to content

ci(publish): add post-publish smoke test job#85

Merged
simongdavies merged 1 commit intohyperlight-dev:mainfrom
simongdavies:update-publish
Apr 28, 2026
Merged

ci(publish): add post-publish smoke test job#85
simongdavies merged 1 commit intohyperlight-dev:mainfrom
simongdavies:update-publish

Conversation

@simongdavies
Copy link
Copy Markdown
Member

Why

The existing publish workflow verifies the artefact is built correctly (musl .node files exist, source tests pass) but never verifies a user can actually npm install @hyperlight-dev/hyperagent from the registry and have it work.

That gap turned a non-issue into a panic last week — when v0.2.3 looked broken (EEXIST on global upgrade + version not changing), there was no automated way to distinguish real breakage from npm CDN/replication lag. So the release got deprecated unnecessarily.

What

New smoke-test job that runs after publish-npm, in two clean containers (debian-slim for glibc, alpine for musl). For each:

  1. Wait for registry propagation — polls registry.npmjs.org for up to 5 min. Fails loudly if metadata never appears.
  2. Verify tarball blob + shasumcurl the dist.tarball URL, compare sha1 to dist.shasum (catches partial/corrupt CDN responses).
  3. Install + runnpm install -g @hyperlight-dev/hyperagent@$VERSION, then assert hyperagent --version matches and --help works.

That last step proves the bundled Module._load launcher actually resolved the right .node file at runtime, including the musl-vs-glibc detection path.

What it catches that the existing workflow doesn't

Failure mode Before After
Tarball missing native binaries
Launcher musl/glibc detection broken
file: deps actually breaking install
Registry propagation/CDN lag ❌ (looks like breakage) ✅ (loudly distinguished)
Tarball blob shasum mismatch

Out of scope

  • Windows smokewin32-x64-msvc launcher path is exercised pre-publish via just test on the win2025 self-hosted runner.
  • macOS — we don't ship macOS binaries (Hyperlight needs KVM/WHP).
  • LLM round-trip — no API token in this job; --version / --help is enough to prove the launcher loaded the right .node.

Job graph

build-native ─→ pack-npm ─→ publish-npm ─→ smoke-test
            ↘ publish-docker

Add a smoke-test job that runs after publish-npm and verifies the
just-published tarball actually installs and runs from the npm
registry in clean linux-x64-gnu (debian-slim) and linux-x64-musl
(alpine) containers.

The existing build-native + pack-npm steps verify the artefact is
built correctly. They do not verify a user can actually 'npm install
@hyperlight-dev/hyperagent' and have it work — which is the failure
mode we were guessing at after v0.2.3.

The new job:
  - polls registry.npmjs.org for up to 5 min for the new version to
    propagate (distinguishes real breakage from CDN lag)
  - fetches the published tarball and verifies its sha1 matches the
    metadata shasum (catches partial/corrupt CDN responses)
  - 'npm install -g' in a clean container then asserts --version and
    --help work (proves the bundled Module._load launcher resolved the
    correct platform .node at runtime, including musl detection)

Windows is not smoke-tested here — the win32-x64-msvc launcher path
is exercised pre-publish via just test on the win2025 self-hosted
runner. macOS is not shipped.

Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 28, 2026 12:01
@simongdavies simongdavies merged commit c229da3 into hyperlight-dev:main Apr 28, 2026
12 checks passed
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