Skip to content
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
3219cb6
test(e2e): assert migrated targets leave retained jobs
prekshivyas Sep 1, 2026
d9cad9a
fix(onboard): remove duplicate readiness clock
prekshivyas Sep 1, 2026
d4abd54
test(e2e): assert migrated targets leave retained jobs
prekshivyas Sep 1, 2026
25e43d4
fix(ci): authenticate exact-base qualification evidence
prekshivyas Sep 2, 2026
3227720
fix(ci): trust exact-base qualification controller
prekshivyas Sep 2, 2026
beaa6c9
merge: preserve pull request branch history
prekshivyas Sep 2, 2026
df7e9f3
test(e2e): assert migrated planner output
prekshivyas Sep 2, 2026
7bee005
fix(ci): address qualification advisor blockers
prekshivyas Sep 2, 2026
2687331
merge: preserve concurrent planner assertions
prekshivyas Sep 2, 2026
e48ba3e
fix(ci): trigger qualification for controller changes
prekshivyas Sep 2, 2026
fad6bf3
test(ci): verify package receipt filesystem behavior
prekshivyas Sep 2, 2026
1091b02
Merge remote-tracking branch 'origin/main' into codex/test-migrated-j…
prekshivyas Sep 2, 2026
58e7550
fix(ci): require exact-base runtime evidence
prekshivyas Sep 2, 2026
8796834
fix(ci): use job-valid catalog paths
prekshivyas Sep 2, 2026
f7331ec
Merge remote-tracking branch 'origin/main' into codex/test-migrated-j…
prekshivyas Sep 2, 2026
79d0180
fix(ci): isolate candidate dependency install
prekshivyas Sep 2, 2026
3c29cb9
fix(ci): remove SDK receipt bootstrap
prekshivyas Sep 2, 2026
5b59d97
fix(ci): isolate managed runtime package credentials
prekshivyas Sep 2, 2026
5f9b415
merge: incorporate latest upstream main
prekshivyas Sep 2, 2026
21076ba
fix(ci): drop SDK receipt migration
prekshivyas Sep 2, 2026
966d3bc
merge: refresh exact-base qualification onto latest main
prekshivyas Sep 2, 2026
2982e3c
fix(ci): retain SDK receipt bootstrap until base lands
prekshivyas Sep 2, 2026
6d1a8db
merge: preserve concurrent credential isolation
prekshivyas Sep 2, 2026
f7abb4b
fix(ci): remove unused source artifact
prekshivyas Sep 2, 2026
964bef4
fix(ci): close managed runtime advisor gaps
prekshivyas Sep 2, 2026
bfe1672
merge: preserve concurrent SDK simplification
prekshivyas Sep 2, 2026
c15bcbe
fix(ci): satisfy managed runtime advisor blockers
prekshivyas Sep 2, 2026
f198691
Merge remote-tracking branch 'origin/codex/test-migrated-job-inventor…
prekshivyas Sep 2, 2026
d570eeb
fix(ci): integrate native qualification sdk handoff
prekshivyas Sep 2, 2026
f6074b1
test(ci): type native publication matrix assertions
prekshivyas Sep 2, 2026
b4deb2e
fix(ci): isolate candidate runtime evidence
prekshivyas Sep 2, 2026
dd79c37
fix(ci): use valid managed runtime job paths
prekshivyas Sep 2, 2026
22849ca
merge: preserve concurrent runtime isolation
prekshivyas Sep 2, 2026
dc6a831
merge: preserve valid qualification paths
prekshivyas Sep 2, 2026
e89de4a
fix(ci): resolve native PR base platform
prekshivyas Sep 2, 2026
633fde1
Merge remote-tracking branch 'origin/codex/test-migrated-job-inventor…
prekshivyas Sep 2, 2026
5d3592c
merge: preserve native base resolution
prekshivyas Sep 2, 2026
549501f
fix(ci): allow native public digest pulls
prekshivyas Sep 2, 2026
3cea74a
fix(ci): close remaining advisor findings
prekshivyas Sep 2, 2026
c6560da
merge: preserve native public image pulls
prekshivyas Sep 2, 2026
526e96a
fix(ci): bind qualification to current base
prekshivyas Sep 2, 2026
5728016
test(policy): align missing binary regression
prekshivyas Sep 2, 2026
7c81dec
merge: preserve policy regression alignment
prekshivyas Sep 2, 2026
5af551a
fix(blueprint): remove stale private NIM policy
prekshivyas Sep 2, 2026
7ae011a
test(e2e): keep policy apply fixture explicit
prekshivyas Sep 2, 2026
7e34376
fix(ci): isolate PR image publication
prekshivyas Sep 2, 2026
aef8cb9
merge: preserve concurrent branch fixes
prekshivyas Sep 2, 2026
e37aa50
test(ci): exercise trusted publisher boundary
prekshivyas Sep 2, 2026
48a8095
fix(ci): guard trusted candidate publisher
prekshivyas Sep 2, 2026
81e2def
Merge remote-tracking branch 'origin/codex/test-migrated-job-inventor…
prekshivyas Sep 2, 2026
2c17f1e
fix(ci): close managed runtime review gaps
prekshivyas Sep 2, 2026
37a5d21
fix(ci): close current security review blockers
prekshivyas Sep 2, 2026
49df9ba
fix(ci): run staging contract from checkout
prekshivyas Sep 2, 2026
122d7de
test(e2e): keep applied base policy consistent
prekshivyas Sep 2, 2026
674bc33
fix(ci): authenticate qualification boundaries
prekshivyas Sep 2, 2026
36e212b
Merge remote-tracking branch 'origin/codex/test-migrated-job-inventor…
prekshivyas Sep 2, 2026
9f99a12
test(ci): allow full promotion integration budget
prekshivyas Sep 2, 2026
ec632f5
refactor(ci): consolidate managed runtime evidence
prekshivyas Sep 2, 2026
bb864b6
fix(security): update fast-uri audit remediation
prekshivyas Sep 2, 2026
30136d5
refactor(ci): remove parallel qualification system
prekshivyas Sep 2, 2026
d61e742
Merge remote-tracking branch 'origin/main' into codex/test-migrated-j…
prekshivyas Sep 2, 2026
5717d45
Merge remote-tracking branch 'origin/main' into codex/test-migrated-j…
prekshivyas Sep 2, 2026
a45db5c
fix(e2e): support failure-triggered base replay
prekshivyas Sep 2, 2026
3bb6bd8
fix(ci): keep exact-base E2E comparison focused
prekshivyas Sep 2, 2026
755b0f1
fix(ci): address qualification review blockers
prekshivyas Sep 2, 2026
53df41c
fix(e2e): close trusted replay review gaps
prekshivyas Sep 2, 2026
9143e07
merge: reconcile PR review fixes
prekshivyas Sep 2, 2026
b164adb
merge: reconcile latest PR review fixes
prekshivyas Sep 2, 2026
f47fc99
merge: update PR with upstream main
prekshivyas Sep 2, 2026
4c1bb9b
fix(ci): address latest review blockers
prekshivyas Sep 2, 2026
4fa515c
merge: update PR with upstream main
prekshivyas Sep 2, 2026
c266367
merge: resolve conflicts with main
github-actions[bot] Sep 2, 2026
d5db06d
merge: reconcile automated conflict resolution
prekshivyas Sep 2, 2026
49a5920
fix(ci): harden manual PR dispatch boundaries
prekshivyas Sep 2, 2026
20a6d96
Merge remote-tracking branch 'origin/main' into codex/test-migrated-j…
prekshivyas Sep 2, 2026
c77cb45
fix(ci): retain native cleanup recovery evidence
prekshivyas Sep 2, 2026
97ca6ef
Merge remote-tracking branch 'refs/remotes/origin/main' into codex/te…
prekshivyas Sep 2, 2026
25f2273
fix(ci): centralize trusted recovery contracts
prekshivyas Sep 2, 2026
b9dbcdc
Merge remote-tracking branch 'refs/remotes/origin/main' into codex/te…
prekshivyas Sep 3, 2026
45d58a9
test(e2e): remove redundant workflow shape checks
prekshivyas Sep 3, 2026
f2f18f8
Merge branch 'main' of github.com:NVIDIA/NemoClaw into codex/test-mig…
prekshivyas Sep 3, 2026
311d6c6
Merge remote-tracking branch 'origin/main' into codex/test-migrated-j…
prekshivyas Sep 3, 2026
8c5ea46
refactor(ci): restore focused exact-base comparison
prekshivyas Sep 3, 2026
4862b16
fix(ci): preserve manual run identity contracts
prekshivyas Sep 3, 2026
8a86a54
fix(ci): reject hardware selectors in both inputs
prekshivyas Sep 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
383 changes: 65 additions & 318 deletions .github/workflows/managed-images.yaml

Large diffs are not rendered by default.

1,190 changes: 1,190 additions & 0 deletions .github/workflows/managed-runtime-base-qualification.yaml

Large diffs are not rendered by default.

125 changes: 7 additions & 118 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ jobs:
sparse-checkout: |
package-lock.json
nemoclaw/package-lock.json
scripts/checks/locate-openshell-sdk-package-for-pr.sh
sparse-checkout-cone-mode: false

- name: Checkout base package decision
Expand All @@ -196,6 +197,7 @@ jobs:
.github/workflows/openshell-sdk-package-pr.yaml
ci/reviewed-npm-audit.json
scripts/audit-reviewed-npm-graph.mts
scripts/checks/locate-openshell-sdk-package-for-pr.sh
scripts/checks/prepare-ci-npm-install.mts
scripts/lib/openclaw-npm-remediation.mts
scripts/lib/reviewed-npm-archive.mts
Expand All @@ -212,125 +214,12 @@ jobs:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
set -euo pipefail

trusted_inspector=.trusted-sdk-package-decision/scripts/checks/prepare-ci-npm-install.mts
trusted_workflow=.trusted-sdk-package-decision/.github/workflows/openshell-sdk-package-pr.yaml
if [ ! -f "$trusted_inspector" ]; then
if [ -f "$trusted_workflow" ]; then
echo "::error title=Incomplete SDK package support::The pull request base has a package workflow without its trusted inspector."
exit 1
fi
if ! jq -se '
length == 2 and
all(.[];
type == "object" and
(.lockfileVersion | type == "number") and
(.packages | type == "object")) and
([.[] | .. | objects | select(has("resolved")) | .resolved] |
all(type == "string" and startswith("https://registry.npmjs.org/")))
' package-lock.json nemoclaw/package-lock.json >/dev/null; then
echo "::error title=SDK package unavailable::The pull request base requires two valid public-registry npm lockfiles."
exit 1
fi
echo "required=false" >> "$GITHUB_OUTPUT"
exit 0
fi

decision="$(
NEMOCLAW_CI_NPM_PACKAGE_MODE=inspect \
NEMOCLAW_CI_TARGET_ROOT="$GITHUB_WORKSPACE" \
node --experimental-strip-types "$trusted_inspector"
)"
required="$(
jq -ser '
if length == 1 and (.[0] | type) == "object" and (.[0].required | type) == "boolean" then
.[0].required | tostring
else
error("decision must contain one object with a boolean required field")
end
' <<<"$decision"
)"
if [ "$required" != "true" ]; then
echo "required=false" >> "$GITHUB_OUTPUT"
exit 0
fi
if [ "$HEAD_REPOSITORY" != "$GITHUB_REPOSITORY" ]; then
echo "::error title=SDK package unavailable::The reviewed OpenShell SDK is available only to same-repository pull requests."
exit 1
fi
if [ ! -f "$trusted_workflow" ]; then
echo "::error title=Missing trusted SDK package workflow::The pull request base cannot package the approved OpenShell SDK."
exit 1
fi

artifact_name="$(jq -er '.artifactName | select(type == "string" and test("^[a-z0-9][a-z0-9._-]*\\.tgz$"))' <<<"$decision")"
printf 'artifact_name=%s\n' "$artifact_name" >> "$GITHUB_OUTPUT"
echo "required=true" >> "$GITHUB_OUTPUT"
newest_matching_run_url=""
newest_matching_run_status=""
for attempt in $(seq 1 84); do
if ! runs="$(gh api \
"repos/$GITHUB_REPOSITORY/actions/workflows/openshell-sdk-package-pr.yaml/runs?event=pull_request_target&per_page=100" \
2>/dev/null)"; then
echo "::error title=SDK package workflow unavailable::Could not inspect reviewed SDK package workflow runs. After GitHub Actions access returns, rerun the failed openshell-sdk-package job in CI / Pull Request."
exit 1
fi
matches="$(jq -cer \
--arg base "$BASE_SHA" \
--arg head "$HEAD_SHA" \
--argjson pr "$PR_NUMBER" '
[.workflow_runs[] |
select(.event == "pull_request_target") |
select(any(.pull_requests[]?;
.number == $pr and .head.sha == $head and .base.sha == $base))] |
sort_by(.created_at) | reverse
' <<<"$runs" 2>/dev/null || true)"
if jq -e 'length > 0' <<<"$matches" >/dev/null 2>&1; then
newest_matching_run_url="$(jq -er '.[0].html_url | select(type == "string" and startswith("https://github.com/"))' <<<"$matches")"
newest_matching_run_status="$(jq -er '.[0].status | select(type == "string" and test("^[a-z_]+$"))' <<<"$matches")"
pending_run=false
newest_completed_url=""
while IFS= read -r match; do
status="$(jq -r '.status' <<<"$match")"
if [ "$status" != "completed" ]; then
pending_run=true
continue
fi
run_url="$(jq -er '.html_url | select(type == "string" and startswith("https://github.com/"))' <<<"$match")"
if [ -z "$newest_completed_url" ]; then
newest_completed_url="$run_url"
fi
conclusion="$(jq -r '.conclusion' <<<"$match")"
if [ "$conclusion" != "success" ]; then
continue
fi
run_id="$(jq -er '.id | select(type == "number" and . > 0 and . <= 9007199254740991)' <<<"$match")"
artifact_listing_url="repos/$GITHUB_REPOSITORY/actions/runs/$run_id/artifacts?per_page=100"
if ! artifacts="$(gh api "$artifact_listing_url" 2>/dev/null)"; then
echo "::error title=SDK package artifact unavailable::Could not inspect the reviewed SDK archive from $run_url. After GitHub Actions access returns, rerun the failed openshell-sdk-package job in CI / Pull Request."
exit 1
fi
expected_artifact="openshell-sdk-$HEAD_SHA"
if jq -e --arg name "$expected_artifact" '
[.artifacts[]? | select(.name == $name and .expired == false)] | length == 1
' <<<"$artifacts" >/dev/null; then
echo "run_id=$run_id" >> "$GITHUB_OUTPUT"
exit 0
fi
done < <(jq -c '.[]' <<<"$matches")
if [ "$pending_run" = "false" ]; then
echo "::error title=SDK package artifact unavailable::No unexpired reviewed SDK archive is available. Last checked $newest_completed_url. Rerun Security / Package OpenShell SDK for PR for this latest PR commit. Then rerun the failed openshell-sdk-package job in CI / Pull Request."
exit 1
fi
fi
sleep 5
done
latest_run_detail="No matching run was found."
if [ -n "$newest_matching_run_url" ]; then
latest_run_detail="Last matching run: $newest_matching_run_url ($newest_matching_run_status)."
selector=scripts/checks/locate-openshell-sdk-package-for-pr.sh
trusted_selector=.trusted-sdk-package-decision/scripts/checks/locate-openshell-sdk-package-for-pr.sh
if [ -f "$trusted_selector" ]; then
selector="$trusted_selector"
fi
echo "::error title=SDK package workflow timed out::No successful reviewed SDK package run for this latest PR commit was available within seven minutes. $latest_run_detail Rerun Security / Package OpenShell SDK for PR for this latest PR commit. Then rerun the failed openshell-sdk-package job in CI / Pull Request."
exit 1
bash "$selector"

- name: Download exact base-controlled SDK archive
if: steps.locate.outputs.required == 'true'
Expand Down
7 changes: 0 additions & 7 deletions nemoclaw-blueprint/blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,3 @@ components:

policy:
base: "sandboxes/openclaw/policy.yaml"
additions:
nim_service:
name: nim_service
endpoints:
- host: "nim-service.local"
port: 8000
access: full
141 changes: 141 additions & 0 deletions scripts/checks/locate-openshell-sdk-package-for-pr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail

trusted_inspector=.trusted-sdk-package-decision/scripts/checks/prepare-ci-npm-install.mts
trusted_workflow=.trusted-sdk-package-decision/.github/workflows/openshell-sdk-package-pr.yaml
if [ ! -f "$trusted_inspector" ]; then
if [ -f "$trusted_workflow" ]; then
echo "::error title=Incomplete SDK package support::The pull request base has a package workflow without its trusted inspector."
exit 1
fi
if ! jq -se '
length == 2 and
all(.[];
type == "object" and
(.lockfileVersion | type == "number") and
(.packages | type == "object")) and
([.[] | .. | objects | select(has("resolved")) | .resolved] |
all(type == "string" and startswith("https://registry.npmjs.org/")))
' package-lock.json nemoclaw/package-lock.json >/dev/null; then
echo "::error title=SDK package unavailable::The pull request base requires two valid public-registry npm lockfiles."
exit 1
fi
echo "required=false" >>"$GITHUB_OUTPUT"
exit 0
fi

decision="$(
NEMOCLAW_CI_NPM_PACKAGE_MODE=inspect \
NEMOCLAW_CI_TARGET_ROOT="$GITHUB_WORKSPACE" \
node --experimental-strip-types "$trusted_inspector"
)"
required="$(
jq -ser '
if length == 1 and (.[0] | type) == "object" and (.[0].required | type) == "boolean" then
.[0].required | tostring
else
error("decision must contain one object with a boolean required field")
end
' <<<"$decision"
)"
if [ "$required" != "true" ]; then
echo "required=false" >>"$GITHUB_OUTPUT"
exit 0
fi
if [ "$HEAD_REPOSITORY" != "$GITHUB_REPOSITORY" ]; then
echo "::error title=SDK package unavailable::The reviewed OpenShell SDK is available only to same-repository pull requests."
exit 1
fi
if [ ! -f "$trusted_workflow" ]; then
echo "::error title=Missing trusted SDK package workflow::The pull request base cannot package the approved OpenShell SDK."
exit 1
fi

artifact_name="$(
jq -er '.artifactName | select(type == "string" and test("^[a-z0-9][a-z0-9._-]*\\.tgz$"))' \
<<<"$decision"
)"
printf 'artifact_name=%s\n' "$artifact_name" >>"$GITHUB_OUTPUT"
echo "required=true" >>"$GITHUB_OUTPUT"
newest_matching_run_url=""
newest_matching_run_status=""
for _attempt in $(seq 1 84); do
if ! runs="$(
gh api \
"repos/$GITHUB_REPOSITORY/actions/workflows/openshell-sdk-package-pr.yaml/runs?event=pull_request_target&per_page=100" \
2>/dev/null
)"; then
echo "::error title=SDK package workflow unavailable::Could not inspect reviewed SDK package workflow runs. After GitHub Actions access returns, rerun the failed openshell-sdk-package job in CI / Pull Request."
exit 1
fi
matches="$(
jq -cer \
--arg base "$BASE_SHA" \
--arg head "$HEAD_SHA" \
--argjson pr "$PR_NUMBER" '
[.workflow_runs[] |
select(.event == "pull_request_target") |
select(any(.pull_requests[]?;
.number == $pr and .head.sha == $head and .base.sha == $base))] |
sort_by(.created_at) | reverse
' <<<"$runs" 2>/dev/null || true
)"
if jq -e 'length > 0' <<<"$matches" >/dev/null 2>&1; then
newest_matching_run_url="$(
jq -er '.[0].html_url | select(type == "string" and startswith("https://github.com/"))' \
<<<"$matches"
)"
newest_matching_run_status="$(
jq -er '.[0].status | select(type == "string" and test("^[a-z_]+$"))' <<<"$matches"
)"
pending_run=false
newest_completed_url=""
while IFS= read -r match; do
status="$(jq -r '.status' <<<"$match")"
if [ "$status" != "completed" ]; then
pending_run=true
continue
fi
run_url="$(
jq -er '.html_url | select(type == "string" and startswith("https://github.com/"))' \
<<<"$match"
)"
if [ -z "$newest_completed_url" ]; then
newest_completed_url="$run_url"
fi
conclusion="$(jq -r '.conclusion' <<<"$match")"
if [ "$conclusion" != "success" ]; then
continue
fi
run_id="$(
jq -er '.id | select(type == "number" and . > 0 and . <= 9007199254740991)' <<<"$match"
)"
artifact_listing_url="repos/$GITHUB_REPOSITORY/actions/runs/$run_id/artifacts?per_page=100"
if ! artifacts="$(gh api "$artifact_listing_url" 2>/dev/null)"; then
echo "::error title=SDK package artifact unavailable::Could not inspect the reviewed SDK archive from $run_url. After GitHub Actions access returns, rerun the failed openshell-sdk-package job in CI / Pull Request."
exit 1
fi
expected_artifact="openshell-sdk-$HEAD_SHA"
if jq -e --arg name "$expected_artifact" '
[.artifacts[]? | select(.name == $name and .expired == false)] | length == 1
' <<<"$artifacts" >/dev/null; then
echo "run_id=$run_id" >>"$GITHUB_OUTPUT"
exit 0
fi
done < <(jq -c '.[]' <<<"$matches")
if [ "$pending_run" = "false" ]; then
echo "::error title=SDK package artifact unavailable::No unexpired reviewed SDK archive is available. Last checked $newest_completed_url. Rerun Security / Package OpenShell SDK for PR for this latest PR commit. Then rerun the failed openshell-sdk-package job in CI / Pull Request."
exit 1
fi
fi
sleep 5
done
latest_run_detail="No matching run was found."
if [ -n "$newest_matching_run_url" ]; then
latest_run_detail="Last matching run: $newest_matching_run_url ($newest_matching_run_status)."
fi
echo "::error title=SDK package workflow timed out::No successful reviewed SDK package run for this latest PR commit was available within seven minutes. $latest_run_detail Rerun Security / Package OpenShell SDK for PR for this latest PR commit. Then rerun the failed openshell-sdk-package job in CI / Pull Request."
exit 1
4 changes: 2 additions & 2 deletions scripts/checks/pull-public-exact-digest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ if [[ ! "$reference" =~ ^ghcr\.io/[a-z0-9._/-]+@sha256:[a-f0-9]{64}$ ]]; then
echo "ERROR: public image reference must be an exact lowercase GHCR digest" >&2
exit 2
fi
if [ "$platform" != "linux/amd64" ]; then
echo "ERROR: public image pull platform must be linux/amd64" >&2
if [[ ! "$platform" =~ ^linux/(amd64|arm64)$ ]]; then
echo "ERROR: public image pull platform must be linux/amd64 or linux/arm64" >&2
exit 2
fi
if [ -z "${RUNNER_TEMP:-}" ] || [ ! -d "$RUNNER_TEMP" ]; then
Expand Down
40 changes: 23 additions & 17 deletions scripts/checks/resolve-managed-pr-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ if [[ ! "$BASE_SHA" =~ ^[0-9a-f]{40}$ || ! "$CANDIDATE_SHA" =~ ^[0-9a-f]{40}$ ]]
echo "ERROR: PR base resolution requires exact base and candidate commit SHAs." >&2
exit 1
fi
if [[ ! "$PLATFORM" =~ ^linux/(amd64|arm64)$ ]]; then
echo "ERROR: PR base resolution requires a supported native Linux platform." >&2
exit 1
fi
if ! git cat-file -e "${BASE_SHA}^{commit}" 2>/dev/null; then
git fetch --no-tags --depth=1 origin "$BASE_SHA"
fi
Expand All @@ -67,20 +71,23 @@ if [ "$diff_status" -eq 1 ]; then
local_base_archive="$RUNNER_TEMP/pr-base.docker.tar"
local_base_oci_archive="$RUNNER_TEMP/pr-base.oci.tar"
local_base_oci="$RUNNER_TEMP/pr-base.oci"
base_labels=()
base_build=(
docker buildx build
--platform "$PLATFORM"
--provenance=false
--sbom=false
--file "$BASE_DOCKERFILE"
--tag "$LOCAL_BASE_REFERENCE"
)
if [ "$AGENT" = "langchain-deepagents-code" ]; then
base_labels+=(--label "org.opencontainers.image.revision=${CANDIDATE_SHA}")
base_build+=(--label "org.opencontainers.image.revision=${CANDIDATE_SHA}")
fi
docker buildx build \
--platform linux/amd64 \
--provenance=false \
--sbom=false \
--file "$BASE_DOCKERFILE" \
--tag "$LOCAL_BASE_REFERENCE" \
"${base_labels[@]}" \
--output "type=docker,dest=${local_base_archive}" \
--output "type=oci,dest=${local_base_oci_archive}" \
base_build+=(
--output "type=docker,dest=${local_base_archive}"
--output "type=oci,dest=${local_base_oci_archive}"
.
)
"${base_build[@]}"
docker load --input "$local_base_archive"
mkdir -p "$local_base_oci"
tar -C "$local_base_oci" -xf "$local_base_oci_archive"
Expand Down Expand Up @@ -113,29 +120,28 @@ alias_raw="$RUNNER_TEMP/pr-base-alias.raw"
exact_raw="$RUNNER_TEMP/pr-base-exact.raw"
docker buildx imagetools inspect "$BASE_ALIAS" --raw >"$alias_raw"
if ! digest="$(
jq -er '
jq -er --arg platform "$PLATFORM" '
if (
.mediaType == "application/vnd.oci.image.index.v1+json" or
.mediaType == "application/vnd.docker.distribution.manifest.list.v2+json"
) then
[
.manifests[]
| select(
.platform.os == "linux" and
.platform.architecture == "amd64"
(.platform.os + "/" + .platform.architecture) == $platform
)
]
| if length == 1 then .[0].digest else error("not one linux/amd64 image") end
| if length == 1 then .[0].digest else error("not one requested platform image") end
else
error("base alias is not a platform index")
end
' "$alias_raw"
)"; then
echo "ERROR: PR base alias does not contain exactly one linux/amd64 image." >&2
echo "ERROR: PR base alias does not contain exactly one ${PLATFORM} image." >&2
exit 1
fi
if [[ ! "$digest" =~ ^sha256:[0-9a-f]{64}$ ]]; then
echo "ERROR: PR base alias returned an invalid linux/amd64 digest." >&2
echo "ERROR: PR base alias returned an invalid ${PLATFORM} digest." >&2
exit 1
fi
reference="${BASE_REPOSITORY}@${digest}"
Expand Down
Loading
Loading