Repository navigation
Try to trick Bite: fix 16 tricks that fooled it - #112
Merged
Merged
Conversation
Contributor
|
We threw 28 tricks at bite --free; 18 fooled it. Fixed here, each with a test
in tests/test_tricks.py that fails on the old code:
- A tested change no longer vouches for an untested one in the same commit:
when the whole change is noticed, each piece (one per function, up to 6)
is taken out alone, and a piece no test notices is named (PART NOT NOTICED).
Covers bundled changes and tests that only call a new helper. A piece that
only changes a docstring or hint isn't named on its own.
- A moved file keeps its new name when the change comes out, so a fix that
rides along with a move is checked instead of "tests crash without it".
- Fix words beat tidy-up and speed-up words ("chore: fix crash").
- Naming another OS or Python version only skips code that checks for one.
- A # or // inside a multi-line string is code, not a comment; docstrings
and type hints count when the file reads them (__doc__, get_type_hints).
- A run where every test was skipped counts as no tests ran.
- 'Revert "Fix ..."' isn't read as a fix claim.
- A test that fails once without the change, then passes, doesn't count as
noticing it (flaky: now fools Bite 1 run in 4 instead of 1 in 2).
TRICKS.md is the scoreboard, including the ones that still fool it.
Assisted-by: Claude Code
…st covers - A fix whose test file a later commit deleted was shown as "noticed". When test files were deleted after a noticed commit, Bite now takes the change out of today's code and runs today's tests; if they all pass it says ITS TEST IS GONE (only when it can tell). - A piece no test noticed at its commit is checked on today's code too, by itself, like a whole gap is: a later commit's test can cover it. - Two unnoticed pieces in one file come out together. Assisted-by: Claude Code
connabyss
force-pushed
the
claude/project-thread-xufeii
branch
from
November 1, 2026 06:46
8535cef to
5bb7bba
Compare
This was referenced Nov 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by CH · project thread
What was wrong, what you changed, how you checked:
We threw 28 tricks at
bite --free. Each one was a tiny repo whose newest commit was the trick. 18 of them fooled it. This PR fixes 16. The scoreboard, including the 2 that still get through, is in TRICKS.md.The biggest one: a tested change could vouch for an untested one in the same commit. Say a commit fixes⚠️ PART NOT NOTICED. A piece that a later commit's test notices on today's code isn't named. The JSON
total()with no test and also tweakslabel(), which is tested. Bite said "noticed by test_label". The same thing happened when a fix added a helper and the new test only called that helper. Now, when the whole change is noticed, Bite also takes each piece out alone (one piece per function, up to 6 per commit). It names any piece no test notices:resultstaysno_test_noticed.The other fixes:
chore: fix crashand "faster and correct its rounding" get checked.#or//inside a multi-line string (a#fffcolour, or a URL in a JS template) is code now, not a comment. Python is compared by its syntax tree.__doc__,get_type_hints). A piece that only changes them still isn't named on its own.Revert "Fix ..."isn't read as a fix claim.How I checked:
tests/test_tricks.pyhas 21 tests, and each new behaviour has one that fails without it. 2 old self-test checks were updated: their "another OS" and "another Python" commits now include a real OS or version check in the code.python -m pytest: 162 passed.Things to know: this makes Bite slower on commits a test noticed. Each one now costs 1 extra run for the flaky check, plus 1 run per piece, up to 6. A follow-up PR will cap the piece runs for a whole Bite run and add
--quick.bite livedoesn't use either check yet. The famous-repo scoreboard numbers were made with the old checks, so a rerun could shift them.python -m pytestpasses, and CI is green (local pass; CI running)Assisted-by: Claude Code