ci+vendor: pin the lifted tree by hash, and run the suite on every push

Two standing gaps in how this tree is guarded.

vendor/ records what every lifted file is and what we changed, in prose
-- prose nothing enforces. vendor/SHA256SUMS is the mechanical half:
all 73 files under vendor/, the lifts, the patch series and the record
itself, hashed; tests/vendor_sums.sh recomputes both directions -- a
file whose content drifted from its record, and a file that arrived
without being recorded -- and fails the suite (ctest: vendor_sums, in
the fast tier). An unrecorded change to a lifted dependency now has to
survive being a committed manifest update to ship, instead of slipping
through a rebase the way 33108e4's silent reverts did through this
branch's history.

And no CI ran the suite at all. .woodpecker.yml (Codeberg CI) builds
CPU-only with the media codecs present and runs the host preset --
everything but the gpu and oot tiers. The runner is the current Ubuntu
LTS deliberately: the mp4 writer binds FFmpeg's >= 7 AVIO callbacks and
24.04's 6.1 does not compile it.

Rehearsed on a native Ubuntu 26.04 box -- the same gcc 15.2 the image
carries -- the host preset fails eight cases on this branch, and the
same eight on plain upstream/main: arch, chatparse, engine_e2e, two
gbnf shards, place, quant_ggml and avx_check. Pre-existing under gcc
15, partly machine-dependent (avx_check compares kernels op by op on
the CPU it finds, and the gbnf shards flip under load); this branch
adds none of them. CI's first red is upstream's to see.
This commit is contained in:
fl0l0u authored and StillDeadcode committed 2026-10-31 07:50:43 +01:00
1 parent 1577854d00
commit 8e65e1a302
5 files changed
+146

No files matched your search

+9
View File
@@ -937,3 +937,12 @@ if(TARGET r4d_bf16_capacity_test)
ENVIRONMENT "RADIANCE_HOME=${RAD_PLUGIN_OUT};RAD_TEST_CPU_BUDGET=0" TIMEOUT 300)
endif()
endif()
# The vendor record, verified: every file under vendor/ -- the lifts, the patch series, the record
# itself -- hashed against vendor/SHA256SUMS. A changed file the record does not carry, or one that
# arrived unrecorded, is an unrecorded change to a lifted dependency, which is the thing UPSTREAM
# exists to prevent and nothing else notices. It reads the source tree only: no build inputs, no
# machine state, so it runs wherever the suite runs.
add_test(NAME vendor_sums
COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/vendor_sums.sh ${CMAKE_SOURCE_DIR})
set_tests_properties(vendor_sums PROPERTIES LABELS "fast;unit" TIMEOUT 120)
+34
View File
@@ -0,0 +1,34 @@
#!/bin/sh
# vendor_sums.sh -- checks the vendor tree, byte for byte, against vendor/SHA256SUMS.
#
# vendor/UPSTREAM records what every lifted file is, from which commit, and what we changed. This
# script is the mechanical half of that record: every file under vendor/ -- the lifts, our patch
# series, the record itself -- is hashed, and anything that differs from its recorded hash or
# arrived without being recorded is an unrecorded change to a lifted dependency, which is exactly
# what the record exists to catch. The build does not consult it; a test does (ctest:
# vendor_sums), so it runs wherever the suite runs.
#
# tests/vendor_sums.sh <repo-root>
#
# Regenerate the manifest in the same commit that changes vendor/:
# find vendor -type f ! -name SHA256SUMS | sort | xargs sha256sum > vendor/SHA256SUMS
set -e
root=${1:?usage: vendor_sums.sh <repo-root>}
cd "$root"
command -v sha256sum >/dev/null || { echo "vendor_sums: sha256sum is required" >&2; exit 1; }
[ -f vendor/SHA256SUMS ] || { echo "vendor_sums: vendor/SHA256SUMS is missing" >&2; exit 1; }
sha256sum -c --status vendor/SHA256SUMS || {
echo "vendor_sums: a vendor file differs from its recorded hash;" \
"run sha256sum -c vendor/SHA256SUMS to see which" >&2
exit 1; }
# The other direction: sha256sum -c never notices a file the manifest does not name -- an added
# header sliding into a lift is silent without this half.
tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT INT TERM
find vendor -type f ! -name SHA256SUMS | sort > "$tmp/have"
awk '{print $2}' vendor/SHA256SUMS | sort > "$tmp/want"
diff "$tmp/want" "$tmp/have" || {
echo "vendor_sums: the vendor tree and the manifest name different files;" \
"regenerate the manifest in the commit that changes vendor/" >&2
exit 1; }
echo "vendor_sums: $(wc -l < "$tmp/have") files, every hash matches"