Repository navigation
feat(#1820): every host uses runtime.wasm's compatible lifecycle - #1824
Merged
Merged
Conversation
Implements Spec 072 (amended to 1.1.0, Decision 127): runtime-owned instance ids, ordered events, platform allowlist, canonical start input, and shutdown cleanup. The bridge stays 1.1.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts-compatible # Conflicts: # CHANGELOG.md # docs/releases/next.md
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.
Summary
Swift, Kotlin, .NET and web now run the compatible-capability lifecycle in
runtime.wasm(Decisions 127 and 128) instead of tracking instances themselves.#1822 (merged) implemented the runtime side, so this PR changes no runtime code and needs no re-pin.
RuntimeTraverseEmbedder.compatibleStartpasses the caller's input bytes into{capability_id, input}unchanged, assubmitdoes (Decision 126). This resolves Native compatibleStart re-serializes capability input #1811.canonical_inputper instance.subscribe()publishescompatible_started,compatible_stoppedandcompatible_killedas embedder-apistate_changed. The started event gets that canonical text asinput, spliced in unchanged.BundleEmbedderruns one compatible-moderuntime.wasmper compatible capability, initialized withplatforms[]and the hostplatform. The runtime owns instance ids, the allowlist and canonical input.RuntimeWasmHostgainsinitCompatibleandcompatible(operation, request).killed_compatible_instances.compatible_instance_not_activereplacesinstance_not_foundandinstance_not_running, andcompatible_instance_active,input_not_canonicalizableandinvalid_inputare new. The web test double follows the same rules.next.md.traverse-embeddercrate runs on the natively linked runtime and is out of scope. Rust traverse-embedder still runs its own compatible lifecycle (Decision 127/128) #1823 tracks it.Governing Spec
072-native-bridge-compatible-lifecycle057-embeddable-runtime-host1722-canonical-guest-input-bytes071-native-runtime-wasm-bridge1402-runtime-wasm-orchestrator-convergenceProject Item
Closes #1820 (Project 1, In Progress)
Validation
All runs below used the real
runtime.wasm(TRAVERSE_NATIVE_ARTIFACT_ROOTset to this checkout).npm test: 193 passed, 1 skipped. New tests cover:compatible("start")inputdotnet test: 51 passedtestDebugUnitTest: 0 failuresswift test, with the host xcframework built from source: 53 passedcanonicalInputVectorsReachTheWrapperThroughCompatibleStart, which runs every vector including the bytes-only duplicate-member one, andcompatibleLifecycleUsesTheRuntimeRules🤖 Generated with Claude Code