Skip to content

fix(skill-evals): make the grader and three fixtures stop failing correct answers - #1398

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/eval-grader-flakiness
Sep 26, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/eval-grader-flakiness

Conversation

@potiuk

@potiuk potiuk commented Sep 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Most eval flakiness is the grading, not the model. Across the 14 cases that failed while reviewing perf(pr-management): trim the family's skills without changing behaviour #1390, the decision fields matched on every run. The failures came from the haiku grader rejecting a correct free-text explanation, or from a regex check on prose.
  • Grader rubric (single and batch): a candidate that reaches the same conclusion is a match even when it adds correct detail, omits secondary detail, names the deciding rule differently, or gives the reasoning without restating the decision — the decision is already compared exactly in its structured fields. The grader answers false only on a different or contradictory conclusion. The harness still never re-asks a NO.
  • Three fixture fixes, each replacing a check that failed correct output:
    • pr-management-mentor/tone-checks: case-14 asserts the quote contains towncrier (regex) instead of exact equality; case-10 drops has_author_tag_issue, whose regex cannot match a missing-tag violation (the case's rule / result fields already pin it).
    • pr-stale-sweep/step-7-recap: drop the "note is absent" regex checks where the exact count is 0 — a recap that says "Maintainer-court PRs: none" is correct but matched the regex.
    • reviewer-routing/step-score-and-propose: the output spec now says signals_shown is false when no reviewer is proposed (the empty-roster case was ambiguous).

Type of change

  • CI / dev loop (prek, workflows, validators) — the skill-evals harness and fixtures

Test plan

  • prek run --all-files passes (36 hooks)
  • uv run --directory tools/skill-evals pytest passes
  • Flaky cases, 3 runs each (claude -p, haiku grader), before → after:
    • now 3/3: mentor case-10, case-13, case-14; triage pre-filter/case-3, case-6, case-9; stats pressure-weight/case-2; stale-sweep step-7-recap/case-1, case-2, case-3; reviewer-routing case-2; code-review review-handoff/case-3, security-disclosure-scan/case-5
    • residual: mentor hand-off/case-3 2/3 (haiku occasionally still asks for the "hand off" conclusion to be restated)
  • Negative control: four explanations that contradict the expected one (different decision, invented reviewer, opposite CI verdict, keep arguing instead of handing off) are all still graded NO with the new rubric.

Not in this PR — genuine decision disagreements

These fail on main as well and are not grading noise; they need someone to decide the intended answer rather than a fixture edited to match the model:

  • pr-management-code-review/step-2.5-slop-detection/case-2-one-hard-three-soft — the model finds 2 soft signals where the fixture expects 3 (0/3 on both trees).
  • pr-management-mentor/intervention/case-5-multiple-triggers — the model concludes no maintainer is engaged; the fixture expects "ask the maintainer which intervention to lead with".

🤖 Generated with Claude Code

…rect answers

Most eval flakiness was the grading, not the model: in 14 cases that
flaked on apache#1390, the decision fields matched on every run and the
failure came from the haiku grader rejecting a correct free-text
explanation, or from a regex check on prose.

- Grader rubric (single and batch): a candidate reaching the same
  conclusion is a match even when it adds correct detail, omits
  secondary detail, names the rule differently, or explains the
  decision without restating it (the decision is compared exactly in
  its own fields). Answer false only on a different or contradictory
  conclusion. A negative control of contradicting explanations still
  grades NO.
- mentor tone-checks case-14: assert the quote contains "towncrier"
  (regex) instead of exact equality; case-10: drop has_author_tag_issue,
  whose regex cannot match a missing-tag violation and which rule/result
  already pin.
- pr-stale-sweep step-7-recap: drop "note is absent" regex checks where
  the exact count is 0; a recap that says "Maintainer-court PRs: none"
  is correct but matched the regex.
- reviewer-routing: output-spec now says signals_shown is false when no
  reviewer is proposed.

Generated-by: Claude Opus 5
@github-actions github-actions Bot added the substrate:framework-dev Tool substrate: build / validate / eval the framework itself label Sep 26, 2026
@potiuk
potiuk merged commit f6c4a6b into apache:main Sep 26, 2026
9 checks passed
potiuk added a commit to potiuk/magpie that referenced this pull request Sep 26, 2026
Pick up today's merges (apache#1390, apache#1391-apache#1394, apache#1398, apache#1399) in a fresh
marketplace build. pyproject.toml, uv.lock and every generated
plugin/marketplace manifest move from 0.9.0.dev202609251939.

Generated-by: Claude Opus 5
potiuk added a commit that referenced this pull request Sep 26, 2026
Pick up today's merges (#1390, #1391-#1394, #1398, #1399) in a fresh
marketplace build. pyproject.toml, uv.lock and every generated
plugin/marketplace manifest move from 0.9.0.dev202609251939.

Generated-by: Claude Opus 5
@potiuk potiuk added capability:review Deep per-item code review or contributor mentoring capability:triage Sweep + classify + propose disposition family:pr-management pr-management-* skills family:tools tools/* labels Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:review Deep per-item code review or contributor mentoring capability:triage Sweep + classify + propose disposition family:pr-management pr-management-* skills family:tools tools/* substrate:framework-dev Tool substrate: build / validate / eval the framework itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant