[FIX] pre-commit: the refusal message stops recommending a mechanism this system retired

The message told people to use Git LFS. Wrong twice: LFS cannot satisfy this check
(it measures the working-tree file), and LFS was tried in this system and retired.

Message drafted by the jurist, with two corrections to my draft that I would have
shipped as written:

  (a) My version asserted "git.skemantix.com serves no LFS endpoint" — a
      PRESENT-TENSE substrate claim, inside a script global to 37 repos, that the
      hook cannot verify, that is repo-dependent across those remotes, and that
      nothing checks. PENDING-144's open class exactly. Now stated historically:
      a dated fact about what was tried does not go stale.

  (b) My version led the remedy with `git config --local core.hooksPath .githooks`.
      That does not exempt large files — it stops the global hook running in that
      repo AT ALL, taking every other check with it. Advertising it as the routine
      response to a routine refusal is REVIEWED-105's failure mode returning:
      someone runs the config line without copying the hook and now has an
      unguarded repo that looks governed. The remedy now leads with copying
      400c054's hook and adding the exemption there; the config line is last.

Controls re-run after the change: whitespace-named 6MB REFUSED (and printing the
new message), plain 6MB REFUSED, small file COMMITTED.

Disposition of PENDING-163's option (ii), recorded here because the ground matters
more than the verdict: 0677e8a gives two reasons for retiring LFS with different
lifespans. The endpoint reason is contingent — a repo pointing elsewhere changes
it. The merits reason ("git delta-compresses text natively") is not, and it is
now measured rather than quoted: eight commits of an append-only 4MB JSONL cost
6MB in plain git and 18MB under LFS, because LFS stores a whole opaque blob per
version and cannot delta. THREE TIMES WORSE, on precisely the corpus that started
this. (ii) therefore REJECTED on the merits, not deferred on the endpoint.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NvZAKSf9aqratbqHbU9LK5
This commit is contained in:
David F Glidden
2026-08-26 18:19:01 +02:00
co-authored by Claude Opus 5
parent 74d3ea9e4e
commit 24080328c1
+6 -2
View File
@@ -56,8 +56,12 @@ while IFS= read -r -d '' file; do
if [ -f "$file" ]; then if [ -f "$file" ]; then
size=$(wc -c < "$file") size=$(wc -c < "$file")
if [ "$size" -gt 5242880 ]; then if [ "$size" -gt 5242880 ]; then
echo -e "${RED}Error: $file is larger than 5MB${NC}" echo -e "${RED}Error: $file is larger than 5 MiB (5,242,880 bytes)${NC}"
echo "Consider using Git LFS for large files" echo "This ceiling measures the working-tree file. Git LFS does not exempt it,"
echo "and LFS was tried in this system and retired (chamber-library 0677e8a, 2026-06-05)."
echo "If this repo legitimately holds large files it needs its own hook:"
echo "copy .githooks from chamber-library (400c054), add the path exemption there,"
echo "then: git config --local core.hooksPath .githooks"
exit 1 exit 1
fi fi
fi fi