fix(capsule)!: serve astrid:process 1.0.0 and 1.1.0 dual-version — restore compat with sdk-0.7.x capsules#1108
Conversation
…store compat with sdk-0.7.x capsules The per-spawn file-injection extension (#881) originally landed in-place on the frozen astrid:process@1.0.0 WIT (wit#15), adding a file-injections field to spawn-request. The component-model linker matches host imports structurally by package version, so every capsule built against the published pre-extension contract (all shipped capsules, on astrid-sys 0.7.x) failed to instantiate on 0.9.0: 'component imports instance astrid:process/host@1.0.0, but a matching implementation was not found in the linker'. The sage supervisor could not astrid init and astrid-capsule-shell v0.2.0 failed to load. Fix mirrors the existing astrid:http@1.0.0/@1.1.0 dual-version precedent: the kernel world imports both astrid:process/host@1.0.0 (restored to its published shape) and astrid:process/host@1.1.0 (the additive successor carrying the injection surface). Bindgen emits per-version modules; the single Kernel::add_to_linker call in configure_kernel_linker wires both, so the engine and lifecycle linkers serve both versions. The @1.1.0 Host/HostProcessHandle impls carry the real backend (mod.rs/handle.rs, injections included); the @1.0.0 impls are thin shims (compat.rs) that convert record/enum shapes and delegate with an empty file-injections list, so @1.0.0 spawn behaves as spawn-with-no-injections. Audit/capability/quota paths are shared and version-agnostic. Existing capsules load again with no rebuild. Refs #1107, wit#19, #881, #890. Claude-Session: https://claude.ai/code/session_01NvX2tE7tgXuCRevqqiXTGU
….1.0 Points the wit submodule at astrid-runtime/wit@278dbca (PR #20), so the committed wit-staging matches the pinned contract and the CI drift check passes. Pairs with the dual-version host serving in this branch. Claude-Session: https://claude.ai/code/session_01NvX2tE7tgXuCRevqqiXTGU
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a breaking change in the 0.9.0 host where capsules built against the original astrid:process@1.0.0 contract failed to link due to an in-place WIT mutation. By adopting a dual-version host pattern, we restore the original 1.0.0 interface for legacy compatibility while moving the new file-injection capabilities to an additive 1.1.0 interface. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. The interface broke, the capsules cried, With versions split, the link was tied. A shim was born to bridge the gap, Restoring peace to the process map. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces the astrid:process@1.1.0 host interface as an additive successor to astrid:process@1.0.0, which has been restored to its original frozen shape to fix instantiation failures for shipped capsules. A new compatibility shim module (compat.rs) has been added to map @1.0.0 types and calls to the @1.1.0 implementation, which now serves as the single backend supporting both versions. Additionally, various imports and test cases have been updated to use the new @1.1.0 bindings. No review comments were provided, so there is no feedback to address.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Pull request overview
Restores capsule compatibility for astrid:process/host@1.0.0 consumers (e.g., sdk-0.7.x-built capsules) by serving a dual-version process host interface: a frozen @1.0.0 matching the published shape, plus an additive @1.1.0 that carries the file-injections extension, both backed by the same Rust implementation.
Changes:
- Adds
astrid:process@1.1.0WIT and restoresastrid:process@1.0.0by removing the in-placefile-injectionsmutation. - Re-homes the concrete host implementation on the
@1.1.0bindings and introduces@1.0.0compatibility shims that translate types and delegate into@1.1.0. - Updates process persistent/registry code and tests to use the versioned
process1_1_0bindings, and updates bindgen imports + CHANGELOG.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/astrid-capsule/wit-staging/deps/astrid-process@1.1.0/process@1.1.0.wit | Introduces the additive astrid:process@1.1.0 contract including file-injections. |
| crates/astrid-capsule/wit-staging/deps/astrid-process@1.0.0/process@1.0.0.wit | Restores the frozen @1.0.0 contract shape by removing injection-related types/fields. |
| crates/astrid-capsule/src/engine/wasm/host/process/persistent/ring.rs | Switches persistent ring types to the process1_1_0 bindings. |
| crates/astrid-capsule/src/engine/wasm/host/process/persistent/registry_tests.rs | Updates tests to reference process1_1_0 types for errors/cursors/streams. |
| crates/astrid-capsule/src/engine/wasm/host/process/persistent/mod.rs | Rebinds persistent-process host implementation imports to process1_1_0 types. |
| crates/astrid-capsule/src/engine/wasm/host/process/persistent/entry.rs | Updates persistent entry logic imports to the process1_1_0 bindings. |
| crates/astrid-capsule/src/engine/wasm/host/process/persistent/config.rs | Updates overflow policy import to process1_1_0. |
| crates/astrid-capsule/src/engine/wasm/host/process/mod.rs | Declares @1.1.0 as the primary implementation module and wires in the @1.0.0 compat module. |
| crates/astrid-capsule/src/engine/wasm/host/process/inject.rs | Re-targets injection code to @1.1.0 binding types. |
| crates/astrid-capsule/src/engine/wasm/host/process/handle.rs | Re-targets handle methods to @1.1.0 binding types. |
| crates/astrid-capsule/src/engine/wasm/host/process/compat.rs | Adds @1.0.0 Host/HostProcessHandle shims that map types and delegate into @1.1.0. |
| crates/astrid-capsule/src/engine/wasm/bindings.rs | Imports both astrid:process/host@1.0.0 and @1.1.0 in the kernel world bindgen. |
| CHANGELOG.md | Documents the dual-version process host interface and the compatibility fix under [Unreleased]. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
## Linked Issue Closes #1109 ## Summary Patch release carrying the **process dual-version compat hotfix** (#1108, Closes #1107). Bumps all workspace crates **0.9.0 → 0.9.1** and rolls `[Unreleased]` into `[0.9.1]`. The 0.9.0 host could not instantiate any capsule importing `astrid:process@1.0.0` that was built with the published SDK — wit#15 had mutated the frozen `@1.0.0` `spawn-request` in place, and the component-model linker matches structurally per version. Found by fresh-install verification of the 0.9.0 binary: the sage supervisor failed `astrid init` and `astrid-capsule-shell` v0.2.0 failed to load. 0.9.1 restores `@1.0.0` to its published shape and serves it alongside an additive `@1.1.0` (dual-version host, the `http` precedent), so **shipped capsules load again with no rebuild**. ## Changes - `Cargo.toml`: workspace version + internal cross-crate requirements 0.9.0 → 0.9.1. - `Cargo.lock`: workspace crate entries refreshed; no external dependency changes. - `CHANGELOG.md`: `[Unreleased]` rolled into `[0.9.1] - 2026-07-02`; link-reference block extended. ## Verification - No code changes beyond the version bump; `cargo metadata --locked` confirms lock consistency. - The fix itself (#1108) landed green: 570 astrid-capsule tests, clippy clean, dual-version link tests. - Post-tag: re-run the sage fresh-install (expect the supervisor + shell to load). ## Checklist - [x] Linked to an issue - [x] CHANGELOG.md updated (`[Unreleased]` rolled into `[0.9.1]`) https://claude.ai/code/session_01NvX2tE7tgXuCRevqqiXTGU
… to @1.1.0 (#62) The `contracts` submodule pinned wit@812c833, where file-injection had been added **in place** to the frozen `astrid:process@1.0.0` (wit#15). That structurally broke every capsule built against the published contract on the 0.9.0 host (astrid-runtime/astrid#1107). wit#20 (merged) restores `@1.0.0` byte-for-byte to its published shape and re-homes injection on an additive `@1.1.0`. This re-syncs the SDK to that: - Bumps `contracts` 812c833 → **278dbca**; `build.rs` re-stages both process versions into `wit-staging/`. - Moves the `process` host import in the `astrid-sys` `world capsule` from `@1.0.0` → **`@1.1.0`** (the same move `http` already made), so the SDK still exposes the `Command::inject_*` file-injection API — now backed by `@1.1.0`. Alias becomes `astrid::process1_1_0::host` (bindgen suffixes when both versions are staged, exactly as `http1_1_0`). - CHANGELOG: the injection entry and the submodule-bump entry updated to the restored-shape reality. **Host-floor note (intentional, per decision):** a capsule rebuilt against this SDK imports `astrid:process/host@1.1.0` and requires a host that serves it (astrid ≥ 0.9.1). Published capsules on the 0.7.1 SDK import the restored `@1.0.0` and are unaffected — the dual-version 0.9.1 host serves both. No version bump here (release is a separate PR). Pairs with astrid-runtime/wit#20 (merged) and astrid-runtime/astrid#1108. ## Verification - `cargo build --workspace`, `cargo clippy --workspace -- -D warnings`, `cargo test --workspace` — all green. - `scripts/sync-contracts-wit.sh --check` — in sync (process is a `host/` package, so the interface bundle is unchanged). - Confirmed the `Command::inject_*` surface resolves against `process@1.1.0`. https://claude.ai/code/session_01NvX2tE7tgXuCRevqqiXTGU
Linked Issue
Closes #1107
Summary
The 0.9.0 host cannot instantiate any capsule that imports
astrid:process@1.0.0and was built with the published SDK. wit#15 addedfile-injectionstospawn-requestin place on the frozenastrid:process@1.0.0package; the component-model linker matches host imports structurally per package version, so every capsule compiled against the published contract (all shipped capsules —astrid-sys 0.7.xembeds the pre-#15 shape) fails to link withcomponent imports instance astrid:process/host@1.0.0, but a matching implementation was not found in the linker. Found by fresh-install verification of the released 0.9.0 binary: the sage supervisor failsastrid init, andastrid-capsule-shellv0.2.0 fails to load. This is the #890 frozen-WIT-mutation class, recurring.The fix is the dual-version pattern already used for
astrid:http@1.0.0/@1.1.0: restore@1.0.0to its published shape and re-home the injection extension on an additive@1.1.0, serving both off one implementation. Existing capsules load unchanged; new capsules opt into injection by importing@1.1.0.Pairs with wit#20 (merged):
process@1.0.0restored byte-identical to its published shape,process@1.1.0added. Submodule pinned to that commit here.Changes
bindings.rs: kernel world importsastrid:process/host@1.1.0alongside@1.0.0; the singleKernel::add_to_linkerserves both (engine + lifecycle linkers).mod.rs/handle.rs/persistent//inject.rs) is re-homed to the@1.1.0(superset) traits unchanged — a rename, not a rewrite; all spawn/audit/capability/quota internals are shared.compat.rs:@1.0.0Host/HostProcessHandleimpls as thin shims — convert record/enum shapes, delegate to the@1.1.0impl, convert back. The three spawn entrypoints build a@1.1.0spawn-requestwith emptyfile-injections, so@1.0.0spawn == spawn-with-no-injections. Error mapping is total (no wildcard: a future@1.1.0-only arm is a compile error, not a silent mis-map).process-handlere-tags between versions over the same rep (thehttpHttpStreamprecedent).witsubmodule bumped to wit@278dbca; CHANGELOG under[Unreleased].Verification
cargo build --workspace,cargo clippy --workspace --all-features --all-targets -- -D warnings— clean.cargo test -p astrid-capsule— 570 pass. New tests incompat.rs:both_process_versions_resolve_in_kernel_linker(minimal components importing@1.0.0and@1.1.0both link viaconfigure_kernel_linker),unknown_process_version_is_not_served(negative control),v10_spawn_request_becomes_v11_with_empty_injections(+ compile-time guard on the restored shape), and four round-trip/totality conversions.Checklist
[Unreleased])https://claude.ai/code/session_01NvX2tE7tgXuCRevqqiXTGU