erlang: make BEAM runtime smoke self-contained (real Node smoke)#820
Open
brandonpayton wants to merge 2 commits into
Open
erlang: make BEAM runtime smoke self-contained (real Node smoke)#820brandonpayton wants to merge 2 commits into
brandonpayton wants to merge 2 commits into
Conversation
The BEAM runtime smoke's ring test called an external `ring` module that
is never compiled, so `ring:start()` died with `{undef,[{ring,start,...}]}`
and the smoke was effectively artifact-only for that case. Erlang cannot
compile modules on Kandelo yet: beam_asm hashes each module with
erlang:md5/1 over an iolist, and erlang:md5/1 returns badarg on iolist
input in this wasm build (it works only on a binary) — tracked as kd-qe2c.
Replace the ring test with a self-contained named-fun ring driven through
-eval, so all 5 tests boot BEAM and run a real Erlang program with no
compilation step. Size it 50x10 so the silent compute (~0.06s) finishes
well inside serve.ts's 2s idle-exit watchdog. Correct the ring.erl and
serve.ts doc comments that advertised the broken ring:start() path.
Node smoke: 5/5 pass (host vitest, dev-shell). maxAddr is explicit
(0x3fdc0000). Browser smoke: skipped (no browser BEAM harness).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Durable pass/fail/skip outcome lists, vitest JSON report, and a summary (before/after counts, maxAddr, browser-smoke status, harvest scope decision) for the kd-fyqz Erlang BEAM runtime smoke. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Make the Erlang/OTP 28 BEAM runtime smoke a real Node smoke instead of
artifact-only. The suite
packages/registry/erlang/test/erlang.test.tsalreadybooted BEAM on Kandelo for 4 cases, but its 5th test called an external
ringmodule that is never compiled, so
ring:start()died with{undef,[{ring,start,...}]}.This replaces the ring test with a self-contained named-fun ring driven via
-eval, so all 5 tests boot BEAM and run a real Erlang program with nocompilation step:
prints hello world,evaluates arithmetic,handles lists and pattern matching,spawns lightweight processes, andruns a ring benchmark with inter-process message passing(spawn/2 + message passing across a 50-processring, sized so the ~0.06s compute finishes well inside serve.ts's 2s
idle-exit watchdog).
demo/ring.erlanddemo/serve.tsdoc comments are corrected: they hadadvertised
ring:start()., which cannot work on-platform.Why not just compile
ring.erlon Kandelo?The on-Kandelo Erlang compiler crashes in
beam_asmbecauseerlang:md5/1returns
badargon iolist input in this wasm BEAM build (it works only on abinary), and
beam_asmcomputes each module's MD5 over an iolist of chunks.Verified directly:
erlang:md5(<<"test">>)→<<9,143,...>>;erlang:md5("abc")→
error:badarg. Filed as follow-up kd-qe2c. Until that is fixed, Erlangmodules must be precompiled on a host; the smoke therefore uses a self-contained
-evalprogram that needs no compilation.Verification
cd host && npx vitest run ../packages/registry/erlang/test/erlang.test.tsinside
scripts/dev-shell.sh→ 5 passed / 5. Outcome lists + JSON reportunder
test-runs/kd-fyqz/.max_addr = 0x3fdc0000(page16348), reserving the top of the wasm32 address space for BEAM thread
channels/TLS.
has only a Node launcher). Documented as a boundary; a browser BEAM smoke is a
candidate follow-up once the OTP runtime tree is a publishable sidecar
(kd-1mr.6 / kd-yuef).
scripts/check-abi-version.sh→ snapshot/ABI_VERSION consistent (nokernel/ABI change here).
code, so those gates are not relevant.
Notes / limitations
describe.skipIf(!hasErlang)contract: itpasses when
erlang.wasm+ theerlang-install/OTP tree are present locally,and skips otherwise. The abi release ships only
erlang.wasm, not the OTPtree, so CI/browser without a staged tree records these as skipped, not failed.
Publishing the OTP runtime tree is separate packaging work (kd-1mr.6 / kd-yuef).
erlang.rbFormula + build-erlang.sh sandbox changes from thekd-xhdd harvest are intentionally not included — they are build/Formula
concerns that overlap a divergent
erlang.rbalready on kd-p3hr's Add Homebrew formulas for language runtimes #810, andbelong to the build/publish lane, not this smoke harness.
Bead: kd-fyqz. Follow-up: kd-qe2c (erlang:md5/1 iolist badarg).
🤖 Generated with Claude Code