refactor(runtime-ports): type plugin runtime contracts#1455
Merged
limityan merged 1 commit intoJul 7, 2026
Conversation
limityan
force-pushed
the
yanzhn/plugin-runtime-contract-guards
branch
from
July 7, 2026 09:14
f57f3da to
d32645b
Compare
limityan
marked this pull request as ready for review
July 7, 2026 09:18
limityan
force-pushed
the
yanzhn/plugin-runtime-contract-guards
branch
from
July 7, 2026 09:22
d32645b to
d3b8031
Compare
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
runtime-portsplugin module while keeping an explicit root export surface.acceptedenvelope shape with typed dispatch/read/response contracts for source, manifest, config validation, status snapshots, capability, payload refs, permission gates, diagnostics, quarantine, recovery actions, lifecycle events, and observed epochs.Scope
This is a contract and boundary-guard PR. It does not enable an executable Plugin Runtime Host or claim completion of the P0 OpenCode-compatible Desktop command/settings + CLI diagnostics loop. Product assembly and agent runtime still reject executable plugin host bindings until the host implementation lands.
Review notes
Independent adversarial subagent review was run from backend architecture and product/plugin-ecosystem perspectives after rebasing onto
gcwing/main(44b3f5138). Findings were fixed in this PR update:read_pluginscontract so discovery/status/config-validation projection is not only reachable through dispatch responses.NotRequiredpermission state and the freePluginMaterializeConditionflag; effect materialization is now derived from an auditablePluginPermissionGate.action_id, quarantine/scope, requester, authorization, epochs, and idempotency facts instead of letting callers resubmit a mutable action descriptor.#[non_exhaustive].pub mod/pub fn/pub const/pub staticplus all plugin re-export forms.Remaining non-blocking follow-up: future host/CLI implementation should validate status/availability consistency and enforce owner-mediated recovery authorization at execution time.
Validation
Passed:
cargo test -p bitfun-runtime-portscargo test -p bitfun-product-capabilities --test product_capabilitiescargo test -p bitfun-agent-runtime builder_rejects_plugin_runtime_client_until_host_boundary_existscargo check -p bitfun-runtime-portscargo check -p bitfun-product-capabilitiescargo check -p bitfun-agent-runtimenode --test scripts/check-core-boundaries.test.mjsnode scripts/check-core-boundaries.mjspnpm run check:repo-hygienegit diff --check gcwing/main...HEADAttempted but blocked outside this PR:
cargo check --workspacefails in third-partyoxc_transformer 0.138.0because its source uses experimentalif letguards under the current localrustc 1.94.1toolchain.