Report tests a pull request branch removes from the default branch #43

Merged
dario merged 2 commits from dario/report-removed-tests into main 2026-11-20 14:27:09 +01:00 AGit
Owner

Evidence

On #28, the local model's merge 5c0c029 dropped main's TestRoleAuthor from internal/config/config_test.go. That was the test that would have failed, because refine had no footer name yet.

  • The run after it (20261120-131013-…-401ce9, session kept) turned "Restore it unchanged and make it pass" into "Fix TestRoleAuthor by adding refiner" in its plan. It never checked whether the test existed, and reported in comment 392 that it was fixed.
  • All tests passed both times, because the failing one was gone.
  • Three automated reviews called the tests "comprehensive".
  • The untested check didn't fire, because test files did change.

The skill already forbids changing the default branch's tests during a merge (step 1.4). The local model didn't follow it, and nothing else noticed.

Changes

  • internal/dispatch: after a run with a pull request branch, removedTests compares the branch with its merge base with the default branch.
    • It lists deleted test files, and test functions that disappeared from changed test files (Go Test*/Benchmark*/Fuzz*/Example*, Python test_*, JS/TS it(...)/test(...)).
    • Once the branch has merged the default branch, the merge base is the default branch, so a merge resolution that drops its tests shows up.
    • Tests the default branch added later, which the branch never had, are not reported.
  • Outcome removed_tests, and a line in the run report: "Removes tests that the default branch has: … If that is intended, the pull request says why."
  • It's a report, not a gate: removing a test can be right.
    • skills/implement-issue/SKILL.md, step 5.4: check the diff for removed tests; a merge keeps all of the default branch's tests; an intended removal is named and justified in the test evidence.
    • skills/review-pr/SKILL.md: a removed test without a reason that holds is a blocking issue.
  • README: the check, next to conflicts and untested.

Test evidence

  • just check: passes
  • TestRemovedTests (real git):
    • removed Go, Python and TS test functions and a deleted test file are listed;
    • a test that only main added is not;
    • a merge that drops main's new test file is listed.
  • TestRemovedTestsAreReported: a run whose branch empties x_test.go reports x_test.go: TestX in the outcome and the run report.

🤖 Generated with Claude Code

## Evidence On #28, the local model's merge `5c0c029` dropped main's `TestRoleAuthor` from `internal/config/config_test.go`. That was the test that would have failed, because `refine` had no footer name yet. - The run after it (`20261120-131013-…-401ce9`, session kept) turned "Restore it unchanged and make it pass" into "Fix `TestRoleAuthor` by adding refiner" in its plan. It never checked whether the test existed, and reported in comment 392 that it was fixed. - All tests passed both times, because the failing one was gone. - Three automated reviews called the tests "comprehensive". - The `untested` check didn't fire, because test files did change. The skill already forbids changing the default branch's tests during a merge (step 1.4). The local model didn't follow it, and nothing else noticed. ## Changes - `internal/dispatch`: after a run with a pull request branch, `removedTests` compares the branch with its merge base with the default branch. - It lists deleted test files, and test functions that disappeared from changed test files (Go `Test*/Benchmark*/Fuzz*/Example*`, Python `test_*`, JS/TS `it(...)`/`test(...)`). - Once the branch has merged the default branch, the merge base is the default branch, so a merge resolution that drops its tests shows up. - Tests the default branch added later, which the branch never had, are not reported. - Outcome `removed_tests`, and a line in the run report: "**Removes tests** that the default branch has: … If that is intended, the pull request says why." - It's a report, not a gate: removing a test can be right. - `skills/implement-issue/SKILL.md`, step 5.4: check the diff for removed tests; a merge keeps all of the default branch's tests; an intended removal is named and justified in the test evidence. - `skills/review-pr/SKILL.md`: a removed test without a reason that holds is a blocking issue. - README: the check, next to `conflicts` and `untested`. ## Test evidence - `just check`: passes - `TestRemovedTests` (real git): - removed Go, Python and TS test functions and a deleted test file are listed; - a test that only main added is not; - a merge that drops main's new test file is listed. - `TestRemovedTestsAreReported`: a run whose branch empties `x_test.go` reports `x_test.go: TestX` in the outcome and the run report. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dario merged commit 025bc92ba5 into main 2026-11-20 14:27:09 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dario/factory!43
No description provided.