Skip to content

chore(openshell): re-vendor proto to v0.0.96 - #147

Open
onsails wants to merge 5 commits into
masterfrom
automation/openshell-proto-revendor
Open

chore(openshell): re-vendor proto to v0.0.96#147
onsails wants to merge 5 commits into
masterfrom
automation/openshell-proto-revendor

Conversation

@onsails

@onsails onsails commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Automated re-vendor of the OpenShell protos to v0.0.96.

static check result
buf breaking (PACKAGE) BREAKING
cargo check -p right-openshell FAILED
buf breaking output
crates/right-openshell/proto/openshell/datamodel.proto:8:8:import "options.proto": file does not exist
cargo check (tail)
   Compiling hashbrown v0.15.5
   Compiling turso_sdk_kit v0.7.1
    Checking hybrid-array v0.4.10
    Checking env_filter v1.0.1
   Compiling libmimalloc-sys v0.1.49
    Checking symlink v0.1.0
    Checking cpufeatures v0.3.0
    Checking genawaiter-macro v0.99.1
   Compiling fixedbitset v0.5.7
   Compiling petgraph v0.8.3
    Checking genawaiter v0.99.1
    Checking tracing-appender v0.2.5
    Checking env_logger v0.11.10
   Compiling pulldown-cmark-to-cmark v22.0.0
   Compiling prost-types v0.14.4
    Checking idna_adapter v1.2.1
    Checking form_urlencoded v1.2.2
    Checking tokio-stream v0.1.18
   Compiling turso_sdk_kit_macros v0.7.1
   Compiling ahash v0.8.12
    Checking cmov v0.5.3
    Checking mime v0.3.17
   Compiling ref-cast v1.0.25
   Compiling multimap v0.10.1
   Compiling prost-build v0.14.3
    Checking axum-core v0.5.6
    Checking ctutils v0.4.2
    Checking idna v1.1.0
    Checking chacha20 v0.10.0
    Checking block-buffer v0.12.0
    Checking crypto-common v0.2.1
   Compiling nix v0.31.3
   Compiling tonic-build v0.14.6
    Checking futures-executor v0.3.32
   Compiling pin-project-internal v1.1.11
   Compiling ref-cast-impl v1.0.25
   Compiling serde_derive_internals v0.29.1
    Checking encoding_rs v0.8.35
    Checking const-oid v0.10.2
    Checking iri-string v0.7.11
    Checking arraydeque v0.5.1
    Checking option-ext v0.2.0
    Checking anstyle v1.0.14
    Checking matchit v0.8.4
    Checking tower-http v0.6.8
    Checking axum v0.8.9
    Checking annotate-snippets v0.12.13
    Checking dirs-sys v0.5.0
    Checking granit-parser v0.0.3
    Checking encoding_rs_io v0.1.7
    Checking digest v0.11.2
   Compiling schemars_derive v1.2.1
    Checking pin-project v1.1.11
    Checking futures v0.3.32
   Compiling tonic-prost-build v0.14.6
    Checking rand v0.10.1
    Checking url v2.5.8
    Checking mimalloc v0.1.52
    Checking serde_urlencoded v0.7.1
    Checking hyper-timeout v0.5.2
   Compiling rmcp v1.7.0
    Checking nohash-hasher v0.2.0
    Checking dyn-clone v1.0.20
    Checking schemars v1.2.1
    Checking serde-saphyr v0.0.27
   Compiling right-openshell v0.4.2 (/home/runner/work/right-agent/right-agent/crates/right-openshell)
    Checking dirs v6.0.0
   Compiling rmcp-macros v1.7.0
    Checking sse-stream v0.2.3
    Checking fs4 v1.1.0
    Checking same-file v1.0.6
    Checking walkdir v2.5.0
    Checking right-process v0.4.2 (/home/runner/work/right-agent/right-agent/crates/right-process)
error: failed to run custom build command for `right-openshell v0.4.2 (/home/runner/work/right-agent/right-agent/crates/right-openshell)`

Caused by:
  process didn't exit successfully: `/home/runner/work/right-agent/right-agent/target/devenv/debug/build/right-openshell-49425278f889ec97/build-script-build` (exit status: 1)
  --- stderr
  Error: Custom { kind: Other, error: "protoc failed: options.proto: File not found.\nproto/openshell/datamodel.proto:8:1: Import \"options.proto\" was not found or had errors.\n" }
warning: build failed, waiting for other jobs to finish...

A BREAKING or FAILED result means upstream changed the wire/API shape.
Audit SandboxReadiness and any code decoding moved/removed fields, then bump
MIN_OPENSHELL_VERSION and the CI OPENSHELL_VERSION pin as needed.
This bot surfaces drift only — it does not fix Rust. Full CI runs on this PR only
when BOT_PR_TOKEN (a fine-grained PAT) is configured as a repo secret;
otherwise bot-authored PRs don't trigger downstream workflows. Either way, the
openshell-proto-compat workflow run itself goes RED when cargo check fails,
so a failing proto bump is visible in the Actions tab even without full CI.

Re-vendor Assessment

Compared v0.0.62v0.0.96. This model-generated report is evidence-backed review input, not a product commitment.

Summary: OpenShell v0.0.62→v0.0.96 proto revendor is wire-compatible for everything Right currently sends (cargo check ok); buf flagged exactly two breaking changes, both already mitigated or unused, and the diff surfaces four adoptable upstream capabilities (atomic profile updates, gateway-owned credential refresh, MCP-native L7 policy, gateway/driver introspection) that map cleanly onto existing Right pain points.

Adoption Candidates

Atomic provider-profile update RPC (UpdateProviderProfiles)
  • User value: Replaces the fragile manual detach/delete/reimport/reattach rollback dance for updating a drifted managed or generic provider profile (e.g. right-fal, right-github, right-provider-*) with a single optimistic-concurrency RPC, removing a whole class of partial-failure risk where a sandbox could be left detached mid-update.
  • Right boundary: crates/right-openshell/src/providers.rs::update_referenced_profile (the 'detach-dance primitive') and managed_profiles.rs::ensure_profiles's EnsureOutcome::DriftedSkipped path, both explicitly built around the old create-or-skip-only ProviderProfile API

Required work

  • Add an UpdateProviderProfiles call path in managed_profiles.rs alongside get_profile/lint_and_import/delete_profile
  • Track ProviderProfile.resource_version from GetProviderProfile responses so it can be passed as expected_resource_version
  • Replace the detach/delete/reimport/reattach body of update_referenced_profile with a direct update call, retiring the custom rollback code
  • Extend regenerated tonic stubs' test coverage (providers_tests.rs, managed_profiles.rs tests) for the new RPC

Blockers

  • Right's authored profiles all currently construct resource_version: 0 unconditionally; the update path needs a real fetch-then-update sequence to avoid ABORTED on stale version
  • Detach-dance is also relied on to guarantee re-import happens only while unreferenced; needs verification that UpdateProviderProfiles is safe to call on a profile still attached to live sandboxes before removing the detach step

Evidence

  • Path: /tmp/openshell-proto.diff (openshell.proto, new rpc UpdateProviderProfiles + messages UpdateProviderProfilesRequest/Response with expected_resource_version)
    Observation: Candidate adds a dedicated update RPC for custom provider profiles with optimistic concurrency via expected_resource_version, explicitly distinct from the existing create-only ImportProviderProfiles
  • Path: crates/right-openshell/src/providers.rs:444-500 (update_referenced_profile)
    Observation: Current code comment states plainly: "OpenShell's `import` never upserts and the gateway refuses to delete a profile while a sandbox references it, so an update is: detach every referencing attachment, delete + re-import the profile (same id), then re-attach" — the exact gap UpdateProviderProfiles fills
Gateway-owned provider credential refresh with AWS STS AssumeRole + multi-credential outputs
  • User value: Would let Right offer auto-refreshing AWS-backed provider credentials (e.g. for Bedrock-style providers) and mint a primary credential plus sibling outputs (e.g. session token) from one refresh operation, replacing Right's current all-manual expiry bookkeeping with gateway-driven rotation.
  • Right boundary: crates/right-openshell/src/providers.rs's ProviderSpec/Provider model, which only carries flat name/type/credentials/config/credential_expires_at_ms and never calls ConfigureProviderRefresh, RotateProviderCredential, GetProviderRefreshStatus, or DeleteProviderRefresh

Required work

  • Add a refresh-strategy field to ProviderSpec and the create/update-provider flow
  • Wire ConfigureProviderRefresh / RotateProviderCredential / GetProviderRefreshStatus / DeleteProviderRefresh into providers.rs
  • Add a dashboard surface for choosing/monitoring a provider's refresh strategy (per the bot/dashboard-is-the-control-plane convention for provider management)
  • Handle the new [(openshell.options.v1.secret)=true] annotated `material` maps without ever logging them, consistent with existing secrecy::SecretString handling

Blockers

  • No dashboard/CLI UX exists yet for selecting or displaying a per-credential refresh strategy
  • AWS_STS_ASSUME_ROLE is one new strategy among several already-unadopted strategies (OAUTH2_REFRESH_TOKEN, CLIENT_CREDENTIALS, GOOGLE_SERVICE_ACCOUNT_JWT) — none of the refresh RPC family is used today, so this is new integration surface, not an incremental extension

Evidence

  • Path: /tmp/openshell-proto.diff (openshell.proto, PROVIDER_CREDENTIAL_REFRESH_STRATEGY_AWS_STS_ASSUME_ROLE = 6; new message ProviderCredentialRefreshOutput; additional_outputs on ProviderCredentialRefresh; additional_output_keys on StoredProviderCredentialRefreshState)
    Observation: Candidate adds an AWS STS assume-role refresh strategy and a mechanism for one refresh to mint multiple sibling credentials (e.g. access key + session token) via additional_outputs
  • Path: crates/right-openshell/src/providers.rs (grep for ConfigureProviderRefresh/RotateProviderCredential/GetProviderRefreshStatus/DeleteProviderRefresh)
    Observation: Zero call sites for any of the four provider-credential-refresh RPCs anywhere in providers.rs or its tests — the entire gateway-owned refresh family is currently unused by Right, which only tracks credential_expires_at_ms manually
Native MCP-protocol L7 policy (protocol: mcp, McpOptions, tools/call params matcher)
  • User value: Adds a second, OpenShell-policy-enforced layer that can allow/deny specific MCP tool names (params.name on tools/call) at the sandbox network-policy layer, independent of and additional to Right's own aggregator-side tool routing — directly reinforcing the MCP tool-restriction security guarantee Right already documents and relies on.
  • Right boundary: crates/right-codegen/src/policy.rs (the Right MCP endpoint is generated with `protocol: rest`, e.g. lines 25 and 297) and ARCHITECTURE.md's MCP Aggregator tool-routing rules (no-prefix / rightmeta__ / {server}__), which are enforced only inside the aggregator process today, not at the OpenShell proxy

Required work

  • Switch the generated Right MCP NetworkEndpoint.protocol from "rest" to "mcp" and configure McpOptions (strict_tool_names, allow_all_known_mcp_methods)
  • Author L7Allow/L7DenyRule params.name globs mirroring the aggregator's own tool-prefix routing rules as policy-layer defense in depth
  • Validate the change against the live sandbox-to-aggregator Streamable-HTTP traffic in a non-prod agent before rollout

Blockers

  • No evidence yet that OpenShell's MCP L7 inspection correctly parses Right's specific Streamable-HTTP session/framing; misconfigured strict_tool_names could deny legitimate tool calls sandbox-wide
  • Proto comment explicitly flags this as targeting the active 2025-11-25 MCP spec revision only, with policy semantics still evolving (candidate profile checks listed as future work upstream)

Evidence

  • Path: /tmp/openshell-proto.diff (sandbox.proto, NetworkEndpoint.mcp: McpOptions field 23; McpOptions.strict_tool_names / allow_all_known_mcp_methods; L7Allow/L7DenyRule new `params` map for tools/call params.name)
    Observation: Candidate adds first-class MCP-protocol L7 policy (method/tool-name matching) as a supervisor-enforced network-policy primitive, distinct from the generic REST L7 rules used everywhere in Right today
  • Path: crates/right-codegen/src/policy.rs:25,297 (protocol: rest for the generated Right MCP endpoint)
    Observation: The host-side Right MCP aggregator endpoint the sandbox connects to is currently policed as generic REST, not as MCP; all tool-name enforcement happens only in the aggregator process per ARCHITECTURE.md's MCP Aggregator routing rules
Gateway/compute-driver introspection (GetGatewayInfo, GetCurrentUser)
  • User value: Lets bot startup preflight (and a future `right doctor`) report the actual compute driver name/version/capabilities and authenticated identity/roles directly from the gateway, instead of inferring driver or auth behavior indirectly — matching Right's own stated 'Debuggability over convenience' principle of preferring direct observable signals over heuristics.
  • Right boundary: crates/right-openshell/src/preflight.rs, which only calls Health() for a bare version string and has no path today for driver or identity introspection

Required work

  • Add a GetGatewayInfo call to preflight (or a new doctor-style diagnostic) surfacing gateway_version and compute_drivers[].capabilities
  • Optionally add GetCurrentUser to preflight/doctor output once Right has a consumer for roles/scopes (currently none)

Blockers

  • GetCurrentUser has no current behavioral consumer — Right doesn't yet branch on roles/scopes anywhere, so adopting it now would be diagnostic-only with no functional payoff until an IdP/role-aware feature exists

Evidence

  • Path: /tmp/openshell-proto.diff (openshell.proto, new rpc GetGatewayInfo returning ComputeDriverInfo/ComputeDriverCapabilities; new rpc GetCurrentUser returning subject/roles/scopes/identity_provider)
    Observation: Candidate adds two new read-only introspection RPCs beyond the existing bare-version Health check
  • Path: crates/right-openshell/src/preflight.rs:102-122 (gateway_version_check)
    Observation: Only RPC preflight ever calls is Health(), extracting just resp.version; no driver-capability or identity introspection exists in the crate

Breaking Changes

SandboxSpec field 9: bool gpu → message resource_requirements (migration_required)
  • Change: Field 9 on SandboxSpec changed wire type from a bool (varint) to a length-delimited ResourceRequirements message, changed name from gpu to resource_requirements, and changed json_name from gpu to resourceRequirements
  • Right impact: Right never hand-builds a SandboxSpec to send (spawn_sandbox shells out to `openshell sandbox create` via CLI, not a gRPC CreateSandboxRequest with a manually-populated SandboxSpec), but Right's gRPC client does decode SandboxSpec as part of GetSandbox/ListSandboxes/WatchSandbox responses, so a Right binary talking to a pre-0.0.69 gateway would fail to decode this field with the new generated stubs.
  • Required action: Already mitigated: crates/right-openshell/src/preflight.rs pins MIN_OPENSHELL_VERSION = Version::new(0, 0, 69) and hard-fails bot startup on any CLI/gateway below it specifically because of this field's wire-type change (see the doc comment at preflight.rs:12-17). For this v0.0.96 revendor the only required action is to confirm MIN_OPENSHELL_VERSION is not lowered below 0.0.69.

Evidence

  • Path: /tmp/buf-breaking.txt lines 1-4
    Observation: buf reports Field "9" on SandboxSpec changed cardinality, json_name, type (bool→message), and name (gpu→resource_requirements)
  • Path: crates/right-openshell/src/preflight.rs:12-18
    Observation: MIN_OPENSHELL_VERSION is already set to 0.0.69 with a doc comment naming exactly this SandboxSpec field-9 retyping as the reason
SandboxTemplate field 9: volume_claim_templates deleted (no_current_consumer)
  • Change: Previously present field 9 (volume_claim_templates, a google.protobuf.Struct) on SandboxTemplate was deleted and the field number/name reserved
  • Right impact: Right never constructs or reads SandboxTemplate.volume_claim_templates anywhere in the workspace — the only occurrences of the identifier are in the vendored proto file itself.
  • Required action: None required. Confirmed via grep that no Rust source outside crates/right-openshell/proto references volume_claim_templates; safe to accept the deletion as-is.

Evidence

  • Path: /tmp/buf-breaking.txt line 5
    Observation: buf reports "Previously present field \"9\" with name \"volume_claim_templates\" on message \"SandboxTemplate\" was deleted"
  • Path: crates/right-openshell (workspace-wide grep for volume_claim_templates)
    Observation: Only match is the reserved-field comment in the proto file itself; no Rust call site ever set or read this field

Copilot AI review requested due to automatic review settings June 25, 2026 07:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR re-vendors the OpenShell protobuf definitions in right-openshell to upstream tag v0.0.69, updating the API/wire surface that right-openshell compiles against and communicates with.

Changes:

  • Updated vendored upstream tracking metadata to v0.0.69.
  • Updated openshell.proto to include new provider profile update RPCs/messages, a new ProviderProfile.resource_version field, and replaced SandboxSpec.gpu with SandboxSpec.resource_requirements (plus new resource requirement messages).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
crates/right-openshell/proto/UPSTREAM.md Bumps recorded upstream proto tag/fetch timestamp to v0.0.69.
crates/right-openshell/proto/openshell/openshell.proto Updates the vendored OpenShell API surface (new RPC/messages, new resource_version, and breaking SandboxSpec field-9 change).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 1094 to 1099
ProviderProfileDiscovery discovery = 9;
// Storage resource version for custom profiles. Built-in profiles and new
// profile files use 0. Gateway responses set this for stored custom profiles.
// Update calls use this for optimistic concurrency.
uint64 resource_version = 10;
}
Comment on lines 321 to +326
openshell.sandbox.v1.SandboxPolicy policy = 7;
// Provider names to attach to this sandbox.
repeated string providers = 8;
// Request NVIDIA GPU resources for this sandbox.
bool gpu = 9;
// Portable resource requirements used by the gateway for driver selection
// and by drivers for provisioning.
ResourceRequirements resource_requirements = 9;
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch from af4fc08 to 1e6a5d1 Compare June 26, 2026 07:14
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.69 chore(openshell): re-vendor proto to v0.0.70 Jun 26, 2026
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.70 chore(openshell): re-vendor proto to v0.0.71 Jun 27, 2026
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch 4 times, most recently from 46e0d9f to 4281031 Compare June 30, 2026 07:13
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.71 chore(openshell): re-vendor proto to v0.0.72 Jun 30, 2026
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch from 4281031 to f977de9 Compare July 1, 2026 07:15
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.72 chore(openshell): re-vendor proto to v0.0.73 Jul 1, 2026
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch from f977de9 to 1b30e2a Compare July 2, 2026 07:05
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.73 chore(openshell): re-vendor proto to v0.0.74 Jul 2, 2026
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch from 1b30e2a to 22efaff Compare July 3, 2026 07:00
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.74 chore(openshell): re-vendor proto to v0.0.75 Jul 3, 2026
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch from 22efaff to 5c3d31a Compare July 4, 2026 06:51
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.75 chore(openshell): re-vendor proto to v0.0.76 Jul 4, 2026
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch 2 times, most recently from a85bf08 to 44ede34 Compare July 6, 2026 09:52
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.76 chore(openshell): re-vendor proto to v0.0.77 Jul 7, 2026
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch from 44ede34 to 46cd062 Compare July 7, 2026 09:06
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.77 chore(openshell): re-vendor proto to v0.0.78 Jul 8, 2026
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch 2 times, most recently from cf620a3 to 8d12ac3 Compare July 10, 2026 09:04
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.78 chore(openshell): re-vendor proto to v0.0.80 Jul 10, 2026
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch from 8d12ac3 to 19895ea Compare July 11, 2026 07:39
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.83 chore(openshell): re-vendor proto to v0.0.85 Jul 17, 2026
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.85 chore(openshell): re-vendor proto to v0.0.86 Jul 18, 2026
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch 5 times, most recently from b81f791 to e74f74f Compare July 22, 2026 08:10
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.86 chore(openshell): re-vendor proto to v0.0.88 Jul 22, 2026
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.88 chore(openshell): re-vendor proto to v0.0.89 Jul 23, 2026
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch 2 times, most recently from ac0f67d to ae58766 Compare July 24, 2026 08:10
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.89 chore(openshell): re-vendor proto to v0.0.90 Jul 24, 2026
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch from ae58766 to bc00228 Compare July 25, 2026 07:49
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.90 chore(openshell): re-vendor proto to v0.0.91 Jul 25, 2026
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch 3 times, most recently from 7a58b30 to 9be0b90 Compare July 28, 2026 08:16
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.91 chore(openshell): re-vendor proto to v0.0.92 Jul 28, 2026
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch 4 times, most recently from 91d8148 to fb01972 Compare August 1, 2026 08:05
@onsails onsails changed the title chore(openshell): re-vendor proto to v0.0.92 chore(openshell): re-vendor proto to v0.0.96 Aug 1, 2026
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch from fb01972 to 839cc8d Compare August 2, 2026 08:05
@onsails
onsails force-pushed the automation/openshell-proto-revendor branch from 839cc8d to 66b4109 Compare August 3, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants