Skip to content

[blocked] feat(drivers): make driver lifecycle id-only - #34

Draft
elezar wants to merge 3 commits into
mainfrom
id-only-driver-lifecycle
Draft

elezar wants to merge 3 commits into
mainfrom
id-only-driver-lifecycle

Conversation

@elezar

@elezar elezar commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Blocked on ai-openshell/openshell#3611 merging.

Port of the driver-specific part of ai-openshell/openshell#3611, which has since been reworked in place (core issue ai-openshell/openshell#3556), as part of the driver move to this repository.

What changed

Drivers locate a sandbox by sandbox_id only.

  • Get, Stop, Start and Delete reject an empty sandbox_id with invalid_argument.
  • Docker and VM no longer fall back to the name or match on it, in lookup, pending-sandbox lookup, the pending image update lookup, or lifecycle fencing. require_sandbox_identifier is replaced by require_sandbox_id; resolve_lifecycle_id, pending_sandbox_record_id and the VM resolve_record_id are removed.
  • Podman already ignored the name; only its test request literals change.
  • Tests: the name-lookup and ambiguous-name tests are replaced with empty-id tests and a same-name, different-workspace regression for pending lookup (Docker) and the registry (VM).

Relationship to the core PR

The request field name = 2 stays in the proto, documented as deprecated, and the gateway may still send it. The drivers ignore it and require sandbox_id: nothing reads request.name, and request literals set name: String::new() or use ..Default::default().

The OpenShell pin is bumped to bbb10834c8, the head of #3611 (all pins move together). Re-pin to the merge commit once #3611 lands; the commit may stop being fetchable if the PR branch is force-pushed again. The drivers should not merge before #3611, so they are built and tested against the proto it changes.

Verification

Against the pin bbb10834c8, mise run ci:

  • cargo fmt --check and cargo clippy --all-targets -D warnings: clean for the Docker, Podman and VM crates.
  • Docker: 197 passed, 3 ignored, plus the serve suites.
  • Podman: 247 passed, plus the preflight and serve suites.
  • VM: 300 passed, run inside the devshell (nix develop --command cargo test -p openshell-driver-vm), which provides mke2fs. Outside the devshell, six tests that build ext4 images fail on a machine without e2fsprogs.

Not verified: the head of #3611 can still change before merge, so this is checked against bbb10834c8 only.

Port of the driver-specific part of ai-openshell/openshell#3611.

Get, Stop, Start and Delete locate a sandbox by sandbox_id only. An
empty sandbox_id is rejected with invalid_argument. The name fallback
and name matching are removed from lookup and lifecycle fencing in the
Docker and VM drivers, including the pending image update lookup in the
Docker driver. Sandbox names are unique per workspace, not per driver,
so a name could select the wrong sandbox.

The request field `name` is neither read nor required: request literals
set it to an empty string or default it, so the change builds against
the current OpenShell pin and against core once the gateway stops
sending it.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
Move every OpenShell git dependency to bdd5233a98, the head of
ai-openshell/openshell#3611, so the drivers build against the proto
that deprecates the request `name` field. Re-pin to the merge commit
once that PR lands.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
Move every OpenShell git dependency to bbb10834c8, the new head of
ai-openshell/openshell#3611 after it was force-pushed.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
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