Skip to content

feat(cli): add openshell conformance subcommand skeleton#2182

Draft
elezar wants to merge 2 commits into
mainfrom
feat/conformance-suite-skeleton
Draft

feat(cli): add openshell conformance subcommand skeleton#2182
elezar wants to merge 2 commits into
mainfrom
feat/conformance-suite-skeleton

Conversation

@elezar

@elezar elezar commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

Adds a hidden openshell conformance subcommand behind a conformance Cargo
feature flag. The subcommand connects to a registered gateway and runs a suite
of driver-agnostic conformance scenarios, reporting pass/fail per scenario and
exiting non-zero on any failure.

Related Issue

Accompanies the driver conformance suite spike issue. This PR makes the design
concrete; it is not intended to merge as-is.

Changes

  • crates/openshell-cli/Cargo.toml — adds conformance feature flag
  • crates/openshell-cli/src/main.rs — adds Conformance command variant and
    ConformanceCommands enum (run, list)
  • crates/openshell-cli/src/run.rs — adds conformance_run, conformance_list,
    run_scenario, wait_for_ready, and all implemented scenario functions

Scenarios

Scenario Status What it verifies
capabilities stub GetCapabilities returns non-empty driver name, version, and image (blocked: requires proto change)
lifecycle Create → Ready → list → delete round-trip
not-found GetSandbox returns NOT_FOUND; DeleteSandbox returns deleted=false without erroring
idempotent-delete Second DeleteSandbox call returns deleted=false without erroring
validate spec=None and gpu.count=0 both return INVALID_ARGUMENT before any sandbox is created
concurrent Two sandboxes created via tokio::join! both reach Ready without interfering
labels Labels persisted on create; label_selector returns only the matching sandbox

Notes

  • Sandbox names follow conformance-<scenario>-<run-id> convention (Kubernetes RFC 1123 safe)
  • conformance list requires no gateway connection — purely static metadata
  • Timeout is per-scenario via tokio::time::timeout, default 300s
  • wait_for_ready is a shared helper; cleanup is always the caller's responsibility
  • capabilities remains stubbed pending a decision on whether to add a gateway passthrough RPC or accept a --driver-addr flag

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (not applicable — this IS the conformance test surface)

Adds a hidden `openshell conformance` subcommand behind a `conformance`
Cargo feature flag. The subcommand connects to a registered gateway and
runs a suite of driver-agnostic conformance scenarios, reporting pass/fail
per scenario and exiting non-zero on any failure.

Implements the `lifecycle` scenario (create → ready → delete) as the first
concrete scenario. The remaining five scenarios are stubbed as "not yet
implemented" placeholders.

Sandbox names follow the `conformance-<scenario>-<run-id>` convention
(Kubernetes RFC 1123 safe) to make orphaned sandboxes identifiable.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

…te, validate, concurrent, labels

Adds five new conformance scenarios and a shared wait_for_ready helper:

- not-found: verifies GetSandbox returns NOT_FOUND and DeleteSandbox
  returns deleted=false for a sandbox name that was never created
- idempotent-delete: creates a sandbox, deletes it (deleted=true), then
  deletes it again and asserts deleted=false without an error
- validate: asserts INVALID_ARGUMENT for spec=None and gpu.count=0,
  covering both the missing-spec and field-constraint validation paths
- concurrent: issues two CreateSandbox calls via tokio::join!, waits for
  both to reach Ready in parallel, and verifies neither interferes with
  the other in ListSandboxes
- labels: creates two sandboxes with distinct label values, filters with
  label_selector, and asserts only the matching sandbox is returned

Also extracts wait_for_ready from scenario_lifecycle into a shared helper
and adds the labels entry to all_scenarios().

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