Stanch

Would this test still catch the bug?

Stanch checks Python pull requests for changes that make tests easier to pass. See which line weakened the test, then run the suite locally and give reviewers a receipt.

tests/test_cart.py
Choose a change to inspect
 def test_empty_cart():
-    assert total([]) == 0
+    assert True
 def test_empty_cart():
     assert total([]) == 0
+
+def test_single_item():
+    assert total([25]) == 25
Runs on the hosted API.
No account needed.

From a diff to a reviewable run.

For the developer checking a teammate’s change, an agent’s patch, or their own work before opening a PR.

Inspect the patch

The hosted audit reads a Python diff and returns the matching rule, file, and line. Diffs are processed in memory. You can also run the audit on your machine.

Read the API contract

Run the change

Use the CLI in your repository or CI to run tests and configured HTTP or CLI probes. The stanch.receipt.v1 file records the verdict, checks, and working-tree fingerprint.

Set up a CI check

Bring it into your editor

Give Claude Code, Codex, or Cursor a tool to audit a patch. Any client that speaks HTTP can use the same audit. Tool logs have a separate digest endpoint.

Connect an editor

What Stanch flags

Five failure rules cover common ways tests lose their value. A sixth rule gives local reviewers a warning about duplicate helpers.

Mocked target
A test replaces a function modified in the same diff with a mock. STANCH_MOCK_BYPASS
Skipped test
A change introduces a skip or an expected-failure marker. STANCH_TEST_SKIPPED
Removed coverage
A change removes test functions or assertions without a corresponding replacement. STANCH_TEST_DELETED
Always-true assertion
A test adds an assertion such as assert True that can pass even if the code breaks. STANCH_VACUOUS_ASSERT
Swallowed error
A new exception handler suppresses an error or substitutes a dummy result. STANCH_SWALLOWED_ERROR
Duplicate helper
In a local repository, Stanch warns when a new public helper repeats an existing name. STANCH_DUPLICATE_EXPORT

Check the next patch.

Opening a free account does not charge you. A key includes 25 hosted calls each day.

Get a free API key