fix(harbor): numeric verifier metrics, lenient + strict judge rubrics, and interception correctness - #324
Open
rgarcia wants to merge 5 commits into
Open
Conversation
Harbor installs Claude Code and Codex before step setup with no hook to honor ClawBench's /data/.stop-requested signal, so agents kept running until their own time limit. Wrap the agent executable during setup with a watcher that forwards SIGINT when the stop file appears, exits cleanly, and records the stop detection time for evidence.
The chapter-finder task matched the landing-page navigation, so an agent that only opened find-your-local-chapter.html scored as intercepted without performing the lookup. Match the region-mappings API call for the requested ZIP instead.
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 Harbor verifier now reports the same scoring rubrics as the native runner, with machine-safe outputs:
reward.jsoncarries only numeric metrics (reward,intercepted,judge_match,judge_match_lenient,judge_match_strict,reward_lenient,reward_strict). Full metadata — including both verdict reasons — stays inclawbench-result.json, so Harbor's reward aggregation never sees booleans, strings, or nulls.rewardremains the lenient verdict; strict is reported separately asreward_strict. Both verdicts and reasons are retained.intercepted_atwhen it captures the request./data/agent-stop.json.Why
reward.jsonmixed booleans, strings, and nested metadata into one blob.clawbench-result.json.Relation to #319
#319 collapses
runner/judge_llm.pyontojudge.py's transport in the native runner. This PR is independent of that refactor but shares its goal for the Harbor path: the verifier's lenient rubric text mirrorsjudge_llm.JUDGE_SYSTEM.The Harbor verifier runs standalone inside each task container via the runtime-server venv where the
clawbenchpackage is not installed, so it cannot import the shared prompt today. If a suitable shared home for rubric strings lands, we're happy to follow up and deduplicate.Tests
uv run pytest -q— 208 passeduv run ruff check src/clawbench tests— cleanuv run ruff format --check src/clawbench tests— cleanuv run --frozen pyright src/clawbench tests— 0 errorsReproduction (Harbor 0.21.0)
Prerequisites: Docker,
uv, agent-provider credentials, judge credentials, and the PurelyMail variables required by ClawBench.Expected:
reward.txtequalsreward_lenient;reward.jsoncontains numericintercepted,reward_lenient, andreward_strictmetrics;clawbench-result.jsonretains both rubric reasons.