refactor(proto): move phase and current_policy_version into status (#1565)

* refactor(proto): move phase and current_policy_version into SandboxStatus

Move phase and current_policy_version from SandboxSpec into
SandboxStatus to correctly model mutable runtime state. Update all
callers in the gateway server, TUI, and Python SDK to read and write
these fields through SandboxStatus accessors.

Signed-off-by: Derek Carr <decarr@redhat.com>

* fix(server): preserve sandbox status on statusless driver updates

When a driver update arrives without a status payload (e.g. before
Kubernetes populates the status subresource), preserve the stored
phase, conditions, and current policy version instead of resetting
them. Adds a regression test covering the edge case.

Signed-off-by: Derek Carr <decarr@redhat.com>

---------

Signed-off-by: Derek Carr <decarr@redhat.com>
This commit is contained in:
Derek Carr
2026-05-29 08:39:12 -07:00
committed by GitHub
parent 7873f611de
commit d01d10650b
16 changed files with 327 additions and 223 deletions
+2
View File
@@ -15,6 +15,7 @@ from .sandbox import (
SandboxError,
SandboxRef,
SandboxSession,
SandboxStatusRef,
TlsConfig,
)
@@ -35,6 +36,7 @@ __all__ = [
"SandboxError",
"SandboxRef",
"SandboxSession",
"SandboxStatusRef",
"TlsConfig",
"__version__",
]