Fool Bite: sneak a "fix" past it

Open
#156 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active

Research direction

Start by reading TRICKS.md to see which tricks are already known, then make a tiny repo whose newest commit claims a fix and run bite --free in it. Look for a case where Bite's answer is wrong in either direction and check it against the tests in tests/test_tricks.py. Done means a new trick posted through the fool-bite form, with a test for it added to tests/test_tricks.py.

Written by the indexing model from the issue text.

Description

fool-bite

This week, real projects fooled Bite 7 times. We fixed every one. Your turn.

Bite asks one question about each recent fix: if this change disappeared, would a test notice?
It takes the fix out, runs the tests, and puts it back. Simple. And it still got fooled, by code nobody wrote to fool it:

Who fooled it How Bite said Now (1.0.4)
dotenv Bite took a fix out of today's code, and git quietly changed nothing ⚠️ "its test is gone", 8 times ✅ noticed
dayjs Bite kept its copies inside node_modules, and jest skips anything in there 0 commits checked 9 noticed
marked the fix's only test skips on Windows ⚠️ its tests didn't notice ➖ its test was skipped on Windows
dotenv same, but the new test sat inside a skipped parent test ⚠️ didn't notice ➖ skipped
h2 an early draft of a fix, rewritten later in the same PR ⚠️ no test noticed ➖ rewritten later, and a test notices that
dayjs a later fix replaced this one, test and all 🚨 UNDONE BY A LATER COMMIT ➖ replaced by a later fix
dayjs a commit that changed only .d.ts type files ⚠️ no test noticed ➖ code the tests can't run

Every one of those was Bite crying wolf (or giving up) when the code was fine. The hard way is still almost unbeaten: make
Bite say ✅ a test noticed when no test really checks the fix. Only two tricks do that today, and both are written
down in TRICKS.md.

How to play

  1. Make a tiny repo. Its newest commit says it fixed something ("Fix rounding in total").
  2. pipx install --force bite-check (or python -m pip install -U bite-check), then bite --free in it. Free, no key.
  3. You win if Bite gets it wrong:
    • 🏆 Hard mode: no test really checks the fix, but Bite says ✅ a test noticed.
    • Easy mode: a test really does check it, but Bite says ⚠️ no test noticed.
  4. Post it with the I fooled Bite form.
    bite --free --keep-output saves exactly what your tests printed, if you want to show your work.

Doesn't count: the two known tricks (a flaky test failing by luck twice in a row, a test that reads the code as
text) and anything already in the Fixed table of TRICKS.md. A new twist on one does count.

What you get: your name and your trick in TRICKS.md, a test for it in tests/test_tricks.py, and a fix if one is
possible. Want to write the fix yourself? Say so on your entry.

Scoreboard: real projects 7, humans 0.

Any language Bite runs counts: Python, JavaScript/TypeScript, Rust, Go, .NET, Java/Kotlin.

Dominant language
Python
Stars
1
Forks
5
Avg merge
1h 19m
Merged PRs (30d)
191

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from connabyss/bite

All issues in connabyss/bite

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.