feat(sdk): establish the PP-M7 contract baseline - #49
Merged
Merged
Conversation
Align the Rust author trait with the existing WIT widget-error result so start and event callbacks can report business rejections without being swallowed or misclassified as runtime traps. Update templates and reference fixtures, and prove both callback paths preserve rejection semantics while the host remains alive. Refs: PP-M7, FR-PLUGIN-01, F11, NFR-MAINT-01 Tests: cargo fmt --all -- --check; RUSTC_WRAPPER= cargo check --workspace --all-targets --locked; RUSTC_WRAPPER= cargo test -p floatile-sdk --locked; RUSTC_WRAPPER= cargo test -p floatile-runtime --test security sdk_lifecycle_errors_reach_the_host_as_rejections --locked; RUSTC_WRAPPER= cargo check -p floatile-sdk --target wasm32-wasip2 --locked; RUSTC_WRAPPER= cargo test -p floatile-cli project --locked; RUSTC_WRAPPER= cargo test -p floatile-cli --test sdk_package generated_project_resolves_only_packaged_sdk_sources --locked Unverified: lifecycle rejection rendering in the interactive shell on Windows, macOS, X11, and Wayland
Introduce a deliberate author-facing import surface separate from raw generated WIT modules. Migrate the project template and reference fixtures to consume it, and add an external API test that compiles the complete Widget, State, View, event, and lifecycle result contract. Refs: PP-M7, FR-PLUGIN-01, NFR-MAINT-01 Tests: cargo fmt --all -- --check; RUSTC_WRAPPER= cargo check --workspace --all-targets --locked; RUSTC_WRAPPER= cargo test -p floatile-sdk --locked; RUSTC_WRAPPER= cargo test -p floatile-cli --lib project::tests --locked; RUSTC_WRAPPER= cargo check -p floatile-sdk --target wasm32-wasip2 --locked; RUSTC_WRAPPER= cargo test -p floatile-cli --test sdk_package generated_project_resolves_only_packaged_sdk_sources --locked Unverified: public registry publication remains blocked by the licensing ADR; downstream third-party source compatibility is not yet measurable before an SDK release
Establish a language-neutral, versioned JSON suite for every WIT widget-error variant. Validate the suite against the Rust guest bindings, execute it through a real WASM Component in the host runtime, and retain the host-survival assertion so future language adapters must match the same semantics instead of copying Rust expectations. Refs: PP-M7, FR-PLUGIN-01, F11, F12, NFR-MAINT-01 Tests: cargo fmt --all -- --check; RUSTC_WRAPPER= cargo check --workspace --all-targets --locked; RUSTC_WRAPPER= cargo test -p floatile-sdk --test conformance --locked; RUSTC_WRAPPER= cargo test -p floatile-runtime --test security sdk_lifecycle_errors_reach_the_host_as_rejections --locked; RUSTC_WRAPPER= cargo check -p floatile-sdk --target wasm32-wasip2 --locked Unverified: TypeScript adapter consumption remains blocked by ADR-0003; lifecycle vectors have not been executed on Windows or macOS hosts
Add a stable author command that validates and emits the embedded language-neutral lifecycle suite for adapters, CI, and agents. Preserve the existing automation flags, schema v1 output, exit-code rules, and bounded public diagnostics so consumers do not depend on repository paths or Rust-only tests. Refs: PP-M7, FR-PLUGIN-01, F11, NFR-MAINT-01 Tests: cargo fmt --all -- --check; RUSTC_WRAPPER= cargo check --workspace --all-targets --locked; RUSTC_WRAPPER= cargo test -p floatile-cli --test conformance_cmd --locked; RUSTC_WRAPPER= cargo test -p floatile-cli --lib conformance::tests --locked Unverified: consumption by a production TypeScript adapter remains blocked by ADR-0003
Mark PP-M7 as in progress and record the implemented Rust lifecycle, author prelude, shared conformance vectors, and CLI surface. Keep generated documentation, migration tooling, broader adversarial vectors, TypeScript, and the milestone exit gate explicitly incomplete. Refs: PP-M7, FR-PLUGIN-01, F11, NFR-MAINT-01, ADR-0003 Tests: cargo fmt --all -- --check; git diff --check Unverified: TypeScript runtime and SDK, generated API documentation, migrate command, full cross-language adversarial vectors, Windows and macOS conformance execution
Return the embedded-suite validation error from the unit test instead of using an expect panic, preserving the workspace rule that recoverable Result values remain explicit under the all-target clippy gate. Refs: PP-M7, NFR-MAINT-01 Tests: cargo fmt --all -- --check; RUSTC_WRAPPER= cargo clippy -p floatile-cli --all-targets --locked -- -D warnings; RUSTC_WRAPPER= cargo test -p floatile-cli --lib conformance::tests --locked Unverified: none
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
Widget::startandWidget::eventwith the existing fallible WITwidget-errorcontractfloatile_sdk::preludeas the supported Rust author surface and migrate templates/reference fixturesfloatile conformance --jsonfor future adapters, CI, and agentsScope and boundaries
Refs: PP-M7, FR-PLUGIN-01, F11, F12, NFR-MAINT-01, ADR-0003
This PR establishes the first PP-M7 vertical slice. It does not claim the PP-M7 exit gate: the production TypeScript runtime/SDK remains blocked by ADR-0003, and public SDK distribution remains blocked by the licensing ADR. No WIT, permission, platform, persistence, or release behavior is changed.
Verification
cargo fmt --all -- --checkRUSTC_WRAPPER= cargo check --workspace --all-targets --lockedRUSTC_WRAPPER= cargo clippy --workspace --all-targets --locked -- -D warningsRUSTC_WRAPPER= cargo test --workspace --all-targets --lockedRUSTC_WRAPPER= cargo check -p floatile-sdk --target wasm32-wasip2 --lockedRUSTC_WRAPPER= cargo deny --locked check advisories bans sourcesRefs:,Tests:, andUnverified:; noCo-authored-by:Unverified / deferred
floatile migrate