CI: corpus score is a gate, releases audit their artifacts; v0.7.2
The corpus job scores the pinned-rev corpus (cached at ~/.cache/lucisv-corpus on the runner, fetched once on a miss) on every push and fails below scripts/corpus-baseline (813) or on any verification error / crash. The release workflow now runs tools/audit_artifacts.sh before publishing: musl must be fully static, linux-gnu's glibc ceiling must stay <= 2.28 (RHEL 8), every file must be the object format its name claims — verified against the 10 real v0.7.1 release binaries. Linux execution under Docker was considered and declined: no container runtime on the runner. Version 0.7.2 with a changelog covering this, the printer column fix and the README truth pass. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
b560909a76
commit
c556a13857
12 files changed
+225
-18
No files matched your search
@@ -0,0 +1 @@
|
||||
813
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
# CI gate over the corpus score: fail on any regression from the recorded
|
||||
# baseline. `scripts/corpus-baseline` holds the passing-file count the tree
|
||||
# must sustain; a verification error or a crash fails regardless of the
|
||||
# count — those are formatter bugs by definition (see tools/corpus_check.sh).
|
||||
#
|
||||
# Usage: scripts/corpus_gate.sh [corpus-dir]
|
||||
#
|
||||
# An improvement does not fail, it nags: bump the baseline in the same
|
||||
# change that earns it, so the gate ratchets and never slides back.
|
||||
|
||||
set -eu
|
||||
|
||||
here=$(cd "$(dirname "$0")" && pwd)
|
||||
corpus=${1:-corpus}
|
||||
baseline=$(cat "$here/corpus-baseline")
|
||||
|
||||
json=$("$here/score.sh" "$corpus")
|
||||
printf '%s\n' "$json"
|
||||
|
||||
passing=$(printf '%s' "$json" | jq .passing)
|
||||
verr=$(printf '%s' "$json" | jq '.failures_by_category["verification-error"] // 0')
|
||||
crash=$(printf '%s' "$json" | jq '.failures_by_category.crash // 0')
|
||||
|
||||
status=0
|
||||
[ "$verr" -eq 0 ] || { echo "FAIL: $verr verification error(s) — always a formatter bug" >&2; status=1; }
|
||||
[ "$crash" -eq 0 ] || { echo "FAIL: $crash crash(es) — always a formatter bug" >&2; status=1; }
|
||||
if [ "$passing" -lt "$baseline" ]; then
|
||||
echo "FAIL: corpus regression — $passing passing, baseline is $baseline" >&2
|
||||
status=1
|
||||
elif [ "$passing" -gt "$baseline" ]; then
|
||||
echo "note: $passing passing beats the baseline $baseline — bump scripts/corpus-baseline"
|
||||
fi
|
||||
exit $status
|
||||
Reference in new issue
Block a user