Wrong-check-reflect tests use the shared judge test base - #528
Open
EdbertChan wants to merge 1 commit into
Open
Conversation
Drops the hook's own judge state folder and runner patching in favor of JudgeTestCase, and removes the now-unused judge import that failed ruff F401. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013smxPCr4XeE7R77zVtN1u4 Change-Id: Id5bc9dfcf774121f654b6d9bd426e59506ff2b0f
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_37bf757b-53a1-4d58-87a1-58a77102b70c) |
This was referenced Sep 13, 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.
Summary
One reply checker asks the AI judge whether a reply took back an earlier check.
Its test cases built their own judge setup and carried an unused import that failed lint.
They now use the shared setup, and the unused import is gone.
Review Claim
This checker's test cases use the shared judge setup instead of their own.
Review Lane
refactor
Review Unit
engine-runtime
Safety Invariant
Test-only. The checker's own state folder setup stays; only the judge state and runners move to the shared base. 16 tests pass; lint is clean.
Slice Rationale
Split from the other hooks because this file has special cases: its own second state folder and per-test runner swaps.
Stack position 4 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 refactor; production hook behavior and phrase lists are untouched.
Overview
Refactors
wrong-check-reflecthook tests to use the sharedJudgeTestCasebase instead of duplicating LLM judge state and runner environment setup.The test class now subclasses
JudgeTestCase, callssuper().setUp()/super().tearDown(), and usesself.use_runners(...)andself.statefor job paths. The checker-specificWRONG_CHECK_REFLECT_STATE_DIRtemporary directory setup is unchanged. The directjudgeimport is removed in favor ofjudge_test_base.JudgeTestCase.Reviewed by Cursor Bugbot for commit a66e57a. Bugbot is set up for automated code reviews on this repo. Configure here.