Pagination reproduced exactly, not just the shape of it
Hit the tree endpoint directly, headers included: page 1 returns exactly 1000 entries / 970 files / 342 .sha256, with a Link: <...>; rel="next" header present. Followed the cursor: page 2 returns 296 entries / 296 files / 99 .sha256, no further Link header. 342 + 99 = 441, your number, not an approximation of it.
_list_tree set cursor_url = None unconditionally after one call — the docstring said pagination should fail loud, but there was no code path that ever looked at the Link header in the first place, so that intent never had a chance to fire. Fixed by actually parsing it (_parse_next_link) and following rel="next" until it's gone.
The 3 mismatches — confirmed, but my "live" column was garbage. Corrected below.
You were right to ask "which command." This exact one:
curl -s "https://huggingface.co/datasets/.../resolve/main/$f" | sha256sum
No -L. HF's resolve/ returns an HTTP 307 (a 329-byte plaintext redirect body) when it wants a redirect followed, not the file — confirmed live just now, same command, headers included. Without -L, that pipeline hashes the redirect response, not the file. All three "live sha256 (mine)" values below were hashes of that 329-byte redirect text, not of anything real — they didn't match your numbers, didn't match any of the 20 historical revisions, because they were never a file hash at all. The -> MISMATCH verdict was accidentally correct (garbage ≠ sealed hash) for the wrong reason, which is worse than being wrong outright.
My own check_mirror_integrity.py was never exposed to this — it uses urllib.request.urlopen, which follows redirects by default, so its 456/456 result stands. Only this one manual verification table, built for this reply, was bad. Corrected, with -L:
file live sha256 (corrected, -L) sealed (post-reseal) match
scripts/citation_baseline.txt beb317ba… beb317ba… match
scripts/dataset_citation_baseline.txt a821367d… a821367d… match
scripts/install-hooks.sh c94a6a9e… c94a6a9e… match
Same three values you already had from git + your own mirror read. Logged as its own incident (governance canon, CLAUDE_INCIDENTS #23) — a receipt that isn't a receipt is exactly the failure mode this whole thread is about, and I produced one while writing about the other kind.
Then checked your "not mirror bugs" claim independently rather than taking it on your say-so: git log --follow on each file against its own .sha256 sidecar.
install-hooks.sh: content last touched at 4b35304 (Round 6), sidecar last touched at c1f06c7 (Round 5) — sealed, then edited, never resealed. Matches your Round-5/Round-6 dates exactly.
dataset_citation_baseline.txt: content touched at bbbe675, sidecar only ever touched at e34439d (earlier) — same pattern.
citation_baseline.txt: content touched repeatedly since c1f06c7, most recently by b30897a — my own commit, a few hours before this thread, adding the causal-chain dataset README's baseline entry. I broke this same seal again, in the same session I was building the tool that would (once its pagination bug was fixed) be the thing to notice.
"What is supposed to check a seal that nothing cites"
Nothing was. check_citations.py and check_dataset_citations.py both walk FROM a document TO the files it names in backticks — citation-driven by construction. A support script no doc ever cites is outside that walk no matter how stale its seal gets; both checks exit 0 on a repo carrying 3 (now 4, my own fresh one) broken seals.
scripts/check_seals.py: walks every *.sha256 in the tree and verifies it against its target's current content, independent of whether any document ever mentions the file by name. Reuses the same basename-fallback as the mirror checker for the FIRST_ERA legacy layout (9 seals, same 9 both scripts agree on). Wired into scripts/pre-commit alongside the two existing checks.
Caught its own bug class before finishing
First run of the new checker, before any commit: 4 STALE, not 3 — the 4th was check_mirror_integrity.py itself, mid-edit for the pagination fix, seal not yet regenerated. Resealed it, reran, clean, then the pre-commit hook (scripts/pre-commit) needed its own reseal for having been edited to call the new script — caught the same way, same run.
Closed the loop, not just the local tree
Git: check_citations.py + check_dataset_citations.py + check_seals.py all exit 0 on HEAD. Pushed as d978535. Then hf_mirror_push.py (single atomic commit, same as always) to actually move the live mirror past the 3 stale bytes it had been faithfully serving. Re-ran check_mirror_integrity.py against the fresh mirror after that push: 456 seals, 456 verified, 0 mismatches — the number moved from 441+3-mismatched under the old paginated-but-broken count to 456+0 now, both because the file count grew (this session's dataset push) and because the fix actually reads what's there