Skip to content

doc(coverage): one file has the numbers, and they are today's - #52

Merged
kzangeli merged 1 commit into
mainfrom
doc/coverage-one-place-remeasured
Sep 2, 2026
Merged

doc(coverage): one file has the numbers, and they are today's#52
kzangeli merged 1 commit into
mainfrom
doc/coverage-one-place-remeasured

Conversation

@kzangeli

@kzangeli kzangeli commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Four files carried coverage figures, and they had drifted into two different measurement regimes — so the answer to "what is our coverage" depended on which page you opened:

File Dated Said
doc/coverage.md 2026-09-02 83.0% of 31534 lines (four repositories)
doc/testing.md 2026-08-27 81.8%, denominator unstated
doc/spec-coverage-gaps.md 2026-08-20 80.7% of 16570 (coraine/src alone)
README.md 620 / 571 tests

coverage.md itself warns that no figure recorded before the measurement widened is comparable with the ones after. Two of those files were quoting exactly such a figure, weeks later, with no warning attached.

Worse than stale. doc/testing.md still said the HA cache-sync paths "need a MongoDB replica set rather than a test nobody has written" — corrected in coverage.md this morning (the harness detects a replica set fine; it was our CI running a standalone), and then made false a second time by #47 giving CI an oplog.

The fix

The figures live in coverage.md and nowhere else.

  • testing.md keeps the argument for why branch coverage is the number to move, and links.
  • spec-coverage-gaps.md loses its baseline: which statements of the spec have a test is a different question from which lines of our C ran, and a file can be at 100% of one and half of the other.
  • The README keeps its test counts — a count is a fair claim for a README — now 627 / 577.

One file to update after a make coverage, instead of four to remember.

Re-measured on 52d683e, both suites green

Run Tests Lines Functions Branches
mongoc 627/627 83.0% (26188/31534) 96.0% (1312/1366) 64.7% (18133/28030)
corDB 577/577 79.3% (23502/29638) 91.8% (1217/1325) 62.0% (16718/26982)

⭐ And the section on what actually moves these numbers

This week produced the cleanest example the file has:

before after
corNgsild functions 94.4% (589/624) 95.2% (589/619)

The numerator does not move. 589 before, 589 after. Five functions were deletedldDatasetIdDedup and its helpers, unreachable behind ldCheckEntity's 400 — and the whole broker figure rose off the denominator. Read the numerator; if it hasn't moved, nothing new is tested.

The never-entered bucket drops with it, 59 functions/527 lines → 54/484, and the "parked" group halves to one family: ringSelfIntersects, kept on purpose with the reason at the call site. That distinction is the value of the bucket — a list of never-entered functions cannot tell you which kind you're holding.

Both decompositions of the 5346 uncovered lines reconcile: 2737 + 1869 + 534 + 206 by repository, 3248 + 1371 + 484 + 132 + 64 + 25 + 12 + 10 by bucket.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TGatXwrHx1CreL49sCuS37

Four files carried coverage figures. They had drifted into TWO DIFFERENT
MEASUREMENT REGIMES, so the answer to "what is our coverage" depended on which
page you opened:

  doc/coverage.md         2026-09-02  83.0% of 31534 lines (four repositories)
  doc/testing.md          2026-08-27  81.8%, denominator unstated
  doc/spec-coverage-gaps  2026-08-20  80.7% of 16570  (coraine/src alone)
  README.md                           620 / 571 tests

coverage.md itself warns that no figure recorded before the measurement widened
is comparable with the ones after it. Two of those files were quoting exactly
such a figure, weeks later, with no warning attached.

Worse than stale: doc/testing.md still said the HA cache-sync paths "need a
MongoDB replica set rather than a test nobody has written". That was corrected
in coverage.md this morning - the harness detects a replica set perfectly well,
it was our CI that ran a standalone - and coraine#47 then gave CI an oplog, so
the sentence was false twice over.

So: the figures live in coverage.md and nowhere else. testing.md keeps the
argument for why BRANCH coverage is the number to move and links; the
spec-coverage-gaps baseline goes, because which STATEMENTS OF THE SPEC have a
test is a different question from which lines of our C ran, and a file can be at
100% of one and half of the other. The README keeps its test counts - a count is
a fair claim for a README - now 627/577.

Re-measured on 52d683e, both suites green:

  mongoc  627/627   83.0% lines (26188/31534)  96.0% func  64.7% branches
  corDB   577/577   79.3% lines (23502/29638)  91.8% func  62.0% branches

⭐ And the section that used to say "what moved since 2026-09-01" now says what
actually moves these numbers, because this week produced the cleanest possible
example of it: corNgsild functions went 94.4% (589/624) to 95.2% (589/619). The
NUMERATOR DOES NOT MOVE. 589 before, 589 after. Five functions were deleted -
ldDatasetIdDedup and its helpers, unreachable behind ldCheckEntity's 400 - and
the whole broker figure rose off the denominator. Read the numerator; if it has
not moved, nothing new is tested.

The never-entered bucket drops with it, 59 functions/527 lines to 54/484, and
the "parked" group halves to one family: ringSelfIntersects, which is kept ON
PURPOSE with the reason at the call site. That distinction is the value of the
bucket - a list of never-entered functions cannot tell you which kind you have.

Both decompositions of the 5346 uncovered lines reconcile: 2737 + 1869 + 534 +
206 by repository, and 3248 + 1371 + 484 + 132 + 64 + 25 + 12 + 10 by bucket.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TGatXwrHx1CreL49sCuS37
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 coraine | 🛠️ Build #34361603 | 📁 Comparing 77b9274 against latest (52d683e)

  🔍 Preview build  

3 files changed
± coverage.html
± spec-coverage-gaps.html
± testing.html

@kzangeli
kzangeli merged commit 25f9660 into main Sep 2, 2026
3 checks passed
@kzangeli
kzangeli deleted the doc/coverage-one-place-remeasured branch September 2, 2026 20:51
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