Skip to content

feat(plugin-platform): complete PP-M5 external data platform - #47

Merged
CN059 merged 18 commits into
devfrom
agent/pp-m5-connections
Aug 27, 2026
Merged

CN059 merged 18 commits into
devfrom
agent/pp-m5-connections

Conversation

@CN059

@CN059 CN059 commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

  • add host-owned Connection and opaque CredentialRef persistence with instance-scoped grants and health generations
  • add a non-enumerable session Credential Vault and connection-bound HTTPS operation contract across WIT, SDK, runtime, services, and shell
  • enforce exact HTTPS origins, DNS/SSRF defenses, credential injection, rate limits, bounded cache/retry/backoff, and connection health behavior
  • add the generic AI balance reference plugin and secret-leakage package checks
  • wire persistent shell instances to HTTPS services composed only from their explicit Connection grants
  • record ADR-0005 and mark PP-M5 complete in the plugin platform roadmap

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 (passed before final shell composition commit)
  • RUSTC_WRAPPER= cargo test -p floatile-shell --lib --locked instance_supervisor
  • RUSTC_WRAPPER= cargo check -p floatile-sdk --target wasm32-wasip2 --locked
  • wasm-tools validate for the clock and AI balance fixtures
  • RUSTC_WRAPPER= cargo deny --locked check advisories bans sources

The final repeated workspace test reached the shell test-binary link stage without failure output but was stopped after several minutes; the focused post-change shell test passed, and remote CI independently reruns the full matrix.

Unverified / follow-up

  • platform Keyring persistence and live-provider network evidence
  • macOS, Windows, Wayland, and real-desktop interaction evidence
  • public distribution remains blocked by the repository license gate

Refs: PP-M5

CN059 added 18 commits August 27, 2026 12:39
Introduce validated Connection and opaque CredentialRef domain types plus the append-only SQLite v5 model for instance-scoped grants. Shared connections survive instance deletion, credential rotation advances generation, and the database never stores secret material.

Refs: PP-M5, PP-G2, PP-G3, PP-G6
Tests: cargo fmt --all -- --check; RUSTC_WRAPPER= cargo test -p floatile-core -p floatile-store --locked; RUSTC_WRAPPER= cargo clippy -p floatile-core -p floatile-store --all-targets --locked -- -D warnings
Unverified: platform credential vault integration and HTTPS execution are intentionally deferred to the next PP-M5 slices
Add a bounded, non-enumerable CredentialVault interface and an explicit in-memory session implementation for Broker composition and deterministic tests. Secret bytes cannot be cloned, serialized, or formatted and are cleared when replaced or deleted; persistent platform Keyring support remains explicit future work.

Refs: PP-M5, PP-G2, PP-G3
Tests: cargo fmt --all; RUSTC_WRAPPER= cargo test -p floatile-services --locked; RUSTC_WRAPPER= cargo clippy -p floatile-services --all-targets --locked -- -D warnings
Unverified: persistent OS Keyring integration on Linux, Windows, and macOS
Resolve the irreversible PP-M5 contract choices before changing manifest and WIT: use a fixed network:https capability with origin scope, optional static manifest templates, host-only credential injection, and typed brokered operations with redirects disabled initially.

Refs: PP-M5, PP-G1, PP-G2, PP-G3, PP-G4, PP-G5, ADR-0005
Tests: git diff --check
Unverified: production DNS pinning, platform Keyring integration, and live HTTPS transport remain implementation work
Add the network:https registry entry, bounded static request templates, and the typed host-http WIT surface. Keep unconfigured runtime instances fail-closed through PermissionBroker while the executor is introduced in the next slice.

Refs: PP-M5, ADR-0005
Tests: RUSTC_WRAPPER= cargo test -p floatile-core; RUSTC_WRAPPER= cargo test -p floatile-cli -p floatile-services -p floatile-runtime --lib; RUSTC_WRAPPER= cargo check --workspace --all-targets
Unverified: live HTTPS transport and platform credential persistence are not part of this contract slice.
Build requests only from validated templates and instance-scoped Connection bindings, inject credentials inside the host, pin DNS to public addresses, disable redirects, and enforce response budgets. Expose an explicit runtime injection point while preserving fail-closed behavior when no service is configured.

Refs: PP-M5, ADR-0005
Tests: RUSTC_WRAPPER= cargo test -p floatile-services -p floatile-runtime --lib; RUSTC_WRAPPER= cargo clippy -p floatile-services -p floatile-runtime --all-targets -- -D warnings
Unverified: live provider integration and platform Keyring persistence.
Add per-instance rate limiting, generation-scoped caching, stale-on-error, bounded transient retries, and Connection health observations. Wire the author SDK and shell composition boundary, then add a generic AI balance monitor whose package evidence rejects credential markers.

Refs: PP-M5, ADR-0005
Tests: RUSTC_WRAPPER= cargo test -p floatile-core -p floatile-services -p floatile-store; RUSTC_WRAPPER= cargo test -p floatile-cli --test ai_balance; RUSTC_WRAPPER= cargo build -p floatile-ai-balance-wasm --target wasm32-wasip2; RUSTC_WRAPPER= cargo check --workspace --all-targets; RUSTC_WRAPPER= cargo clippy --workspace --all-targets -- -D warnings
Unverified: live provider response and persistent platform Keyring require environment-specific evidence.
Make runtime and shell integration fixtures run Cargo's incremental build before reading wasm bytes, with one build per test binary. This prevents stale WIT 1.1 components from being reused against the WIT 1.2 host.

Refs: PP-M5, PP-G5
Tests: RUSTC_WRAPPER= cargo test -p floatile-runtime --tests --locked; RUSTC_WRAPPER= cargo clippy -p floatile-runtime -p floatile-shell --all-targets --locked -- -D warnings
Unverified: Xvfb-only shell evidence remains environment-gated.
Wire each persistent instance to an HTTPS service composed from only its explicit Connection grants and the process-owned Credential Vault. Mark PP-M5 complete after the automated contract and workspace evidence passes.\n\nRefs: PP-M5\nTests: cargo check -p floatile-shell --all-targets --locked; cargo test -p floatile-shell --lib --locked instance_supervisor\nUnverified: platform Keyring integration and live provider network evidence
Keep the epoch wall-clock boundary finite while raising the default guest-call budget from two to five seconds. This accommodates WIT 1.2 component startup on loaded Windows runners without weakening the explicit 25 ms malicious-loop regression.\n\nRefs: PP-M5, PP-G5\nTests: cargo fmt --all -- --check; RUSTC_WRAPPER= cargo test -p floatile-runtime --test security --locked infinite_loop_is_wall_clock_timed_out_and_peer_survives; RUSTC_WRAPPER= cargo test -p floatile-cli --test test_cmd --locked\nUnverified: Windows behavior pending PR CI rerun
Prevent the two headless CLI author tests from concurrently rebuilding and consuming the same clock release artifact. Windows file replacement semantics made both actors receive an unusable component; keep the production two-second runtime boundary unchanged.\n\nRefs: PP-M5, PP-G5\nTests: cargo fmt --all -- --check; RUSTC_WRAPPER= cargo test -p floatile-cli --test test_cmd --locked; RUSTC_WRAPPER= cargo clippy -p floatile-cli --test test_cmd --locked -- -D warnings\nUnverified: Windows behavior pending PR CI rerun
Retain a redacted RuntimeError when an instance actor exits during setup or construction so start/event callers receive the actionable cause instead of a closed-channel placeholder. Let serialized author tests continue after a failed case without poisoning the shared build lock.\n\nRefs: PP-M5, PP-G5\nTests: cargo fmt --all -- --check; RUSTC_WRAPPER= cargo test -p floatile-runtime --tests --locked; RUSTC_WRAPPER= cargo test -p floatile-cli --test test_cmd --locked; RUSTC_WRAPPER= cargo clippy -p floatile-runtime -p floatile-cli --all-targets --locked -- -D warnings\nUnverified: underlying Windows setup failure pending PR CI diagnostic
Preserve the underlying actor setup or call error when command-channel closure wakes a caller before the task wrapper records its result.

Refs: PP-M5

Tests: cargo fmt --all -- --check; cargo test -p floatile-runtime; cargo test -p floatile-cli --test test_cmd; cargo clippy -p floatile-runtime -p floatile-cli --all-targets -- -D warnings

Unverified: Windows CI reproduction pending
Observe the actor in a nested task so panic and cancellation JoinErrors cross the runtime boundary as stable instance failures instead of closing the command channel without a cause.

Refs: PP-M5

Tests: cargo fmt --all -- --check; cargo test -p floatile-runtime; cargo test -p floatile-cli --test test_cmd; cargo clippy -p floatile-runtime -p floatile-cli --all-targets -- -D warnings

Unverified: Windows CI reproduction pending
Replace scheduler-dependent polling with a watch channel so command-channel closure waits for the actor task result and reliably preserves setup or panic details on every platform.

Refs: PP-M5

Tests: cargo fmt --all -- --check; cargo test -p floatile-runtime; cargo test -p floatile-cli --test test_cmd; cargo clippy -p floatile-runtime -p floatile-cli --all-targets -- -D warnings

Unverified: Windows CI reproduction pending
Render Wasmtime errors with their complete cause chain so constructor and lifecycle failures report the underlying guest panic, fuel, epoch, or canonical ABI cause instead of only a wasm backtrace.

Refs: PP-M5

Tests: cargo fmt --all -- --check; cargo test -p floatile-runtime; cargo test -p floatile-cli --test test_cmd; cargo clippy -p floatile-runtime -p floatile-cli --all-targets -- -D warnings

Unverified: Windows CI reproduction pending
Temporarily retain DWARF and names for the PP-M5 reference clock release artifact so the Windows-only constructor abort can be mapped to its source frame. This evidence setting will be removed after diagnosis.

Refs: PP-M5

Tests: cargo build -p floatile-clock-wasm --release --target wasm32-wasip2; wasm-tools validate target/wasm32-wasip2/release/floatile_clock_wasm.wasm; wasm-tools addr2line target/wasm32-wasip2/release/floatile_clock_wasm.wasm 0xcff5

Unverified: Windows CI frame mapping pending
Preserve typed-state deserialization failures in the generated guest adapter and return widget-error.invalid-input from lifecycle entry points. Runtime can now fail only the affected instance with the exact contract error instead of an opaque guest abort.

Refs: PP-M5

Tests: cargo test -p floatile-sdk; cargo build -p floatile-clock-wasm --release --target wasm32-wasip2; wasm-tools validate target/wasm32-wasip2/release/floatile_clock_wasm.wasm; cargo test -p floatile-runtime; cargo test -p floatile-cli --test test_cmd; cargo clippy -p floatile-sdk -p floatile-runtime -p floatile-cli --all-targets -- -D warnings

Unverified: Windows CI exact serde failure pending
Place each plugin host-side build_ftui binary in a package-specific target directory. Concurrent author builds can no longer overwrite and execute another plugin’s same-named binary on Windows, which had paired clock WASM with AI balance initial state. Remove the temporary clock DWARF evidence override now that the trap is mapped.

Refs: PP-M5

Tests: cargo fmt --all -- --check; cargo test -p floatile-cli --test test_cmd; cargo test -p floatile-cli --test ai_balance; cargo clippy -p floatile-cli --all-targets -- -D warnings

Unverified: Windows CI regression confirmation pending
@CN059
CN059 merged commit 45c33e7 into dev Aug 27, 2026
4 checks passed
@CN059
CN059 deleted the agent/pp-m5-connections branch August 27, 2026 10:28
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