Skip to content

The page's 'as of' date comes from a file mtime, which git does not preserve #74

Description

@realmarcin

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions