From c95980785a3ed6e40d95b13eb4551be0ed59b337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Tue, 29 Sep 2026 05:26:17 +0300 Subject: [PATCH] preflight: the tracked column is committed provenance, not host state A runner host has no .git, so a regeneration there recomputed every committed pin's tracked column as 'no-git' and the drift check reported 37 differing rows on a host whose library was fine. The column is normalised to '-' on both sides when the tree is not a git tree; the tracked invariant already falls back to the committed value there, and says so in its own message. --- scripts/verify-fixture-library.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/verify-fixture-library.sh b/scripts/verify-fixture-library.sh index df8b4199..3642efb4 100755 --- a/scripts/verify-fixture-library.sh +++ b/scripts/verify-fixture-library.sh @@ -321,7 +321,16 @@ if ! "$ROOT/scripts/gen-fixture-library.sh" "$regen" >/dev/null 2>&1; then echo "FAIL: scripts/gen-fixture-library.sh did not run" >&2 exit 1 fi -if ! diff -u <(grep -v '^#' "$MANIFEST") <(grep -v '^#' "$regen") >"$patch" 2>&1; then +# The `tracked` column is COMMITTED provenance: it is computed in a git tree. +# A runner host has no .git, so a regeneration there cannot recompute it and +# would emit 'no-git' for every committed pin -- a drift on all 37 pin rows that +# says nothing about the host's library. Off-git the column is normalised on both +# sides, and the tracked invariant falls back to the committed value (as its own +# message already says). +drift_norm() { grep -v '^#' "$1" | awk -F'\t' -v OFS='\t' 'BEGIN{off=1} $1 ~ /^crates\/.*\/fixtures\//{if(off && $6!="-") $6="-"} {print}'; } +OFFGIT=0 +[ -e "$ROOT/.git" ] || OFFGIT=1 +if ! diff -u <(drift_norm "$MANIFEST") <(drift_norm "$regen") >"$patch" 2>&1; then if [ "$REQUIRE" != 0 ]; then echo "FAIL: this tree's library does not match what the code reaches" >&2 echo " (DRIFT: the committed manifest's rows differ from a regeneration" >&2