Commit Graph
1882 Commits
Author SHA1 Message Date
Polite_realism fa2d381eaa docs(gateway): make the Podman container gateway example work (#4977)
The "Using Podman" example no longer produces a working gateway on
rootless Podman. Replace the single command with a tested procedure that
runs the gateway with mTLS, and document the five settings it needs: a
writable state directory, a same-path data directory, generated signing
keys and TLS certificates, the SELinux type for the Podman socket, and
matching host and container ports.

Refs #4972

Signed-off-by: politerealism <burdcat17@gmail.com>
v0.1.7-pre.1
2026-10-27 20:50:48 +00:00
Jesse Jaggars 2c31ac7e60 feat(network): support additional destination CAs (#3292)
* feat(network): support additional destination CAs

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(network): harden additional CA propagation

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(network): narrow additional CA review scope

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(network): harden additional CA rotation

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* feat(network): complete additional CA delivery

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(docker): remove stale runtime fixture field

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(network): adapt additional CA series to upstream main

Resolve rebase fallout against current upstream main after the series was
rebased 214 commits forward:

- follow upstream #3110: supervisor→gateway TLS is CA-only, so
  configure_gateway_tls and its isolation tests drop the client identity
- follow upstream tls_secret_names reduction to [String; 1] in the Podman
  driver while keeping the network trust bundle delivery
- port [openshell.supervisor.network] rendering into the
  openshell.gatewayConfigToml serializer in _toml.tpl
- adapt tests to upstream struct/function changes (DriverStartupContext,
  SandboxRunConfig, IsolationSpecInput, supervisor_pod, VM bootstrap image)
- drop conformance-artifact-prefix plumbing removed upstream

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* refactor(network): adopt upstream additional CA bundle surface

Unify the additional destination CA series on the mechanism merged to
main in #3996: one operator pre-assembled PEM bundle, the
--additional-ca-bundle supervisor flag, and the
/etc/openshell/tls/additional/ca-bundle.pem staging path.

- Replace the gateway-level additional_ca_cert_paths list with a single
  additional_ca_bundle file validated and staged at gateway startup.
- Restore the upstream supervisor argument path and fold-into-roots
  behavior; drop the --network-additional-ca-bundle and
  --network-additional-ca-digest contracts.
- Keep gateway normalization bounds, content-addressed staging,
  digest-based driver reconciliation, and stop/start rotation; the
  freshness check now runs at the gateway/driver boundary instead of
  the supervisor boundary.
- Reject additional_ca_bundle in operator driver JSON config; standalone
  drivers self-source the bundle from --sandbox-additional-ca-bundle
  with the same validation.
- Extend the Kubernetes ConfigMap name digest segment to keep the full
  63-byte budget after the prefix rename.
- Box the persisted-sandbox reconciliation futures so callers stay
  under the clippy::large_futures threshold.

Updates Docker, Podman, Kubernetes, and VM delivery, Helm chart and
tests, e2e wiring, gateway configuration docs, and the cluster
debugging skill to the single mechanism.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(ci): make gateway startup tests wrap-tolerant and refresh example lockfile

The network trust startup tests asserted on raw substrings of gateway
diagnostics, but the CLI renderer wraps output at a fixed width with
continuation markers and hard-breaks long paths. Compare assertions on
whitespace- and continuation-squashed text so they hold regardless of
wrap position.

Format the e2e workspace (separate cargo workspace, not covered by the
root cargo fmt run) and refresh examples/isolation-backend-v8/Cargo.lock
for the libc dependency added to the network trust crate.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(podman): reuse TLS CA secret during stopped-pair trust replacement

The additional CA e2e never ran in CI before the first maintainer test
dispatch, and its local container inspection was broken in two ways: it
located the supervisor container through e2e network membership (the
supervisor is host-networked or runtime-bridged, so the filter matched
the CI job container instead), and it required the gateway mTLS CA as a
bind mount (Podman delivers it as a container secret when user
namespaces remap UIDs). Select the supervisor by managed labels and
accept the secret delivery form.

The lifecycle leg then exposed a driver bug: stopped-pair trust
replacement re-created the per-sandbox TLS CA secret, colliding with
the secret still owned by the renamed stopped pair. Mirror the token
and resolver secret handling: require and reuse the existing secret
during replacement instead of creating it.

Validated end-to-end with the Podman additional CA e2e lane.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(server): restore upstream recovery semantics for start-request failures

Recovery no longer marks sandboxes Error/InvalidPersistedSandbox when
driver_start_request fails during the startup or lifecycle sweeps.
Gateway configuration problems (for example a missing launch signer)
must not permanently fail unrelated sandbox records; the sweep logs a
warning and skips them, matching the behavior before the additional CA
work. Sandbox-record failures surface through the normal start path.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* refactor(podman): refresh stale supervisors without replacing workloads

Replace the stopped-pair trust reconciliation with supervisor-only
recreation. The destination-trust generation label moves from the
workload to the supervisor container, and start_sandbox recreates only
the supervisor when its generation is missing or stale. The workload
container, its volumes, its secrets, and its workspace data are never
replaced: the additional CA bundle is mounted only into the supervisor.

Running sandboxes are never gated on trust labels, and recovery without
fresh launch credentials keeps the existing supervisor. The intentional
-removal fence machinery in the watcher existed only for workload
replacement and is removed with it.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* refactor(docker): drop workload replacement for destination-trust changes

Delete the stopped-workload trust reconciliation path and all of its
machinery: the trust-generation label on workload containers, the
generation match check in the start fence, the stopped-sandbox
replacement, the bounded workspace archive copy with its 512 MiB cap
and regular-file-only validation, and the boundary-state rollback
helpers.

No replacement machinery is needed: the trusted supervisor container
is already re-created from the gateway's current configuration on
every start via ensure_control_process_for_container, so stop/start
picks up the current additional CA bundle while the workload
container, its volumes, and its workspace data are never replaced.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* docs(configuration): drop reconciliation wording from additional CA lifecycle

The stop/start lifecycle description already matches the
supervisor-only refresh model; remove the two remaining references to
restart reconciliation of workload containers.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(network): port additional CA test fixtures to the crypto interface

Route the gateway TLS isolation test PKI, the destination CA source
fixtures, and the gateway startup trust tests through
openshell_crypto::pki now that rcgen access is centralized there:
generate_keypair/self_signed/signed_by replace the direct rcgen calls
and CertifiedKey field access follows the wrapper's shape.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(e2e): repair additional CA lane for Docker and non-container builds

The first maintainer test dispatch revealed two latent issues in the
additional CA e2e that no local run had exercised: the Podman gateway
CA secret helper referenced ContainerEngine without the container
feature gate, breaking Kubernetes and VM builds of the test, and the
Docker branch asserted a client ca.crt bind mount that the Docker
driver never creates. Gate the helper like its callers, and assert
Docker's actual delivery path instead: the gateway mTLS CA staged as
tls/ca.pem inside the read-only supervisor state volume, selected
through the OPENSHELL_TLS_CA environment pointer.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(helm): restore alphabetical README ordering for supervisor keys

The helm:docs check regenerates the chart README with helm-docs, which
orders rows alphabetically; a conflict resolution had placed
supervisor.network.additionalCaConfigMapName after the
supervisor.podSecurityContext rows. Regenerate with mise run
helm:docs.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* chore: refresh testkit lockfile for openshell-core libc dependency

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(driver-podman): stage operator CA bundle as driver-owned artifact

Standalone Podman drivers accepting --sandbox-additional-ca-bundle
previously kept the operator's source path as the trust artifact path.
The immutable-artifact verification performed on every create/start
requires exactly mode 0444, which an operator-owned source path cannot
guarantee, so a readable-but-writable source failed reconciliation.

Read the operator bundle with the same bounded, no-symlink validation,
then stage the normalized material into a driver-owned artifact inside a
private tempdir held for the driver process lifetime. The artifact is
created 0600, synced, and only then restricted to 0444 so no observer
ever sees a writable artifact. The operator source and its permissions
are never referenced after startup.

Addresses GATOR-291f43b2-02.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(driver-podman): pin retained workload image during supervisor refresh

Supervisor-only trust reconciliation re-entered
create_sandbox_with_existing_token, which re-pulled and re-resolved the
workload image tag even though the workload container is retained. If
the tag moved to a different image between stop and start, identity
resolution and child-environment construction would reflect the new
image while the retained workload still runs the original one, leaving
mode-0600 bootstrap files the retained user cannot read.

During a refresh with a retained workload, inspect the stopped container
and pin to the immutable image ID it was created from (Config.Image);
never pull or resolve the request tag. The requested reference is still
used for child metadata so the retained workload's environment is
byte-identical to its original launch.

Addresses GATOR-291f43b2-01.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* test(e2e): verify host-only VM trust delivery and drop curl dependency

The additional-CA lane's VM assertions read the destination CA out of the
guest overlay and a guest-side supervisor-argv marker — artifacts from
the guest-supervisor design that no longer exist now that the VM driver
stages the CA host-only and runs the supervisor on the host. Inspect the
driver-staged host artifact (digest-compared against the source), assert
the guest overlay contains no CA material at the old mount paths, and
keep the serial-console no-disclosure check.

The workload validation scripts also ran curl, which exists only in the
container-engine fixture image; the Kubernetes and VM lanes use the
uv-based workload image and died instantly with "canonical main process
already finished". Rewrite the main-process, exec, and lifecycle
validation scripts in python3 (present in every lane's workload image).
The network-policy binary identity is the resolved /proc/<pid>/exe
target, so the versioned python3.12 binaries are allowlisted rather
than the unversioned symlinks. The hostname mismatch check keeps its
semantics: same reachable fixture, mismatched TLS SNI, and the failure
must specifically be hostname verification.

Addresses GATOR-291f43b2-04.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(kubernetes): allow admission-added labels on destination-trust ConfigMaps

The destination-trust ConfigMap validation compared the whole label map
for equality. A mutating admission webhook that attaches an
organizational label to the created ConfigMap made the create response
fail validation, and the retained ConfigMap then failed every subsequent
create/start through the existing-object path, blocking sandbox launches
despite the ownership labels, immutable flag, digest, and certificate
bytes remaining correct.

Validate the gateway-owned label pairs individually and allow unrelated
labels; the exact trust-material checks are unchanged. Covered by a
regression test with an admission-added label and a missing
gateway-owned label.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(podman): close supervisor-refresh rollback gaps

The supervisor-only trust refresh renamed the previous supervisor to a
random rollback name and then performed the token-secret lookup. A
transient lookup failure returned with the supervisor still renamed,
where a normal delete could never find it, and the rollback rename and
final rollback removal ignored their own failures, leaving orphans with
attached control and channel resources.

Complete every fallible preparation before the rename. On a failed
replacement, restore the canonical name; if the restore itself fails,
return an error naming the rollback container so the orphan stays
identifiable — a later retry still succeeds because the canonical name
is absent and the replacement path recreates a fresh supervisor. Treat
not-found during the final rollback removal as success and name the
orphan in both the log and the error on other removal failures; a retry
observes the fresh canonical supervisor and resumes the normal start
path.

Covered by failure-injection tests for each transaction boundary:
preparation failure before any rename, replacement failure restoring
the canonical name, and restore failure naming the orphaned rollback
container.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* docs: address destination-trust review corrections

The gateway-configuration RFC documented an additional_ca_cert_paths
list that the strict configuration parser never accepted; document the
additional_ca_bundle single-path setting the parser actually enforces.

The debug-openshell-cluster skill named the wrong generation annotation
(openshell.ai/network-supervisor-trust-generation) and described digest
argv and network-init canonicalization checks the implementation does
not perform. Correct it to openshell.ai/additional-ca-generation and
describe the actual delivery: the supervisor Pod mounts the immutable
ConfigMap read-only and receives --additional-ca-bundle for the mount
path, with the driver validating the digest annotation and exact bytes
per creation.

Classify the destination-trust generation hashes as deterministic
identity derivation rather than authenticity proofs, following the
openshell-crypto exclusions table: trust decisions come from the
gateway's normalization, immutable staging, exact-byte validation, and
TLS verification. Record the classification in the crypto README and at
each hashing site.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(network): reconcile additional CA tests with suspend/resume and auth changes

Upstream's suspend/resume lifecycle took StartSandboxRequest fields 7
and 8, so the durable-snapshot field moves from 7 to 9; update the
wire-format test to assert the field-9 key (0x4a) and initialize the
new resume controls. Repair the cli test module after the auth opt-in
test merged alongside the environment-guard helpers, and initialize the
gateway driver-startup context's network-trust fields in the shared
supervision test.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(server): box start-recovery futures for clippy large-futures

The durable-snapshot field grows StartSandboxRequest enough that the
start-recovery match and the recovery-expiry test exceed the
large-futures limit under -D warnings. Box::pin both futures, matching
the pattern the recovery path used before the suspend/resume rework.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

---------

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>
2026-10-27 18:31:11 +00:00
Jesse Jaggars 26134dc735 feat(gateway): add hashed service-routing hostnames for multi-gateway clusters (#4842)
* feat(gateway): add hashed service-routing hostnames for multi-gateway clusters

Closes #4840

Add an optional service_routing_gateway_name gateway setting (TOML, CLI,
env, Helm) that disambiguates exposed service URLs when multiple gateways
share a cluster, ingress, and wildcard certificate. When configured,
exposed-service hostnames become a deterministic 16-character lowercase
base32 SHA-256 label of (gateway name, workspace, sandbox, service) under
the same base domain, keeping every hostname exactly one label deep for
wildcard-certificate compatibility. Unset gateways preserve the existing
readable hostname format byte-for-byte, and configured gateways still
accept legacy hosts during migration.

Hashed hosts resolve through an in-memory route index hydrated from
persisted ServiceEndpoint records at startup, refreshed on miss for
multi-replica deployments, maintained across expose, delete, and sandbox
cleanup, and enforced for collisions before endpoint persistence.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* fix(lint): satisfy clippy doc lints on main-landed sandbox_runtime code

The shared-supervisor landing (9a85667d0) predates the last Branch
Checks run on main, so its doc-comment style was never gated. Split the
three overlong first doc paragraphs so workspace clippy -D warnings
passes; behavior is unchanged.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

* refactor(gateway): address hashed-hostname review feedback

Three changes from PR review:

Identity model: replace service_routing_gateway_name with an explicit
service_hostname_format mode (readable, the default, or hashed). In
hashed mode the discriminator hashed into exposed-service hostnames is
the existing gateway installation name ([openshell.gateway].name,
operator- or platform-assigned, defaulting to the Helm release name),
so no second per-gateway name is introduced. The name must be a DNS
label and unique among gateways sharing the service base domain — an
operational contract held by the deploying platform, documented in the
configuration reference. gateway_jwt.gateway_id remains separate and
untouched; renaming the installation now changes every minted URL.

Request-path amplification: miss-triggered service route index
rebuilds are debounced to one attempt per five seconds. Unknown hash
labels reach the rebuild path before authentication, and without the
debounce each request carrying a random well-formed label triggered a
full all-workspaces endpoint scan. Startup hydration and explicit
rebuilds bypass the debounce.

OCSF regression: cross-origin rejections for hashed service hosts
emitted no security event because the logging path used the
readable-host parser only. The emitter now resolves hashed hosts
through the in-memory route index (never the miss-triggered rebuild
path) and still emits for unknown hash-shaped labels, attributed to
the raw label.

Also updates the debug-openshell-cluster skill for the new gateway
TOML fields, per the repository instructions for gateway config
changes.

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>

---------

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>
2026-10-27 17:51:44 +00:00
Taylor Mutch ac7f615cd1 fix(ci): allow accepted protobuf breaks for v0.1.6 prereleases (#4976)
* fix(ci): allow accepted protobuf breaks for one prerelease

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>

* fix(ci): cover all v0.1.6 prerelease candidates

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>

* docs(ci): document full rollback of temporary protobuf exception

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>

* fix(ci): complete protobuf test copyright header

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>

---------

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
v0.1.6 v0.1.6-pre.7 sdk/go/v0.1.6
2026-10-27 15:44:53 +00:00
alangou dedb089f0b fix(deps): update setuptools and vitest to patched releases (#4969)
* fix(deps): update setuptools to 84.1.0

Update the locked setuptools package and the build backend minimum to the patched release for GHSA-xmj3-9gf7-h52w.

Signed-off-by: Adrien Langou <alangou@nvidia.com>

* fix(deps): update vitest to 4.1.12

Update Vitest and V8 coverage together to resolve GHSA-qxg6-89mg-rqv8 and GHSA-xp26-3454-mjgp. Preserve unrelated locked dependencies.

Signed-off-by: Adrien Langou <alangou@nvidia.com>

---------

Signed-off-by: Adrien Langou <alangou@nvidia.com>
2026-10-27 15:43:30 +00:00
alangou bd2ecaf152 docs(skills): add structured security advisory authoring (#4872)
Signed-off-by: Adrien Langou <alangou@nvidia.com>
2026-10-27 14:40:05 +00:00
alangou 860ac27130 docs(security): add private reporting and advisory workflows (#4832)
* docs(security): use GitHub private vulnerability reporting

Signed-off-by: Adrien Langou <alangou@nvidia.com>

* docs(security): clarify report quality and advisory workflows

Signed-off-by: Adrien Langou <alangou@nvidia.com>

* docs(security): require structured evidence-backed reports

Signed-off-by: Adrien Langou <alangou@nvidia.com>

* docs(security): remove CVE coordination wording

Signed-off-by: Adrien Langou <alangou@nvidia.com>

---------

Signed-off-by: Adrien Langou <alangou@nvidia.com>
2026-10-27 14:40:03 +00:00
Simon Scatton f558da67fb fix(ci): add exceptions for zstd advisories (#4973)
Signed-off-by: Simon Scatton <sscatton@nvidia.com>
2026-10-27 14:25:17 +00:00
Taylor Mutch 2e1e2c50a6 chore(ci): extend issue stale window and exempt roadmap issues (#4962)
* chore(ci): extend issue stale window to 28 days

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>

* chore(ci): exempt roadmap issues from stale handling

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>

---------

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
2026-10-27 14:11:02 +00:00
Drew Newberry e5adf6f484 feat(supervisor): recover shared instances with hash-based HA (#4864)
* feat(supervisor): recover shared instances with hash-based HA

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): keep HA coordination out of compute drivers

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix(supervisor): fence pool admission and reconciliation races

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* feat(supervisor): keep pool mode stable across replica scaling

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): default shared deployments to pool mode

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix(supervisor): fence refused launches and remove legacy mode

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix(supervisor): confirm live owners and fence stale observations

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix(supervisor): preserve takeover cause log formatting

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* feat(helm): add memory-based supervisor autoscaling

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix(supervisor): retain acknowledgements and fence streamed input

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* docs(supervisor): consolidate experimental multi-tenant guidance

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* docs(supervisor): simplify multi-tenant supervisor guide

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): simplify pool member identity

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* feat(helm): make supervisor affinity configurable

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* feat(helm): make supervisor disruption budget optional

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* test(supervisor): align HA fixtures with suspend support

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

---------

Signed-off-by: Drew Newberry <anewberry@nvidia.com>
v0.1.6-pre.6
2026-10-27 04:28:39 +00:00
Drew Newberry f07127e5d7 feat(sandbox): add suspend and resume lifecycle (#4765)
* feat(sandbox): add suspend and resume lifecycle

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix(sandbox): preserve V8 state across failed resume launches

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix(sandbox): handle suspend and resume recovery races

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(example): move V8 suspend support to a dependent change

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix(sandbox): align suspend tests with current supervisor APIs

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix(sandbox): isolate suspend requests and resume compensation

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix(supervisor): allow restoration to wait until agent admission

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

---------

Signed-off-by: Drew Newberry <anewberry@nvidia.com>
2026-10-26 20:21:08 -07:00
Taylor Mutch 7b0f8ae07c fix(gateway): require authentication or explicit development opt-in (#4821)
* fix(gateway): require authentication or explicit development opt-in

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>

* fix(gateway): reject implicit unauthenticated admin requests

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>

---------

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
2026-10-27 02:33:15 +00:00
Shailendra SinghandDrew Newberry 17eda52d45 docs(windows): route main documentation to the Windows release branch (#4758)
* docs(windows): route main documentation to the Windows release branch

Signed-off-by: Shailendra Singh <shailendras@nvidia.com>

* docs(windows): include native MXC tests in full validation

Signed-off-by: Shailendra Singh <shailendras@nvidia.com>

* docs(windows): address documentation review feedback

Signed-off-by: Shailendra Singh <shailendras@nvidia.com>

* docs(windows): include E2E in full validation

Signed-off-by: Shailendra Singh <shailendras@nvidia.com>

* docs(windows): stop validation after any failed task

Signed-off-by: Shailendra Singh <shailendras@nvidia.com>

* docs(windows): simplify quickstart and installation guidance

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

---------

Signed-off-by: Shailendra Singh <shailendras@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Co-authored-by: Drew Newberry <anewberry@nvidia.com>
2026-10-26 23:36:38 +00:00
Free Wortley f5d9223e08 feat(supervisor): let operators require specific middleware bindings (#4678)
* feat(middleware): authorize supervisor bindings at registration

Let operators require and limit the operation and phase pairs that an
external middleware may expose. Validate the same binding policy at
gateway startup and when a supervisor discovers the service, and keep
only authorized bindings in the registry used for dispatch.

Preserve dynamic discovery and the existing wire configuration when no
binding policy is set. Document that older supervisors must be upgraded
before relying on binding restrictions.

Signed-off-by: Free Wortley <freeqaz@openai.com>

* docs(skills): check which supervisor middleware hooks the operator authorizes

Signed-off-by: Free Wortley <freeqaz@openai.com>

* fix(go): regenerate the sandbox protobuf binding

Restore the comment separator emitted by the pinned generator. This keeps the checked-in binding byte-for-byte reproducible without changing the protobuf schema or Go behavior.

Signed-off-by: Free Wortley <freeqaz@openai.com>

---------

Signed-off-by: Free Wortley <freeqaz@openai.com>
2026-10-26 22:23:46 +00:00
Matthew Grossman 5c533d6fbb docs: document local Nix setup and the OpenShell binary cache (#4931)
* docs: document local Nix setup and the OpenShell binary cache

Recommend Determinate Nix and configuring openshell.cachix.org system-wide so nix develop and nix run substitute the cross toolchains instead of building them from source.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs: link to upstream Nix install docs and mark the cache optional

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs: point Nix cache setup at the Cachix docs

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs: show the Determinate Nix cache config and link the Cachix cache

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

---------

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
2026-10-26 20:46:26 +00:00
DiveshandDhiraj Bokde d0a163a428 docs(rfc): add RFC 0018 for multi-sandbox and HA supervisors (#4377)
* docs(rfc): add RFC 0018 for multi-sandbox and HA supervisors

Propose four supervisor deployment models (per workspace, per node, per sandbox, per gateway) with shared safety rules for fenced recovery, and set out how to compare them and choose one. Refs #4311.

Signed-off-by: divesh <dgude@nvidia.com>

* docs(rfc): simplify RFC 0018 proposal and address review

Rewrite the proposal in plain language and shorten it. Address review notes on defaults, readiness, relay caps, the network fence, node drain, the driver reconciler, and token fencing on takeover.

Signed-off-by: divesh <dgude@nvidia.com>

* docs(rfc): tighten RFC 0018 proposal and note suspend scope

Trim the proposal without dropping content. Note backend-initiated suspend as a separate task, per-node fit with backends that move sandboxes, and sizing by active sandboxes.

Signed-off-by: divesh <dgude@nvidia.com>

* docs(rfc): define sandbox workload identity for shared supervisors

Signed-off-by: Dhiraj Bokde <dbokde@nvidia.com>

* docs(rfc): address RFC 0018 review feedback

Signed-off-by: divesh <dgude@nvidia.com>

* docs(rfc): clarify workload identity for shared supervisors

Signed-off-by: Dhiraj Bokde <dbokde@nvidia.com>

* docs(rfc): add verdict to RFC 0018

Signed-off-by: divesh <dgude@nvidia.com>

---------

Signed-off-by: divesh <dgude@nvidia.com>
Signed-off-by: Dhiraj Bokde <dbokde@nvidia.com>
Co-authored-by: Dhiraj Bokde <dbokde@nvidia.com>
2026-10-26 17:51:32 +00:00
Jim Meyer 2ff59bf33e feat(agents): allow gator to reach GHSA private forks (#4893)
Widen the github-gator provider's repo-scoped rules from NVIDIA/OpenShell
to {NVIDIA,ai-openshell}/{OpenShell,OpenShell-ghsa-*} so gator can read and
review pull requests in GitHub security advisory private forks. The search
rule already matches the forks and is unchanged.

Signed-off-by: Jim Meyer <jimeyer@nvidia.com>
2026-10-26 17:01:34 +00:00
Simon Scatton cc14afcc15 fix(ci): exempt Dependabot PRs from issue acceptance (#4928)
Signed-off-by: Simon Scatton <sscatton@nvidia.com>
2026-10-26 14:40:34 +00:00
Simon Scatton 9c6c25204c fix(deps): update tokio and crypto-bigint security patches (#4924)
* fix(deps): update tokio and crypto-bigint security patches

Signed-off-by: Simon Scatton <sscatton@nvidia.com>

* chore(deps): document temporary crypto-bigint advisory exception

Signed-off-by: Simon Scatton <sscatton@nvidia.com>

* fix(sandbox): migrate owned descriptors to AsyncFd register

Signed-off-by: Simon Scatton <sscatton@nvidia.com>

* test(server): avoid deadlock in concurrent CAS retry test

Signed-off-by: Simon Scatton <sscatton@nvidia.com>

---------

Signed-off-by: Simon Scatton <sscatton@nvidia.com>
v0.1.6-pre.5
2026-10-26 14:04:16 +00:00
Simon Scatton 37b7302796 chore(ci): update rust-cache to include upstream fixes (#4748)
Signed-off-by: Simon Scatton <sscatton@nvidia.com>
2026-10-26 13:53:37 +00:00
Simon Scatton 72bc3d3668 ci(release): infer optional workflow tags (#4707)
* ci(release): infer optional workflow tags

Signed-off-by: Simon Scatton <sscatton@nvidia.com>

* fix(release): use resolved tag in success notifications

Signed-off-by: Simon Scatton <sscatton@nvidia.com>

* fix(release): pin prerelease notes to resolved candidate

Signed-off-by: Simon Scatton <sscatton@nvidia.com>

---------

Signed-off-by: Simon Scatton <sscatton@nvidia.com>
2026-10-26 12:50:45 +00:00
Brooke Storm c4688aa871 feat(helm): add certificate hook pod labels and annotations (#4895)
Signed-off-by: Brooke Storm <brookes@nvidia.com>
2026-10-24 02:00:51 +00:00
Jim Meyer f571c8e99c docs(agents): ban AI attribution in PR descriptions and issues (#4890)
The rule against mentioning Claude or other AI agents covered only commits, so harness defaults could still add "Generated with" footers to PR descriptions. Extend it to PR descriptions and issues.

Signed-off-by: Jim Meyer <jimeyer@nvidia.com>
2026-10-23 22:27:25 +00:00
Eric Curtin 16250df210 feat(helm): add server.extraEnv for the gateway container (#4876)
Signed-off-by: Eric Curtin <eric.curtin@docker.com>
2026-10-23 22:17:20 +00:00
Jim Meyer 567d36033b fix(build): raise file limit for native gateway builds (#3122)
Native gateway builds exhaust the default open-file soft limit. Raise the
soft limit to the hard limit (capped) in the shared build environment and
apply it from the gateway task scripts.

Explicitly read the current soft limit and only raise it when needed.

Signed-off-by: Jim Meyer <jimeyer@nvidia.com>
2026-10-23 21:59:15 +00:00
krishicks e0ba078920 ci: keep rust caches warm on main and stop saving binary caches on branches (#4881)
Branch Checks never runs on main, so PR mirrors had no main rust-checks
cache to restore and each one saved its own. Per-binary release build
caches were also saved from every branch. Together they filled the 50 GB
cache quota within hours and evicted main's caches.

Save per-binary caches only on main, and add a Rust Cache workflow that
builds the Branch Checks test targets on each push to main so PRs and
merge groups can restore a matching rust-checks cache.

Signed-off-by: Kris Hicks <khicks@nvidia.com>
2026-10-23 21:15:15 +00:00
krishicks 92434dcb2b test(windows): repair the Windows MSVC test suite (#4862)
* fix(isolation): validate Unix socket paths the same way on every host

Prior to this change, SandboxTransport::validate checked Unix socket
paths with Path::is_absolute(). On Windows that requires a drive or UNC
prefix, so a POSIX path such as /run/backend.sock was rejected as
"invalid boundary control transport endpoint". The isolation backend
registration work in #3898 added tests that register Unix endpoints
in the core registration types, gateway config, gateway config
preflight, and supervisor backend setup; all of them failed on the
Windows MSVC runners. The Windows test job only runs on PRs labeled
test:windows, so the break went unnoticed on main.

Unix transport is refused at runtime on non-Unix hosts, so these paths
are always POSIX paths regardless of where they are validated. Now, both
the core registration validator and the sandbox backend protocol
validator use a new openshell_core::paths::is_posix_absolute helper,
which applies the POSIX rule (the path starts with '/') on every host.
On Unix this matches is_absolute() exactly.

Signed-off-by: Kris Hicks <khicks@nvidia.com>

* test(supervisor): run baseline write-back cases only on Unix hosts

The startup policy write-refusal tests from #3785 rely on
enrich_proto_baseline_paths adding the proxy baseline paths (/usr,
/tmp, /dev/null, ...) to a policy, which triggers a write-back that the
fake gateway then refuses. Enrichment only adds paths that exist on the
host. Prior to this change, the tests assumed those paths exist, so on
Windows enrichment added nothing, the precondition assertions failed,
and the baseline case of permanent_codes_still_exit never saw a write
to refuse.

Now, the four baseline write-back tests are gated to Unix, and
permanent_codes_still_exit checks the image policy upload case on every
host and the baseline write-back case only on Unix.

Signed-off-by: Kris Hicks <khicks@nvidia.com>

* test(server): scale the SQLite concurrent-write test for Windows fsync

sqlite_concurrent_writes_return_their_own_resource_version (#4408) runs
8 writers that each make 25 unconditional and 25 version-checked writes
against one row of an on-disk WAL database with synchronous=FULL.
Writers serialize on the SQLite write lock and wait out sqlx's default
5s busy_timeout. Prior to this change, the per-commit fsync cost on the
Windows runners was high enough that a waiting writer starved past that
timeout and failed with "database is locked" after about 7s.

Now, each writer makes 5 writes on Windows and 25 elsewhere. The test
still races every writer on the same row, which is what it checks.

Signed-off-by: Kris Hicks <khicks@nvidia.com>

* test(server): hold scope-mix locks for wall-clock time, not timer ticks

random_scope_mix_never_deadlocks (#4147) runs 64 tasks of 50 random
lock operations and holds each operation's locks for 0-2 ms, failing if
the mix does not finish within 20s. Prior to this change, the hold was a
tokio::time::sleep. Windows timers round a 1 ms sleep up to about 16 ms,
and a quarter of the operations take the exclusive global lock, so the
serialized holds alone took several seconds and the full mix exceeded
the 20s deadline on the Windows runners.

Now, occupy yields until a std::time::Instant deadline, so holds last
0-2 ms of wall-clock time on every platform and the deadline means the
same thing everywhere.

Signed-off-by: Kris Hicks <khicks@nvidia.com>

* test(supervisor): run sandbox instance host tests only on Unix hosts

The sandbox_instance_host tests added with per-instance supervisor
state (#4701) admit hosted instances through SandboxInstanceHost::new,
which prepares a private directory per instance. Hosted sandbox
instances are Unix-only: on other hosts prepare_private_dir returns
"hosted sandbox instances require a Unix host". Prior to this change,
the test module still compiled and ran on Windows, so all three tests
failed while creating their host.

Now, the test module is gated to Unix, and the Unix-only permission
check inside one test no longer needs its own cfg attribute.

Signed-off-by: Kris Hicks <khicks@nvidia.com>

---------

Signed-off-by: Kris Hicks <khicks@nvidia.com>
2026-10-23 18:06:35 +00:00
Oliver Calder 72e4eaa89c feat(snap): publish prerelease builds to latest/beta channel (#4870)
* feat(snap): publish prerelease builds to latest/beta channel

Signed-off-by: Oliver Calder <oliver.calder@canonical.com>

* fixup! feat(snap): publish prerelease builds to latest/beta channel

Signed-off-by: Oliver Calder <oliver.calder@canonical.com>

* fix(snap): use concurrency group when checking version to publish snap

Signed-off-by: Oliver Calder <oliver.calder@canonical.com>

---------

Signed-off-by: Oliver Calder <oliver.calder@canonical.com>
2026-10-23 16:43:24 +00:00
krishicks 5bfe2fbc88 docs(contributing): exempt build and flaky-test fixes from the issue requirement (#4875)
Prior to this change, CONTRIBUTING.md, the PR template, and the
create-github-pr skill required every PR except automated dependency
updates to close an issue. A maintainer fixing a broken build or flaky
tests had to file an issue that only restated the failure the PR already
describes.

Now, authors with WRITE, MAINTAIN, or ADMIN access may open a PR that
only fixes a broken build or flaky tests without a separate issue, and
describe the failure in the PR instead. Authors without write access
still need an accepted issue; the PR Issue Acceptance workflow already
passes write-access authors without checking for linked issues, so it
needs no change. The branch naming rule now covers PRs without an issue,
and the sync-agent-infra consistency check states the new rule.

Signed-off-by: Kris Hicks <khicks@nvidia.com>
2026-10-23 14:40:13 +00:00
Simon Scatton bc4c8f0013 fix(deps): update ctutils to resolve timing advisory (#4867)
Signed-off-by: Simon Scatton <sscatton@nvidia.com>
2026-10-23 14:13:07 +00:00
Drew Newberry 9a85667d0d feat(kubernetes): host sandboxes on the shared supervisor (#4702)
* feat(sandbox-backend): route runtime connections to shared supervisor sessions

A supervisor shared by several sandboxes needs one listener for every
session's runtime-initiated Sandbox Protocol connections. The runtime
now sends a fixed, bounded routing preface (magic, version, length, and
an opaque route handle) before its pinned TLS handshake when its
bootstrap names a route. RuntimeRouter treats the handle only as a hint
that selects which generation-pinned TLS identity to demand, closes
unknown, removed, and replaced handles before any handshake, bounds
unauthenticated handshakes globally and per route, and queues an
authenticated connection only for its own session, so no peer can
displace a live channel. A routed session waits up to the bootstrap
grace for its first connection, because it is registered before its
workload Pod is scheduled.

The session_control module defines the trusted contract between a
compute driver and a shared supervisor: registering one generation's
runtime descriptor and gateway-issued credentials, reading its status,
and removing it, over mutually authenticated TLS 1.3.

Dedicated descriptors and bootstrap listeners keep their encodings.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* feat(supervisor): host gateway-registered sessions in one process

openshell-supervisor experimental-host replaces the idle bootstrap
process with a session host. A mutually authenticated session-control
API accepts registrations only from the admission certificate holder,
the gateway. Each registration starts a SessionHost session that acts
only with the gateway credentials issued for its generation, keeps its
proxy CA, trust directory, and SSH socket under a private directory,
and receives its runtime connections through the routed listener.
Status reports each session's own readiness; the health socket keeps
reporting process health only.

Removing a session runs on a task the host owns, so it completes when
the caller disconnects, concurrent removers share its result, and the
route stays reserved until the session has ended and its files are
gone. An identical registration is accepted again and a different one
for a registered route is refused.

Sessions get no upstream proxy, extra CA bundle, or provider workload
identity; the Kubernetes driver refuses configurations that need them.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* feat(server): issue a TLS-only private PKI from generate-certs

generate-certs --tls-only creates just a server and a client TLS Secret
from a fresh CA, with the same create-if-missing contract and a recovery
hint for partial state. The Helm certgen hook uses it for private PKIs
that must not carry a sandbox-JWT signing key.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* feat(kubernetes): supervise gateway-topology generations as shared sessions

With experimental_supervisor_topology = "gateway", each new runtime
generation becomes a session on the gateway's shared supervisor instead
of a supervisor Pod and boundary Service of its own. The generation
records its placement and session route on its Sandbox resource when it
starts, and every later decision reads that record, so changing the
setting never reinterprets a running generation and unknown records fail
closed. The runtime identity ends with the session route, which no Pod
UID can equal, so Pod authentication cannot vouch for a shared
generation.

Create and start add a per-sandbox egress allowance to the Pods the
shared supervisor's Service selects, bind it into the boundary evidence,
and register the session over session control before releasing the
workload; registration does not wait for the runtime, so create still
returns before the gateway persists the generation. Readiness follows
the session's own status. Stop, restart, and delete remove only that
session, and reconciliation suspends a workload whose session is gone
and removes sessions that no current generation may run. Configurations
with an upstream proxy or provider SPIFFE identity are refused.

Closes #4700

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* feat(helm): deploy and wire the shared supervisor

With the gateway topology enabled, the chart runs the session host as a
single-replica Deployment with its Service and a NetworkPolicy that
admits session control only from the gateway and runtime connections
only from sandbox workload Pods. The certgen hook issues a private
session-control PKI whose client credential only the gateway mounts,
the gateway may read only that Service, and the chart renders the
matching experimental_shared_supervisor table. The supervisor Pod has no
service account token. Settings the shared supervisor cannot isolate,
and a hand-written connection table, fail at render time.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(ocsf): attribute events to session-bound contexts

A supervisor process that hosts several sandboxes cannot use one
process-wide OCSF context: every event would carry the wrong sandbox
identity, and middleware requests read their sandbox identity from the
same context.

Builders now accept a ContextRef, either a borrowed context or a context
shared by a hosted session, so per-session contexts need not be leaked.
ctx() returns the context bound to the calling thread when present and
falls back to the process-wide context otherwise. OCSF JSON output
settings can likewise be bound per thread, and OpenTelemetry can parent
a span from an explicit W3C trace context instead of process
environment. A dedicated supervisor keeps using the process-wide
context.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* test(e2e): run two sandboxes on one shared Kubernetes supervisor

The e2e:kubernetes:shared-supervisor lane enables the gateway topology
and creates two sandboxes with different policies and provider
credentials. It checks that one shared supervisor process hosts both,
that each session enforces its own policy and injects its own
credential, that stopping one leaves the other working, that the routed
listener refuses stale and unknown routes and drops a peer that names a
live route without its pinned identity, and that a restart registers a
fresh session on the same process.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): scope gateway credentials and network state to a session

The supervisor kept its gateway bearer, Sandbox Protocol bearer, and
renewal task in process-wide slots, and the network supervisor read
provider token grants, proxy CA files, and the gateway identity from
process environment. A second sandbox in the same process would have
replaced or rotated the first sandbox's credentials, reused its
provider access tokens, and exposed its denials through policy.local.

GatewayCredentials now holds one session's gateway and Sandbox Protocol
credentials and their renewal; every gateway client receives a
GatewayEndpoint that pairs the URL with them, including log push,
ConnectSupervisor and its redirects, and extension-credential rotation.
run_networking takes a NetworkSession with the sandbox identity, the
session's gateway access, its Workload API socket, its policy.local
denial source, and its proxy CA files. Provider token grants use a cache
and HTTP client owned by the session and fail closed without a Workload
API socket.

run_session supervises one generation from an explicit SessionConfig and
owner-provided SessionControls. run_sandbox_with_backend remains the
dedicated entry point: it keeps the process-wide OCSF context, reads the
same environment, binds readiness endpoints to session readiness, and
stops on SIGTERM or SIGINT. The binary shares one set of credentials
between log push and supervision, as before.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* docs: describe the experimental shared supervisor

Document the gateway supervisor topology, its chart-owned connection
settings and limits, and how to debug and test it.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* feat(supervisor): host concurrent sessions on session-bound runtimes

SessionHost runs several supervisor sessions in one process. Each
session gets its own Tokio runtime, and every thread that runtime starts,
plus the thread driving it, is bound to the session's OCSF context, OCSF
JSON settings, log sink, and denial log. Tasks, blocking work,
reconnects, and credential renewal spawned by a session therefore keep
its identity, while threads outside any session carry none and push no
logs. Gateway credentials stay explicit per session.

Removing a session stops its workload gracefully, or cancels it at once
while it is still starting, then shuts down only its runtime and revokes
its gateway credentials. The key stays registered until the session
thread has finished, so the same generation cannot gain a second owner
while one is stopping. A panicking session reports a failure, clears its
readiness, and is revoked the same way. Hosted sessions get a private
proxy trust directory and serve policy.local denials from their own log.

A focused test runs two sessions concurrently and checks that nested and
blocking tasks see their own identity, gateway requests carry their own
bearer, log lines reach only their own stream, and removing one leaves
the other supervising.

Closes #4699

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix: tighten shared supervisor naming, removal deadlines, and route probes

The shared supervisor's resource name appended its suffix before
truncating, so a release fullname of 51 or 52 characters produced the
gateway Service's own name. A fullname without room for the suffix now
keeps a prefix and a hash of the whole fullname.

Removing a session waits up to 20 s for its workload to stop and 5 s for
the session runtime to shut down, but the driver gave DELETE the same
15 s budget as other session-control calls and reported normal removals
as failures. The contract now defines the removal grace and a 45 s
removal deadline, and deleting a sandbox no longer waits on a session
whose workload is already going away.

The shared host runs no supervisor OTLP trace or OCSF exporter. The
driver warns at startup when the gateway configures that export, and the
docs state the limit. experimental-host keeps its Unix-only imports in
its Unix entry point.

The e2e route probe fails when the supervisor neither refuses nor
challenges a connection, or keeps a challenged connection open after a
malformed TLS answer, and it checks that every probe reached the
supervisor Pod.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): route shared supervisor crypto through openshell-crypto

Main now routes first-party TLS providers and digests through the
openshell-crypto facade. Build the session-control TLS configurations and
the routed-runtime test server from its configuration provider, install the
experimental host's default provider through it, and hash shared session
registrations with its SHA-256 instead of a direct sha2 dependency.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* feat(supervisor): report shared supervisor health over TCP

experimental-host takes --health-port instead of a Unix health socket,
matching experimental-bootstrap. It binds the wildcard health listener
after the session-control and runtime listeners and accepts and closes
connections while the process runs. The chart probes the named container
port health (5502) with native kubelet tcpSocket checks; session control
stays on 5501, the Service exposes only runtime and session control, and
/run/openshell remains for per-session files.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): probe shared supervisor health on session control

The shared supervisor's kubelet tcpSocket probes now connect to the
mTLS session-control listener (5501) instead of a separate health
listener. Drop the experimental-host --health-port flag, its accept
loop, and the chart's 5502 container port. Probes open and close a
TCP connection; every session-control request still requires mTLS.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): use shared mode flags for the session host

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): describe the shared host module by its mode

Drop the experimental label from the shared host module documentation
so it matches the --mode=shared entry point. No behavior changes.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix(test): preserve shared supervisor workspace overlays

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): name hosted lifetimes sandbox instances

A sandbox instance is one running generation of a stable Sandbox
resource. Gateway transport connections and the gateway supervisor
sessions they carry can reconnect within one instance, so the hosted
object, its configuration, controls, host, and per-instance network,
denial, and token-grant state now use the sandbox instance name.

Rename session_host to sandbox_instance_host, run_session to
run_sandbox_instance, and SessionConfig, SessionControls, SessionHost,
and related hosted types to their SandboxInstance equivalents. Gateway
supervisor sessions, SSH sessions, and authentication session types
keep their names. No wire, configuration, or lifecycle behavior
changes.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): launch sandbox instances from one config and prepared bindings

Replace SandboxRunConfig and its field-by-field copy into
SandboxInstanceConfig with a single launch configuration. Live per-instance
state (gateway credentials, OCSF context and JSON settings, log sink, and
denial log) is now an explicit SandboxInstanceBindings value that the owner
prepares once, instead of placeholders the runner or host overwrote.

The dedicated binary loads launch inputs from its arguments and environment
and shares one GatewayCredentials with log push; run_sandbox_with_backend
keeps the process-wide OCSF context, health endpoints, and signal handling.
The instance host binds the same SandboxInstanceBindings to its runtime
threads and revokes their credentials when the instance ends.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): use session-control wire types for instance status and trace context

Drop the supervisor's duplicate SandboxInstancePhase, SandboxInstanceStatus,
and TraceContext families. The sandbox instance host reports
SandboxInstanceStatusReport directly, with its key as the route, so the
shared host no longer converts or re-keys status, lists, or removal
results. SandboxInstanceConfig carries RegistrationTraceContext and the
dedicated process reads it through trace_context_from_environment. No wire
definitions change.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix(supervisor): update Windows host proxy test config

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): assign shared sandbox instances over a supervisor-initiated gRPC stream

Replace the private HTTP/JSON session-control API, which the gateway dialed
on the shared supervisor, with a supervisor-initiated stream to the gateway.
The gateway owns the desired set of sandbox instances; the shared supervisor
attaches with a gateway-scoped host certificate, receives complete assignment
snapshots with session-scoped revisions, reconciles its instance registry to
each one, and reports what it observes. Losing the stream never stops an
instance; only a later snapshot that omits it does.

- Add the private openshell.supervisor.host.v1 protocol, served on the gateway
  listener but authorized only for the supervisor host certificate, excluded
  from SDK generation and reflection, and classified in the schema inventory.
- Add SupervisorHostController in openshell-core: uninitialized until the
  driver derives the desired set once, compare-and-replace full resyncs,
  capacity bound, session fencing by connection epoch, revision-bounded acks,
  bounded sends.
- Classify TLS peers per connection against the ordinary client CA and the
  supervisor host CA from one configuration snapshot; a chain matching
  neither or both is refused, and host connections never become users.
- Persist each shared generation's launch material in its supervisor Secret so
  a restarted gateway rebuilds assignments from Sandbox resources, and
  withdraw instances on stop, delete, and suspend.
- Issue the host identity with `generate-certs --client-only`; the gateway
  mounts only the CA. Drop the control port, server certificate, and gateway
  ingress rule from the chart; require gateway TLS for the topology.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): authenticate the shared supervisor stream with a gateway-minted supervisor token

Replace the shared supervisor's host CA and client certificate with a
supervisor token: a bearer the gateway mints from its existing launch-signing
key under a profile of its own (typ openshell-supervisor+jwt, subject
openshell-supervisor:<gateway_id>, no sandbox, generation, or epoch claims).
The supervisor dials the gateway's Attach stream over ordinary
server-authenticated TLS and presents the token; the gateway verifies it
with the same key infrastructure, grants only the assignment stream, refuses
every other credential on it, and ends a stream when the token that opened
it expires.

The gateway renews the token at half its lifetime and publishes each renewal
into the supervisor host controller; the Kubernetes driver's only part in
authentication is delivery, replacing the token in the chart-created
<release>-supervisor-token Secret, which the supervisor mounts and re-reads
on every connection attempt. The gateway Role may get and patch only that
Secret.

Remove the host-only TLS realm classification, the supervisor host CA mount
and config, certgen --client-only, and the supervisor host PKI; gateway TLS
returns to its pre-feature behavior and remains required for the topology.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(helm): remove redundant certgen condition

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): extract gateway-owned shared supervision into openshell-supervisor-control

Move the shared supervisor control types out of openshell-core and
openshell-sandbox-backend into a new openshell-supervisor-control crate:
the SupervisorHostController (desired set, revision fencing, host
sessions, observations), the SandboxInstanceRegistration launch material
and SandboxInstanceStatusReport mapping, and a new SharedSupervision
coordinator that owns the control contracts a compute driver previously
implemented itself: validated persist-before-assign launches, recovery
from durable records with the compare-and-replace baseline captured before
the driver lists them, keep-previous-set on any failed or mismatched read,
and one interpretation of host observations for readiness and bootstrap.
Supervisor token delivery keeps its retry and newer-value policy in the
crate; the write itself stays with the driver.

The gateway now constructs the coordination: ComputeDriverBuildContext
exposes shared_supervision() and the server keeps the controller for the
Attach stream and token minting, replacing the driver-created controller
that was installed into the gateway. The Kubernetes factory injects it
through KubernetesComputeDriver::with_shared_supervision; new() stays the
dedicated-topology constructor and refuses a configuration that selects
the gateway topology without the gateway's coordination.

The Kubernetes driver keeps its platform work: placement annotations, the
shared supervisor Service and egress NetworkPolicy, launch Secret create
and read (bytes only), its own fence and Pod evidence, and the token
Secret patch. The supervisor process consumes the moved registration and
status types unchanged. Wire protocol, storage JSON, annotations, and the
supervisor token profile are unchanged; the private protobuf stays
generated in openshell-core and is re-exported by the new crate.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

---------

Signed-off-by: Drew Newberry <anewberry@nvidia.com>
v0.1.6-pre.4
2026-10-22 22:20:02 +00:00
Emilien Macchi 07b7a74b62 fix(server): bound the provisioning-deadline scan's lock wait (#4549)
The provisioning-deadline scan takes each provisioning sandbox's local
S(global) S(workspace) X(sandbox) keys in ascending key order and waited
for them with no deadline. When a sandbox's key sorts before its
workspace's key, the scan held X(sandbox) while it waited behind a
provider or profile writer, so start, stop and delete for that sandbox
waited for the writer too. In the other order, the scan held
S(workspace) while it waited for a busy sandbox, and provider writers
on that workspace queued behind it. Either way the rest of the pass
waited as well.

Each pass now has a 500 ms budget for waiting on these keys. A sandbox
whose keys stay busy is skipped and picked up on the next pass a second
later. Once the budget is spent, the rest of the pass only takes keys
that are free when it reaches them, so a busy workspace or global key
costs one wait per pass rather than one per sandbox. The local
acquisition is cancel-safe, so giving up releases the keys it already
took.

Skips log at debug and count in the new
openshell_server_provisioning_deadline_skips_total counter, labeled by
whether the sandbox was already past its deadline. A steady rate of
delayed expiries can then be alerted on without a warning every pass.
The gateway metrics page and the cluster debugging skill describe it.

The test that pinned the old wait is replaced by tests for both key
orders: a lifecycle lock or a provider writer proceeds and the scan
finishes while the other side holds its key, the skipped sandbox is
untouched and expires once the writer releases, and a skip doesn't end
the pass for other sandboxes. Another test checks that sandboxes
behind one busy workspace share a single wait.

Part of #4307
Closes #4547

Signed-off-by: Emilien Macchi <emacchi@redhat.com>
2026-10-22 21:04:14 +00:00
Simon Ruggier eec00ad492 fix(podman): Increase the API timeout (#4820)
Experience has shown that ordinary podman container creation can take
longer than 30 seconds for some users, so for now, this change doubles
the timeout, until the source of the slowness is found and accounted
for.

Signed-off-by: Simon Ruggier <Simon.Ruggier@gmail.com>
2026-10-22 20:54:54 +00:00
Taylor Mutch 132c582349 docs(extensibility): document external compute driver setup (#4826)
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
2026-10-22 19:48:11 +00:00
Fede Kamelhar 78376bd041 fix(installer): resolve the gateway config dir like the CLI does (#4063)
* fix(installer): resolve the gateway config dir like the CLI does

install.sh hardcoded $TARGET_HOME/.config/openshell in two places: the
readiness check, which reads the client certificates it expects the
gateway registration to have written, and the cleanup that removes a
stale openshell entry before re-adding it. The CLI instead keeps both
under $XDG_CONFIG_HOME/openshell whenever that variable is set, so with
the variable pointing anywhere other than ~/.config the installer and
the CLI looked in different directories: the readiness check waited for
certificates that were never going to appear there, and the cleanup left
the real stale entry in place.

Resolve the directory through as_target_user instead, which answers from
the same environment the CLI is invoked in. That covers both branches
without duplicating their logic: the same-user branch inherits the
caller's XDG_CONFIG_HOME, while the sudo and runuser branches reset the
environment and fall back to the target user's home.

An empty XDG_CONFIG_HOME falls back to $HOME/.config, following the XDG
base directory specification. The CLI diverges here: xdg_config_dir
treats a set-but-empty value as set and joins onto it, yielding the
relative path "openshell", which no installer path can usefully match.
Worth fixing separately in the CLI.

Signed-off-by: fede-kamel <fkamelhar@gmail.com>

* fix(core): treat an empty XDG_CONFIG_HOME as unset

xdg_config_dir() joined onto an empty XDG_CONFIG_HOME and resolved the
config root to the relative path "openshell", while the installer falls
back to $HOME/.config/openshell for the same value. Registration runs the
CLI with the caller's environment, so the two could disagree on where the
gateway entry lives.

Treat an empty value as unset, as the XDG base directory spec requires,
so the CLI and installer resolve the same directory. Add tests for a value
with spaces and drive registration cleanup through the helper for the
spaces and empty cases.

Signed-off-by: fede-kamel <fkamelhar@gmail.com>

---------

Signed-off-by: fede-kamel <fkamelhar@gmail.com>
2026-10-22 19:32:47 +00:00
Drew Newberry ea13dfce41 refactor(supervisor): isolate state per sandbox instance (#4701)
* refactor(ocsf): attribute events to session-bound contexts

A supervisor process that hosts several sandboxes cannot use one
process-wide OCSF context: every event would carry the wrong sandbox
identity, and middleware requests read their sandbox identity from the
same context.

Builders now accept a ContextRef, either a borrowed context or a context
shared by a hosted session, so per-session contexts need not be leaked.
ctx() returns the context bound to the calling thread when present and
falls back to the process-wide context otherwise. OCSF JSON output
settings can likewise be bound per thread, and OpenTelemetry can parent
a span from an explicit W3C trace context instead of process
environment. A dedicated supervisor keeps using the process-wide
context.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): scope gateway credentials and network state to a session

The supervisor kept its gateway bearer, Sandbox Protocol bearer, and
renewal task in process-wide slots, and the network supervisor read
provider token grants, proxy CA files, and the gateway identity from
process environment. A second sandbox in the same process would have
replaced or rotated the first sandbox's credentials, reused its
provider access tokens, and exposed its denials through policy.local.

GatewayCredentials now holds one session's gateway and Sandbox Protocol
credentials and their renewal; every gateway client receives a
GatewayEndpoint that pairs the URL with them, including log push,
ConnectSupervisor and its redirects, and extension-credential rotation.
run_networking takes a NetworkSession with the sandbox identity, the
session's gateway access, its Workload API socket, its policy.local
denial source, and its proxy CA files. Provider token grants use a cache
and HTTP client owned by the session and fail closed without a Workload
API socket.

run_session supervises one generation from an explicit SessionConfig and
owner-provided SessionControls. run_sandbox_with_backend remains the
dedicated entry point: it keeps the process-wide OCSF context, reads the
same environment, binds readiness endpoints to session readiness, and
stops on SIGTERM or SIGINT. The binary shares one set of credentials
between log push and supervision, as before.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* feat(supervisor): host concurrent sessions on session-bound runtimes

SessionHost runs several supervisor sessions in one process. Each
session gets its own Tokio runtime, and every thread that runtime starts,
plus the thread driving it, is bound to the session's OCSF context, OCSF
JSON settings, log sink, and denial log. Tasks, blocking work,
reconnects, and credential renewal spawned by a session therefore keep
its identity, while threads outside any session carry none and push no
logs. Gateway credentials stay explicit per session.

Removing a session stops its workload gracefully, or cancels it at once
while it is still starting, then shuts down only its runtime and revokes
its gateway credentials. The key stays registered until the session
thread has finished, so the same generation cannot gain a second owner
while one is stopping. A panicking session reports a failure, clears its
readiness, and is revoked the same way. Hosted sessions get a private
proxy trust directory and serve policy.local denials from their own log.

A focused test runs two sessions concurrently and checks that nested and
blocking tasks see their own identity, gateway requests carry their own
bearer, log lines reach only their own stream, and removing one leaves
the other supervising.

Closes #4699

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): name hosted lifetimes sandbox instances

A sandbox instance is one running generation of a stable Sandbox
resource. Gateway transport connections and the gateway supervisor
sessions they carry can reconnect within one instance, so the hosted
object, its configuration, controls, host, and per-instance network,
denial, and token-grant state now use the sandbox instance name.

Rename session_host to sandbox_instance_host, run_session to
run_sandbox_instance, and SessionConfig, SessionControls, SessionHost,
and related hosted types to their SandboxInstance equivalents. Gateway
supervisor sessions, SSH sessions, and authentication session types
keep their names. No wire, configuration, or lifecycle behavior
changes.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* refactor(supervisor): launch sandbox instances from one config and prepared bindings

Replace SandboxRunConfig and its field-by-field copy into
SandboxInstanceConfig with a single launch configuration. Live per-instance
state (gateway credentials, OCSF context and JSON settings, log sink, and
denial log) is now an explicit SandboxInstanceBindings value that the owner
prepares once, instead of placeholders the runner or host overwrote.

The dedicated binary loads launch inputs from its arguments and environment
and shares one GatewayCredentials with log push; run_sandbox_with_backend
keeps the process-wide OCSF context, health endpoints, and signal handling.
The instance host binds the same SandboxInstanceBindings to its runtime
threads and revokes their credentials when the instance ends.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix(supervisor): update Windows host proxy test config

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

---------

Signed-off-by: Drew Newberry <anewberry@nvidia.com>
2026-10-22 17:36:32 +00:00
Balaji Ganesan 9152b6e4a1 fix(vm): boot a digest-pinned image from the cache without a registry call (#4582)
A registry-sourced sandbox boot authenticated with the registry, and for a
tag resolved the manifest, before it looked at the root disk cache. It did
so on every boot, even when the image reference carries a digest and the
root disk for that digest is already cached. Each boot then waits on the
registry, and a registry outage stops every boot of an image the host
already has.

A digest names the image's content, and since #4342 a cached root disk is
published only after its manifest was verified against that digest. On a
cache hit for a digest-pinned reference the registry cannot add anything,
so return the hit before authenticating. Authentication and the pull stay
on the miss path, and a tag still resolves through the registry. The hit
emits the same Pulling, CacheHit and Pulled events as before.

Behaviour change: a host whose registry credentials were revoked still
boots digest-pinned images it has already cached, as a kubelet does with
IfNotPresent and a digest-pinned image.

Test: bootstrap_registry_cache_hit_for_a_digest_pin_makes_no_registry_request
covers a miss (authenticates and fetches), a cached digest pin (no request
at all) and a tag for the same content (still resolved). It fails without
this change with ["GET /v2/"].

Closes #4581

Signed-off-by: Balaji Ganesan <bganesan@nvidia.com>
2026-10-22 17:36:05 +00:00
Oliver Calder cb42f5d9e8 fix(snap): use openshell-prover instead of openshell.prover (#4835)
The alias `openshell-prover` has been granted for OpenShell:

https://forum.snapcraft.io/t/alias-request-for-openshell/53658

Thus, we can remove guidance differentiating `openshell.prover` for the
snap from `openshell-prover` for other packaging formats. It is still
worth noting that installing a locally-built snap directly, rather than
from the store, means there is no alias.

Signed-off-by: Oliver Calder <oliver.calder@canonical.com>
2026-10-22 17:12:02 +00:00
Matthew Grossman fac82327b3 test(testkit): add the testkit library for end-to-end suites (#4724)
* test(testkit): add the testkit workspace for end-to-end suites

Add tests/testkit as its own Cargo workspace: testkit, testkit-macros,
and testkit-spec. testkit reads a target file, connects to the gateway
through openshell-sdk, creates and cleans up sandboxes, and runs the
installed CLI. #[testkit::test] requires a stable ID and a doc comment and
declares capability requirements. testkit-ready waits for a target's
gateway and CLI before tests run.

Nothing uses testkit yet. The lockfile is seeded from the root lockfile
so shared crates resolve to the same versions.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* ci(tests): format, lint and test testkit in Branch Checks

Nothing else builds testkit, so check it in Branch Checks and the
matching mise tasks to catch openshell-sdk changes that break it.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(tests): describe how to write and run testkit tests

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* fix(testkit): give each sandbox its own cleanup timeout

Cleanup shared one two-minute budget across all of a test's sandboxes, so
a slow delete left the rest with no time and could leak them on a shared
gateway. Delete them concurrently, each with the full timeout.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(testkit): show how to exclude tests by capability

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs: list tests/testkit in the project structure tables

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* refactor(testkit): drop test IDs and capabilities for now

Nothing reads test IDs or capability requirements until a runner, waivers,
or result history exist, so remove the id and requires arguments and the
target file's capabilities section. Both can return as optional attribute
arguments without changing existing tests.

With them gone, testkit-spec only checked the function shape and read the
doc comment, so fold it into testkit-macros.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(testkit): describe what testkit provides today

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* refactor(testkit): find the gateway the way the CLI does

Replace the target file (OPENSHELL_TEST_TARGET) with the CLI's own gateway
selection: OPENSHELL_GATEWAY_ENDPOINT, then OPENSHELL_GATEWAY, then the
active gateway. A registered gateway's endpoint, auth mode, and mTLS
material come from its CLI config directory. cx.cli runs OPENSHELL_BIN
against the same gateway and workspace as the SDK.

Suites now run unchanged under e2e/with-docker-gateway.sh and
e2e/with-podman-gateway.sh, and environments need no extra file.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* fix(testkit): keep labels when creating a sandbox with a policy

The policy path creates the sandbox through gRPC and dropped the spec's
labels without an error. Pass them in the create request.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* fix(testkit): use the registered gateway's credentials for an endpoint

When OPENSHELL_GATEWAY_ENDPOINT is set, the CLI takes credentials from the
gateway named by OPENSHELL_GATEWAY, or else the registered gateway with
that endpoint. testkit connected without a client certificate instead, so
an mTLS endpoint such as the one e2e/rust/e2e-vm.sh exports worked for
cx.cli but not for the SDK. Resolve it the way the CLI does, and pass
both the name and the endpoint to cx.cli.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(tests): list testkit's gateway variables in precedence order

OPENSHELL_GATEWAY_ENDPOINT takes precedence over OPENSHELL_GATEWAY. Also
mention OPENSHELL_BIN.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* fix(testkit): apply other attributes to the generated test

#[testkit::test] left attributes such as #[ignore] and #[cfg] on the
nested body function, where they have no effect on the test. Move them
to the generated test, and reject a second test attribute such as

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
#[test] or #[tokio::test].

* fix(testkit): show usage for testkit-ready --help

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* test(testkit): cover cleanup after pass, failure, and panic

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* fix(testkit): reject #[should_panic] on testkit tests

A testkit test panics on any failure, including an unreachable gateway or
a failed cleanup, so #[should_panic] would let such a failure pass. Reject
it and point to checking the expected failure in the body.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* test(testkit): keep only the macro's misuse checks as unit tests

Suites built on testkit exercise gateway resolution, the CLI wrapper,
polling, errors, and cleanup against a real gateway. Keep one unit test
for the macro's compile errors, which a passing suite never reaches, and
drop the test-only seams the other tests needed.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* refactor(testkit): connect through the SDK's mTLS support

The SDK's ClientConfig now takes a client identity, so testkit no longer builds
its own channel. It still resolves the registered gateway and reads its
credential files, then hands the CA and client certificate to
OpenShellClient::connect. That keeps TLS behavior, connect timeouts and
keep-alive settings in the SDK, and drops testkit's direct tonic dependency.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* fix(testkit): bound readiness and cleanup with timeouts

wait_ready checked elapsed time only after a health call returned, and cleanup
started its timeout only after the delete returned, so a gateway that accepts a
connection but never answers could hang either one. Wrap each whole operation in
tokio::time::timeout: the readiness wait, including every connect and health
call, and each sandbox's delete plus wait for deletion. A test covers a peer
that accepts connections and never replies.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

---------

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
2026-10-22 17:11:31 +00:00
Taylor Mutch 39d95b42cb chore(e2e): remove obsolete OpenShift sandbox SCC grant (#4823)
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
v0.1.6-pre.3
2026-10-22 06:36:02 +00:00
Mrunal Patel 0a51652308 chore(server): remove unused server macros crate (#4818)
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2026-10-22 04:29:21 +00:00
Taylor Mutch 029fda684d refactor(cli): use Rust SDK transport (#4817)
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
2026-10-22 02:10:49 +00:00
Taylor Mutch 1d880c9acd fix(examples): repair multi-agent notepad launch (#4807)
* fix(examples): repair multi-agent notepad launch

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>

* test(examples): remove redundant demo harness

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>

---------

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
2026-10-21 19:36:50 +00:00
Yuedong Wu 20cb306d3a perf(docker): slow steady-state supervisor healthcheck (#4802)
Signed-off-by: Yuedong Wu <dwcn22@outlook.com>
2026-10-21 18:44:55 +00:00
krishicks 4b7486e73d test(auth): share fixtures for gateway audit event tests (#4778)
Tests for the gateway's OCSF events each carried their own copy of the
same fixtures: converting captured events to JSON, the request ID and
peer address, running a handler inside a routed request, and checking
event shapes. They now share them:

- OcsfCapture::json_events returns captured events as their exported
  JSON.
- auth::audit::test_support holds the test request origin, audited()
  for running a handler as a routed request, and assertions for
  authentication failures, logons, denials, boundary findings, the
  request origin, and redacted secrets. The event assertions also check
  each event against its OCSF class schema, which the handler tests did
  not do before.
- auth::principal::test_support builds the OIDC user and gateway-JWT
  sandbox principals that several test modules defined identically.

Refs #2912

Signed-off-by: Kris Hicks <khicks@nvidia.com>
2026-10-21 17:43:15 +00:00
Adel Zaalouk 229382e51d docs(sandbox): align workload image requirements with current runtime (#3967)
Workload images no longer need iproute2 or nftables since the supervisor
moved out of the workload (#2942). Docker and Podman run images without
USER as UID/GID 1000 (#3386), the driver creates /sandbox, and the CLI no
longer builds Dockerfiles (#3214). Update the bring-your-own-container
example and the runtimes page to match.

Fixes #3965

Signed-off-by: Adel Zaalouk <azaalouk@redhat.com>
dev
2026-10-21 16:46:23 +00:00
krishicks 19ae2b7ed7 test(cli): retry forward tests when ssh loses the port after the check (#4799)
Forward tests retried on a new port only when the CLI's port check
found the port in use. Another test can also take the port after that
check passes and before the fake ssh binds it. The fake then panicked
with exit status 101, which the retry did not recognize, so the test
failed.

The fake ssh now exits 255 when its port is taken, as
ssh -o ExitOnForwardFailure=yes does, and the tests retry on that exit
status too.

Signed-off-by: Kris Hicks <khicks@nvidia.com>
2026-10-21 16:10:41 +00:00
krishicks a4c27f9ca9 refactor(auth): share audit helpers for gateway denials and rejections (#4777)
Handlers recorded each refusal by emitting an OCSF event and then
building the status by hand, so a new refusal could skip the event.
These helpers do both in one call:

- audit::deny emits an authorization denial for the current request and
  returns the permission-denied status. Guards, workspace
  authorization, and the token and current-user handlers use it.
- audit::reject_credential emits an Authentication failure for a
  credential a handler verifies itself and returns the rejection's
  status. It replaces emit_credential_failure for SSH session tokens and
  IssueSandboxToken. RefreshSandboxToken now takes its path and origin
  from the request scope, as every other handler does, instead of
  rebuilding them from the request.
- Failure and logon events share one Authentication builder.
- AuthMechanism and AuthFailureReason carry their audit labels. The
  logon digest uses the label instead of the variant's Debug name.

Events and statuses are unchanged.

Refs #2912

Signed-off-by: Kris Hicks <khicks@nvidia.com>
2026-10-21 15:58:14 +00:00
Matthew Grossman 2fd802eff2 feat(skills): add release-captain skill for the weekly release cadence (#4435)
* feat(skills): add release-captain skill for the weekly release cadence

Add an internal skill with Monday pre-flight, Tuesday stable cut, and
recovery steps for the RFC 0014 release train. All tag, workflow, merge,
and Slack actions require explicit maintainer approval.

Closes #4433

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): document starting a release train after tag-push triggers

Pre-release tag pushes now start Release Tag, so the skill no longer
dispatches after pushing. Add seed-commit selection from Release Dev
results, a commit-type summary for the patch/minor decision, and a
recovery row for a tag push that starts no run.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): create lightweight release tags regardless of signing config

With tag.gpgSign enabled, git tag creates an annotated tag and blocks in
an editor. Disable signing for the release tag commands so they create
the same lightweight tags as Auto-Tag.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): capture release captain lessons from starting 0.1.5

Note that Auto-Tag skips report success and show how to tell from the
log, the UTC time of the schedule across DST, where pre-releases appear
instead of the Releases page, why tags need a forced fetch, reading
workflow triggers from origin/main, the rolling dev tag, and the common
compatibility-review false positive for unpublished internal crates.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): add recovery for pre-releases failing on new RustSec advisories

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): recommend fixing forward to a green pre-release

A failed pre-release doesn't end the train. Document merging the fix and
tagging the next pre-release by hand once its Release Dev run passes,
letting the failed run finish for its remaining signal.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): describe the triage channel and thread replies for pre-release failures

Name #openshell-triage, where TriageBot posts each failed Release Tag
attempt, and ask the captain to reply in the failure's thread so others
know a fix is underway. List common transient failure types and rerun
once when a failure looks unrelated to the commit.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): drop Codex Security from release captain run matching

Codex Security no longer runs in release qualification (#4469), so the
stable release can't rely on a pre-release's Codex result and runs can't
be matched by its job name. Match dispatched runs by the qualification
artifact name instead.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): describe where and how to post the release coordination thread

Name the CNCF Slack channel, note that the release ships from main with
no release branch or cherry-picks, and add an example post.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): make seeding the next train the outgoing captain's handoff

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): update release captain for the Release workflow and add usage guide

Stable releases are now dispatched with release.yml, which selects the
qualified pre-release and creates the tag, and pre-releases run in
release-prerelease.yml. Replace the stable tag push steps and stale
recovery rows, add a preview of the selected candidate, add a section on
when to use each part of the skill, and trim redundant explanations.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): explain what the release cutoff guarantees

The release ships the final pre-release's commit only if it passes, so
the coordination post must not promise that every PR merged by the
cutoff ships. Describe the Auto-Tag and hand-tagged cutoffs, and tag
the final pre-release by hand on Tuesday for a later cutoff.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): add release notes review and v0.1.5 release day lessons

Review the release notes preview from the Pre-release run before
approval, and describe how Release regenerates them. Correct the thread
when the shipped pre-release was cut before the posted cutoff, require
maintainer agreement for accepted-risk breaks in a patch release, and
add recovery rows for startup failures and release notes failures.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): make starting the next train the captain's final duty

Move starting the next train after closing the loop, so it is the last
Tuesday step. The captain's week ends when the next -pre.1 Pre-release
run passes or its failure is handed off. Also move open milestone items
when closing the loop.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): trim the release captain skill to its durable steps

Remove repeated guidance, week-specific examples, fragile commands, and
debugging detail an agent can derive from the workflows. Keep the
approval guardrails, the weekly steps, and a short recovery table.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(ci): document Release Auto-Tag and pre-release notes previews

Add Release Auto-Tag to the workflow table, including that each train's
-pre.1 is pushed by hand, and note that every Pre-release run writes a
release notes preview.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): add a template for the release announcement reply

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): watch pre-releases in the week before your turn

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): remove internal channel references from release captain

Check pre-release runs directly instead of relying on an internal
notification channel, and drop internal Slack channel IDs.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

* docs(skills): fix pre-release failures in a new number via Auto-Tag

A rerun repeats the same commit, so a failure that needs a fix ships
in the next -pre.N. Cut it by dispatching Release Auto-Tag from the tip
of main, and tag a specific commit by hand only when needed.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

---------

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
2026-10-21 15:41:17 +00:00
Simon Scatton e7dc051b2b chore(sdk): update Vite to 8.1.6 (#4792)
Signed-off-by: Simon Scatton <sscatton@nvidia.com>
2026-10-21 15:01:10 +00:00