From abacebf6b918834564475ef597e9194a0f80cf7c Mon Sep 17 00:00:00 2001 From: acamilo Date: Tue, 29 Sep 2026 02:49:03 +0000 Subject: [PATCH] tag-release: refuse a gate that would pass the ROM suites without running them The ROM suites return early and count as passed when FLY_ROM or their checkpoint variable is unset; v0.6.4's gate ran that way and the merge of rows 62-64 looked green while row 59's ROM test failed. Require FLY_ROM and log every checkpoint suite left unset. --- infra/build/tag-release.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/infra/build/tag-release.sh b/infra/build/tag-release.sh index c21ba0b..dd4365c 100755 --- a/infra/build/tag-release.sh +++ b/infra/build/tag-release.sh @@ -56,7 +56,19 @@ if [ -d "$flysim_dir" ]; then # --release, not debug (Makefile's `rust:` target and the reason it gives): the flysim # integration test that asserts the feed's 30 Hz contract only reaches ~9.5-10.4 Hz in a debug # build, so a debug run would fail or flake that gate. - log "running cargo test --workspace --release in services/flysim" + # The ROM suites (tests/rom_*.rs) return early and count as PASSED when FLY_ROM or their + # checkpoint variable is unset, so a gate run without them proves nothing about the macros. + # v0.6.4's gate ran that way. Refuse without the ROM; name every checkpoint suite skipped. + if [ -z "${FLY_ROM:-}" ] || [ ! -r "${FLY_ROM}" ]; then + die "FLY_ROM is unset or unreadable: the ROM test suites would pass without running. Export FLY_ROM and the FLY_*_CHECKPOINT variables (the operator's rom env) first." + fi + skipped="" + while IFS= read -r var; do + [ -n "${!var:-}" ] || skipped="${skipped} ${var}" + done < <(grep -rhoE 'var_os\("FLY_[A-Z0-9_]*_CHECKPOINT"\)' "$flysim_dir"/crates/*/tests/rom_*.rs \ + | sed -E 's/.*"(FLY_[A-Z0-9_]*)".*/\1/' | sort -u) + [ -z "$skipped" ] || log "WARNING: ROM checkpoint suites that will pass WITHOUT running (unset):${skipped}" + log "running cargo test --workspace --release in services/flysim (FLY_ROM set)" (cd "$flysim_dir" && cargo test --workspace --release) else log "WARNING: services/flysim does not exist in this checkout — skipping cargo test --workspace"