Add auto-updated core coverage badge (ADR 0004) #301

Open
didericis-claude wants to merge 1 commits from core-coverage-badge into ratchet-supervise-90
Collaborator

Stacked on #300 (base = ratchet-supervise-90).

Summary

Adds an auto-updated core coverage badge to the README — the metric ADR 0004 says matters (the critical security/logic core, currently 95%), distinct from the informational global coverage badge.

Done the responsible way (allowlist, single source of truth, auto-generated):

  • scripts/critical-modules.txt — the one place the core-module list lives. scripts/coverage.sh now reads it instead of a hardcoded string, and update-badges.yml reads the same file, so the badge and the critical report can't silently drift.
  • update-badges.yml — a core coverage step reuses the unit-coverage data (every core module is unit-tested, so the unit-only run is accurate for it) and sed-updates the new badge exactly like the existing pylint/pyright/coverage badges.
  • READMEcore coverage 95% badge, linked to ADR 0004 so a reader can discover what "core" means.

Verified end-to-end: the list file → coverage report --includeTOTAL 95%, matching the badge; the badge sed replacement was dry-run against the real README.

Not done (deliberately)

No additional omits. Per ADR 0004, narrowing to the core is done with an allowlist (this badge / the --include report), not by growing the omit denylist — so the global number stays honest and the CLI/backend never go invisible.

Stacked on #300 (base = `ratchet-supervise-90`). ## Summary Adds an auto-updated **`core coverage`** badge to the README — the metric ADR 0004 says matters (the critical security/logic core, currently **95%**), distinct from the informational global `coverage` badge. Done the responsible way (allowlist, single source of truth, auto-generated): - **`scripts/critical-modules.txt`** — the one place the core-module list lives. `scripts/coverage.sh` now reads it instead of a hardcoded string, and `update-badges.yml` reads the *same* file, so the badge and the `critical` report can't silently drift. - **`update-badges.yml`** — a `core coverage` step reuses the unit-coverage data (every core module is unit-tested, so the unit-only run is accurate for it) and `sed`-updates the new badge exactly like the existing pylint/pyright/coverage badges. - **README** — `core coverage 95%` badge, linked to ADR 0004 so a reader can discover what "core" means. Verified end-to-end: the list file → `coverage report --include` → `TOTAL 95%`, matching the badge; the badge `sed` replacement was dry-run against the real README. ## Not done (deliberately) No additional `omit`s. Per ADR 0004, narrowing to the core is done with an **allowlist** (this badge / the `--include` report), not by growing the omit denylist — so the global number stays honest and the CLI/backend never go invisible.
didericis-claude added 1 commit 2026-06-26 02:20:02 -04:00
Surface the metric ADR 0004 says matters — the critical security/logic
core, currently 95% — as a README badge, distinct from the
informational global `coverage` badge.

- scripts/critical-modules.txt: single source of truth for the core
  module list. scripts/coverage.sh now reads it (instead of a hardcoded
  string) and update-badges.yml reads the same file, so the badge and
  the `critical` report cannot drift.
- update-badges.yml: a `core coverage` step reuses the unit-coverage
  data (every core module is unit-tested, so unit-only is accurate for
  it) and sed-updates the new badge, like the existing ones.
- README: `core coverage 95%` badge linking to ADR 0004 so a reader can
  find out what "core" means.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NkwFXLFff9PYPy4wgVBJp9
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin core-coverage-badge:core-coverage-badge
git checkout core-coverage-badge
Sign in to join this conversation.