Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

fix(ci): isolate release archive downloads

Martin Vogeld5529e7acf61
diff --git a/.github/workflows/dry-run.yml b/.github/workflows/dry-run.yml
index e9134c6d3..e747c67df 100644
--- a/.github/workflows/dry-run.yml
+++ b/.github/workflows/dry-run.yml
@@ -146,13 +146,13 @@ jobs:
with:
pattern: binaries-*
merge-multiple: true
- path: assets
+ path: ${{ runner.temp }}/release-archives
# Same extraction the release verify job performs, so the bytes handed to
# VirusTotal here are the bytes a user would download and run.
- name: Extract archive artifacts
run: |
- scripts/ci/extract-release-archives.sh assets binaries \
+ scripts/ci/extract-release-archives.sh "$RUNNER_TEMP/release-archives" binaries \
--archive-scope=ui \
--expect-archives=8 \
--expect-binaries=8 \
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index b0c9ede3b..81c30e3bf 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -212,9 +212,10 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ inputs.version }}
run: |
- mkdir -p assets binaries
- gh release download "$VERSION" --dir assets --repo "$GITHUB_REPOSITORY" --pattern '*.tar.gz' --pattern '*.zip'
- scripts/ci/extract-release-archives.sh assets binaries \
+ ARCHIVE_DIR="$RUNNER_TEMP/release-archives"
+ mkdir -p "$ARCHIVE_DIR" binaries
+ gh release download "$VERSION" --dir "$ARCHIVE_DIR" --repo "$GITHUB_REPOSITORY" --pattern '*.tar.gz' --pattern '*.zip'
+ scripts/ci/extract-release-archives.sh "$ARCHIVE_DIR" binaries \
--expect-archives=16 \
--expect-binaries=16 \
--expect-packs=8 \
diff --git a/tests/test_release_archive_extractor_contract.sh b/tests/test_release_archive_extractor_contract.sh
index 67872475e..9797c8d34 100644
--- a/tests/test_release_archive_extractor_contract.sh
+++ b/tests/test_release_archive_extractor_contract.sh
@@ -528,6 +528,21 @@ if dry_run.count("ui_only: true") != 2 or "--archive-scope=ui" not in dry_run:
fail("dry-run must build, smoke and extract only the UI runtime set")
if "--archive-scope=ui" in release:
fail("release workflow must retain its dual-variant compatibility scope")
+if (
+ "path: ${{ runner.temp }}/release-archives" not in dry_run
+ or 'extract-release-archives.sh "$RUNNER_TEMP/release-archives" binaries' not in dry_run
+ or "path: assets" in dry_run
+ or "extract-release-archives.sh assets binaries" in dry_run
+):
+ fail("dry-run must isolate downloaded archives from tracked checkout assets")
+if (
+ 'ARCHIVE_DIR="$RUNNER_TEMP/release-archives"' not in release
+ or '--dir "$ARCHIVE_DIR"' not in release
+ or 'extract-release-archives.sh "$ARCHIVE_DIR" binaries' not in release
+ or "--dir assets" in release
+ or "extract-release-archives.sh assets binaries" in release
+):
+ fail("release verification must isolate downloaded archives from tracked checkout assets")
for workflow_name, workflow, arguments in (
("release", release, count_args),
("dry-run", dry_run, ui_count_args),
diff --git a/tests/test_smoke_fixture_contract.sh b/tests/test_smoke_fixture_contract.sh
index f793b299b..eb33dddae 100755
--- a/tests/test_smoke_fixture_contract.sh
+++ b/tests/test_smoke_fixture_contract.sh
@@ -419,8 +419,9 @@ require(
"finalize while the activation callback still owns the guard",
)
require(
- "scripts/ci/extract-release-archives.sh assets binaries" in release_workflow,
- "release verification must use the canonical archive extractor",
+ 'ARCHIVE_DIR="$RUNNER_TEMP/release-archives"' in release_workflow
+ and 'scripts/ci/extract-release-archives.sh "$ARCHIVE_DIR" binaries' in release_workflow,
+ "release verification must feed the canonical extractor from an isolated archive directory",
)
require(
"cbm-release-scan-associations-v2" in release_extractor