commit b4ec61f7dd8268af7fe661ce21bc2e871a864cc7
parent 1d393dc92f495943e15b2c3cdd70f0d1b1e1dc86
Author: triesap <tyson@radroots.org>
Date: Sat, 21 Feb 2026 16:33:59 +0000
coverage: add oss 100-100-100 policy and rollout matrix
- add strict oss coverage policy for executable lines functions and branches
- add deterministic crate-by-crate rollout matrix with `radroots-core` as entry crate
- link contract readme to policy and rollout governance files
- run cargo check -q -p xtask and cargo test -q -p xtask
Diffstat:
3 files changed, 94 insertions(+), 0 deletions(-)
diff --git a/contract/README.md b/contract/README.md
@@ -30,3 +30,8 @@ The sdk contract excludes app/runtime/storage implementation crates.
- all contract changes require conformance updates.
- all contract exports must be reproducible from source.
- release automation must publish contract metadata and artifact checksums.
+
+## coverage governance
+
+- strict coverage policy for oss rust crates is defined in `contract/coverage/POLICY.md`.
+- crate rollout and enforcement order is defined in `contract/coverage/rollout.toml`.
diff --git a/contract/coverage/POLICY.md b/contract/coverage/POLICY.md
@@ -0,0 +1,35 @@
+# radroots oss rust coverage policy
+
+This document defines the required coverage gate for the oss rust workspace.
+
+## gate contract
+
+- executable lines coverage: 100.0
+- function coverage: 100.0
+- branch coverage: 100.0
+- branch records must be present in lcov data
+
+All three thresholds are release-blocking.
+
+## toolchain contract
+
+- use nightly rust for coverage runs
+- use `cargo llvm-cov` with `--branch`
+- generate json summary and lcov reports for each run
+- evaluate coverage using deterministic parsing rules
+
+## enforcement contract
+
+- run coverage checks per crate, not only aggregate workspace totals
+- a crate cannot be promoted to required unless it is at 100/100/100
+- once required, the crate remains blocking on every pull request and push to `master`
+
+## rollout contract
+
+- start with `radroots-core` as the first required crate
+- expand required coverage crate-by-crate
+- full workspace required coverage is only enabled after every required crate is green
+
+## local override policy
+
+Local override env vars may exist for smoke runs, but ci must run with default strict thresholds and required branch data.
diff --git a/contract/coverage/rollout.toml b/contract/coverage/rollout.toml
@@ -0,0 +1,54 @@
+[policy]
+fail_under_exec_lines = 100.0
+fail_under_functions = 100.0
+fail_under_branches = 100.0
+require_branches = true
+
+[rollout]
+strategy = "crate-by-crate"
+entry_crate = "radroots-core"
+
+[[rollout.crates]]
+name = "radroots-core"
+status = "required"
+order = 1
+
+[[rollout.crates]]
+name = "radroots-types"
+status = "planned"
+order = 2
+
+[[rollout.crates]]
+name = "radroots-events"
+status = "planned"
+order = 3
+
+[[rollout.crates]]
+name = "radroots-identity"
+status = "planned"
+order = 4
+
+[[rollout.crates]]
+name = "radroots-trade"
+status = "planned"
+order = 5
+
+[[rollout.crates]]
+name = "radroots-events-codec"
+status = "planned"
+order = 6
+
+[[rollout.crates]]
+name = "radroots-events-codec-wasm"
+status = "planned"
+order = 7
+
+[[rollout.crates]]
+name = "radroots-tangle-db-schema"
+status = "planned"
+order = 8
+
+[[rollout.crates]]
+name = "xtask"
+status = "planned"
+order = 9