preflight: the tracked column is committed provenance, not host state
Browse files at this commitc95980785a3ed6e40d95b13eb4551be0ed59b337Parent: e6d595d1 changed file +10 -1
scripts/verify-fixture-library.shmodified+10 -1
| @@ -321,7 +321,16 @@ if ! "$ROOT/scripts/gen-fixture-library.sh" "$regen" >/dev/null 2>&1; then | |||
| 321 | echo "FAIL: scripts/gen-fixture-library.sh did not run" >&2 | 321 | echo "FAIL: scripts/gen-fixture-library.sh did not run" >&2 |
| 322 | exit 1 | 322 | exit 1 |
| 323 | fi | 323 | fi |
| 324 | -if ! diff -u <(grep -v '^#' "$MANIFEST") <(grep -v '^#' "$regen") >"$patch" 2>&1; then | 324 | +# The `tracked` column is COMMITTED provenance: it is computed in a git tree. |
| 325 | +# A runner host has no .git, so a regeneration there cannot recompute it and | ||
| 326 | +# would emit 'no-git' for every committed pin -- a drift on all 37 pin rows that | ||
| 327 | +# says nothing about the host's library. Off-git the column is normalised on both | ||
| 328 | +# sides, and the tracked invariant falls back to the committed value (as its own | ||
| 329 | +# message already says). | ||
| 330 | +drift_norm() { grep -v '^#' "$1" | awk -F'\t' -v OFS='\t' 'BEGIN{off=1} $1 ~ /^crates\/.*\/fixtures\//{if(off && $6!="-") $6="-"} {print}'; } | ||
| 331 | +OFFGIT=0 | ||
| 332 | +[ -e "$ROOT/.git" ] || OFFGIT=1 | ||
| 333 | +if ! diff -u <(drift_norm "$MANIFEST") <(drift_norm "$regen") >"$patch" 2>&1; then | ||
| 325 | if [ "$REQUIRE" != 0 ]; then | 334 | if [ "$REQUIRE" != 0 ]; then |
| 326 | echo "FAIL: this tree's library does not match what the code reaches" >&2 | 335 | echo "FAIL: this tree's library does not match what the code reaches" >&2 |
| 327 | echo " (DRIFT: the committed manifest's rows differ from a regeneration" >&2 | 336 | echo " (DRIFT: the committed manifest's rows differ from a regeneration" >&2 |