Repository navigation
Admit WASI TCP/UDP/DNS components with host API compatibility checks - #209
Merged
Merged
Conversation
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.
Components importing ordinary WASI TCP, UDP or DNS currently fail admission. Accept
wasi:socketsand disclose its network reach, while requiring the importing app to declarehost_api.required: {"wasm.sockets": 1}plus the existinghost-api-v1feature. This applies to bundled functions, catalog shared components and system-bundled components.Use the existing extensible host API map instead of a new manifest feature: RC5's catalog reader rejects an entire catalog containing an unknown
requiresfeature. Older hosts can read these entries and refuse the socket app before installation. Shared-component installation checks availability before download, validates the importing app's requirement even for cached components, and rechecks availability on launch. Missingnetusage declarations warn and do not become execution gates.For socket cancellation to remain valid when an app closes and reopens, host requests now carry a unique identity token. An old
Repliercannot become pending again or consume a replacement request when both heap address and request number are reused. Completion/timeout queueing is synchronized with close, and response delivery rechecks its deadline after serialization.Updated publishing/host API/shared-component documentation in English and Chinese. No contract version/schema change, catalog publication, release, or runtime-support claim for RC5. The OctoSense runtime and App Flow authoring changes are coordinated separately; the host must advertise
wasm.sockets@1only when its bounded WASI sockets implementation is available.Validation on macOS Apple silicon:
cargo test --locked -p octosense-app-contract -p octosense-app-policy -p octosense-app-hub: 335 passed across 27 suites, zero failures/skips.hub component-infoinspected the existing netprobe Wasm fixture and reported all seven standard socket interfaces.cargo test --locked -p octosense-appstore --no-default-features --lib services::tests: 18 passed, including reuse after close, timeout and prior completion.git diff --checkpassed.Consumers: OctoSense #484 and App Flow #187 pin final head
c317f787. The coordinated host passed its macOS runtime/shell checks and 11 standalone runtime tests on OnePlus 6; released RC5 remains unchanged.