Skip to content

Make the records tile total the cards, and date the census from the scan - #80

Merged
realmarcin merged 2 commits into
mainfrom
feat/refresh-fleet-numbers
Sep 16, 2026
Merged

realmarcin merged 2 commits into
mainfrom
feat/refresh-fleet-numbers

Conversation

@realmarcin

Copy link
Copy Markdown
Contributor

Replaces #73, which GitHub closed when its base branch was deleted on merging #77. Rebuilt onto main, and rethought: main's cards cite each Mech's published browser, not the record-corpus census, so the original approach of deriving card numbers from the census globs would have contradicted that design rather than fixing anything.

Closes #76. The strip claimed 448,724 records while the page's own ten cards summed to 1,059,170, short by roughly the whole of TaxonMech, which was admitted after the tile was last edited by hand.

tile was now
records across the fleet 448,724 1,059,170
vocabularies in dated census 43 45

The records tile is now the sum of the card counts, computed at assembly time. That is the right source as well as a self-consistent one: totalling the census instead would have produced a third number rather than reconciling the two, because the census measures a different corpus for ProteinTraitsMech and CultureMech and does not measure TaxonMech at all. assemble() refuses to build if a card carries no count, and two new tests hold the tile to the sum.

The census is rerun for the nine measured Mechs, which is why the heatmap numbers move. The vocabulary tile picks up EMDB and MediaDive, hence 43 to 45.

The census note dates itself from the scan. prefix_census.py records its run date in the file it writes, and the note reads that field rather than a month typed into the markup. Not the file's mtime: git neither records nor restores those, so a fresh clone would have dated the census to the day somebody cloned it. The note also counts its own coverage rather than spelling out "nine", so admitting a Mech cannot leave it claiming the wrong number.

TaxonMech stays unmeasured. Adding 625,960 records to the scanning passes would also add their record-subset indexes to the repository, and that is a size decision rather than a refresh. The note says so on the page.

Prose updated to match the cards: the suite sentence on index.md, where the taxon figure read 100 against a corpus of 625,960, and TraitMech on resources.md, which also gained a tenth trait category.

Checks: 15 tests pass and assemble_page.py --check reports the page current. Verified in Chrome at 1400px: five tiles on one row, heatmap with no horizontal overflow.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BXHrBTSU8fU4Zg7HfaMKs9

The strip claimed 448,724 records while the page's own ten cards summed to
1,059,170, short by roughly the whole of TaxonMech, which was admitted after
the tile was last edited by hand. Reported by the site owner, filed as #76.

The tile is now the sum of the card counts, computed at assembly time. That is
the right source as well as a self-consistent one: the cards cite each Mech's
published browser, which the record-corpus census does not measure the same
way, so totalling the census would have produced a third number rather than
reconciling the two. assemble() refuses to build if a card has no count, and
two tests hold the tile to the sum.

The vocabulary tile is derived from the census too, and moves 43 to 45 on the
refreshed scan: EMDB and MediaDive now appear in the corpora.

The census itself is rerun for the nine measured Mechs, which is why the
heatmap numbers move. prefix_census.py records its run date in the file it
writes, and the note reads that rather than a month typed into the markup or
the file's mtime, which git neither records nor restores. The note also counts
its own coverage instead of spelling out "nine", so admitting a Mech cannot
leave it claiming the wrong number.

TaxonMech is still unmeasured: adding 625,960 records to the scanning passes
would also add their record-subset indexes to the repository, and that is a
size decision rather than a refresh.

Prose that repeats these figures is updated to match the cards: the suite
sentence on index.md, where the taxon figure read 100, and TraitMech on
resources.md, which also gained a tenth trait category.

Closes #76

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BXHrBTSU8fU4Zg7HfaMKs9
Copilot AI lite review requested due to automatic review settings September 16, 2026 17:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Review of this branch found assemble() reading the census run date with
census.pop(), which removes the key from the caller's object. A second call
with the same dictionary raised KeyError on a key the caller never touched.

main() loads a fresh dictionary each run, so nothing shipped was affected. The
test suite was one reordering away from it: a test renders twice and passes
only because its second call raises the membership ValueError before reaching
the pop. A function handed a parsed document should not consume it.

Reads the field instead and filters underscore-prefixed metadata out of the
Mech entries, with a test that renders twice and compares.

Closes #81

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BXHrBTSU8fU4Zg7HfaMKs9
@realmarcin

Copy link
Copy Markdown
Contributor Author

Adversarial review done, read-only, against main. Findings filed as #81 and #82.

What I checked beyond reading the diff:

  • Confirmed the card-count regex matches exactly the ten cards and nothing else in the template, so the tile cannot quietly pick up an unrelated number.
  • Confirmed build_data.py reads the census by Mech key rather than iterating it, so the new _as_of entry does not reach the heatmap.
  • Confirmed the carried record-subset indexes are consistent with the refreshed census, and that roots.CITATION, which landed in Order heatmap columns by how widely each vocabulary is shared #60 after those artifacts were built, is semantically identical to the literal it replaced.
  • Called assemble() twice with one census object, which is what turned up assemble() consumes the census dictionary it is passed #81.
  • Ran main's gates: 16 tests pass, assemble_page.py --check reports the page current.

Addressed here: #81, a real defect in this branch. assemble() read the census date with pop(), consuming the caller's dictionary, so a second call raised KeyError. Nothing shipped was affected because main() loads a fresh dictionary, but the suite was one reordering away from a confusing failure: an existing test renders twice and passes only because its second call raises the membership error first. Now reads the field and filters metadata keys, with a test that renders twice and compares.

Left filed: #82, that the tile sums ten different units under the word "records". A recipe, a taxon and a protein trait are different kinds of thing, and two of the ten cards call theirs structures. The total is still the most useful single number on the page and was always meant to be this sum, so this is an argument about the label, not the arithmetic. Renaming it is a wording call for whoever owns the page, not something to slip into a PR about a broken total.

@realmarcin
realmarcin merged commit f47587b into main Sep 16, 2026
1 check passed
@realmarcin
realmarcin deleted the feat/refresh-fleet-numbers branch September 16, 2026 17:38
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.

The records tile says 448,724 while the page's own cards sum to 1,059,170

2 participants