fix(review): separate review and verifier rubric lifecycles - #981
fix(review): separate review and verifier rubric lifecycles#981bingran-you wants to merge 4 commits into
Conversation
|
@wenjun-ke could you please review this fail-closed rubric-dialect fix? The PR prevents |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 477b302d8e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| scoring = _parse_scoring(data.get("scoring", {})) | ||
| criteria: list[Criterion] = [] | ||
| for idx, raw in enumerate(data.get("criteria", [])): | ||
| if "guidance" in raw: |
There was a problem hiding this comment.
Accept judge criteria that also contain guidance
When a valid LLM-judge criterion contains both id/match_criteria and a supplemental guidance field, this unconditional check rejects it even though match_criteria remains the unambiguous grading rule and no guidance is silently substituted. This also conflicts with is_review_rubric_file() in src/benchflow/review/config.py, which explicitly classifies every entry containing id and match_criteria as the judge dialect, so such a rubric is claimed by neither consumer: bench review skips it and the judge loader fails. Restrict the rejection to criteria without match_criteria or to the actual detached-review shape.
Useful? React with 👍 / 👎.
477b302 to
e6d530b
Compare
|
@wenjun-ke the latest head now implements the full lifecycle boundary: |
|
@wenjun-ke follow-up on the latest head: the reviewer prompt now explicitly names |
Summary
verifier/rubric.jsonandtests/rubric.jsonexclusively for detached post-runbench reviewLLMJudgeRewardFuncfrom auto-discovering JSON and reject explicit references to either reserved task path before evidence download or model callsverifier/rubrics/verifier.toml, while retaining explicit TOML and Harvey-style JSON scoring rubrics at non-reserved pathsWhy
rubric.jsonis a quality-audit contract, not a reward contract. Its{name, description, guidance}criteria belong only to the isolated second-stage reviewer. The first-stage verifier must use a separately owned scoring rubric and must have zero influence from the detached review contract.The previous shape-based behavior allowed ownership to depend on JSON fields. The new boundary is structural and fail-closed: files in the two reserved task slots are always review rubrics, regardless of their shape.
The reviewer previously received only a pointer to
/evidence/trial/trajectory/. The default prompt now names/evidence/trial/trajectory/acp_trajectory.jsonl, explains its chronological redacted JSONL event contract and capture limitations, directs behavioral checks to it, and treats all solver evidence as untrusted data rather than instructions.Migration
{name, description, guidance}inverifier/rubric.jsonor legacytests/rubric.jsonand runbench review.verifier/rubrics/verifier.tomlor an explicit non-reserved JSON path such asverifier/rubrics/llm-judge.json.Crossing the boundary now reports an actionable error naming
bench reviewand the verifier-owned default path.Regression coverage
Tests prove that:
bench reviewloadsverifier/rubric.json, rendersname + guidance, and leaves the source reward byte-identicalLLMJudgeRewardFuncValidation
uv run python -m pytest tests/ -q— 5,382 passed, 65 skipped, 7 deselecteduv run ty check src/— passeduv run ruff check .— passeduv run ruff format --check .— 638 files already formatted