Found reviewing #73, in that PR's own change.
The heatmap note's "as of" date is derived from the modification time of _fleet/data/prefix_census.json. Git does not record or restore mtimes, so a fresh checkout stamps every file with the checkout time, and the page then claims the corpora were counted on whatever day someone happened to clone.
Reproduced by cloning the branch into a temporary directory:
|
date the page would print |
| working copy where the census actually ran |
15 September 2026 |
fresh git clone of the same commit |
16 September 2026 |
That is worse than the hardcoded "September 2026" it replaced, because it is confidently wrong rather than vague, and it will be wrong on every CI build and every new machine.
The date belongs inside the file the scan writes. prefix_census.py should record its own run date in prefix_census.json, and assemble_page.py should read that field instead of asking the filesystem.
Related, and fixable in the same place: mech_stats.py recounts records with its own len(record_paths(...)) to compute the percentage denominators, while the cards display the count from prefix_census.json. Two scans of the same corpus at two moments. They agree today because the runs were minutes apart, but the page would show a percentage whose denominator is not the number printed beside it. Reading the record counts from the census would give one source of truth.
Fixing both in #73.
Found reviewing #73, in that PR's own change.
The heatmap note's "as of" date is derived from the modification time of
_fleet/data/prefix_census.json. Git does not record or restore mtimes, so a fresh checkout stamps every file with the checkout time, and the page then claims the corpora were counted on whatever day someone happened to clone.Reproduced by cloning the branch into a temporary directory:
git cloneof the same commitThat is worse than the hardcoded "September 2026" it replaced, because it is confidently wrong rather than vague, and it will be wrong on every CI build and every new machine.
The date belongs inside the file the scan writes.
prefix_census.pyshould record its own run date inprefix_census.json, andassemble_page.pyshould read that field instead of asking the filesystem.Related, and fixable in the same place:
mech_stats.pyrecounts records with its ownlen(record_paths(...))to compute the percentage denominators, while the cards display the count fromprefix_census.json. Two scans of the same corpus at two moments. They agree today because the runs were minutes apart, but the page would show a percentage whose denominator is not the number printed beside it. Reading the record counts from the census would give one source of truth.Fixing both in #73.