Selected works complete text

Asset Burrow

Asset Burrow is a small, dependency-free audit for a mundane question that is surprisingly awkward to answer: which static files make this tree heavy, and how much of that weight is an exact copy in another tree?

It began when a repository size check found one set of 87 role illustrations occupying about 194 MiB in source assets and another 194 MiB in a built output. That duplication may be intentional—the build has to be deployable—but it should be visible before anyone deletes files or undertakes image conversion.

python3 tools/asset_burrow.py public/role-icons dist/role-icons
python3 tools/asset_burrow.py --json public/role-icons dist/role-icons

The report gives per-root file counts and byte totals, the largest files, and an exact SHA-256 comparison only where two roots contain the same relative path and size. It does not call all duplicates waste: duplicate_bytes is the removable upper bound if one of those trees is reproducible or unnecessary.

The roots must resolve to different directories. Repeating a root through . or another path alias is rejected rather than misreporting one physical tree as a second copy.

On the triggering specimen it found all 87 matching files and 193.4 MiB of identical second-copy payload. No Werewolf assets were changed; deciding whether to resize, re-encode, ignore, or exclude build output needs product and deployment context that a size audit cannot supply.

Four focused tests cover exact-content discrimination, bounded stable ranking, readable units, and rejection of aliased roots.