Skip to main content

MEP-66 implementation tracking

Per-phase tracking for MEP-66 Mochi+Erlang/OTP package bridge. Status values: NOT STARTED, IN PROGRESS, BLOCKED, LANDED, DEFERRED. Commit is the merge commit short SHA on main (or, for the umbrella PR, the in-branch commit on mep/0066-erlang-package).

A phase is LANDED only when its gate is green for every target in the runtime matrix. Missing surfaces become N.1, N.2, ... sub-phases per the umbrella-phase coverage rule.

Phase status

PhaseTitleStatusCommitTracking page
0Skeleton: package3/erlang/ layout + rebar3 workspace plumbingLANDED3b9fe10phase-00
1Hex.pm API v2 client (package fetch + outer/inner tarball + SHA-256/SHA-512 verify)LANDEDa0e95bephase-01
2BEAM abstract code ingest (Dbgi/Abst chunk ETF decoder, -spec/-type walker)LANDED99f463cphase-02
3EDoc XML fallback ingest (for packages with no -spec directives)LANDED445e4a0phase-03
4Dialyzer typespec-to-Mochi type mapping + SkipReport emitLANDED6b60b77phase-04
5Port bridge shim emitter (shim.erl gen_server + shim.mochi extern fn corpus)LANDED21dcdcbphase-05
6import erlang "..." grammar + parserLANDED7080e01phase-06
7Build orchestration (rebar3 compile + Port process spawn + workspace setup)LANDEDa68fe5ephase-07
8mochi.lock [[erlang-package]] integration + --check modeLANDED41faa0dphase-08
9TargetErlangPort emit (rebar3 app skeleton + mochi_port_driver.erl + priv/mochi_binary)LANDED178280dphase-09
10Hex.pm trusted publishing (OIDC flow + rebar3 hex publish)LANDEDa66f1dbphase-10
11OTP behavior bindings (gen_server call/cast, supervisor, application)LANDED42e7b50phase-11
12Async process bridge (OTP process spawn/receive/send/monitor via Mochi async)LANDEDa2f8956phase-12
13Distributed Erlang node bridge (C-node via erl_interface + dist capability)LANDEDcf49246phase-13

Per-phase fields

Each phase tracking page documents (or will document, once the phase begins):

  • Gate: the test or check that must pass for the phase to be LANDED.
  • Files to touch: the bridge-side files (Go) and emit-side files (Erlang template) the phase introduces or modifies.
  • Fixtures: which of the 20-package fixture corpus the phase validates against.
  • Skip count: the expected SkipReport count per fixture package (golden numbers).
  • Sub-phase decomposition (if needed): N.1, N.2, ... entries when an upstream constraint forces splitting.

Fixture corpus

The 20-package fixture corpus (May 2026 top-downloaded Erlang packages on Hex.pm plus representative OTP behavior, distributed systems, and data-format cases):

cowboy, ranch, hackney, gun, jsx, jose, poolboy, lager, erlware_commons, parse_trans, meck, proper, recon, observer_cli, telemetry, opentelemetry_api, prometheus.erl, gproc, cuttlefish, uuid.

Packages lager, observer_cli, and cuttlefish exercise phase 3 (EDoc XML fallback). All other packages exercise phase 2 (BEAM abstract code ingest). Each phase that touches the type-mapping or shim-emit layer asserts golden SkipReport counts against this corpus.

Runtime matrix

Phase rangeCI targetNotes
0-5OTP 25 + OTP 27 on ubuntu-latestIngest + type-mapping; no BEAM runtime needed
6-9OTP 27 on ubuntu-latestRuntime bridge; OTP 27 is primary target
6-9OTP 27 on darwin-arm64 (macos-latest)Added when Port bridge becomes testable
10OTP 27 on ubuntu-latestPublish; mock-hex harness only
11-13OTP 27 on ubuntu-latest + darwin-arm64OTP behavior + async + distributed

Implementation location

The bridge lives at package3/erlang/ in the repo root:

package3/erlang/
README.md # pointer to MEP-66 spec
errors/ # SkipReason + BridgeError (phase 0)
build/ # rebar3 workspace synth + build driver (phase 0)
etf/ # Erlang External Term Format encoder/decoder in Go (phase 0)
hexsemver/ # Hex.pm-flavoured semver parser (phase 1)
hexindex/ # Hex.pm HTTP API v2 client + content-addressed cache (phase 1)
beamingest/ # BEAM file parser + Dbgi/Abst chunk reader (phase 2)
edocingest/ # EDoc XML fallback parser (phase 3)
typemap/ # closed typespec-to-Mochi table + SkipReport (phase 4)
portemit/ # shim.erl gen_server emitter (phase 5)
externemit/ # shim.mochi extern fn/type emitter (phase 5)
port/ # Go-side Port process manager (phase 7)
cnode/ # C-node via erl_interface (phase 13)
publish/ # Hex.pm OIDC publish + rebar3 hex publish (phase 10)
target/ # TargetErlangPort rebar3 app skeleton emitter (phase 9)
otp/ # OTP behavior bindings: GenServer, Supervisor, Application (phase 11)
async/ # Async process bridge: Spawn, Send, Monitor, Mailbox (phase 12)
cnode/ # C-node: EPMD client + dist handshake + REG_SEND (phase 13)
testutil/ # mock-hex harness + BEAM test fixtures (all phases)

Status snapshot

As of 2026-05-30 01:22 (GMT+7): phases 0-13 ALL LANDED. Full bidirectional Erlang/OTP bridge implemented and merged to main.

Cross-references