Judge test base runs only a local stub, never a real model - #525
Open
EdbertChan wants to merge 1 commit into
Open
Conversation
Tests on the base can no longer fall through to codex/claude/cursor, and enqueue is pinned to the temporary state folder. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013smxPCr4XeE7R77zVtN1u4 Change-Id: I7b2356d2fda21cbe253900540139827fcc4d8827
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_c713de50-91bb-4995-870a-b79f5726ed2b) |
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
Checker test cases that ask the AI judge use one shared setup.
That setup cleared the runner list, so a test that forgot to pick one fell back to the real model tools.
Now the setup picks a local stand-in that always answers no, and a new test proves it.
Review Claim
Test cases on the shared setup can no longer reach a real model or the real judge queue.
Review Lane
behavior
Review Unit
engine-runtime
Safety Invariant
Test-only. The judge's runtime defaults are unchanged; only the shared test setup sets a stand-in. The new stub test fails on the parent slice and passes here.
Slice Rationale
The default flip lands alone so its one new failure mode is easy to see. Directly affected tests stay with it.
Stack position 2 of 7, split from one bundled change. Merge bottom-up.
Non-goals
Test Plan
Test Plan
python3 -m unittest tests.test_judge.TestAsk.test_test_base_runs_only_the_local_stubwith the parent slice's base —FAILED (failures=1); with this slice —OKpython3 -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
Changes only shared judge test fixtures and assertions; production judge runner defaults and runtime behavior are unchanged.
Overview
Test-only hardening for the LLM judge hook: shared
JudgeTestCasesetup no longer clearsRUNNERS_ENV(which let tests accidentally hit real codex/claude/cursor runners). It now pins a localstubrunner viasys.executablethat always returns{"match": false}.Adds
test_test_base_runs_only_the_local_stubto lock that default, and updatestest_default_runner_order_is_codex_then_claude_then_cursorto temporarily unsetRUNNERS_ENVso production default order is still asserted without fighting the base fixture.Adds
test_enqueue_writes_only_to_temporary_state_directory, checkingenqueuewrites job files only under the test’s tempSTATE_ENVroot and leaves the defaultHOME-derived state directory empty.Reviewed by Cursor Bugbot for commit 86705c2. Bugbot is set up for automated code reviews on this repo. Configure here.