Skip to content

feat(sdk): establish the PP-M7 contract baseline - #49

Merged
CN059 merged 6 commits into
devfrom
agent/pp-m7-sdk-ecosystem
Aug 28, 2026
Merged

CN059 merged 6 commits into
devfrom
agent/pp-m7-sdk-ecosystem

Conversation

@CN059

@CN059 CN059 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • align Rust Widget::start and Widget::event with the existing fallible WIT widget-error contract
  • define floatile_sdk::prelude as the supported Rust author surface and migrate templates/reference fixtures
  • add versioned language-neutral lifecycle conformance vectors consumed by Rust guest tests and a real host/WASM security path
  • expose the validated suite through floatile conformance --json for future adapters, CI, and agents
  • mark PP-M7 in progress while keeping TypeScript, generated API docs, migration tooling, and broader vectors explicitly incomplete

Scope 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 -- --check
  • RUSTC_WRAPPER= cargo check --workspace --all-targets --locked
  • RUSTC_WRAPPER= cargo clippy --workspace --all-targets --locked -- -D warnings
  • RUSTC_WRAPPER= cargo test --workspace --all-targets --locked
  • RUSTC_WRAPPER= cargo check -p floatile-sdk --target wasm32-wasip2 --locked
  • RUSTC_WRAPPER= cargo deny --locked check advisories bans sources
  • SDK dependency-tree audit: no host/runtime/platform dependency
  • commit message audit: all commits contain Refs:, Tests:, and Unverified:; no Co-authored-by:

Unverified / deferred

  • TypeScript runtime and public SDK
  • generated API documentation and floatile migrate
  • broader cross-language adversarial and behavior vectors
  • Windows/macOS lifecycle conformance execution
  • registry publication and license gate

CN059 added 6 commits August 28, 2026 08:42
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
@CN059
CN059 merged commit 666aeca into dev Aug 28, 2026
4 checks passed
@CN059
CN059 deleted the agent/pp-m7-sdk-ecosystem branch August 28, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant