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.

feat(ci): add a third release candidate (debug-stripped) as an extra VT draw

Martin Vogel98d7dbab0188
diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml
index 10032a493..c7031bd71 100644
--- a/.github/workflows/_build.yml
+++ b/.github/workflows/_build.yml
@@ -295,10 +295,10 @@ jobs:
if-no-files-found: error
# One blocking join owns the security-sensitive transition from candidates
- # to public artifacts. Each target tuple contributes exactly two behavior-
- # equivalent candidates (stripped/unstripped); the selector may choose only
- # within that tuple. A hard or incomplete result for either sibling blocks
- # the all-target release rather than selecting around missing evidence.
+ # to public artifacts. Each target tuple contributes exactly three behavior-
+ # equivalent candidates (unstripped/debug-stripped/stripped); the selector may
+ # only choose within that tuple. A hard result on ANY sibling blocks
+ # the all-target release rather than selecting around a real detection.
select-package:
needs: [build-unix, build-windows, build-windows-arm64, build-linux-portable]
runs-on: ubuntu-latest
@@ -324,14 +324,14 @@ jobs:
"$RUNNER_TEMP/release-candidate-artifacts" \
release-candidate-scan \
--expect-targets 8 \
- --expect-candidates 16
+ --expect-candidates 24
# Staging copied and re-hashed every byte into the immutable object
# set. Drop the redundant artifact-download tree before the VT wait.
test -n "$RUNNER_TEMP"
rm -rf -- "$RUNNER_TEMP/release-candidate-artifacts"
test ! -e "$RUNNER_TEMP/release-candidate-artifacts"
- - name: Submit all 16 candidates to VirusTotal
+ - name: Submit all 24 candidates to VirusTotal
if: ${{ inputs.scan_candidates }}
uses: crazy-max/ghaction-virustotal@936d8c5c00afe97d3d9a1af26d017cfdf26800a2 # v5.0.0
id: virustotal-candidates
@@ -379,7 +379,7 @@ jobs:
- name: Reclaim rejected and redundant candidate bytes
run: |
# release-selection owns fresh, hash-verified copies of the eight
- # chosen executables. No later release step may consume the 16-object
+ # chosen executables. No later release step may consume the 24-object
# scan pool, so discard it before packaging to bound runner disk use.
rm -rf -- release-candidate-scan/objects
test ! -e release-candidate-scan/objects
diff --git a/README.md b/README.md
index e47936b21..b36b72f20 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ High-quality parsing through [tree-sitter](https://tree-sitter.github.io/tree-si
> **Research** — The design and benchmarks behind this project are described in the preprint [*Codebase-Memory: Tree-Sitter-Based Knowledge Graphs for LLM Code Exploration via MCP*](https://arxiv.org/abs/2603.27277) (arXiv:2603.27277). Evaluated across 31 real-world repositories: 83% answer quality, 10× fewer tokens, 2.1× fewer tool calls vs. file-by-file exploration.
-> **Security & Trust** — This tool reads your codebase and writes to your agent configuration files. That is what it is designed to do. If you prefer to audit before running, the [full source is here](https://github.com/DeusData/codebase-memory-mcp). For each release product, both stripped and unstripped executable candidates are submitted to VirusTotal before testing; the selected candidate is then packaged with its SHA-256 unchanged. Release notes link every measured candidate result. Publication permits only the narrowly documented single-Microsoft `!ml` tolerance in [SECURITY.md](SECURITY.md#our-release-policy). All processing happens 100% locally; your code never leaves your machine. Found a security issue? We want to know — see [SECURITY.md](SECURITY.md). Security is Priority #1 for us.
+> **Security & Trust** — This tool reads your codebase and writes to your agent configuration files. That is what it is designed to do. If you prefer to audit before running, the [full source is here](https://github.com/DeusData/codebase-memory-mcp). For each release product, three behaviourally identical executable candidates (unstripped, debug-stripped, stripped) are submitted to VirusTotal before testing; the selected candidate is then packaged with its SHA-256 unchanged. Release notes link every measured candidate result. Publication permits only the narrowly documented single-Microsoft `!ml` tolerance in [SECURITY.md](SECURITY.md#our-release-policy). All processing happens 100% locally; your code never leaves your machine. Found a security issue? We want to know — see [SECURITY.md](SECURITY.md). Security is Priority #1 for us.
<p align="center">
<img src="docs/graph-ui-screenshot.png" alt="Graph visualization UI showing the codebase-memory-mcp knowledge graph" width="800">
@@ -794,7 +794,7 @@ internal/cbm/ Vendored tree-sitter grammars (158 languages) + AST extrac
Every release is verified through a multi-layer pipeline before publication:
-- **VirusTotal** — all 16 stripped/unstripped executable candidates across the eight release products are scanned before smoke/soak (clean is preferred and only the single-Microsoft `!ml` tolerance documented in [SECURITY.md](SECURITY.md#our-release-policy) may pass; the number of engines that returned a decisive result is recorded as evidence but is VirusTotal fleet availability, not a pass condition). The selected executable is packaged without changing its SHA-256, and release notes link every candidate result and the selection evidence. Archive containers are checksummed, not redundantly resubmitted.
+- **VirusTotal** — all 24 executable candidates (unstripped, debug-stripped and stripped) across the eight release products are scanned before smoke/soak (clean is preferred and only the single-Microsoft `!ml` tolerance documented in [SECURITY.md](SECURITY.md#our-release-policy) may pass; the number of engines that returned a decisive result is recorded as evidence but is VirusTotal fleet availability, not a pass condition). The selected executable is packaged without changing its SHA-256, and release notes link every candidate result and the selection evidence. Archive containers are checksummed, not redundantly resubmitted.
- **SLSA Level 3** — cryptographic build provenance generated by the trusted GitHub Actions build workflow; verify with `gh attestation verify <file> --repo DeusData/codebase-memory-mcp --signer-workflow DeusData/codebase-memory-mcp/.github/workflows/_build.yml`
- **Sigstore cosign** — keyless signatures on all artifacts; bundles included in every release
- **SHA-256 checksums** — `checksums.txt` published with every release; verified by both install scripts before extraction
diff --git a/SECURITY.md b/SECURITY.md
index 19e6eea04..308c1586e 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -126,7 +126,7 @@ Releases are created as **drafts** (invisible to users) and only published after
2. **Sigstore cosign signing** — keyless digital signatures verifiable by anyone
3. **SBOM** — Software Bill of Materials (SPDX) listing all vendored dependencies
4. **SHA-256 checksums** — published with every release
-5. **VirusTotal scanning** — both stripped and unstripped executable candidates for every release product are scanned before smoke/soak. Zero malicious and zero suspicious is preferred; the only tolerated result is exactly one Microsoft malicious label ending in `!ml`, which is disclosed. The selected executable is packaged without changing its SHA-256; archive containers are checksummed rather than redundantly rescanned. Release notes link every candidate result and the selection evidence.
+5. **VirusTotal scanning** — three behaviourally identical executable candidates — unstripped, debug-stripped and stripped — are derived from one linker output for every release product and scanned before smoke/soak. Zero malicious and zero suspicious is preferred; the only tolerated result is exactly one Microsoft malicious label ending in `!ml`, which is disclosed. The selected executable is packaged without changing its SHA-256; archive containers are checksummed rather than redundantly rescanned. Release notes link every candidate result and the selection evidence.
6. **OpenSSF Scorecard** — repository security health score
Scope of the SLSA claim: this is a build provenance claim for release
diff --git a/docs/index.html b/docs/index.html
index 3ca89d290..abf053b54 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -165,7 +165,7 @@
"name": "Does codebase-memory-mcp send my code anywhere?",
"acceptedAnswer": {
"@type": "Answer",
- "text": "No. All indexing and querying happen 100% locally on your machine. There is no embedded LLM and no API key — your MCP client acts as the intelligence layer. Before release testing, both stripped and unstripped executable candidates for every platform and link mode are submitted to VirusTotal. The selected candidate is packaged with its SHA-256 unchanged, and release notes link every measured result. Publication permits only the documented single-Microsoft !ml tolerance."
+ "text": "No. All indexing and querying happen 100% locally on your machine. There is no embedded LLM and no API key — your MCP client acts as the intelligence layer. Before release testing, three behaviourally identical executable candidates (unstripped, debug-stripped, stripped) for every platform and link mode are submitted to VirusTotal. The selected candidate is packaged with its SHA-256 unchanged, and release notes link every measured result. Publication permits only the documented single-Microsoft !ml tolerance."
}
},
{
@@ -791,8 +791,8 @@
<h3>Does codebase-memory-mcp send my code anywhere?</h3>
<p>No. All indexing and querying happen 100% locally. There is no embedded LLM and no API key. Release
- archives are signed and checksummed. Before testing, both stripped and unstripped executable candidates
- for every platform and link mode are submitted to VirusTotal; the selected candidate is packaged with its
+ archives are signed and checksummed. Before testing, three behaviourally identical executable candidates
+ (unstripped, debug-stripped, stripped) for every platform and link mode are submitted to VirusTotal; the selected candidate is packaged with its
SHA-256 unchanged. Release notes link every measured result. Publication permits only the
documented single-Microsoft <code>!ml</code> tolerance.</p>
diff --git a/scripts/ci/prepare-release-candidates.sh b/scripts/ci/prepare-release-candidates.sh
index 9cd714cc5..3c197c41d 100755
--- a/scripts/ci/prepare-release-candidates.sh
+++ b/scripts/ci/prepare-release-candidates.sh
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
-# Derive the two final, immutable release candidates for one existing product
+# Derive the three final, immutable release candidates for one existing product
# tuple from a single linker output. Strip/signing happens here and nowhere
# after this boundary.
set -euo pipefail
@@ -11,8 +11,9 @@ usage() {
Usage: scripts/ci/prepare-release-candidates.sh <goos> <goarch> \
--binary FILE --out-dir DIR
-Derive one unstripped and one stripped final executable for exactly one of the
-eight release product tuples. Both candidates come from the same linker output
+Derive three final executables - unstripped, debug-stripped and stripped - for
+exactly one of the eight release product tuples. All three come from the same
+linker output
and are finalized before hashing and atomic publication. Runtime testing starts
only after VirusTotal selection, using the selected candidate.
@@ -139,12 +140,14 @@ trap cleanup EXIT
STAGE="$WORK/$TARGET"
BINARY_NAME=codebase-memory-mcp
[ "$GOOS" = windows ] && BINARY_NAME=codebase-memory-mcp.exe
-mkdir -p "$STAGE/unstripped" "$STAGE/stripped"
+mkdir -p "$STAGE/unstripped" "$STAGE/debug-stripped" "$STAGE/stripped"
UNSTRIPPED="$STAGE/unstripped/$BINARY_NAME"
+DEBUG_STRIPPED="$STAGE/debug-stripped/$BINARY_NAME"
STRIPPED="$STAGE/stripped/$BINARY_NAME"
cp "$BINARY" "$UNSTRIPPED"
+cp "$BINARY" "$DEBUG_STRIPPED"
cp "$BINARY" "$STRIPPED"
-chmod 0755 "$UNSTRIPPED" "$STRIPPED"
+chmod 0755 "$UNSTRIPPED" "$DEBUG_STRIPPED" "$STRIPPED"
STRIP_INVOCATION="$(basename "$STRIP_TOOL") --strip-all"
if ! "$STRIP_TOOL" --strip-all "$STRIPPED" 2>/dev/null; then
@@ -161,7 +164,31 @@ if ! "$STRIP_TOOL" --strip-all "$STRIPPED" 2>/dev/null; then
STRIP_INVOCATION="$(basename "$STRIP_TOOL")"
fi
+# Third candidate: debug information removed, symbol table kept. Behaviourally
+# identical to the other two — same linker output, nothing but metadata differs
+# — but a distinct byte image, so VirusTotal scans it as its own file.
+#
+# That is the entire point. Release-run evidence shows the single tolerated
+# Microsoft `!ml` verdict landing on stripped and unstripped candidates of the
+# SAME build essentially at random (they disagreed on 4 of 8 targets, in both
+# directions), so each variant is an independent draw. With two candidates one
+# target came back flagged on both and had no clean binary to ship; a third
+# independent draw makes that outcome substantially rarer.
+DEBUG_STRIP_INVOCATION="$(basename "$STRIP_TOOL") --strip-debug"
+if ! "$STRIP_TOOL" --strip-debug "$DEBUG_STRIPPED" 2>/dev/null; then
+ # Apple's strip rejects --strip-debug; -S is its measured equivalent.
+ if [ "$GOOS" != darwin ]; then
+ echo "prepare-release-candidates: $STRIP_TOOL --strip-debug failed" >&2
+ exit 2
+ fi
+ cp "$BINARY" "$DEBUG_STRIPPED"
+ chmod 0755 "$DEBUG_STRIPPED"
+ "$STRIP_TOOL" -S "$DEBUG_STRIPPED"
+ DEBUG_STRIP_INVOCATION="$(basename "$STRIP_TOOL") -S"
+fi
+
UNSTRIPPED_PRE_SIGN_SHA="$(sha256_file "$UNSTRIPPED")"
+DEBUG_STRIPPED_PRE_SIGN_SHA="$(sha256_file "$DEBUG_STRIPPED")"
STRIPPED_PRE_SIGN_SHA="$(sha256_file "$STRIPPED")"
SIGNATURE=not-applicable
if [ "$GOOS" = darwin ]; then
@@ -171,7 +198,7 @@ if [ "$GOOS" = darwin ]; then
exit 2
}
CODESIGN_TOOL="$(command -v "$CODESIGN_TOOL")"
- for candidate in "$UNSTRIPPED" "$STRIPPED"; do
+ for candidate in "$UNSTRIPPED" "$DEBUG_STRIPPED" "$STRIPPED"; do
"$CODESIGN_TOOL" --sign - --force --timestamp=none "$candidate"
"$CODESIGN_TOOL" --verify --strict "$candidate"
done
@@ -179,13 +206,18 @@ if [ "$GOOS" = darwin ]; then
fi
UNSTRIPPED_SHA="$(sha256_file "$UNSTRIPPED")"
+DEBUG_STRIPPED_SHA="$(sha256_file "$DEBUG_STRIPPED")"
STRIPPED_SHA="$(sha256_file "$STRIPPED")"
-[ "$UNSTRIPPED_SHA" != "$STRIPPED_SHA" ] || {
+# All three must differ: identical candidates would be one draw wearing three
+# hats, and the selector would believe it had alternatives it does not have.
+if [ "$UNSTRIPPED_SHA" = "$STRIPPED_SHA" ] || \
+ [ "$UNSTRIPPED_SHA" = "$DEBUG_STRIPPED_SHA" ] || \
+ [ "$DEBUG_STRIPPED_SHA" = "$STRIPPED_SHA" ]; then
echo "prepare-release-candidates: strip did not produce byte-distinct candidates" >&2
exit 2
-}
+fi
-for candidate in "$UNSTRIPPED" "$STRIPPED"; do
+for candidate in "$UNSTRIPPED" "$DEBUG_STRIPPED" "$STRIPPED"; do
bash "$ROOT/scripts/ci/check-binary-composition.sh" "$candidate" >/dev/null
done
@@ -194,6 +226,7 @@ done
exit 2
}
[ "$(sha256_file "$UNSTRIPPED")" = "$UNSTRIPPED_SHA" ] && \
+ [ "$(sha256_file "$DEBUG_STRIPPED")" = "$DEBUG_STRIPPED_SHA" ] && \
[ "$(sha256_file "$STRIPPED")" = "$STRIPPED_SHA" ] || {
echo "prepare-release-candidates: a final candidate changed during validation" >&2
exit 2
@@ -212,6 +245,7 @@ linux-*) LINKAGE=dynamic ;;
esac
UNSTRIPPED_SIZE="$(wc -c < "$UNSTRIPPED" | tr -d '[:space:]')"
+DEBUG_STRIPPED_SIZE="$(wc -c < "$DEBUG_STRIPPED" | tr -d '[:space:]')"
STRIPPED_SIZE="$(wc -c < "$STRIPPED" | tr -d '[:space:]')"
MANIFEST="$STAGE/candidate-provenance.tsv"
{
@@ -221,13 +255,17 @@ MANIFEST="$STAGE/candidate-provenance.tsv"
"$TARGET" "$BINARY_NAME" "$SOURCE_SHA" "$UNSTRIPPED_PRE_SIGN_SHA" \
"$UNSTRIPPED_SHA" "$UNSTRIPPED_SIZE" "$FORMAT" "$ARCHITECTURE" \
"$LINKAGE" "$SIGNATURE" "$STRIP_INVOCATION" "$STRIP_VERSION"
+ printf '%s\tdebug-stripped\tdebug-stripped/%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\tstrip-debug\t%s\t%s\t%s\tsame-linker-output-v1\n' \
+ "$TARGET" "$BINARY_NAME" "$SOURCE_SHA" "$DEBUG_STRIPPED_PRE_SIGN_SHA" \
+ "$DEBUG_STRIPPED_SHA" "$DEBUG_STRIPPED_SIZE" "$FORMAT" "$ARCHITECTURE" \
+ "$LINKAGE" "$SIGNATURE" "$DEBUG_STRIP_INVOCATION" "$STRIP_VERSION"
printf '%s\tstripped\tstripped/%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\tstrip\t%s\t%s\t%s\tsame-linker-output-v1\n' \
"$TARGET" "$BINARY_NAME" "$SOURCE_SHA" "$STRIPPED_PRE_SIGN_SHA" \
"$STRIPPED_SHA" "$STRIPPED_SIZE" "$FORMAT" "$ARCHITECTURE" \
"$LINKAGE" "$SIGNATURE" "$STRIP_INVOCATION" "$STRIP_VERSION"
} > "$MANIFEST"
-chmod 0555 "$UNSTRIPPED" "$STRIPPED"
+chmod 0555 "$UNSTRIPPED" "$DEBUG_STRIPPED" "$STRIPPED"
chmod 0444 "$MANIFEST"
mv "$STAGE" "$PUBLISHED"
-echo "prepare-release-candidates: published $TARGET stripped/unstripped pair"
+echo "prepare-release-candidates: published $TARGET unstripped/debug-stripped/stripped candidates"
diff --git a/scripts/ci/select-release-candidates.py b/scripts/ci/select-release-candidates.py
index 7fb453343..94ab81e25 100755
--- a/scripts/ci/select-release-candidates.py
+++ b/scripts/ci/select-release-candidates.py
@@ -30,7 +30,7 @@ TARGETS = (
"windows-amd64",
"windows-arm64",
)
-VARIANTS = ("unstripped", "stripped")
+VARIANTS = ("unstripped", "debug-stripped", "stripped")
PROVENANCE_FIELDS = (
"target",
"variant",
@@ -78,6 +78,11 @@ SELECTION_FIELDS = (
"unstripped_classification",
"unstripped_analysis_id",
"unstripped_virustotal_url",
+ "debug_stripped_sha256",
+ "debug_stripped_scan_path",
+ "debug_stripped_classification",
+ "debug_stripped_analysis_id",
+ "debug_stripped_virustotal_url",
"stripped_sha256",
"stripped_scan_path",
"stripped_classification",
@@ -210,7 +215,11 @@ def validate_candidate_row(row: dict[str, str], *, target: str, variant: str) ->
"format": file_format,
"architecture": architecture,
"linkage": linkage,
- "transform": "copy" if variant == "unstripped" else "strip",
+ "transform": {
+ "unstripped": "copy",
+ "debug-stripped": "strip-debug",
+ "stripped": "strip",
+ }[variant],
"signature": "adhoc-verified" if target.startswith("darwin-") else "not-applicable",
"pair_verification": "same-linker-output-v1",
}
@@ -517,17 +526,30 @@ def main(argv: Sequence[str]) -> None:
variant: results[pair[variant]["scan_path"]]["policy_classification"]
for variant in VARIANTS
}
- stripped_class = classifications["stripped"]
- unstripped_class = classifications["unstripped"]
- if stripped_class == "clean":
- selected_variant = "stripped"
- decision = "stripped-preferred"
- elif unstripped_class == "clean":
- selected_variant = "unstripped"
- decision = "unstripped-clean-after-stripped-microsoft-ml"
+ # Preference order is fixed and content-independent: the
+ # smallest artifact first, then progressively more metadata.
+ # A `hard` classification never reaches here - the gate fails
+ # the release before selection - so every candidate below is
+ # either clean or a tolerated single Microsoft `!ml`.
+ #
+ # The variants are behaviourally identical, so this picks on
+ # verdict alone: the first clean one in preference order, and
+ # only if EVERY candidate drew the tolerated verdict do we ship
+ # a flagged one (still the smallest).
+ order = ("stripped", "debug-stripped", "unstripped")
+ clean = [v for v in order if classifications[v] == "clean"]
+ if clean:
+ selected_variant = clean[0]
+ if selected_variant == "stripped":
+ decision = "stripped-preferred"
+ else:
+ others = "-".join(
+ f"{v}:{classifications[v]}" for v in order if v != selected_variant
+ )
+ decision = f"{selected_variant}-clean-after-{others}"
else:
selected_variant = "stripped"
- decision = "stripped-both-microsoft-ml"
+ decision = "stripped-all-candidates-microsoft-ml"
selected = pair[selected_variant]
binary_name = expected_properties(target)[0]
@@ -547,13 +569,16 @@ def main(argv: Sequence[str]) -> None:
"decision": decision,
}
for variant in VARIANTS:
+ # Field prefixes use underscores; the variant name is the
+ # on-disk directory and keeps its hyphen ("debug-stripped").
+ key = variant.replace("-", "_")
candidate = pair[variant]
result = results[candidate["scan_path"]] if results is not None else None
- evidence[f"{variant}_sha256"] = candidate["sha256"]
- evidence[f"{variant}_scan_path"] = candidate["scan_path"]
- evidence[f"{variant}_classification"] = classifications[variant]
- evidence[f"{variant}_analysis_id"] = result["analysis_id"] if result else ""
- evidence[f"{variant}_virustotal_url"] = result["virustotal_url"] if result else ""
+ evidence[f"{key}_sha256"] = candidate["sha256"]
+ evidence[f"{key}_scan_path"] = candidate["scan_path"]
+ evidence[f"{key}_classification"] = classifications[variant]
+ evidence[f"{key}_analysis_id"] = result["analysis_id"] if result else ""
+ evidence[f"{key}_virustotal_url"] = result["virustotal_url"] if result else ""
selection_rows.append(evidence)
write_tsv(
diff --git a/scripts/ci/stage-release-candidates.py b/scripts/ci/stage-release-candidates.py
index 20f2b5901..3a4fda27f 100755
--- a/scripts/ci/stage-release-candidates.py
+++ b/scripts/ci/stage-release-candidates.py
@@ -30,7 +30,7 @@ TARGETS = (
"windows-amd64",
"windows-arm64",
)
-VARIANTS = ("unstripped", "stripped")
+VARIANTS = ("unstripped", "debug-stripped", "stripped")
PROVENANCE_FIELDS = (
"target",
"variant",
diff --git a/tests/test_release_candidate_derivation_contract.sh b/tests/test_release_candidate_derivation_contract.sh
index 3c94fb59b..164dca1c5 100755
--- a/tests/test_release_candidate_derivation_contract.sh
+++ b/tests/test_release_candidate_derivation_contract.sh
@@ -122,16 +122,19 @@ expected_fields = (
actual_fields = tuple(rows[0].keys()) if rows else ()
if actual_fields != expected_fields:
raise SystemExit("FAIL: candidate provenance header changed")
-if [row["variant"] for row in rows] != ["unstripped", "stripped"]:
+if [row["variant"] for row in rows] != ["unstripped", "debug-stripped", "stripped"]:
raise SystemExit("FAIL: provenance rows are not in canonical variant order")
if any(row["target"] != target for row in rows):
raise SystemExit("FAIL: provenance target is not exact")
if any(row["source_sha256"] != source_hash for row in rows):
- raise SystemExit("FAIL: both candidates must bind the unchanged linker-output hash")
-if rows[0]["sha256"] == rows[1]["sha256"]:
- raise SystemExit("FAIL: strip did not produce two byte-distinct candidates")
-if rows[0]["transform"] != "copy" or rows[1]["transform"] != "strip":
- raise SystemExit("FAIL: transforms are not explicit copy/strip")
+ raise SystemExit("FAIL: every candidate must bind the unchanged linker-output hash")
+digests = [row["sha256"] for row in rows]
+if len(set(digests)) != len(digests):
+ # Identical candidates would be one VirusTotal draw wearing three hats, and
+ # the selector would believe it has alternatives that do not exist.
+ raise SystemExit("FAIL: strip did not produce three byte-distinct candidates")
+if [row["transform"] for row in rows] != ["copy", "strip-debug", "strip"]:
+ raise SystemExit("FAIL: transforms are not explicit copy/strip-debug/strip")
if any(row["pair_verification"] != "same-linker-output-v1" for row in rows):
raise SystemExit("FAIL: common linker-output provenance is not recorded")
if target.startswith("darwin-") and any(row["signature"] != "adhoc-verified" for row in rows):
diff --git a/tests/test_release_gate_chain_contract.sh b/tests/test_release_gate_chain_contract.sh
index f7e8580ae..bac3e7f1f 100755
--- a/tests/test_release_gate_chain_contract.sh
+++ b/tests/test_release_gate_chain_contract.sh
@@ -175,7 +175,7 @@ else:
"select-package: timeout-minutes must be at least 300 so the bounded\n"
" four-hour VirusTotal poll can complete before job cleanup.")
- for token in ("--expect-targets 8", "--expect-candidates 16",
+ for token in ("--expect-targets 8", "--expect-candidates 24",
"VT_POLL_TIMEOUT_SECONDS: 14400",
"scripts/ci/select-release-candidates.py",
"scripts/ci/verify-release-selection.py",