Skip to content

Coverage beyond blocks: M1 denominators, diagnostics, metadata tables, codegen (no rebuild) - #40

Merged
zmaril merged 1 commit into
mainfrom
mirth/cov-static
Oct 10, 2026
Merged

zmaril merged 1 commit into
mainfrom
mirth/cov-static

Conversation

@zmaril

@zmaril zmaril commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

The parts of docs/coverage-plan.md that need no rebuild of the instrumented compiler: M1, M3, and the codegen half of M5. Each is a mirth-lab subcommand with a report and gap lists. rustc/coverage-report.sh runs them after the function and block report.

What's measured (2026-10-10, block corpus cov-blk plus the suites in cov-suites)

dimension denominator measured
branch arms (source level, M1) 115,951 arms in reachable functions (41,265 implicit across all functions) 67,444 measurable from block sites; 57,957 taken (85.9%); implicit arms wait for M2
configuration branches 1,114 (decision, kind) pairs: feature 321, option 334, target 357, edition 102 1,078 consulted; both arms seen at 168
feature gates 262: 136 checked by accessor calls, 109 only through generic code, 17 not named in the compiler all 136 consulted
delayed-bug sites 238 in reachable functions 177 reached (74.4%)
keyed engine sites 330 queries × 1,018 engine sites 307,444 possible pairs (M4 measures them)
error codes 387 live (131 retired) 365 (94.3%); 4 retired codes still emitted
lints 253 225 (88.9%)
diagnostic / subdiagnostic messages 1,900 / 705 measurable 1,308 (68.8%) / 599 (85.0%)
metadata tables 82 67 encoded, 62 decoded in the blessed records; no dylib/staticlib/cdylib record
LLVM intrinsics 76 59 in the IR of the 3,493 runnable tests (77.6%)
Rust intrinsic codegen arms 189 143 (75.7%)
calling-convention lowering 4,432 block sites in 26 files 3,705 (83.6%)

The plan's budget, corrected

  • Branch arms: M1 counts 0.16 source-level arms per reachable site. The plan estimated 0.5. Expect about +100k to +200k arm sites, which M2's MIR pass will settle.
  • Keyed engine sites: 330 queries × 1,018 engine sites. The plan estimated about 700 × 150.

Caveats

  • Estimates. Numbers that come from block sites are estimates: a span counts as having run when a block site inside it was reached.
  • Moved source. Files whose source has moved since the coverage build are detected and skipped.
  • Corpus. The diagnostics corpus is the standalone UI tests at --emit=metadata, so crate-loading errors, auxiliary-crate lints and codegen/link lints can't appear.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT

…an.md: coverage-static (M1 denominators: source-level branch arms, configuration branches, feature-gate checks, delayed-bug sites, keyed engine sites, metadata tables, with block-site estimates of what ran), diag-coverage (error codes, lints, diagnostic and subdiagnostic messages, applicabilities; --collect over the UI corpus), rmeta-coverage (tables x crate type, from the blessed records), codegen-coverage (LLVM and Rust intrinsics, calling-convention lowering; --collect to LLVM IR); coverage-report.sh runs them; numbers in coverage.md; plan budgets corrected

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
@zmaril
zmaril merged commit 1e93804 into main Oct 10, 2026
0 of 3 checks passed
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