Skip to content

refactor(driver-contract): move the driver contract types into a contract crate - #5488

Open
elezar wants to merge 2 commits into
refactor/5383-carve-out-driver-sdk/elezarfrom
refactor/5456-driver-contract-types/elezar
Open

elezar wants to merge 2 commits into
refactor/5383-carve-out-driver-sdk/elezarfrom
refactor/5456-driver-contract-types/elezar

Conversation

@elezar

@elezar elezar commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Move the driver contract types (the documents a compute driver hands to the supervisor and the sandbox boundary) out of openshell-driver-sdk into a new openshell-driver-contract crate, so the driver, the supervisor and the sandbox boundary depend on it without depending on each other.

Related Issue

Part of #5456. Stacked on #5405.

Changes

  • New crate with three modules: model (types, no I/O), write (driver side, behind the write feature so readers do not build the certificate generation code) and read (supervisor and sandbox side).
  • The SDK re-exports the crate as driver_contract and keeps sandbox_session, jwt::{CredentialEpoch, SessionRotation} and paths::is_posix_absolute resolving. The legacy-contract feature is removed and jwt is no longer forced on. The JWT launch documents stay in the SDK.
  • openshell_sandbox_backend::boundary_protocol and openshell_isolation_interface::contract remain as re-exports for code outside this repository.
  • Docker, Podman, VM, supervisor and sandbox are repointed. No behaviour change.

Release Notes

None.

Testing

  • Checks appropriate to the affected code and behavior pass
    • fmt, clippy, workspace tests, rust:deny:policy, buf lint and buf breaking pass at this tip. The openshell-driver-vm tests were not run to completion: they need mke2fs, which was unavailable locally.
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)
    • Not run on this version.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@elezar elezar added the area:drivers Compute and secret drivers, host OS/architecture support, backend isolation, and lifecycle. label Nov 11, 2026
@elezar
elezar force-pushed the refactor/5456-driver-contract-types/elezar branch from d830485 to af28bc2 Compare November 12, 2026 12:38
@elezar
elezar force-pushed the refactor/5456-driver-contract-types/elezar branch from af28bc2 to bc41cbe Compare November 12, 2026 12:50
@elezar
elezar added this pull request to stack #5532 November 13, 2026 12:35
@elezar
elezar force-pushed the refactor/5456-driver-contract-types/elezar branch from bc41cbe to a1e935f Compare November 13, 2026 12:52
@elezar
elezar force-pushed the refactor/5456-driver-contract-types/elezar branch from a1e935f to f96b308 Compare November 13, 2026 13:07
@purp purp added topic:api Public APIs, gRPC/protobuf, SDK interfaces, versioning, compatibility, and API design standards. topic:architecture System design, component boundaries, data/control flow, architectural decisions, and RFCs. topic:documentation Architecture docs, READMEs, project website updates, and automated documentation generation. labels Nov 15, 2026
@elezar elezar changed the title refactor(driver-sdk): move the driver contract types into the SDK refactor(driver-contract): move the driver contract types into a contract crate Nov 16, 2026
Docker, Podman, and the VM driver hand the supervisor and the sandbox
boundary a set of JSON documents whose only definition is Rust types in
openshell-sandbox-backend and openshell-isolation-interface, which pull
in openshell-core. Move those types into an openshell-driver-sdk module
behind the legacy-contract feature, re-export them from their old paths,
and repoint the three drivers.

The module is documented as legacy: it describes the format that exists
today, accepts no new fields, and is removed once a replacement ships.
Golden JSON examples and a round-trip test pin the encoding.

The drivers no longer depend on openshell-core, openshell-sandbox-backend,
openshell-isolation-interface, or openshell-policy for normal builds.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
…ract crate

Docker, Podman, and the VM driver hand the supervisor and the sandbox
boundary a set of documents whose only definition is Rust types. Move the
types out of openshell-driver-sdk into a new openshell-driver-contract crate
that the driver, the supervisor, and the sandbox boundary all depend on
without depending on each other.

The crate has three modules: model (the types, no I/O), write (the driver
side, behind the write feature so that readers do not build the certificate
generation code), and read (the supervisor and sandbox side). The SDK
re-exports the crate as driver_contract and keeps sandbox_session,
jwt::{CredentialEpoch, SessionRotation}, and paths::is_posix_absolute
resolving. The legacy-contract feature is removed and the jwt feature is no
longer forced on. The JWT launch documents stay in the SDK with their own
test and examples.

openshell_sandbox_backend::boundary_protocol and
openshell_isolation_interface::contract remain as re-exports for code
outside this repository. generate_sandbox_tls_material is re-exported from
boundary_protocol only with the sandbox-backend write feature.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar
elezar force-pushed the refactor/5456-driver-contract-types/elezar branch from 03442f8 to 9f7d983 Compare November 16, 2026 15:29

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:drivers Compute and secret drivers, host OS/architecture support, backend isolation, and lifecycle. topic:api Public APIs, gRPC/protobuf, SDK interfaces, versioning, compatibility, and API design standards. topic:architecture System design, component boundaries, data/control flow, architectural decisions, and RFCs. topic:documentation Architecture docs, READMEs, project website updates, and automated documentation generation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants