Skip to content

fix(tooling): close rename blind spot in asset hash check#7

Merged
maybebyte merged 1 commit into
masterfrom
003-hash-check-coverage
Jun 12, 2026
Merged

fix(tooling): close rename blind spot in asset hash check#7
maybebyte merged 1 commit into
masterfrom
003-hash-check-coverage

Conversation

@maybebyte

Copy link
Copy Markdown
Owner

Summary

Follow-up to #6, fixing the one substantive finding from its post-merge review: the hash-integrity check validated references only in three hardcoded files, so renaming a hashed asset referenced from an article (30+ image refs across 4 articles) or from the stylesheet's font url()s passed all checks while breaking the site.

Changes

  • Check (b) now discovers referencing files via git grep over tracked text files instead of a hardcoded list, with vendored trees excluded (fonts/*/FONTLOG.txt carries commit-pinned permalinks that are valid without existing on disk).
  • The template existence guard the hardcoded list implicitly provided is re-added explicitly before check (c).

Testing

  • Clean tree passes; a hash-preserving rename of an article-referenced image fails check (b) and only check (b) (check (a) stays green since the hash is still valid), then passes after restore.
  • pre-commit run --all-files green.

Check (b) previously validated references only in three hardcoded files,
so renaming a hashed asset referenced from an article or from the
stylesheet's font url()s passed all checks while breaking the site.
Discover referencing files with git grep instead; vendored trees stay
excluded because FONTLOG.txt carries commit-pinned permalinks that are
valid without existing on disk. Re-add the template existence guard that
the hardcoded list used to provide. Verified: a hash-preserving rename
of an article-referenced image now fails check (b) and only check (b).
@maybebyte maybebyte merged commit ca43de8 into master Jun 12, 2026
2 checks passed
@maybebyte maybebyte deleted the 003-hash-check-coverage branch June 12, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant