Reply-length checker tests stop reaching the real judge - #529
Open
EdbertChan wants to merge 1 commit into
Open
Conversation
These suites had no judge isolation, so a phrase check that asks the judge could write to the real queue or call a real model. They now inherit JudgeTestCase. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013smxPCr4XeE7R77zVtN1u4 Change-Id: I76b5a9b6926bab3d871e489198505beb2821a559
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_45573813-6250-4383-960c-e6dd6f7f0993) |
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.
Summary
The reply checker that enforces short, plain replies has some checks that ask the AI judge.
Its test cases had no judge setup, so a run could write to the user's real queue.
Its test classes now use the shared setup.
Review Claim
This checker's test cases run on the shared judge setup and cannot reach a model.
Review Lane
behavior
Review Unit
engine-runtime
Safety Invariant
Test-only. No checker logic changes; four test files change their base class and import path. 104 tests pass.
Slice Rationale
Same mechanical change across four test files of one hook, so they share one claim.
Stack position 5 of 7, split from one bundled change. Merge bottom-up.
Non-goals
Test Plan
Test Plan
python3 -m unittest discover -s engine/hooks/llm-judge/tests—Ran 61 tests/OKpython3 -m unittest discover -s engine/hooks/wrong-check-reflect/tests—Ran 16 tests/OKpython3 -m unittest discover -s engine/hooks/diu-stop/tests—Ran 104 tests/OKuvx ruff check . --select E9,F—All checks passed!python3 engine/skills/make-pr/scripts/preflight.py --base <stack parent>—ok preflight passedRevert Plan
Revert Plan
git revert <merge-commit-sha>🤖 Generated with Claude Code
https://claude.ai/code/session_013smxPCr4XeE7R77zVtN1u4
Note
Low Risk
Test-only wiring; no runtime checker or judge behavior changes.
Overview
diu-stop reply-length and evidence tests that can invoke the LLM judge now inherit
JudgeTestCaseinstead ofunittest.TestCase, withllm-judgeonsys.pathso they pick up the shared test harness.That harness isolates judge state and uses stub runners, so a local
unittestrun no longer risks enqueueing real judge work.test_plain_words_checkalso callssuper().setUp()/super().tearDown()so the stub environment is applied around its tempfile setup.No production hook or checker logic changes—only four test modules.
Reviewed by Cursor Bugbot for commit 2a04aff. Bugbot is set up for automated code reviews on this repo. Configure here.