Skip to content

fix(review): separate review and verifier rubric lifecycles - #981

Open
bingran-you wants to merge 4 commits into
mainfrom
bry/reject-review-rubric-in-llm-judge
Open

fix(review): separate review and verifier rubric lifecycles#981
bingran-you wants to merge 4 commits into
mainfrom
bry/reject-review-rubric-in-llm-judge

Conversation

@bingran-you

@bingran-you bingran-you commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • reserve verifier/rubric.json and tests/rubric.json exclusively for detached post-run bench review
  • stop LLMJudgeRewardFunc from auto-discovering JSON and reject explicit references to either reserved task path before evidence download or model calls
  • move the default verifier-scoring contract to verifier/rubrics/verifier.toml, while retaining explicit TOML and Harvey-style JSON scoring rubrics at non-reserved paths
  • make review-rubric ownership path-based instead of guessing the JSON dialect
  • preserve the review lifecycle: completed reward artifacts are read-only evidence and reviewer output cannot change the original reward
  • tell the reviewer exactly where the canonical solver trajectory lives, what its recorded ACP events may contain, and how to use it safely for behavioral and chronological criteria

Why

rubric.json is 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

  • Post-run review: keep {name, description, guidance} in verifier/rubric.json or legacy tests/rubric.json and run bench review.
  • Verifier-time LLM scoring: use verifier/rubrics/verifier.toml or an explicit non-reserved JSON path such as verifier/rubrics/llm-judge.json.

Crossing the boundary now reports an actionable error naming bench review and the verifier-owned default path.

Regression coverage

Tests prove that:

  • bench review loads verifier/rubric.json, renders name + guidance, and leaves the source reward byte-identical
  • the reviewer prompt identifies the canonical ACP trajectory, describes its evidence contract and limitations, and warns against following embedded instructions
  • JSON is never auto-discovered by LLMJudgeRewardFunc
  • direct reward-function use, legacy verifier config, and native verifier strategies reject both reserved slots
  • verification artifacts exist before detached review begins
  • the default LLM-judge scoring path is verifier-owned

Validation

  • uv run python -m pytest tests/ -q — 5,382 passed, 65 skipped, 7 deselected
  • uv run ty check src/ — passed
  • uv run ruff check . — passed
  • uv run ruff format --check . — 638 files already formatted

@bingran-you
bingran-you deployed to pypi-internal-preview August 13, 2026 01:08 — with GitHub Actions Active
@bingran-you

Copy link
Copy Markdown
Collaborator Author

@wenjun-ke could you please review this fail-closed rubric-dialect fix? The PR prevents LLMJudgeRewardFunc from silently discarding detached-review guidance and documents the correct migration path.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@bingran-you
bingran-you force-pushed the bry/reject-review-rubric-in-llm-judge branch from 477b302 to e6d530b Compare August 13, 2026 03:11
@bingran-you
bingran-you deployed to pypi-internal-preview August 13, 2026 03:11 — with GitHub Actions Active
@bingran-you bingran-you changed the title fix(judge): reject detached review rubrics fix(review): separate review and verifier rubric lifecycles Aug 13, 2026
@bingran-you

Copy link
Copy Markdown
Collaborator Author

@wenjun-ke the latest head now implements the full lifecycle boundary: verifier/rubric.json and tests/rubric.json are review-only, verifier scoring uses a separate contract, JSON auto-discovery is removed, and lifecycle/immutability regressions are covered. Could you please review the updated PR?

@bingran-you
bingran-you deployed to pypi-internal-preview August 13, 2026 03:46 — with GitHub Actions Active
@bingran-you

Copy link
Copy Markdown
Collaborator Author

@wenjun-ke follow-up on the latest head: the reviewer prompt now explicitly names /evidence/trial/trajectory/acp_trajectory.jsonl, explains its chronological redacted ACP-event contents and capture limits, directs behavioral criteria to it, and treats embedded solver content as untrusted evidence rather than instructions.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant