Skip to content

1.0.4 fixes from real projects: npm copies, tests already red, skipped tests, submodules, rewrites, UTF-8, --keep-output - #158

Merged
connabyss merged 21 commits into
mainfrom
claude/project-thread-tcs0wx
Nov 4, 2026
Merged

connabyss merged 21 commits into
mainfrom
claude/project-thread-tcs0wx

Conversation

@connabyss

@connabyss connabyss commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Requested by CH · project thread

What was wrong, what you changed, how you checked:

This PR collects the fixes for 1.0.4. Each one fixes something Bite got wrong on a real project, mostly run on CH's Windows PC. Every fix has its own commit and its own test.

  1. Tests that already fail (validator.js). When the first 2 commits fail with nothing taken out, Bite runs the tests once on the newest commit. If they fail there too, it stops, says so, and names the command it ran.
  2. A commit's own test skipped on this system (marked e7c4f64c, dotenv 7c675904). Bite now says "skipped: its test … was skipped on Windows" instead of "didn't notice". This also covers a test the commit added inside a parent test that is skipped, where tap names only the parent.
  3. UTF-8 output to files. Output to a file is now UTF-8. Output to a pipe keeps the system encoding.
  4. Replaced by a later fix (dayjs d0e6738a). Bite now says "➖ replaced by a later fix" instead of "UNDONE".
  5. Git submodules (tomlkit, eemeli/yaml). Bite's copies now include each submodule's files.
  6. Flaky first run (h2). A first run that fails with nothing taken out now gets one more try, alone.
  7. Rewritten later in the same run (h2 #1329). Bite now says "rewritten later by …" when a test notices the rewrite. It also prints a line saying so, so the list matches the summary.
  8. --keep-output. This saves each commit's test output, with the change in and with it taken out, to bite_proof/output/<commit>.txt.
  9. npm: taking a change out of today's code did nothing (dotenv). git apply inside a copy that sat in the project's git folder changed nothing and still said it worked. It now runs with GIT_CEILING_DIRECTORIES, so git can't see that folder.
  10. JavaScript copies moved out of node_modules (validator.js, dayjs). jest, @babel/register and tap skip anything in node_modules, so they skipped Bite's copies too. Copies now sit in the temp folder and link to each of the project's node_modules: a symlink, or a junction on Windows. Removing a copy removes only the link.
  11. --only finds older commits. It no longer looks only in the last 40.
  12. why: lines. A literal \r and the + diff marker from tap's escaped error dump are now left out.
  13. .d.ts files count as code the tests can't run (dayjs).
  14. README: adds a "Bite does this / You decide that" box and a link to the Fool Bite challenge (Fool Bite: sneak a "fix" past it (Hack Week challenge) #156).
  15. PR template: the pytest box now says it runs tests/selftest.py too, and asks anyone who changes a message to search tests/ for its old wording (what turned fix(recent): say "1 commit", not "1 commits" #163 and fix(recent): refuse --last 0, which can never find a commit #164 red).

Reruns on CH's PC, before and after (commits where a test noticed the change): node-semver 11 → 17, dotenv 8 → 16, dayjs 0 → 9, yaml 0 → 6. All the false alarms we checked by hand are gone.

  • Each fix has a test that fails without it.
  • python -m pytest passes locally: 315 passed, 1 skipped (that test only runs on Windows). CI is green.

Assisted-by: Claude Code

https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR


Generated by Claude Code

When the first 2 commits checked both fail with nothing taken out, run the
tests on the newest commit; if they fail there too, say so once and stop
instead of running every other check the same way. README: a short
'Bite does this, you decide that' box and a link to the Fool Bite challenge.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
@connabyss connabyss self-assigned this Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Bite ⚠️ Bite: no test noticed 1 change

Bite took the ⚠️ change below out and every test still passed. If it broke later, nothing would warn you. That's fine for a tidy-up, a rename or docs.

Next: if the change should do something, add a test that fails without it.

  • ✅ The test test_a_replacement_fix_with_its_own_tests_is_only_noted noticed it was gone. If this change breaks later, that test will warn you.
    Commit 871a1d4c: “Note a replacement fix instead of sounding the comeback alarm”
  • ✅ The tests test_node_copies_sit_outside_node_modules_and_see_the_packages and 1 more noticed it was gone. If this change breaks later, they will warn you.
    Commit e6660797: “Make JavaScript copies outside node_modules, with a link to it”
  • ✅ The test test_keep_output_saves_what_the_tests_printed noticed it was gone. If this change breaks later, that test will warn you.
    Commit 42365ba7: “Add --keep-output: save each commit's test output”
  • ✅ The tests test_marks_survive_output_to_a_file_on_a_cp1252_system and 1 more noticed it was gone. If this change breaks later, they will warn you.
    Commit 7dac9bda: “Write UTF-8 to files and pipes; name the test command when tests already fail”
  • ⚠️ No test noticed it was gone. If it breaks later, nothing warns you. Next: add a test that fails without it.
    Commit edd94902: “Use one check for --last 0 and --free-checks 0”
  • ✅ The test test_no_still_working_line_after_the_step_ends noticed it was gone. If this change breaks later, that test will warn you.
    Commit 2253d3c3: “Wait for a still-working line before a step ends”
  • ✅ The test test_free_checks_zero_is_refused_not_a_silent_all_clear noticed it was gone. If this change breaks later, that test will warn you.
    Commit d8be880c: “Refuse --free-checks 0 instead of a silent all-clear”
  • ✅ The test test_a_subtest_added_inside_a_skipped_parent_counts_as_skipped noticed it was gone. If this change breaks later, that test will warn you.
    Commit 7979abfa: “Count a subtest inside a skipped parent as skipped”
  • ✅ The test test_a_type_declaration_file_is_code_the_tests_cant_run noticed it was gone. If this change breaks later, that test will warn you.
    Commit f048ae53: “Count .d.ts type declarations as code the tests can't run”
  • ✅ The test test_a_why_line_drops_taps_escaped_diff_dump noticed it was gone. If this change breaks later, that test will warn you.
    Commit 69280470: “Keep tap's escaped diff dump out of why: lines”
  • ✅ The test test_a_gap_rewritten_later_by_a_noticed_commit_is_skipped noticed it was gone. If this change breaks later, that test will warn you.
    Commit 4f1ff54f: “Say so when a flagged commit turns out rewritten later”
  • ✅ The test test_only_finds_a_commit_older_than_the_last_ones_looked_at noticed it was gone. If this change breaks later, that test will warn you.
    Commit 070ce1a0: “Let --only find a commit older than the last 40”
  • ✅ The test test_taking_a_change_out_of_a_copy_inside_the_project_changes_the_copy noticed it was gone. If this change breaks later, that test will warn you.
    Commit 2c8b0432: “Take a change out of today's code for real on npm projects”
  • ✅ The test test_a_gap_rewritten_later_by_a_noticed_commit_is_skipped noticed it was gone. If this change breaks later, that test will warn you.
    Commit a875d295: “Don't flag a change that a later, noticed commit rewrote”
  • ✅ The tests test_tests_that_read_a_submodule_work_on_bites_copies and 2 more noticed it was gone. If this change breaks later, they will warn you.
    Commit 77ace169: “Fill git submodules into Bite's copies; rerun a failing baseline once”
  • ✅ The test test_a_pipe_keeps_the_systems_encoding noticed it was gone. If this change breaks later, that test will warn you.
    Commit bec9cb6a: “UTF-8 only for output to a file, not a pipe”
  • ✅ The tests test_the_skipped_tests_are_read_by_name and 1 more noticed it was gone. If this change breaks later, they will warn you.
    Commit 56cce34c: “Say a commit's own test was skipped here, not that it didn't notice”
  • ✅ The test test_bite_stops_when_the_tests_already_fail_today noticed it was gone. If this change breaks later, that test will warn you.
    Commit 053bd8d3: “Stop once when the tests already fail before Bite changes anything”

Bite score for these commits: 17/18 noticed by a test.

How Bite checks

Bite asks one question about each change: if it disappeared, would any test notice? It takes the change out, runs your tests, and puts it back. The steps to rerun each check yourself are on the job's summary page. What is Bite?

marked's --no-clobber fix added its only telling test with
{ skip: process.platform === 'win32' }; on Windows Bite said 'its tests didn't
notice'. Skipped test names are read from node --test, TAP, go test -v, cargo
test and pytest -rs output; one the commit added is named instead.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
@connabyss connabyss changed the title Say once and stop when the tests already fail; README "Bite does / you decide" box Stop once when the tests already fail; name a commit's skipped test; README "Bite does / you decide" box Nov 3, 2026
…ady fail

On Windows, output redirected to a file used cp1252: the result marks came out
as '?' and a cut-off subject's ellipsis as a stray byte (marked's run.log).

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
@connabyss connabyss changed the title Stop once when the tests already fail; name a commit's skipped test; README "Bite does / you decide" box 1.0.4 fixes from real projects: tests already red, skipped own test, UTF-8 output, README box Nov 3, 2026
When the commit that put the old code back also took out the fix's own test
lines and added tests of its own, it fixed the bug another way (dayjs
b575c81a after d0e6738a): '➖ replaced by a later fix', not 'UNDONE'.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
A program reading Bite through a pipe on Windows decodes with the system's code
page; UTF-8 there broke every Windows test that read Bite's output (0x8f in
the warning sign). Files, like run.log, still get UTF-8.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
tomlkit's tests read the toml-test submodule, which git archive leaves out, so
every commit read 'tests already fail'. h2's Hypothesis test failed once on a
cold copy and 2 commits were skipped; the tests now run once more first.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
h2 #1329: e1f7c12c showed as no test noticed, but a6ed24e later in the same
pull request rewrote that code and a test notices the rewrite. Now such a gap
says 'rewritten later by <commit>' instead. When the rewrite isn't noticed
either, the gap stays flagged. Test: tests/test_rewritten_later.py.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
Hand-checking how Bite read a run (eemeli/yaml) needed a wrapper around the
test command. --keep-output writes the change-in and change-out output to
bite_proof/output/<commit>.txt. Test: tests/test_keep_output.py.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
@connabyss connabyss changed the title 1.0.4 fixes from real projects: tests already red, skipped own test, UTF-8 output, README box 1.0.4 fixes from real projects: tests already red, skipped tests, submodules, rewrites, UTF-8, --keep-output Nov 3, 2026
npm copies live in node_modules/bite_tmp, inside the project's git work tree.
There git apply read the patch paths from the outer repo's top, matched
nothing, changed nothing and exited 0, so every 'its test is gone' on an npm
project ran unchanged code (dotenv: 8 false). git apply now runs with
GIT_CEILING_DIRECTORIES set above the copy. Test:
tests/test_apply_in_nested_copy.py.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
Copies lived in node_modules/bite_tmp so Node found the packages, but jest,
@babel/register and tap skip anything under node_modules, so they skipped
the copy (validator.js: 0 of 40 checked though its tests pass). Each copy
now sits in the system temp folder with a symlink (or, on Windows without
that right, a junction) to each node_modules the project has. Removing a
copy removes only the link. Test: tests/test_node_copies.py.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
--only filtered the --last list, so a named older commit (node-semver
0864b3ce in the hunt) got 'Nothing to check'. The named commits are now
looked up directly. Test: tests/test_shard.py.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
@connabyss connabyss changed the title 1.0.4 fixes from real projects: tests already red, skipped tests, submodules, rewrites, UTF-8, --keep-output 1.0.4 fixes from real projects: npm copies, tests already red, skipped tests, submodules, rewrites, UTF-8, --keep-output Nov 3, 2026
claude added 10 commits November 3, 2026 06:53
The line printed while checking said NO TEST NOTICED, but the summary then
skipped it as rewritten later (node-semver c570a348 on CH's PC). A line now
says it's not flagged after all. Test: tests/test_rewritten_later.py.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
tap repeats an error in its diff dump, escaped, so the last error line
was 'TypeError: LRU is not a constructor\\r' with a literal backslash-r
(node-semver on CH's Windows PC). Diff markers and trailing literal \\r or
\\n are now dropped. Test: tests/test_good_failure_wording.py.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
dayjs commits that changed only types/index.d.ts were flagged 'no test
noticed'. Declaration files hold types only, so no test runs them. Test:
tests/test_type_declarations.py.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
dotenv 7c675904 added a subtest inside t.test('POSIX signal forwarding',
{ skip: win32 }). tap prints only the parent as skipped, so Bite said its
tests didn't notice. Now a skipped test whose block the commit added lines
to counts too. Test: tests/test_skipped_own_test.py.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
--free-checks 0 checked no commit and ended like a clean run. It now says
it needs a whole number of 1 or more. Test: tests/test_odd_inputs.py.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
…old wording

#163 and #164 changed messages and went red because tests/selftest.py and
test_odd_inputs.py still expected the old text. Same three boxes, so the
checklist check is unchanged.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iGWaiVqiKe779Fd543
A heartbeat line already on its way printed after the step ended (failed
Windows 3.10 CI on #158). heartbeat's exit now joins its thread. Test:
tests/test_jobs_memory.py.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
#164 (merged) refused --last 0 its own way; #158 refused --free-checks 0
another. Now both go through AT_LEAST_ONE.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhqMpL4wyk62EegnR
@connabyss
connabyss enabled auto-merge November 4, 2026 08:26
@connabyss
connabyss merged commit 86233bb into main Nov 4, 2026
7 of 8 checks passed
@connabyss
connabyss deleted the claude/project-thread-tcs0wx branch November 4, 2026 08:32
@connabyss connabyss mentioned this pull request Nov 4, 2026
1 task done
connabyss pushed a commit that referenced this pull request Nov 4, 2026
Bite remembered each commit it checked with ✅, keyed on every test file in
today's code. A pull request whose every commit adds a test changed that key
on each push, so every commit was checked again from zero (#158: 17 commits,
about 30 minutes, each push).

Bite checks a fix on a copy of its own commit, so a later test can't undo
that ✅. A ✅ now holds while the settings, test setup and dependency files
are the same and no test file the commit had is deleted since. A ✅ that
leaned on today's tests (a piece only a later test notices, or a test deleted
since) still needs every test file unchanged.

Tests: tests/test_jobs_memory.py (the two "keeps the earlier checks" tests
fail without this; the weakened-later-test test guards the ✅ that leaned on
today's tests).

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iGdLGjN4japo2hhaEt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants