A commit in a real open source project said this:
fix: add weakref callback to clean up resolve cache entries
The cache used dict keyed by id(doc) with no cleanup, causing a slow memory leak in long-running processes.
It was co-authored by Claude. It read right. It looked right. It passed its own tests.
It didn't fix the leak. The cache kept every document alive through its own cached positions, so the cleanup never ran. Resolve 20,000 documents, drop them all, and the cache still held all 20,000, using 35 MB. That was true on the commit itself and on the project's newest code at the time.
The tool that caught it is mine. It's called Bite, and as of this week coding AIs can find it on their own.
What Bite does
One job. It checks whether "fixed" is true.
It takes the fix back out of a copy of your project and runs your tests. If the tests still pass with the fix gone, no test is guarding it. The bug can come back and nothing will warn you.
That's the free part, no API key. There's a paid part (your own Anthropic key, capped by --budget) where a fresh AI writes one small test of the commit's own claim, Bite runs it on that commit and on today's code, and a second fresh check has to agree the test is fair before Bite shows it. That's how the memory leak test got written:
def test_cache_entry_removed_after_doc_gc():
resolvedpos._resolve_cache.clear()
d = doc(p("hello"))
ResolvedPos.resolve_cached(d, 2)
assert len(resolvedpos._resolve_cache) == 1
del d
gc.collect()
assert len(resolvedpos._resolve_cache) == 0 # fails: 1 == 0
I reported it with a repro in prosemirror-py #335 and the tested fix, #336, got merged. A second Claude commit in the same project had a different bug, and that fix (#337) got merged too.
The news: AIs can look it up now
Bite has an MCP server with one main tool, check_fix. As of this week it's on the official MCP Registry as io.github.connabyss/bite, and on mcpservers.org.
So the AI that wrote the fix can call the tool that checks the fix. The server even tells it when:
After you fix a bug, call check_fix before you tell the user it's fixed.
That's the whole idea. The AI doesn't grade its own homework. Your tests do.
Watch it catch one
I made a tiny shop project to show it. A cart total, one test. Then I played the AI: "fix: reject negative quantities." Added the check, added a test, everything green.
def total(items):
for price, qty in items:
if qty < 0:
raise ValueError("quantity can't be negative")
return sum(price * qty for price, qty in items)
def test_total_rejects_negative_quantity():
assert total([(250, 1)]) == 250
$ python -m pytest -q
2 passed in 0.01s
Looks done. Look at that test again though. It never passes a negative number. Here's what check_fix sent back over MCP, word for word:
Bite ⚠️ the tests that came with this change (tests/test_cart.py) don't notice it:
with the change to shop/cart.py taken out, they still pass. The "fixed" isn't proven yet.
Bite checked your fix before the user sees it. It took your change to shop/cart.py back
out of a copy of the project and ran the tests (python3 -m pytest -q): they all still
passed, including the tests you added or changed (tests/test_cart.py). Those tests pass
without your change, so they don't test it. Before you say it's fixed, add a test that
fails without your change and passes with it, and run it both ways to be sure.
A test with the right name that tests nothing. This isn't made up for the demo: Bite found the same thing in a real Claude commit in simonw/llm, where the new test never made the tool call it was about (#1828). Swap in a real one:
def test_total_rejects_negative_quantity():
with pytest.raises(ValueError):
total([(250, -3)])
Bite ✅ a test noticed, good news: with the change to shop/cart.py taken out, a test
failed (`test_total_rejects_negative_quantity`). That failure is the good result: if
this change ever breaks, that test will warn you.
That's Bite 1.0.10, run for real. The shop is fake, the output isn't.
It's not just my toy project
Some that got merged upstream:
-
pamqp: Bite's free check found three past fixes no test would notice breaking. One was
Basic.Reject(requeue=False), which could flip back toTrueand every test would still pass. Tests for all three got merged (#86). - text-to-cad: a Claude commit added a Python 3.11 syntax check that couldn't catch the exact bug it was written for. Bite sent a test that does, and it shipped in 0.8.2 (#708).
- The rest, with a link for every one: docs/track-record.md.
The honest part
This isn't an "AI lies constantly" post. In a run on 220 public repos, 100 fix commits could actually be checked. 7 had no test guarding the fix. AI and humans came out about the same, and too few to rank Claude vs Copilot vs Cursor. On well-kept code, AI fixes mostly hold, and Bite stays quiet.
Bite was wrong too. In that run, 9 of its 30 flags were its own mistakes, mostly tests the project's test command never runs. That got fixed, and a rerun cut it to 2.
And quiet isn't a pass. Bite tests one claim. It can't tell you a commit has no other bugs.
Try it
Your AI, in Claude Code:
claude mcp add bite -- uvx bite-check mcp
Setup lines for Cursor, Copilot in VS Code, Windsurf, Codex and Gemini CLI are in docs/live.md. Or just you, in a terminal:
pipx install bite-check
cd your-repo
bite --free
Free, no key, never touches your files. Repo: github.com/connabyss/bite
Your turn
What's the best "fixed" an AI ever handed you that wasn't? What gave it away?
AI disclosure: I build Bite with Claude Code doing most of the typing, and I wrote this post with Claude's help. The demo output is pasted from a real run of Bite 1.0.10, and every catch above links to the public issue or pull request.
Top comments (2)
The id(doc) detail is the part that should scare everyone: the key itself is the leak's accomplice. A dict keyed by id(doc) doesn't just grow — once a document is gone, its id can be reused, so the cache can hand back another document's positions. A weakref callback was the right instinct, but a callback that never fires because the cache itself holds the reference is exactly the kind of fix that reads correctly and proves nothing.
What I like most is the discipline of the check: removing the fix and watching the tests is the only honest definition of "this test guards this fix." Your pamqp example is the proof — Basic.Reject(requeue=False) flipping back to True with every test still green is a silent behavior change, not a passing suite.
One question on the honest part: 9 of Bite's 30 flags in that run were its own mistakes. What was the most common way it got it wrong — and did any of those misses change what you think "guarded" should mean?
Good question, and the answer is a little embarrassing for Bite. The 9 were really two mistakes.
The big one: the commit's new tests were real, but the project's test command never ran them. Vitest's
excludeskipped them in two repos, and pytest'stestpathsskipped them in another. So Bite took the fix out, saw everything stay green, and said "its tests didn't notice." Technically true, since the tests never ran at all.The other one was Bite's own doing. One commit pointed jest's
rootsat its new e2e tests, and Bite tookjest.config.jsout along with the code, which hid those tests from itself.So yes, it changed what "guarded" means to me: a test only guards a fix if your test command actually runs it. Now Bite says "your test command never runs these" instead of blaming the tests, and it leaves test runner configs in place. The rerun went from 9 false flags to 2.