A22: protocol is the host-ABI surface, gated by conventions goldens - #232
Merged
Conversation
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
enabled auto-merge
August 23, 2026 02:04
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
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.
Stream,StreamWriter,Future,ErrorContext+ aux types), brand predicates (isStream/isStreamWriter/isFuture/isErrorContext), and thepolyengine.streamWriter/1brand. Compatible additions; protocol 0.2.1 -> 0.2.2 (patch — no breaking/protocol label, no golden M/D).createStream()is the app-surface stream-pair factory (theStream.create()spelling retired). Bindgen emits protocol imports for vocabulary; the release-bundle surface shrinks to match.instanceof Stream→isStreambrand checks), dissolving the module-identity mapping constraint consumer configs carried for it.runtime/tests/conventions/, 32 transcript goldens, byte-stable across POLYENGINE_SCHED_SEED reruns) pins host-facing lift/lower behavior. Golden M/D requiresbreaking/protocol(escape:conventions-fix), enforced by version-guard inprmode 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 gatesgreen locally, including conformance, sched-seeds (both seeds), shells, browsers, smoke-tls, smoke-c0, test-npm.Contract-text follow-ups already folded in:
createStreamreachability (the suite foundStream.createstranded by the class removal) and the A16 deferred-future lowering window now named in §"Streams and futures".