Skip to content

gateway: GetSandbox response omits Sandbox.phase (proto field 4) when sandbox is READY #1710

Description

@nloke

Summary

The published ghcr.io/nvidia/openshell/gateway:latest image (sha256:2d1e54cb66b6214a2e88233f1ef7338e061d8d7d6695ef661c0da31d0f01a5d5) does not serialize the phase field (proto field 4) in GetSandbox responses, even when the sandbox is functionally ready and status.conditions[Ready=True].

Proto definition

message Sandbox {
  SandboxMeta   metadata = 1;
  SandboxSpec   spec     = 2;
  SandboxStatus status   = 3;
  SandboxPhase  phase    = 4;  // ← never present in wire response
}

Reproduction

grpcurl -plaintext   -import-path ./proto -proto openshell.proto   -d '{"name":"<sandbox-name>"}'   <gateway-host>:8080 openshell.v1.OpenShell/GetSandbox

Expected — response includes "phase": "SANDBOX_PHASE_READY"

Actualphase key is absent entirely:

{
  "sandbox": {
    "metadata": { ... },
    "spec":     { ... },
    "status": {
      "sandboxName": "kagent-orch-the-orc",
      "conditions": [
        {
          "type": "Ready",
          "status": "True",
          "reason": "DependenciesReady",
          "message": "Pod is Ready; Service Exists",
          "lastTransitionTime": "2026-06-03T13:33:27Z"
        }
      ]
    }
  }
}

Note: phase is completely absent — not UNSPECIFIED, not UNKNOWN — the field is simply missing from the serialized response.

Root cause hypothesis

The running binary appears to have been compiled from a proto where phase was not yet field 4 of Sandbox, or field 4 was a different type. On decode/re-encode the binary treats the persisted field-4 bytes as unknown and drops them. Raw SQLite inspection confirms field 4 (\x20\x02 = phase READY) is written but absent from gRPC responses.

Impact

Clients that switch on GetSandbox().phase to determine readiness (e.g. kagent-controller phaseToCondition) will permanently see UNSPECIFIED and never transition to Ready=True, even when the sandbox is fully provisioned. This blocks any controller that relies on the phase field.

Environment

  • Gateway image: ghcr.io/nvidia/openshell/gateway:latest = sha256:2d1e54cb66b6214a2e88233f1ef7338e061d8d7d6695ef661c0da31d0f01a5d5
  • Kubernetes: kind cluster, k8s 1.36.1
  • Sandbox driver: kubernetes
  • kagent version: 0.9.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions