Your AI says "fixed". Would a test notice if it wasn't?
When an AI coding tool says "Fixed, and I added a test", how do you know the test would catch the bug coming back? Bite is a small free tool that checks. It takes each recent fix back out of your code and runs your tests. If they still pass, nothing guards that fix, and Bite names it. On real public projects, not a staged demo, it found a memory leak in prosemirror-py that a commit said it had…
When an AI coding tool declares a fix complete, the validity of that statement hinges on the effectiveness of the accompanying test. To ascertain whether a test can detect a bug resurfacing after a fix, developers utilize a tool called Bite.
Bite is a lightweight tool that scans recent code modifications and executes existing tests. If the tests maintain their passing status, Bite concludes that the fix hasn't introduced new issues. However, if the tests fail, Bite flags the fix as potentially flawed and assigns it a name.
Real-world applications of Bite have demonstrated its utility. For instance, on a public project known as prosemirror-py, Bite detected a memory leak that a subsequent commit had supposedly resolved. This issue was later integrated into the project's codebase.
Bite operates without requiring any authentication and functions on duplicate copies of code, ensuring that the original source remains unaltered. To use Bite, one can install it with a couple of terminal commands: python -m pip install bite-check and python -m bite_check --free.
For those looking to test their own code, Bite provides a simple interface. After installation, run it by dragging the project folder into the tool's window. Bite begins by demonstrating its capabilities on a fictional project before guiding users through the process of checking their own codebase.
Bite is particularly beneficial for individuals participating in the MLH Hack Week, which took place from November 6-12. During this event, Bite had several "good first issue" tasks – small Python fixes that included directions on where to look and what constitutes completion. These tasks were quickly claimed due to their straightforward nature.
To engage with Bite's community, users can comment on the "good first issue" label on the Bite GitHub repository: https://github.com/connabyss/bite/labels/good%20first%20issue. The Bite cat, a symbol of the tool, bids farewell to users.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.