Skip to content

v0.16.0 — the rule registry (no behaviour change)

Choose a tag to compare

@Mormolykos Mormolykos released this 02 Aug 08:38

Every single-run rule lived inside one function, check_records() — which also computed the statistics all the other rules depended on. Adding a check meant editing several hundred lines that every existing check ran through, so each new rule raised the risk to the rules already there. That was the structural bottleneck, and it was blocking the checkpoint work planned next.

What changed

Each rule is now a standalone function taking a CheckContext and returning findings. check_records() builds the context and runs a registry in order — composition instead of implementation.

The context computes each shared series exactly once — losses, gradient norms, learning rates, step times, eval losses, loader fractions — and carries the ran / skipped bookkeeping. A rule can now be read, tested and reasoned about without reading the ones around it.

What did not change — and how that is proven

No rule, threshold, verdict, evidence string or output shape moved. That is enforced, not asserted:

  • All 38 golden snapshots byte-identical to 0.15.0
  • scripts/regenerate_evidence.py --check exits 0 — the evidence matrix regenerates unchanged
  • The same 228 tests pass, none of them modified

Rule evaluation order is part of that guarantee. The snapshots encode the sequence findings appear in, so reordering the registry would change them even if every individual verdict stayed identical. That is what makes the byte-identical comparison a real test rather than a formality.

A refactor of judging logic that cannot prove it changed nothing is indistinguishable from a silent regression. This release exists to be provable.

Shipped alone, on purpose

Mixing a behaviour-preserving refactor with a new check would destroy the only evidence that the refactor preserved behaviour. The checkpoint-tensor work lands in its own release, against a codebase where adding a rule no longer means editing every other one.

84 rule IDs, 228 tests, schema_version 3 — all unchanged.

pip install trainproof==0.16.0