diff --git a/test/run b/test/run index 4f547b02..3dd97a73 100755 --- a/test/run +++ b/test/run @@ -72,6 +72,25 @@ if [ "${UNIT:-0}" != "1" ]; then name=${t##*/}; name=${name%.c} "$0" --one "$RESULTS/$name" "$t" || true done + + # combined.ww freshness gate (#110): 990/995 above unconditionally + # regenerate every tracked combined.ww amalgamation, so a diff vs HEAD + # here means an embedded source changed without its derived artifact + # being regenerated + committed (the #28 staleness hole the per-file + # byte-id gates were blind to). git ls-files keeps new combined.ww + # auto-covered (rule-13 SSoT). Lives inside the UNIT guard because + # test-unit skips 990/995 and thus the regen. + name=combined_ww_fresh + if git diff --exit-code -- $(git ls-files '*.combined.ww') > /dev/null 2>&1; then + printf 'ok %s\n' "$name" > "$RESULTS/$name.status" + else + { + printf 'FAIL %s (stale; regen + commit the derived amalgamation)\n' "$name" + echo '--- stale combined.ww ---' + git diff --name-only -- $(git ls-files '*.combined.ww') + } > "$RESULTS/$name.status" + : > "$RESULTS/$name.fail" + fi fi fail=0