Skip to content

Commit 4dd9705

Browse files
committed
fix(providers): reconcile readiness with mutation replay
Merge current main and preserve original provider operation receipts and mutation identities across admitted request replay. Reject replay when its operation evidence is unavailable without repeating the saved mutation. Regenerate protocol bindings, refresh the measured public schema fingerprint, and align request and boundary test fixtures with the combined interfaces. Signed-off-by: Shiju <shiju@nvidia.com>
2 parents 8b5fd3f + 58b5f8f commit 4dd9705

112 files changed

Lines changed: 14457 additions & 1603 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/actions/build-docker-image/action.yml‎

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
name: Build Docker Image
5-
description: Build and push one architecture of an OpenShell image
5+
description: Build, push, and export a multi-platform OpenShell image
66

77
inputs:
88
component:
@@ -11,14 +11,8 @@ inputs:
1111
binary:
1212
description: Binary staged in the Docker build context
1313
required: true
14-
triple:
15-
description: Binary artifact target triple
16-
required: true
17-
arch:
18-
description: Docker architecture name
19-
required: true
20-
platform:
21-
description: Docker platform
14+
target-suffix:
15+
description: Binary artifact target suffix
2216
required: true
2317
image-tag:
2418
description: Docker image tag
@@ -35,41 +29,64 @@ runs:
3529
buildkitd-config: /etc/buildkit/buildkitd.toml
3630

3731
- name: Log in to GHCR
38-
shell: bash
39-
run: echo "${INPUTS_GITHUB_TOKEN}" | docker login ghcr.io -u "${GITHUB_ACTOR}" --password-stdin
40-
env:
41-
INPUTS_GITHUB_TOKEN: ${{ inputs.github-token }}
32+
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
33+
with:
34+
registry: ghcr.io
35+
username: ${{ github.actor }}
36+
password: ${{ inputs.github-token }}
37+
38+
- name: Download amd64 ${{ inputs.binary }}
39+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
40+
with:
41+
name: ${{ inputs.binary }}-x86_64-${{ inputs.target-suffix }}
42+
path: artifact/amd64
4243

43-
- name: Download ${{ inputs.binary }}
44+
- name: Download arm64 ${{ inputs.binary }}
4445
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
4546
with:
46-
name: ${{ inputs.binary }}-${{ inputs.triple }}
47-
path: artifact
47+
name: ${{ inputs.binary }}-aarch64-${{ inputs.target-suffix }}
48+
path: artifact/arm64
4849

4950
- name: Stage ${{ inputs.binary }}
5051
shell: bash
51-
run: install -Dm0755 artifact/${INPUTS_BINARY} deploy/docker/.build/prebuilt-binaries/${INPUTS_ARCH}/${INPUTS_BINARY}
5252
env:
53-
INPUTS_BINARY: ${{ inputs.binary }}
54-
INPUTS_ARCH: ${{ inputs.arch }}
53+
BINARY: ${{ inputs.binary }}
54+
run: |
55+
install -Dm0755 artifact/amd64/${BINARY} deploy/docker/.build/prebuilt-binaries/amd64/${BINARY}
56+
install -Dm0755 artifact/arm64/${BINARY} deploy/docker/.build/prebuilt-binaries/arm64/${BINARY}
5557
5658
- name: Build ${{ inputs.component }} image
5759
shell: bash
5860
env:
61+
COMPONENT: ${{ inputs.component }}
5962
IMAGE_TAG: ${{ inputs.image-tag }}
60-
INPUTS_PLATFORM: ${{ inputs.platform }}
61-
INPUTS_COMPONENT: ${{ inputs.component }}
62-
INPUTS_ARCH: ${{ inputs.arch }}
6363
run: |
64+
install -d artifacts/images
6465
docker buildx build \
6566
--builder openshell \
66-
--platform ${INPUTS_PLATFORM} \
67-
--file deploy/docker/Dockerfile.${INPUTS_COMPONENT} \
68-
--target ${INPUTS_COMPONENT} \
69-
--tag ghcr.io/nvidia/openshell/${INPUTS_COMPONENT}:${IMAGE_TAG}-${INPUTS_ARCH} \
70-
--cache-from type=gha,scope=${INPUTS_COMPONENT}-${INPUTS_ARCH} \
71-
--cache-to type=gha,mode=max,scope=${INPUTS_COMPONENT}-${INPUTS_ARCH} \
67+
--platform linux/amd64,linux/arm64 \
68+
--file deploy/docker/Dockerfile.${COMPONENT} \
69+
--target ${COMPONENT} \
70+
--tag ghcr.io/nvidia/openshell/${COMPONENT}:${IMAGE_TAG} \
71+
--cache-from type=gha,scope=${COMPONENT} \
72+
--cache-to type=gha,mode=max,scope=${COMPONENT} \
7273
--provenance=mode=min \
7374
--attest type=sbom \
7475
--output type=image,push=true,oci-mediatypes=true,oci-artifact=true \
76+
--output type=oci,dest=artifacts/images/${COMPONENT}.tar \
7577
.
78+
79+
- name: Verify SBOM attestation
80+
shell: bash
81+
env:
82+
IMAGE_REF: ghcr.io/nvidia/openshell/${{ inputs.component }}:${{ inputs.image-tag }}
83+
run: tasks/scripts/verify-image-sbom.sh "${IMAGE_REF}" --require-cargo
84+
85+
- name: Upload ${{ inputs.component }} image
86+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
87+
with:
88+
name: image-${{ inputs.component }}
89+
path: artifacts
90+
compression-level: 0
91+
retention-days: 5
92+
if-no-files-found: error

‎.github/actions/build-rust-binary/action.yml‎

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ inputs:
1717
cargo-version:
1818
description: Cargo package version embedded in the binary
1919
required: true
20-
image-tag:
20+
supervisor-image-tag:
2121
description: Default supervisor image tag embedded in the binary
2222
required: false
2323
default: ""
@@ -29,11 +29,6 @@ inputs:
2929
description: Additional flags passed to cargo build
3030
required: false
3131
default: ""
32-
interpreter:
33-
description: Expected ELF program interpreter, "none" for static, or "skip"
34-
required: false
35-
default: skip
36-
3732
runs:
3833
using: composite
3934
steps:
@@ -63,7 +58,7 @@ runs:
6358
shell: nix develop -c bash -euo pipefail {0}
6459
env:
6560
GIT_DIR: /nonexistent
66-
OPENSHELL_IMAGE_TAG: ${{ inputs.image-tag }}
61+
OPENSHELL_IMAGE_TAG: ${{ inputs.supervisor-image-tag }}
6762
INPUTS_PACKAGE: ${{ inputs.package }}
6863
INPUTS_BINARY: ${{ inputs.binary }}
6964
INPUTS_TRIPLE: ${{ inputs.triple }}
@@ -75,24 +70,12 @@ runs:
7570
env:
7671
INPUTS_BINARY: ${{ inputs.binary }}
7772
INPUTS_TRIPLE: ${{ inputs.triple }}
78-
INPUTS_INTERPRETER: ${{ inputs.interpreter }}
7973
run: |
8074
binary="target/${INPUTS_TRIPLE}/release/${INPUTS_BINARY}"
8175
# Confirm the binary runs and reports the expected name.
8276
"$binary" --version | grep -q "^${INPUTS_BINARY} "
8377
# Confirm Syft can decode the embedded cargo-auditable metadata.
8478
SYFT_CHECK_FOR_APP_UPDATE=false syft "file:${binary}" -o cyclonedx-json | grep 'pkg:cargo/' > /dev/null
85-
if [ "$INPUTS_INTERPRETER" != skip ]; then
86-
actual_interpreter="$(readelf -l "$binary" | sed -n 's/.*Requesting program interpreter: \(.*\)]/\1/p')"
87-
expected_interpreter="$INPUTS_INTERPRETER"
88-
if [ "$expected_interpreter" = none ]; then
89-
expected_interpreter=""
90-
fi
91-
if [ "$actual_interpreter" != "$expected_interpreter" ]; then
92-
echo "error: expected interpreter '${expected_interpreter:-<none>}', got '${actual_interpreter:-<none>}'" >&2
93-
exit 1
94-
fi
95-
fi
9679
9780
- name: Upload ${{ inputs.binary }}
9881
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7

‎.github/actions/release-helm-oci/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ inputs:
2626
as 0.0.0-dev.<sha> with appVersion set to the same SHA, enabling exact
2727
version pinning alongside the floating 0.0.0-dev tag. Both chart version
2828
and appVersion use the full SHA so the chart tag matches the image tag
29-
pushed by docker-build.yml.
29+
pushed by build-images.yml.
3030
required: false
3131
default: ""
3232

‎.github/workflows/branch-checks.yml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,25 @@ jobs:
173173
run: |
174174
cargo nextest run --profile ci --workspace --features openshell-server/test-support
175175
176+
- name: Verify standalone policy prover package
177+
if: matrix.system == 'x86_64-linux'
178+
env:
179+
CARGO_NET_OFFLINE: "true"
180+
run: |
181+
cargo test --locked -p openshell-prover-cli
182+
cargo build --locked --release -p openshell-prover-cli --bin openshell-prover
183+
cargo tree --locked -p openshell-prover-cli --edges normal --prefix none > /tmp/openshell-prover-dependencies.txt
184+
if grep -Eq '^(openshell-(cli|server|sdk|bootstrap|tui|providers|core|policy)) v' /tmp/openshell-prover-dependencies.txt; then
185+
echo "ERROR: standalone prover includes an OpenShell control-plane dependency" >&2
186+
cat /tmp/openshell-prover-dependencies.txt >&2
187+
exit 1
188+
fi
189+
target/release/openshell-prover check \
190+
crates/openshell-prover-cli/tests/fixtures/candidate-contained.yaml \
191+
--boundary crates/openshell-prover-cli/tests/fixtures/boundary.yaml \
192+
--output json > /tmp/openshell-prover-result.json
193+
grep -q '"result"[[:space:]]*:[[:space:]]*"within_boundary"' /tmp/openshell-prover-result.json
194+
176195
- name: Verify telemetry can be compiled out
177196
run: |
178197
cargo build -p openshell-gateway --bin openshell-gateway

0 commit comments

Comments
 (0)