Skip to content

Container and Kata workspaces on OpenShell v0.1.10 - #174

Merged
mtalvi merged 9 commits into
validatedpatterns-sandbox:mainfrom
mtalvi:kata-container-openshell-0110
Nov 25, 2026
Merged

mtalvi merged 9 commits into
validatedpatterns-sandbox:mainfrom
mtalvi:kata-container-openshell-0110

Conversation

@mtalvi

@mtalvi mtalvi commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Container and Kata workspaces on OpenShell v0.1.10: GitOps-deployed, with no cluster-specific configuration. Kata gets two VMs per sandbox. OCSF audit export and the agent trace relay go to a collector the pattern deploys.

What this changes

Commit Area
Workspace runtime for container and Kata workspaces kubernetes-runtime/: controller, plan compiler, tool gate, provider and boundary checks
Container and Kata workspace charts on OpenShell v0.1.10 charts/, overrides/: per-user stack, admission policies, projection, Kata and telemetry charts
Pattern configuration, saw-init and live checks values-prod.yaml, scripts/, Makefile*
Images and CI for OpenShell v0.1.10 .github/, images/, image-builder-charts/, openshell-sandbox-carry/
Docs: install guide, container, Kata and audit README.md, docs/

Container and Kata workspaces

  • Adding a user: an entry in overrides/saw-users.yaml creates a container or Kata workspace through Argo CD. The projector resolves the user, enrollment publishes the boundary, and the runtime reconciles the user's own OpenShell gateway.
  • No cluster-specific configuration:
    • Workspaces reach the Kubernetes API through an AdminNetworkPolicy nodes peer on the control-plane nodes, and DNS through the cluster DNS pods. No IPs are needed.
    • Storage is the cluster's default StorageClass.
    • overrides/container-network.yaml and the per-cluster storage file are gone. make saw-init is the one preparation step.
  • Audit:
    • OCSF events from every gateway and supervisor go to an OpenTelemetry collector that the pattern deploys (Red Hat build of OpenTelemetry).
    • The OpenClaw tool gate keeps a local audit log by default.
    • Signed, fail-closed receipts are optional (auditReceipts). Only then does a workspace get the audit writer, a saw-history-* namespace and RWX storage.
  • Agent trace relay (OpenShell 0.1.10): each supervisor forwards the workload's own OTLP traces to the same collector, tagged with the sandbox ID. OpenClaw's own trace export needs its diagnostics-otel plugin, which OpenClaw 2026.9.6 doesn't bundle; that's a follow-up.
  • Admission policy (saw-runtime-policies): supervisor and workload pods must match the stock OpenShell shape. That means the approved images and commands, and only the configured OCSF and agent-trace collectors and a numeric attach timeout. The gateway and the policy get their images from one value.
  • Provider profiles: a credentialed provider's live profile must match the shipped governed profile exactly. That covers every endpoint's host, ports, path, protocol, access preset and L7 rules, not just host and port.

Kata

  • values-prod.yaml installs the OpenShift sandboxed containers operator.
  • saw-kata creates the KataConfig, selecting plain workers only. It also creates a saw-kata RuntimeClass that's already labelled attachable, so nobody labels the operator's class by hand. It is off by default, because enabling it reboots the workers once.
  • Kata users default to saw-kata. On autoApprove sites the projector binds them to its live UID and placement digest automatically. Reviewed sites keep an explicit binding.
  • Two VMs per sandbox: with OpenShell 0.1.10 (supervisor_runtime_class_name), the supervisor runs in its own Kata VM. It handles the agent's traffic and credentials, so it never shares the workload's guest kernel. This is required, not optional: the admission policy and the controller's boundary check both enforce it.

OpenShell v0.1.10-rhaiv.0

Tooling: make e2e-workspace OPENSHELL_SAW_NAME=<user> DEPLOYMENT_MODE=vm|container|kata checks one user's live workspace:

  • Argo health and sandbox readiness.
  • Kata placement, for Kata users.
  • A real OpenClaw turn that must echo a random token through the user's inference provider.
  • The tool gate's audit entry for that turn.
  • OCSF events at the collector.

Temporary items

  • openshell-sandbox carry. On OpenShift (RHEL 9, kernel 5.14), odh-openshell-sandbox:v0.1.10-rhaiv.0 panics in its network broker on every connect, so the agent has no network and no inference.
    • Cause: the new process-identity code (feat(supervisor): identify the process behind each network event ai-openshell/openshell#5251) calls rustix clock_ticks_per_second(). rustix reads the aux vector with prctl(PR_GET_AUXV), which needs Linux 6.4 or later, or with /proc/self/auxv, which a non-dumpable sandbox running as a non-root UID can't read.
    • openshell-sandbox-carry/ rebuilds only /openshell-sandbox from the same downstream commit with a one-line warm-up at the top of main(), and layers it onto the official image.
    • An issue is being filed with opendatahub-io/openshell. Remove the carry once a fixed image is released.
  • Image pins: the runtime, OpenClaw, interceptor and sandbox-carry images are pinned to ghcr.io/sauagarwa/… CI builds until main CI publishes them.

Verification

  • Unit tests: 2239 chart, runtime, script and portal tests pass, plus the installer suite. The interceptor's SAW extension tests pass against v0.1.10.
  • Live, on an OpenShift 4.x test cluster (RHCOS 9.8): after the final changes, a GitOps-deployed container user and a Kata user, both using custom inference, passed make e2e-workspace with every check green. For the Kata user, the workload and the supervisor each ran in saw-kata. Removing and recreating both users through GitOps also worked.
  • Not retested on v0.1.10: VM mode. It's next, and will also show whether VM sandboxes need the carry.

Follow-ups (separate PRs)

  • Export OpenClaw's own traces (the diagnostics-otel plugin, or a newer OpenClaw).
  • The reconciler should recover when a first sandbox create is rejected after the gateway records its request ID. Today it needs a new generation.
  • A relay app's retrying sync blocks workspace deletion until it's terminated.
  • After the last user is removed, adding one stalls about 3 minutes while the projector's identity is recreated.
  • The self-service portal's Kata path still needs an explicit RuntimeClass binding.
  • Superseded tool-gate trees accumulate on the gate volume.
  • Possibly merge the per-user saw-ctl-* and saw-ui-* namespaces.

https://claude.ai/code/session_01B7As13NaHoAbqt5NZ6SRn8

Supersedes #173 (same 5 commits by @sauagarwa, unchanged).

CI fixes

  • Vendor the served KataConfig v1 schema from OpenShift sandboxed containers
    operator v1.13.1 at commit 891eadc9fa270c38b1d7040d05675636990058b8.
    Deployment validation continues to reject missing schemas, and the schema
    lookup test and pinned-source documentation include KataConfig.

  • Extend the existing NemoClaw Debian package alignment to replace the removed
    ca-certificates=20250419 pin with 20250419+deb13u1, keeping the curl
    8.14.1-2+deb13u7 alignment. Tests execute the workflow step against stale,
    partially updated and already-correct pins, then confirm a second run changes
    nothing.

  • Local targeted verification: uv run --locked pytest -q tests/charts/test_nemoclaw_image_build.py tests/scripts/test_deployment_validation_ci.py — 27 passed.

  • make test-dependencies — 0 errors, including 299 schema resources.

  • GitHub CI at 838b8513: 25 successful checks, 12 expected skips,
    including Deployment validation and both NemoClaw sandbox architectures.

Installation blocker fix

The first fresh-cluster install exposed a failure in the documented credential
setup: the current utility framework rejects duplicate secret names even when
vaultPrefixes differ. The container-workspace instructions now put distinct
owner keys in a separate values-secret file selected explicitly with
VALUES_SECRET; the template also explains how one entry can share identical
credentials across multiple prefixes. Appending a second inference or
web-search entry to the platform's file no longer appears as the install path.

Review follow-up fixes

  • The demonstration collector now uses detailed, unsampled debug output with
    a dedicated logger, preserving OCSF event bodies, sandbox identities and trace
    details in its logs. The installation guide distinguishes demonstration logs
    from a production SIEM or durable audit store.
  • Lifecycle-enabled model selection requires auditReceipts: true. Static
    projection rejects an unsupported local-audit combination before enrollment
    reads, portal requests reject it before credential writes, and direct chart
    rendering rejects it before the enrollment Job exists. The compiler's receipt
    requirement remains enforced. Fixed-model local audit remains supported.
  • W6 selects the requested sandbox's own workload/supervisor pair and requires
    a fresh OCSF JSON body whose device.container.uid matches both the live
    sandbox UUID and the record's openshell.sandbox.id attribute. Batch summaries,
    other sandboxes, stale bodies, malformed records and request resource references
    cannot satisfy it.
  • Focused chart, portal, projection, OCSF matching and receipt-backed compiler
    tests passed (278 distinct cases across targeted runs). make test-dependencies
    again completed with 0 errors, including 299 schema resources.
  • CI for review-fix commit 68246ced is running.

Live verification

Fresh-cluster verification on 2026-11-25, following README Installation
→ Kata workspace and docs/kata-workspaces.md:

  • Cluster: cluster-9q89w, OpenShift 4.22.22, BareMetal,
    OVNKubernetes.
  • Workers: two dedicated amd64 workers, both qualified for KVM. No cloud
    instance-type label is present. Control-plane nodes were excluded from Kata.
  • KataConfig saw-kata-pool: 2 installed / 2 ready, InProgress=False;
    MachineConfigPool kata-oc Updated and not degraded. Both kata and
    attachable saw-kata RuntimeClasses are present.
  • Platform applications installed successfully. Workspace kata1 uses
    saw-kata for its separate supervisor and workload Pods, custom inference at
    https://integrate.api.nvidia.com/v1, and
    nvidia/nemotron-3.5-lightning-30b-a3b.
  • Cluster-specific values are confined to
    mtalvi/secure-agent-workspace:test/fresh-cluster-kata; none are in this PR.

make e2e-workspace OPENSHELL_SAW_NAME=kata1 DEPLOYMENT_MODE=kata — passed.

=== W1 Argo CD applications ===
  PASS saw-c-d43b55dd1e7f58e3-audit
  PASS saw-c-d43b55dd1e7f58e3-controller
  PASS saw-c-d43b55dd1e7f58e3-gateway
  PASS saw-c-d43b55dd1e7f58e3-identity
  PASS saw-c-d43b55dd1e7f58e3-policy
  PASS saw-c-d43b55dd1e7f58e3-relay
  PASS saw-kata1
  PASS saw-kata1-bom
  PASS saw-projector-e0444315fece47b92ea0-kata1

=== W2 sandbox Pods ===
  PASS os-supervisor-bcf92a35-24e7-46b6-9a78-ccd28ec4e8b2 Ready
  PASS default--notebook Ready

=== W3 Kata runtime ===
  PASS workload runs in saw-kata
  PASS supervisor runs in its own saw-kata VM

=== W4 OpenClaw inference turn ===
  PASS model returned the nonce through the user's inference profile

=== W5 tool-gate audit ===
  PASS gate recorded exec: deny for kata1

=== W6 OCSF export ===
  PASS collector preserved a fresh OCSF body: sandbox=bcf92a35-24e7-46b6-9a78-ccd28ec4e8b2 class_uid=4001 activity_id=1 time=1795609907070

kata workspace for kata1: all checks passed

Owner browser chat passed. On 2026-11-25, @mtalvi confirmed the manual
check: signing in as kata1, sending a chat message through the owner route,
and receiving a real model reply.

The Kata e2e above was rerun after the review fixes on 2026-11-25.
The deployed collector retained the following fields from the verified record:

{
  "log_record_attributes": {
    "openshell.sandbox.id": "bcf92a35-24e7-46b6-9a78-ccd28ec4e8b2"
  },
  "ocsf_body_excerpt": {
    "class_uid": 4001,
    "class_name": "Network Activity",
    "activity_id": 1,
    "activity_name": "Open",
    "type_uid": 400101,
    "time": 1795609907070,
    "device": {
      "container": {
        "uid": "bcf92a35-24e7-46b6-9a78-ccd28ec4e8b2"
      }
    }
  }
}

sauagarwa and others added 8 commits November 25, 2026 07:17
The saw-kubernetes-runtime controller that drives a user's stock OpenShell
gateway: it compiles the workspace plan, enrolls it, and reconciles the
workspace, providers and sandboxes.

- OpenClaw tool gate: automation approvals, retry hints, harness rules and
  model thinking, with a best-effort local audit log by default and signed
  fail-closed receipts as an option. The audit mount stays on log/.
- Superseded tool-gate trees are kept for sandboxes that still mount them.
- Native providers: an already-configured refresh is observed, not resent.
- A credentialed provider's live profile must match the shipped governed
  profile exactly: every endpoint's host, ports, path, protocol, access and
  rules (custom inference: the site's host).
- Kata: the boundary check requires the workload and the supervisor in the
  approved RuntimeClass.

Assisted-By: Claude
Portal and GitOps projection of container and Kata workspaces, and the
platform charts they need.

- saw-portal-container: per-user stack (identity, policy, gateway, audit,
  relay). No cluster-specific addresses: the Kubernetes API through the
  control-plane nodes, DNS by selector, the cluster's default StorageClass.
  Signed audit receipts are optional (auditReceipts); OCSF events and the
  agent trace relay go to the pattern's OpenTelemetry collector. The gateway
  and the admission policy pin the same runtime and supervisor images.
- saw-runtime-policies: supervisors may carry only the configured OCSF and
  agent-trace collectors and a numeric attach timeout; in Kata mode both the
  workload and the supervisor must use the approved class (two VMs).
- saw-users: projection with an IP-free projector; Kata users default to
  saw-kata, bound by its live UID and placement digest on autoApprove sites.
- saw-kata (KataConfig and an attachable saw-kata RuntimeClass) and
  saw-telemetry (OCSF logs and agent traces collector).
- OpenShell v0.1.10-rhaiv.0 for VM and container users; the governance
  interceptor rebuilt from v0.1.10; container sandboxes on a temporary
  openshell-sandbox carry until a fixed image is released.
- openshell-rhdh portal, Keycloak relay registrar, container defaults.

Assisted-By: Claude
- values-prod: OpenShift sandboxed containers and Red Hat build of
  OpenTelemetry operators, saw-kata (off by default), saw-telemetry,
  agent-sandbox, container defaults for saw-users and the portal.
- make saw-init is the one preparation step: storage classes and, only for
  audit receipts, the shared RWX class.
- make e2e-workspace checks one user's live workspace for vm, container or
  kata: Argo, sandbox, Kata placement, a real inference turn, the tool-gate
  audit entry and OCSF export.
- Scripts and tests follow OpenShell v0.1.10.

Assisted-By: Claude
- OpenShift-ready OpenClaw image and the workspace runtime image, published
  from branches on demand.
- Governance interceptor built from OpenShell v0.1.10 (Rust 1.95) with the
  SAW extension; the ai-openshell/openshell#3929 workaround stays.
- TEMPORARY carry: odh-openshell-sandbox v0.1.10-rhaiv.0 rebuilt with one
  fix. Its network broker panicked on every connect on RHEL 9: rustix could
  read the aux vector neither through PR_GET_AUXV (Linux 6.4+) nor through
  /proc/self/auxv once the sandbox is nondumpable. The patch reads it at the
  top of main(). Remove once a fixed image is released.

Assisted-By: Claude
README rewritten as an install guide (VM, container and Kata users, make
e2e-workspace); container installation, Kata (pattern-managed runtime, two
VMs per sandbox), audit events and receipts, deployment and governance docs
updated for OpenShell v0.1.10.

Assisted-By: Claude
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mtalvi
mtalvi marked this pull request as ready for review November 25, 2026 12:05
@mtalvi
mtalvi requested a review from Hadar301 November 25, 2026 12:10

@Hadar301 Hadar301 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed PR #174 with the #173 review as context. The four earlier high urgency findings remain fixed, and the description now covers the broader scope.

One high urgency issue remains in charts/saw-telemetry/values.yaml:9–11: the sole default exporter uses debug verbosity: basic, which writes batch counts and discards the OCSF event bodies and trace details. Successful delivery therefore leaves no event details in the documented collector log. Please use a record-preserving exporter, or detailed output for the demonstration setup, and verify a record with its body and sandbox identity before merge.

Two medium issues also need attention. Lifecycle-enabled model selection generates a local-audit binding that compiler.py:402–404 rejects without a receipt key. Also, the W6 check can pass from another workspace's traffic because it only counts shared collector batch summaries. Please support or reject the lifecycle/audit combination before enrollment, and make W6 verify an event from the workspace under test.

…settings

Use detailed, unsampled collector output for the demonstration deployment.
Require W6 to find a fresh OCSF JSON body and matching sandbox identity rather
than shared batch summaries. Select the requested sandbox's own pod pair.

Reject lifecycle model selection without receipts in shared projection,
portal requests before credential writes, and direct chart rendering.
Keep the compiler's receipt-key requirement intact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mtalvi
mtalvi force-pushed the kata-container-openshell-0110 branch from ecf0448 to 68246ce Compare November 25, 2026 12:30
@mtalvi

mtalvi commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

I reviewed PR #174 with the #173 review as context. The four earlier high urgency findings remain fixed, and the description now covers the broader scope.

One high urgency issue remains in charts/saw-telemetry/values.yaml:9–11: the sole default exporter uses debug verbosity: basic, which writes batch counts and discards the OCSF event bodies and trace details. Successful delivery therefore leaves no event details in the documented collector log. Please use a record-preserving exporter, or detailed output for the demonstration setup, and verify a record with its body and sandbox identity before merge.

Two medium issues also need attention. Lifecycle-enabled model selection generates a local-audit binding that compiler.py:402–404 rejects without a receipt key. Also, the W6 check can pass from another workspace's traffic because it only counts shared collector batch summaries. Please support or reject the lifecycle/audit combination before enrollment, and make W6 verify an event from the workspace under test.

Fixed all three in 68246ced:

  • Collector output is now detailed and unsampled; verified a real OCSF body with its sandbox identity.
  • Lifecycle-enabled model selection without auditReceipts: true is rejected before enrollment or credential writes.
  • W6 now requires a fresh OCSF event whose body and record attribute match the sandbox under test.

Targeted tests and live Kata W1–W6 checks passed on cluster-9q89w. PR description updated with the evidence.

@Hadar301 Hadar301 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR, LGTM 🚀

@mtalvi
mtalvi merged commit c44caef into validatedpatterns-sandbox:main Nov 25, 2026
37 checks passed
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.

3 participants