Skip to content

Wrong-check-reflect tests use the shared judge test base - #528

Open
EdbertChan wants to merge 1 commit into
split/judge-tests-3-llm-judge-testsfrom
split/judge-tests-4-wrong-check-reflect
Open

Wrong-check-reflect tests use the shared judge test base#528
EdbertChan wants to merge 1 commit into
split/judge-tests-3-llm-judge-testsfrom
split/judge-tests-4-wrong-check-reflect

Conversation

@EdbertChan

@EdbertChan EdbertChan commented Sep 13, 2026

Copy link
Copy Markdown
Owner

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

  • Behavior unchanged for the checker.
  • No change to its phrase lists.

Test Plan

Test Plan
$ per-slice checks on split/judge-tests-4
ruff: All checks passed!
[llm-judge: Ran 61 tests in 8.434s OK ] [wrong-check-reflect: Ran 16 tests in 3.508s OK ] [diu-stop: Ran 104 tests in 0.044s OK ]
gate-tests: Ran 8 tests in 0.170s OK
gate: check_hook_test_coverage: OK (37 hook(s) checked)
preflight: ok      preflight passed
  • python3 -m unittest discover -s engine/hooks/llm-judge/testsRan 61 tests / OK
  • python3 -m unittest discover -s engine/hooks/wrong-check-reflect/testsRan 16 tests / OK
  • python3 -m unittest discover -s engine/hooks/diu-stop/testsRan 104 tests / OK
  • uvx ruff check . --select E9,FAll checks passed!
  • python3 engine/skills/make-pr/scripts/preflight.py --base <stack parent>ok preflight passed

Revert Plan

Revert Plan
  • Safe to revert? Yes, after reverting any later slice in this stack first.
  • Revert command: git revert <merge-commit-sha>
  • Post-revert steps: None.
  • Data migration? No.

🤖 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-reflect hook tests to use the shared JudgeTestCase base instead of duplicating LLM judge state and runner environment setup.

The test class now subclasses JudgeTestCase, calls super().setUp() / super().tearDown(), and uses self.use_runners(...) and self.state for job paths. The checker-specific WRONG_CHECK_REFLECT_STATE_DIR temporary directory setup is unchanged. The direct judge import is removed in favor of judge_test_base.JudgeTestCase.

Reviewed by Cursor Bugbot for commit a66e57a. Bugbot is set up for automated code reviews on this repo. Configure here.

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
@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant