Skip to content

Make external calibration a release gate - #50

Merged
brandonifco merged 2 commits into
mainfrom
release/external-calibration-gate
Sep 15, 2026
Merged

brandonifco merged 2 commits into
mainfrom
release/external-calibration-gate

Conversation

@brandonifco

Copy link
Copy Markdown
Owner

Item 7 of the 0.4.0 plan. The PyYAML pin landed in #40.

Tool: tools/calibration/run.sh kernel|analyzer [checkout...]. With no arguments, it fetches the consumers in tools/calibration/consumers.json at their pinned commits.

  • kernel: packs the tree under a non-shadowing version, redirects each consumer's RulesKernel pins (and counts them), then restores, builds with -warnaserror and tests. Result is pass or fail.
  • analyzer: attaches the packed analyzer from outside, keeps RK warnings from stopping the build, and counts unique findings per rule. It puts a control draw beside every project and fails if any control goes unreported, so "0 findings" is a result and not a missing analyzer.

Gate: tools/release-checks.py adds calibration-recorded, which applies when src/RulesKernel/ or src/RulesKernel.Analyzers/ changed since the previous release tag:

  • docs/calibration/<version>.md must exist.
  • The recorded kernel commit must be in the tag's history, with no calibrated path changed since it.
  • Kernel: at least 2 manifest consumers at their pinned commits, all passing. Analyzer: at least 1.

It has 14 new tests against git fixtures, including an earlier-tree calibration, the wrong consumer commit, a failing row, a wrong mode, and a missing previous tag. publish.yml fetches full history and reruns the kernel calibration at the tag. The validate timeout goes from 15 to 45 minutes.

Record: docs/calibration/0.4.0.md (at 793252e):

  • Kernel: faa-part-107 (156 tests), hoyle-backgammon (552) and srd-52-combat (250) all pass.
  • Analyzer: the three factory engines have 0 findings, with controls seen. SRD_Combat has 17 (10 RK0001, 5 RK0007, 1 RK0003, 1 RK0004), which reproduces the manual ADR 0015 numbers exactly.
  • A dry run of release-checks.py with the suffix cleared passes.

ADR 0021 records the decision. CLAUDE.md's release cycle gains the calibration step. The gate does not run per PR (network, minutes). A PR that changes a kernel type calibrates and says so in its description, as #47 did.

🤖 Generated with Claude Code

brandonifco and others added 2 commits September 15, 2026 13:50
tools/calibration/run.sh packs the tree and runs it against real consumers
pinned in tools/calibration/consumers.json: `kernel` mode redirects their
RulesKernel pins and requires build and tests to pass; `analyzer` mode attaches
the packed analyzer from outside, counts findings per rule, and places a
control draw beside every project so zero findings proves the analyzer ran.

tools/release-checks.py gains calibration-recorded: a release changing
src/RulesKernel/ needs docs/calibration/<version>.md naming at least two
passing kernel consumers, and one changing src/RulesKernel.Analyzers/ at least
one analyzer consumer, calibrated at a commit in the tag's history with no
calibrated path changed since. publish.yml fetches full history and reruns the
kernel calibration at the tag. ADR 0021; CLAUDE.md release step.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Kernel mode: faa-part-107, hoyle-backgammon, srd-52-combat all pass (958
tests). Analyzer mode: the three factory engines have no findings with controls
seen in every project; SRD_Combat reproduces the recorded 17 findings.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@brandonifco
brandonifco merged commit dbacf2a into main Sep 15, 2026
1 check passed
@brandonifco
brandonifco deleted the release/external-calibration-gate branch September 15, 2026 17:54
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