Skip to content

A22: protocol is the host-ABI surface, gated by conventions goldens - #232

Merged
lannbot merged 2 commits into
mainfrom
a22-host-abi-surface
Aug 23, 2026
Merged

A22: protocol is the host-ABI surface, gated by conventions goldens#232
lannbot merged 2 commits into
mainfrom
a22-host-abi-surface

Conversation

@lannbot

@lannbot lannbot commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

What

contracts/embedder-api.md amendment A22 — decouples host-provider packages (polymorph-webcrypto et al.) from engine releases that do not touch the interfaces they use.

  • @polyengine/protocol gains the handle vocabulary as executable structural interfaces (Stream, StreamWriter, Future, ErrorContext + aux types), brand predicates (isStream/isStreamWriter/isFuture/isErrorContext), and the polyengine.streamWriter/1 brand. Compatible additions; protocol 0.2.1 -> 0.2.2 (patch — no breaking/protocol label, no golden M/D).
  • @polyengine/runtime/embedder is application-only: A9 courtesy re-exports and the concrete handle classes removed; createStream() is the app-surface stream-pair factory (the Stream.create() spelling retired). Bindgen emits protocol imports for vocabulary; the release-bundle surface shrinks to match.
  • wasi is protocol-only (instanceof StreamisStream brand checks), dissolving the module-identity mapping constraint consumer configs carried for it.
  • Conventions regression suite (runtime/tests/conventions/, 32 transcript goldens, byte-stable across POLYENGINE_SCHED_SEED reruns) pins host-facing lift/lower behavior. Golden M/D requires breaking/protocol (escape: conventions-fix), enforced by version-guard in pr mode and authoritatively at cut time — so protocol's version line is the host ABI version.

Breaking

breaking/runtime: removed embedder exports. Lockstep 0.4.1 → 0.5.0 (+ RUNTIME_VERSION). Host modules and apps import vocabulary from @polyengine/protocol; a two-line import diff for migrated consumers, folded into the deltic→polyengine step for the rest. wasi's published surface is unchanged (types now spelled against protocol's structural interfaces).

Gates

Full just gates green locally, including conformance, sched-seeds (both seeds), shells, browsers, smoke-tls, smoke-c0, test-npm.

Contract-text follow-ups already folded in: createStream reachability (the suite found Stream.create stranded by the class removal) and the A16 deferred-future lowering window now named in §"Streams and futures".

Decouples host-provider packages from engine releases that do not touch
the interfaces they use (contracts/embedder-api.md amendment A22):

- @polyengine/protocol gains the handle vocabulary as executable
  structural interfaces (Stream, StreamWriter, Future, ErrorContext +
  aux types) with brand predicates (isStream/isStreamWriter/isFuture/
  isErrorContext) and the polyengine.streamWriter/1 brand.
- @polyengine/runtime/embedder is application-only: the A9 courtesy
  re-exports and the concrete handle classes are removed; createStream()
  replaces the Stream.create() spelling as the app-surface stream-pair
  factory. Bindgen emits protocol imports for vocabulary; the release
  bundle shrinks accordingly.
- wasi goes protocol-only (its instanceof Stream sites become isStream
  brand checks), dissolving the module-identity mapping constraint
  consumer configs carried for it.
- New conventions regression suite (runtime/tests/conventions/, 32
  transcript goldens, deterministic across sched seeds) pins the
  host-facing lift/lower behavior; version-guard gates golden M/D on
  breaking/protocol (or the conventions-fix escape) in pr mode and
  authoritatively at cut time.

Lockstep manifests 0.4.1 -> 0.5.0 (breaking/runtime); protocol additions
are compatible and ride 0.2.1.
@lannbot lannbot added the breaking/runtime Breaks @polyengine/runtime published surface (caret-incompatible): minor must bump this cycle label Aug 23, 2026
@lannbot
lannbot enabled auto-merge August 23, 2026 02:04
@lannbot
lannbot merged commit 8e6bc68 into main Aug 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking/runtime Breaks @polyengine/runtime published surface (caret-incompatible): minor must bump this cycle

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants