Skip to content

Rewrite your app in Rust, piece by piece, checked against the original at every step. Works with TypeScript, JavaScript, Python, Go, Ruby, Java, C, PHP, C#, Kotlin, PowerShell and Swift.

website: coverage covers Python and fails gate for an export with no case (#1286)

jakalijey317d78c4530c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1d128cd8..46f01857 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,9 @@
## Unreleased
+- The website's Coverage and Gate pages say `record` measures lines for Python too, and that gate's
+ `coverage` check fails for an export with no recorded case unless it is waived; the line count
+ stays information only (#1263 by @jakalijey).
- The website's agent setup and quick start pages name OpenCode with the other four agents, the
"Works with" table has an OpenCode row, and the MCP server paragraph names every tool
`rust-anything mcp` lists, which `tests/skill.rs` now checks (#1264 by @jakalijey).
diff --git a/website/pages/en/docs/concepts/coverage.md b/website/pages/en/docs/concepts/coverage.md
index 6af1119f..67abeb4d 100644
--- a/website/pages/en/docs/concepts/coverage.md
+++ b/website/pages/en/docs/concepts/coverage.md
@@ -1,13 +1,15 @@
---
title: Coverage
-description: How much of the original the recorded cases ran, reported by record and gate for TypeScript/JavaScript.
+description: How much of the original the recorded cases ran (TypeScript/JavaScript and Python), and the gate check that fails when an export has no recorded case.
---
# Coverage
Passing `diff` means the port matches every recorded case. Coverage tells you how much of the original those cases ran, so you know what the recording does not cover.
-For TypeScript/JavaScript, `record` measures the lines of the original the cases ran, from V8's coverage, and `gate` prints it as a passing, informational check: the share of lines reached, and the files with the most lines missed. Other languages do not measure it yet.
+`record` measures the lines of the original the cases ran: for TypeScript/JavaScript from V8's coverage, and for Python with `sys.monitoring` on 3.12 and later (`sys.settrace` before). Other languages do not measure it yet. `gate` prints the line count in its `coverage` check as information only: the share of lines reached, and the files with the most lines missed. It never fails gate on its own.
+
+The `coverage` check fails when an export of the unit has no recorded case and is not waived. Its `fix` gives the two ways out: record a case for each export it lists (`record --inputs`), or, for one that needs no case, `rust-anything obligations waive <id> --reason "<why>"` from the repository.
On Fuse.js, the cases ran 81% of the lines the unit imports ([status](/docs/project/status)).
diff --git a/website/pages/en/docs/concepts/gate.md b/website/pages/en/docs/concepts/gate.md
index 58b3f7a4..72bd148a 100644
--- a/website/pages/en/docs/concepts/gate.md
+++ b/website/pages/en/docs/concepts/gate.md
@@ -18,7 +18,7 @@ Done means `gate` passes. It checks:
- the port at most 3x the original's lines (plus 50 lines for imports and signatures), unless the user allowed the unit more with a `[[size]]` decision and its ADR;
- the module builds, and every export is present;
- every recorded case matches, [known diffs](/docs/concepts/diff#known-diffs) included, and the recording is not [stale](/docs/concepts/diff#stale-recordings);
-- for TS/JS, a [coverage](/docs/concepts/coverage) line: how much of the original the cases ran.
+- a recorded case for every export, or a waiver ([coverage](/docs/concepts/coverage)); the line count next to it is information only.
Each failed check carries a `fix`: run that first.