Context
PR #338 added an ELF readelf gate to verify musl-linked native addons (NEEDED libc.so, no glibc SONAME). The gate proves ELF metadata but does NOT prove that Node.js can dlopen the addon on an actual musl system.
Proposal
After the readelf gate completes on the x86_64-unknown-linux-musl build leg only (aarch64 would require QEMU), run a load-test step in the stage-and-verify-napi job:
docker run --rm -v "$PWD:/w:ro" node:22-alpine node -e "require('/w/mds-napi.linux-x64-musl.node'); console.log('ok')"
This verifies that Node's require() can successfully load and link the addon on a musl C library.
Design Notes
Docker Hub pull rate limits: Anonymous pull rate limits on GitHub runners can flake a tag-push release build (the build would fail before any publish, but a re-run needs a new tag). Consider pulling from a mirror (public.ecr.aws/docker/library/node:22-alpine) or marking the step as non-blocking with a loud warning in the output.
Musl detection: Verify that the isMusl() check in crates/mds-napi/index.js (reads /usr/bin/ldd) returns true on node:22-alpine; otherwise the loader would pick the wrong platform package at runtime.
Acceptance Criteria
- Load-test runs after readelf gate on x86_64-unknown-linux-musl only
- Docker image pull is resilient to rate limits (mirror or non-blocking mark)
- isMusl() detection validated on node:22-alpine
- Test passes in a branch dry-run
Related
Relates to PR #338
Context
PR #338 added an ELF readelf gate to verify musl-linked native addons (NEEDED libc.so, no glibc SONAME). The gate proves ELF metadata but does NOT prove that Node.js can dlopen the addon on an actual musl system.
Proposal
After the readelf gate completes on the x86_64-unknown-linux-musl build leg only (aarch64 would require QEMU), run a load-test step in the stage-and-verify-napi job:
This verifies that Node's require() can successfully load and link the addon on a musl C library.
Design Notes
Docker Hub pull rate limits: Anonymous pull rate limits on GitHub runners can flake a tag-push release build (the build would fail before any publish, but a re-run needs a new tag). Consider pulling from a mirror (public.ecr.aws/docker/library/node:22-alpine) or marking the step as non-blocking with a loud warning in the output.
Musl detection: Verify that the isMusl() check in crates/mds-napi/index.js (reads /usr/bin/ldd) returns true on node:22-alpine; otherwise the loader would pick the wrong platform package at runtime.
Acceptance Criteria
Related
Relates to PR #338