Repository navigation
feat: implement issue #2141 — dev-lead test-tamper guard treats tests the PR itself added as existing: a pass cannot revise its own new test, and its real fixes get retracted - #2149
Conversation
… the PR itself added as existing: a pass cannot revise its own new test, and its real fixes get retracted
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 22 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #2149 |
|
Note @don-petry I reviewed this PR and no code changes were needed, but I can't mark it done yet: required check |
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-09T21:01:24Z. |
There was a problem hiding this comment.
Code Review
This pull request refines the test-tamper guard mechanism to only protect tests that existed prior to the pull request (i.e., present at the merge base with the base branch). This allows PRs to freely modify or revise tests that they themselves introduced. The changes include updating the scanning logic to compute preexisting removals, resolving the merge base, and adding comprehensive unit tests to verify the new behavior. I have no feedback to provide as there are no review comments.
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ath in skip diff Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Dev-Lead — fix-reviews (applied)Changes committed and pushed. Requested items addressed:
|
|
Codex usage-limit notice; no code finding, nothing to change. |
|
Qodo billing/trial-ended notice; no code finding, nothing to change. |
|
CodeRabbit rate-limit summary; it has no actionable, nitpick, outside-diff, or architecture-review findings, so nothing to change. |
|
SonarCloud quality gate passed; no action needed. |
Dev-Lead — fix-reviews (no-changes)Agent reasoning |
|
|
No description provided. |
|
No description provided. |
|
No description provided. |
|
CodeRabbit rate-limit notice — no code findings to address. The comment indicates the free OSS review quota was consumed; this is an operational notice, not a code defect. |



Problem
dev-lead test-tamper guard treats tests the PR itself added as existing: a pass cannot revise its own new test, and its real fixes get retracted
From the issue: The test-tamper guard from #2013 (
scripts/lib/test-tamper-guard.sh) decides what an "existing" test is by comparing against the pre-pass head. A test file the PR itself added in an earlier commit therefore counts as existing. When a reviewer asks for a change to that new test, dev-lead cannot make it without aTest-Change-Justification:trailer; if the model forgets the trailer, the push is refused, the PR is flagged for a human, and every "Fixed" reply the pass posted is retracted, including replies for fixes that had nothing to do with the test.Risk
Low — changes automation shell logic under scripts/, covered by shellcheck (--severity=warning) and the bats suite.
Test plan
Tests added/updated:
tests/dev-lead/unit/test_fix_reviews.bats,tests/dev-lead/unit/test_test_tamper_guard.bats. Verification:bash scripts/dev-lead-lint.sh(shellcheck --severity=warning) ran pre-commit; the bats suite runs in CI.Rollback
Revert this PR. No non-revertible side effects (no tags, migrations, or external state).
Monitoring
This PR's Lint (shellcheck) and bats checks show pass/fail; watch subsequent dev-lead / pr-review runs for behavioral regressions.
Closes #2141