Skip to content

chore: refresh assets/badge-tests.svg from a measured count (post-#294) - #296

Closed
cdeust wants to merge 1 commit into
mainfrom
chore/refresh-test-badge-post-294
Closed

chore: refresh assets/badge-tests.svg from a measured count (post-#294)#296
cdeust wants to merge 1 commit into
mainfrom
chore/refresh-test-badge-post-294

Conversation

@cdeust

@cdeust cdeust commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

Tiny, single-file follow-up to #294 (issue #293). #294's own squash-merge
(05c7169) landed assets/badge-tests.svg still stating 6673 — main's
count from before that PR's own rebase — rather than a fresh measurement.
6673 <= 6692 (the true live count on this tree), so the monotone-floor
gate #294 introduced correctly stayed green; the number just isn't
current.

Not a bug in #294's design (a floor is explicitly allowed to lag), but a
floor that is only ever checked, never refreshed, gets stale forever —
worth a one-line regeneration whenever it's touched rather than carried
forward PR after PR.

Change

python scripts/generate_repo_badges.py --test-count 6692 (not
hand-edited) — 6692 is pytest --collect-only -q on this branch's tip.
No other file changed.

Completion Ledger (§13.2)

Path / behavior Evidence
assets/badge-tests.svg title/label/alt refreshed to the measured count Regenerated via the actual generator script, not hand-edited; diffed — only the four count occurrences changed
No other doc drifted git diff scoped to this commit touches exactly one file

Test plan

  • python scripts/check_doc_claims.py --test-count 6692 -> doc claims OK (1 declared not-a-claim exemption(s))
  • python scripts/generate_repo_badges.py --check --test-count 6692 -> badges OK (5 checked)
  • pytest tests_py/scripts/test_generate_repo_badges.py -q -> 49 passed, 20 subtests passed
  • ruff check scripts/generate_repo_badges.py -> clean
  • Constructed a genuinely false claim (badge overclaiming 999999) against this same tree and confirmed both check_doc_claims.py and generate_repo_badges.py --check fail closed (exit 1) — the floor gate fix: eliminate the six-file test-count conflict class with a monotone floor (issue #293) #294 introduced is still blocking, not just decorative

Boy-scout check (§14)

Co-Authored-By: Claude noreply@anthropic.com

#294 (issue #293) made the tests badge the sole artifact carrying an
absolute test count, checked as a monotone floor (committed <= live) so
two branches adding tests never conflict on it. The version that landed
in 05c7169 kept the badge at 6673 — main's pre-rebase figure carried
through its own conflict resolution — which still satisfies the floor
(6673 <= 6692) but is not itself a fresh measurement, only a number that
happens not to overclaim.

A floor that is merely non-overclaiming, left unrefreshed indefinitely,
drifts further from the true count every time another PR adds tests
without also regenerating this file — the badge would still say 6673
after ten more test-adding PRs, none of them individually breaking the
gate. Refreshing it whenever it is touched keeps it a real answer to
"how many tests," not just a number nothing yet overtook.

Regenerated via `python scripts/generate_repo_badges.py --test-count 6692`
(not hand-edited); 6692 is `pytest --collect-only -q` on this branch's
tip (3f0522b, current main). No other file changed — the five prose/JSON
docs already point at this badge rather than restating a number.

Verified: `check_doc_claims.py --test-count 6692` -> "doc claims OK";
`generate_repo_badges.py --check --test-count 6692` -> "badges OK (5
checked)"; tests_py/scripts/test_generate_repo_badges.py -> 49 passed, 20
subtests passed; ruff check/format clean.
@cdeust

cdeust commented Jul 30, 2026

Copy link
Copy Markdown
Owner Author

Superseded — no longer needed. Main moved twice more while this was in flight: PR #284 landed right after #294 (main is extremely active right now), and whoever rebased #284 onto main also regenerated assets/badge-tests.svg as part of that landing — it now correctly states 6706, which matches a fresh pytest --collect-only -q on the current main tip exactly (verified: check_doc_claims.py --test-count 6706 -> "doc claims OK", generate_repo_badges.py --check --test-count 6706 -> "badges OK (5 checked)").

This PR's own regeneration (to 6692) was correct against the main tip it was branched from (3f0522b) but would now be a regression (6692 < 6706, reintroducing staleness) against the current tip. Closing rather than rebasing a now-pointless diff.

@cdeust cdeust closed this Jul 30, 2026
@cdeust
cdeust deleted the chore/refresh-test-badge-post-294 branch July 30, 2026 11:58
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