doc(coverage): one file has the numbers, and they are today's - #52
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
doc/coverage.mddoc/testing.mddoc/spec-coverage-gaps.mdcoraine/srcalone)README.mdcoverage.mditself 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.mdstill said the HA cache-sync paths "need a MongoDB replica set rather than a test nobody has written" — corrected incoverage.mdthis 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.mdand nowhere else.testing.mdkeeps the argument for why branch coverage is the number to move, and links.spec-coverage-gaps.mdloses 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.One file to update after a
make coverage, instead of four to remember.Re-measured on
52d683e, both suites green⭐ And the section on what actually moves these numbers
This week produced the cleanest example the file has:
corNgsildfunctionsThe numerator does not move. 589 before, 589 after. Five functions were deleted —
ldDatasetIdDedupand its helpers, unreachable behindldCheckEntity'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 + 206by repository,3248 + 1371 + 484 + 132 + 64 + 25 + 12 + 10by bucket.🤖 Generated with Claude Code
https://claude.ai/code/session_01TGatXwrHx1CreL49sCuS37