From 7e9a7f511013ed6dc00f323e17a3899c8fd5e78f Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Tue, 28 Jul 2026 16:39:41 +0200 Subject: [PATCH 1/4] fix(sandbox): gate Linux-only ordering import (#2513) Signed-off-by: Evan Lezar --- crates/openshell-sandbox/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/openshell-sandbox/src/lib.rs b/crates/openshell-sandbox/src/lib.rs index 1a49f7cd05..e696403f39 100644 --- a/crates/openshell-sandbox/src/lib.rs +++ b/crates/openshell-sandbox/src/lib.rs @@ -17,7 +17,9 @@ mod sidecar_control; use miette::{IntoDiagnostic, Result, WrapErr}; use std::future::Future; use std::sync::Arc; -use std::sync::atomic::{AtomicBool, AtomicU32, Ordering}; +#[cfg(target_os = "linux")] +use std::sync::atomic::Ordering; +use std::sync::atomic::{AtomicBool, AtomicU32}; use std::time::Duration; use tracing::{debug, info, warn}; From b78c8615e37530dc920f031bc9292d23deabda31 Mon Sep 17 00:00:00 2001 From: Derek Carr Date: Tue, 28 Jul 2026 11:56:41 -0400 Subject: [PATCH 2/4] fix(server): stabilize flaky delete telemetry unit test (#2521) Replace yield_now() spin-loop with sleep(10ms) polling in delete_handler_ends_telemetry_for_the_resolved_sandbox_id. The single-threaded tokio runtime starves the spawn_blocking threads used by SQLite when yield_now() burns 100% CPU waiting for the delete gate entry count. Increase the timeout from 1s to 5s for consistency with similar guard tests. Signed-off-by: Derek Carr --- crates/openshell-server/src/grpc/sandbox.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/openshell-server/src/grpc/sandbox.rs b/crates/openshell-server/src/grpc/sandbox.rs index 57bf421b88..c87fc01436 100644 --- a/crates/openshell-server/src/grpc/sandbox.rs +++ b/crates/openshell-server/src/grpc/sandbox.rs @@ -2477,9 +2477,9 @@ mod tests { ) .await }); - tokio::time::timeout(std::time::Duration::from_secs(1), async { + tokio::time::timeout(std::time::Duration::from_secs(5), async { while state.compute.delete_gate_entry_count() == 0 { - tokio::task::yield_now().await; + tokio::time::sleep(std::time::Duration::from_millis(10)).await; } }) .await From efb2d9c2e4c84336ee493dd7910188ab858384db Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Tue, 28 Jul 2026 19:45:30 +0200 Subject: [PATCH 3/4] fix(e2e): bound podman stop timeout in tests (#2516) Signed-off-by: Evan Lezar --- e2e/with-podman-gateway.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/e2e/with-podman-gateway.sh b/e2e/with-podman-gateway.sh index ba9179a841..e9e9fb2be2 100755 --- a/e2e/with-podman-gateway.sh +++ b/e2e/with-podman-gateway.sh @@ -13,6 +13,10 @@ # # HTTPS endpoint-only mode is intentionally unsupported here. Use a named # gateway config when mTLS materials are needed. +# +# Set OPENSHELL_E2E_PODMAN_STOP_TIMEOUT_SECS to override the managed gateway's +# Podman sandbox stop timeout. The harness default is intentionally shorter +# than the production driver default to keep CI teardown bounded. set -euo pipefail @@ -359,6 +363,11 @@ echo "Using Podman supervisor image: ${SUPERVISOR_IMAGE}" DEFAULT_SANDBOX_IMAGE="ghcr.io/nvidia/openshell-community/sandboxes/base:latest" SANDBOX_IMAGE="${OPENSHELL_E2E_PODMAN_SANDBOX_IMAGE:-${OPENSHELL_SANDBOX_IMAGE:-${DEFAULT_SANDBOX_IMAGE}}}" +PODMAN_STOP_TIMEOUT_SECS="${OPENSHELL_E2E_PODMAN_STOP_TIMEOUT_SECS:-15}" +if ! [[ "${PODMAN_STOP_TIMEOUT_SECS}" =~ ^[0-9]+$ ]]; then + echo "ERROR: OPENSHELL_E2E_PODMAN_STOP_TIMEOUT_SECS must be a non-negative integer." >&2 + exit 2 +fi if ! podman_cmd image exists "${SANDBOX_IMAGE}" 2>/dev/null; then echo "Pulling ${SANDBOX_IMAGE}..." podman_cmd pull "${SANDBOX_IMAGE}" @@ -416,6 +425,9 @@ cp "${ROOT}/deploy/rpm/gateway.toml.default" "${GATEWAY_CONFIG}" printf 'gateway_port = %s\n' "${HOST_PORT}" printf 'default_image = %s\n' "$(toml_string "${SANDBOX_IMAGE}")" printf 'image_pull_policy = "missing"\n' + # Keep CI teardown bounded while the production Podman driver default stays + # conservative for real user workloads. + printf 'stop_timeout_secs = %s\n' "${PODMAN_STOP_TIMEOUT_SECS}" printf 'supervisor_image = %s\n' "$(toml_string "${SUPERVISOR_IMAGE}")" printf 'guest_tls_ca = %s\n' "$(toml_string "${PKI_DIR}/ca.crt")" printf 'guest_tls_cert = %s\n' "$(toml_string "${PKI_DIR}/client/tls.crt")" From b1c7ff684e9b16f88d050c29b0093d07389fbbbb Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Tue, 28 Jul 2026 21:12:19 +0200 Subject: [PATCH 4/4] ci: add focused macOS Rust lint (#2515) Signed-off-by: Evan Lezar --- .github/workflows/branch-checks.yml | 43 ++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index 5a80331ba1..3bc6944537 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -106,7 +106,7 @@ jobs: run: mise install --locked - name: Cache Rust target and registry - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2 + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 with: # Keep branch-check caches partitioned by runner architecture; lint # and test intentionally share the same job-local target directory. @@ -139,6 +139,47 @@ jobs: fi exit 0 + rust-macos: + name: Rust lint (macOS) + needs: pr_metadata + if: needs.pr_metadata.outputs.should_run == 'true' + runs-on: macos-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Install mise + run: | + curl --proto '=https' --tlsv1.2 -sSf https://mise.run | MISE_VERSION=v2026.4.25 sh + echo "$HOME/.local/bin" >> "$GITHUB_PATH" + echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH" + + - name: Configure GHA sccache backend + uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10 + + - name: Install Rust and Clippy + run: | + mise install --locked rust + rustup component add clippy + + - name: Cache Rust target and registry + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + with: + shared-key: rust-clippy-macos + cache-on-failure: "true" + + - name: Lint macOS-sensitive crates + # Formatting is target-independent and already checked by the Linux jobs. + # The full mise lint covers every workspace/E2E target and requires extra + # native dependencies such as Z3; keep this guard focused on macOS cfgs. + run: | + cargo clippy \ + -p openshell-sandbox \ + -p openshell-core \ + -p openshell-cli \ + --all-targets \ + -- -D warnings + python: name: Python (${{ matrix.runner }}) needs: pr_metadata