ADR 0151 evidence: what was run, on which versions

Supporting record for ADR 0151. It lists every experiment behind a factual claim in the ADR, the result, and what was not verified. Same role as 0075-gate-evaluation.html for ADR 0075.

Nothing here is a test in the repo. These are one-off probes run in a scratch directory on 2026-11-16. Timings are single runs on a shared cloud container, so read them as orders of magnitude, not benchmarks.

Environment

ComponentVersion
Beamtalkbeamtalk 0.5.0-edge+02378f0 (2026-11-16) (installed edge build)
Erlang/OTP28.5 (ERTS 16.4)
Elixir1.20.1, compiled with OTP 28
Mix1.20.1
Hex (Mix archive)2.7.0 (installed with mix local.hex --force)
rebar33.27.0 (system) and the repo's runtime/tools/rebar3, also 3.27.0
rebar_mix plugin0.5.1, fetched by rebar3 from Hex
OSLinux 6.18 (cloud container)
Hex accessthrough the container's Hex mirror (HEX_MIRROR); repo.hex.pm answered 200

Only one Elixir version and one OTP version were available. Everything about running several Elixir versions is unverified (see the last section).

The probes used a project made with beamtalk new probe --app, with ERL_LIBS pointing at the Elixir lib/ directory (and at the Mix build output where a library was involved). beamtalk run Main run ran each probe. Probe code called Elixir through Erlang erlang apply:with:with:, because the Elixir global does not exist yet.

E1. Baseline: what works today

#ProbeResult
E1aErlang erlang apply: #'Elixir.Enum' with: #sum with: #(#(1, 2, 3)), no Elixir on the code pathUndefined function: Elixir.Enum:sum/1 (a clean does_not_understand)
E1bSame, with ERL_LIBS=<elixir>/lib6
E1cEnum.map with block [:x | x * 10]#(10, 20, 30)
E1dString.upcase("hello"), String.valid?, String.split/1,2,3 (with {#parts, 2}), Enum.join/2all answered as expected
E1eMap.get(map, :b) where the key is absentnil
E1fErlang perform: #'Elixir.Enum'Erlang does not understand 'Elixir.Enum'
E1gErlang Enum sum: #(1, 2) (uppercase unary after Erlang), beamtalk checkparses; reports Unknown Erlang module 'Enum' in FFI call, so the parser already accepts X Enum as a unary send

:code.lib_dir(:elixir) is not resolvable without Elixir on the path ({error, bad_name}). Locating it with elixir -e 'IO.puts(:code.lib_dir(:elixir))' takes about 0.35 s per call here (three runs: 0.34 to 0.39 s; a bare erl -noshell takes 0.25 to 0.27 s).

E2. Value boundary probes

Run through erlang:apply/3, so every argument was inside a list.

ProbeResultReading
Enum.join(["a","b"]) (Strings)Protocol.UndefinedError for String.Chars on {beamtalk_string, <<"a">>}, reported as runtime_errorNested String reaches Elixir tagged. The BT-4866 retry does not fire: this is not function_clause.
Jason.encode!(%{"a" => "b"})Protocol.UndefinedError for String.Chars on the tagged StringSame cause
Jason.encode!(["x","y"])Protocol.UndefinedError for Jason.Encoder on the tupleSame cause
Exception.message(ArgumentError.exception(message: "boom"))the message is the printed tagged tuple, with no errorSilent corruption: the struct was built with a tagged String inside it
Req.get!("http://127.0.0.1:8765/")ArgumentError: expected 1st argument to be a url ... got: {:beamtalk_string, ...}Through apply: even the URL is nested in the argument list, so the top-level unwrap never runs
Same, URL made raw with Erlang unicode characters_to_binary:200The rest of the stack works
Jason.decode!("{\"a\":1}") at: "a"key_error: key not found: {beamtalk_string, <<"a">>}Decoded keys are raw binaries (class Binary); a Beamtalk String key is tagged
class of String.upcase("hello") resultBinaryElixir text comes back as Binary, as for any Erlang library
Integer.parse("42abc") / Integer.parse("abc"){42, "abc"} / Result error: nilbare :error is coerced to Result error: nil
File.read("/nonexistent")Result error: enoentADR 0076 coercion works on Elixir returns
Enumerable.count(#(1, 2)), String.Chars.to_string(42), Kernel.inspect(%{a: 1})Result ok: 2, "42", "%{a: 1}"Protocol functions are callable; {:ok, n} becomes a Result
URI.parse(...)#{#__struct__ => #Elixir.URI, #host => "x.com", ...}, class Dictionary, at: #host worksStructs arrive as plain maps
Kernel.struct(URI, [host: "x.com"])a URI struct mapStructs can be built from Beamtalk with a plain function
File.read!("/nonexistent")runtime_error, message = the raw printed struct #{reason => enoent, path => ..., '__struct__' => 'Elixir.File.Error', ...}Exceptions reach Beamtalk as error:Struct and are not mapped
Enum.fetch!([1], 5)runtime_error, message = raw printed Enum.OutOfBoundsError structsame
Map.fetch!(%{a: 1}, :zz)key_error: ErlangModule>>apply: key not found: zzOne struct happens to be classified by the existing generic wrapper
Exception.message(%File.Error{reason: :enoent, action: "read file", path: "/x"}) run in plain Elixircould not read file "/x": no such file or directoryThe text a mapping would use is available
Logger.info("hi")Undefined function: Elixir.Logger:info/1A macro is a clean undef; the message says nothing about macros
Kernel.is_nil(nil)Undefined function: Elixir.Kernel:is_nil/1same
String.to_charlist("hi")"hi"A charlist result is coerced to a String
Enum.map([1,2,3], fn x -> x + 64 end)"ABC", class StringHazard: stock-mode result coercion turns a printable integer list into a String. Erlang lists seq: 65 with: 70 answers "ABCDEF" today, so this is existing behaviour that Elixir code would hit far more often.

E3. Req end to end

Built with Mix (E6), ERL_LIBS=<elixir>/lib:<mix _build>/prod/lib, ELIXIR_ERL_OPTIONS=+fnu, a local python3 -m http.server on 127.0.0.1:

E4. Today's rebar3 path

[native.dependencies] jason = "~> 1.4" in beamtalk.toml, beamtalk build:

===> Fetching jason v1.4.5
===> Compiling jason
===> Error building application jason:
     No project builder is configured for type mix

E5. rebar_mix

A rebar3 project with {plugins, [rebar_mix]}:

ProjectResultTime (one run)
{deps, [{jason, "~> 1.4"}]}built; _b/default/lib/jason/ebin has 29 beams; decimal also present12 s
{deps, [{req, "~> 0.5"}]}built; 16 directories in lib/1 m 56 s
jason with Elixir absenterror: missing_elixir, shown only as Failed creating providers; the details are in rebar3.crashdumpn/a

For the Req build, rebar.lock listed 9 packages (finch, hpax, jason, mime, mint, nimble_options, nimble_pool, req, telemetry). The lib/ directory also held brotli, castore, decimal, nimble_csv, plug, plug_crypto: six packages not in rebar.lock. They came from mix deps.get run by the plugin inside each dependency's own directory. In the Jason build that run also fetched Jason's development dependencies (ex_doc, dialyxir, stream_data, and others) into jason/deps. Reading the plugin source (rebar_mix_utils.erl): it finds Elixir by running elixir -e on PATH, and runs mix deps.get then mix compile with MIX_ENV=prod in each Mix dependency.

The "Elixir absent" run needed the real Erlang install and the repo's bundled rebar3 under env -i, because the container's mise erl shim prepends Elixir to PATH. An earlier attempt with an edited PATH was invalid for that reason and is not counted.

E6. Mix driven directly

A generated-style mix.exs (deps: [{:jason, "~> 1.4"}, {:req, "~> 0.5"}], MIX_ENV=prod):

StepResultTime
mix deps.get9 packages resolved and fetched: finch, hpax, jason, mime, mint, nimble_options, nimble_pool, req, telemetry5.5 s
mix deps.compileall compiled to _build/prod/lib/<app>/ebin; telemetry (a rebar3 package) built too8.3 s
mix compileproduces _build/prod/lib/<project>/consolidated/ with 8 protocol beams (Collectable, Enumerable, IEx.Info, Inspect, JSON.Encoder, Jason.Encoder, List.Chars, String.Chars)n/a

mix.lock records, per package, version, inner and outer checksum, build tool ([:mix] or [:rebar3]) and requirements, for the whole transitive closure. beamtalk.lock already records version, checksum and outer checksum for native packages.

Not checked: which rebar3 Mix used to build telemetry.

A 24-library mix.exs (the audit set below) resolved to 53 locked packages in one run: mix deps.get, 20 s. It also included the Erlang packages cowboy, ranch and telemetry.

E7. Protocol consolidation

Jason.encode! of a 200-key map x 3000 and Enum.map/sum over 50,000 elements x 200, with and without the consolidated directory on the path:

Jason encodeEnum map/sum
unconsolidated400 ms127 ms
consolidated370 ms117 ms

One run each, plain elixir, not through Beamtalk. Unconsolidated dispatch is functionally correct (every earlier probe ran unconsolidated). The difference is about 7% here.

E8. Releases (ADR 0125)

Hand-built .rel with kernel, stdlib, sasl, compiler, elixir, logger, jason, using the staging rule from ADR 0125 §1.3:

E9. Specs

ModuleSpecs readFully Dynamic (all params and return)
Elixir.Jason7not counted
Elixir.Req220
Elixir.URI200
Elixir.String560
Elixir.Enum954

Sample mappings: Req.get/2 takes a URI-struct map, String, Binary, List(Tuple(Symbol, Dynamic)) or Dynamic, then a keyword list, and answers Result(Dynamic, Exception); String.upcase/2 is (String | Binary, #default | #ascii | #greek | #turkic) -> String | Binary; Enum.map/2 is (Dynamic, Block) -> List; URI.encode_query/2 is (Dynamic, #rfc3986 | #www_form) -> String | Binary. Parameter names come out as arg, because Elixir specs carry no parameter names.

E10. Macro and function audit

24 libraries from one mix.exs (MIX_ENV=prod, all compiled; exit 0): req 0.7.5, finch 0.24.0, mint 1.11.0, jason 1.4.5, decimal 2.4.1, nimble_options 1.2.0, swoosh 1.29.3, broadway 1.3.1, nx 0.13.1, explorer 0.11.1, plug 1.20.3, bandit 1.14.1, phoenix_pubsub 2.4.1, oban 2.24.2, cachex 4.1.1, floki 0.38.5, ecto 3.13.6, nimble_parsec 1.4.2, phoenix 1.8.16, telemetry_metrics 1.2.0, gen_stage 1.3.2, timex 3.7.13, earmark 1.4.49, cowboy 2.21.0. (Elixir 1.20's compiler printed type warnings for several of these while compiling them; they did not stop the build.)

For each entry module the script counts documented, non-hidden public functions and macros from the Docs chunk, the behaviour callbacks, and whether use Module exists. The script:

public = fn mod ->
  case Code.fetch_docs(mod) do
    {:docs_v1, _, _, _, moduledoc, _, docs} ->
      if moduledoc == :hidden do
        {:hidden, [], []}
      else
        f = for {{:function, n, a}, _, _, d, _} <- docs, d != :hidden, do: "#{n}/#{a}"
        m = for {{:macro, n, a}, _, _, d, _} <- docs, d != :hidden, do: "#{n}/#{a}"
        {:ok, f, m}
      end
    _ -> {:nodocs, [], []}
  end
end
# per entry module: length(f), length(m), length(mod.behaviour_info(:callbacks)),
# and macros(mod) has :__using__ (hidden or not): `Keyword.has_key?(mod.__info__(:macros), :__using__)`
LibraryEntry modulePublic functionsPublic macrosCallbacksuse macroMacros (sample)
reqReq2300no
reqReq.Request3000no
reqReq.Response1000no
finchFinch1620nois_finch_error/1, is_request_ref/1 (guards)
mintMint.HTTP1810nois_connection_message/2 (guard)
jasonJason600no
decimalDecimal4210nois_decimal/1 (guard)
nimble_optionsNimbleOptions500no
swooshSwoosh.Email1700no
swooshSwoosh.Mailer200yesdeliver/2 is a function
broadwayBroadway1006yes
nxNx21230nois_tensor/1, sigil_MAT/2, sigil_VEC/2
nxNx.Defn1560nodefn/2, defnp/2, deftransform/1,2, ...
explorerExplorer.DataFrame10240nofilter/2, mutate/3, sort_by/3, summarise/2
explorerExplorer.Series15930nofilter/2, map/2, sort_by/3
plugPlug.Conn5200no
plugPlug.Builder120yesbuilder_opts/0, plug/2
plugPlug.Router190yesget/3, post, match/3, forward/2, ...
banditBandit100no
phoenix_pubsubPhoenix.PubSub2200no
obanOban2610yes
cachexCachex3800no
flokiFloki1710nois_html_node/1 (guard)
ectoEcto.Query10280nofrom/2, distinct/3, dynamic/2, ...
ectoEcto.Changeset5000no
ectoEcto.Repo1043yes
ectoEcto.Multi2100no
nimble_parsecNimbleParsec3740nodefparsec/3, defcombinator/3, ...
phoenixPhoenix.Router4200yesget/4, forward/4, ...
phoenixPhoenix.Endpoint1121yes
phoenixPhoenix.Controller4310yes
telemetry_metricsTelemetry.Metrics500no
gen_stageGenStage19012yes
timexTimex9600no
earmarkEarmark800no
(Elixir)Logger28100noinfo/2, error/2, debug/2, ...
(Elixir)Kernel82640nois_nil/1, &&/2, ...
(Elixir)Enum8900no

Follow-ups, same session:

E11. Function-name collisions for a suffix scheme

Over the 23 listed libraries (all of E10 except cowboy, an Erlang package) plus the Elixir standard library (elixir application), 1,308 modules and 3,847 distinct exported function names:

Name shapeCount
ends in ?162
ends in !254
ends in _bang0
ends in _question0
ends in _p1 (mkdir_p)
starts with an uppercase letter0
outside [a-z_][a-zA-Z0-9_]*[?!]?&&&, <<<, >>>, ^^^, |||, ~~~, !=, !== (operators)

Not run, or not verified

  1. A second Elixir version. A prebuilt Elixir 1.18.4 download and run was blocked by the session's permission check and was not retried by any other route. So "beams compiled by Elixir X load on Elixir Y" is not tested. The OTP-range table in the ADR comes from the official compatibility page (fetched 2026-11-16), not from a run.
  2. A second OTP version. Everything ran on OTP 28.
  3. Windows and macOS. Linux only. ADR 0027 puts Windows in tier 1; the elixir and mix launchers on Windows are a .bat, which was not looked at.
  4. The Elixir global, the elixir coercion mode, name mapping, error mapping and the Mix build step are designs. No compiler or runtime code was changed; the probes use only what exists today.
  5. Rebuilding mix.lock from beamtalk.lock (the lock round trip) was not tried.
  6. Which rebar3 Mix uses for Erlang packages was not checked.
  7. Effect of starting Elixir's logger application on Beamtalk's OTP logging, and the memory and boot-time cost of loading elixir, were not measured.
  8. Explorer's NIF, Nx backends, Swoosh delivery and Broadway were not run; only their API shape was audited.
  9. +fnu: shown to silence the Elixir warning when passed through ELIXIR_ERL_OPTIONS; its effect on Beamtalk's own file-name handling was not checked.
  10. Offline and private Hex use: the probes used the container's Hex mirror. Behaviour with HEX_MIRROR unset, private repos, or no network was not tested.