Skip to content

feat(eval): AACR-Bench replay harness - #26

Merged
jma49 merged 2 commits into
mainfrom
feat/eval-harness
Sep 24, 2026
Merged

jma49 merged 2 commits into
mainfrom
feat/eval-harness

Conversation

@jma49

@jma49 jma49 commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Part of #12 (the harness; the baseline follows once bundling and off-bundle filtering land).

What

ocra-eval (docs in docs/evaluation.md):

  • list: free preview of a seeded selection (--limit, --seed, --languages, --max-change-lines, --ids).
  • run: for each PR, blobless-clone the repo (cached), check out the head, run the real ocra review --from <base> --to <head> --format json, and save the result. Runs resume per PR and stop starting new PRs at --max-cost-usd.
  • score <run-dir>: re-score with cached judge answers (free).

Scoring is a port of AACR-Bench's evaluate_comments, so numbers are comparable:

  • matching stages: path → side → line ranges overlapping or at most one line apart → LLM judge
  • each generated comment counts at most once
  • only PRs that were actually reviewed are scored; failed and skipped PRs are reported separately

The report covers precision, recall, F1, line-level variants, breakdowns by language / category / context level, tokens, cost and latency.

Judge: the official prompt at temperature 0, via any OpenAI-compatible endpoint (JUDGE_* variables, the official names) or a Gemini key. One deliberate fix: the official parser counts "No, they are not the same issue" as a match; an answer opening with "no" is a no here.

Also: Biome skips git-ignored files (local eval output had broken the check).

Smoke run (3 PRs ≤150 lines, flash-lite for review and judge, $0.17)

Precision Recall F1 Reviewed Failed
25.0% 6.7% 10.5% 2 1

The sample is too small to judge quality, but it exposed the next fixes:

  1. Cost: 538k input tokens for 112 changed lines. Without a grouper wired, multi-file PRs run one task per file.
  2. Duplicates: the same missing-break bug was reported by 3 tasks reviewing other files, which cuts precision.
  3. Unavailable commits: module: add prefix-only modules to module.builtinModules nodejs/node#56185's head commit is no longer fetchable (force-pushed); such PRs should be excluded as unavailable rather than counted as failures.

How verified

  • npm run verify (215 tests: dataset parsing and cache, seeded selection, matching stages including the one-line tolerance and one-to-one counting, metrics, judge request/parse/cache, runner resume and budget with a stand-in CLI, scoring, report)
  • Smoke run above

…luation

ocra-eval selects a seeded subset of AACR-Bench PRs, reviews each one
by running the real ocra CLI on a blobless clone, and scores findings
with a port of the benchmark's four-stage matching: path, side, line
proximity and an LLM judge. Runs resume per PR and stop starting new
PRs at a spend cap. Reports cover precision, recall, F1, line-level
metrics, breakdowns by language, category and context, and cost and
latency. The judge treats answers opening with no as no, fixing a
false positive in the official parser.
@jma49 jma49 added this to the M1: local review MVP milestone Sep 24, 2026
@jma49 jma49 added enhancement New feature or request pkg:eval @open-cr-agent/eval labels Sep 24, 2026
@jma49
jma49 merged commit 41b211c into main Sep 24, 2026
1 check passed
@jma49
jma49 deleted the feat/eval-harness branch September 24, 2026 23:20
jma49 added a commit that referenced this pull request Sep 28, 2026
The site's design rules now live in its DESIGN.md (site #26), with a
token migration plan and a decision on the terminal's warn colour.
Two site traps that cost time are added to pitfalls: blank full-page
screenshots caused by Reveal, and builds failing without access to
Google Fonts.
jma49 added a commit that referenced this pull request Sep 28, 2026
The site's design rules now live in its DESIGN.md (site #26), with a
token migration plan and a decision on the terminal's warn colour.
Two site traps that cost time are added to pitfalls: blank full-page
screenshots caused by Reveal, and builds failing without access to
Google Fonts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request pkg:eval @open-cr-agent/eval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant