rhi

Coordinated trade for connected markets
git clone https://radroots.dev/git/rhi.git
Log | Files | Refs | README | LICENSE

commit 419a2a52be47451fb7d92da20653797cab56e0b1
parent 6e2128a138fd9da1d60d8d78ded5a14396207ace
Author: triesap <tyson@radroots.org>
Date:   Tue,  3 Mar 2026 18:26:14 +0000

coverage: add policy and thresholds contract

Diffstat:
Acontract/coverage/POLICY.md | 30++++++++++++++++++++++++++++++
Acontract/coverage/thresholds.toml | 5+++++
2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/contract/coverage/POLICY.md b/contract/coverage/POLICY.md @@ -0,0 +1,30 @@ +# rhi coverage policy + +this policy defines the required rust coverage gate for this repository. + +## gate contract + +- executable lines coverage: 100.0 +- function coverage: 100.0 +- branch coverage: 100.0 +- branch records must be present in coverage data + +all thresholds are merge-blocking and release-blocking. + +## toolchain contract + +- use nightly rust for coverage runs +- use `cargo llvm-cov` with `--branch` +- export summary json and lcov artifacts per run +- evaluate gates from `contract/coverage/thresholds.toml` + +## enforcement contract + +- evaluate coverage for the repository crate, not only aggregated workspace totals +- fail hard when any required metric is below threshold +- fail hard when required branch records are missing + +## local and ci contract + +- local development may run report-only commands +- ci must run strict gate commands with default thresholds diff --git a/contract/coverage/thresholds.toml b/contract/coverage/thresholds.toml @@ -0,0 +1,5 @@ +[coverage] +line_percent = 100.0 +function_percent = 100.0 +branch_percent = 100.0 +require_branch_records = true