Skip to content

fix(source-control): make the pull-request evidence eval cases measure the skill - #17198

Merged
kyle-sexton merged 2 commits into
mainfrom
fix/evidence-eval-cases-measure-skill
Nov 18, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
fix/evidence-eval-cases-measure-skill

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

No related issue: the four evidence eval cases were found measuring nothing while measuring held PR #17183; this repair must land first so #17183 can be measured against a live baseline.

Summary

The four pull-request-evidence-* cases in the source-control plugin measured nothing on main.
The pull-request skill fired in 0 of 3 baseline runs. When it did fire, three causes made a run
fail or read INVALID for reasons that had nothing to do with the evidence comment:

  1. The prompts never named the skill, and the fixture's gh did not answer
    repo set-default --view, so step 1 stopped at target-repo.sh.
  2. Every content grader was tool_used: Write. A run that wrote the body with a Bash heredoc
    failed every content grader, whatever the body held.
  3. Runs read, grepped and globbed outside the exported plugin. They went to app-control's
    drive/SKILL.md and the plugins/ parent, because step 5 defined its leak scan only by
    pointing at /app-control:drive. They also searched the plugin copy for target-repo.sh,
    because step 1 named it without <skill-dir>/.

Fix

  • Prompts and fixture (carried over from feat(verification): carry one row per criterion into the PR evidence table #17183's suite repair only): each prompt reads "With
    the pull-request skill, post its verification evidence comment", and
    evals/fixtures/gh-forge/gh answers repo set-default --view as a checkout with no default
    set.
  • Content graders read the posted comment. text-first, captures-in-collapsed-section,
    collapsed-sections, captures-labeled-by-run, record-fields, inline-table and
    no-record-by-default are now regex graders on
    { source: file, path: .git/eval-forge/comment-body.md }. That is the body the fake
    gh pr comment received, however the body file was written. The precedent is
    pull-request-reassess-rebase-comparison/graders/comparison-body.md. Each pattern is the old
    one translated from JSON-escaped tool input to raw text, and its samples are the old ones
    converted to posted bodies. A run that never posts fails them, as it should for this prompt.
  • A new body-written-with-write grader in each case (tool_used: Write, content holding
    Verification evidence for <sha>) checks step 4's "with the Write tool" on its own. A run that
    writes the body another way passes the content graders and fails this one, so its score names
    the one step it skipped.
  • reference/evidence.md:
    • Step 5 states the normalization and the credential pattern itself and says to read no other
      plugin's files for them.
    • Step 1 names bash "<skill-dir>/scripts/target-repo.sh".
    • Step 4 says to read the template with the Read tool.
  • .changes/source-control/: a patch fragment.

No case loses a grader, and the skill description is unchanged.

Verification

  • validate-cases.py (repo copy) on plugins/source-control/evals: no FAIL. No WARN on any
    evidence grader, so every pass and fail sample sorts as intended under Python and JavaScript.

  • Rule written before the first run: each case VALID over 3 runs; the skill fires in every run;
    each content grader passes on every run whose posted body is correct, whatever
    body-written-with-write says; one trace read per case.

  • claude plugin eval on Claude Code 2.1.327, Sonnet (claude-sonnet-5-5) tested, judge Opus,
    --ablation none, --scaffold, --allow-tools Bash Write, 3 runs per case, against
    git archive of this branch's head dcf3e0037d:

    Case Valid Skill fired Content graders body-written-with-write Mean
    e2e-summary-collapsed yes 3/3 3/3 each 0/3 0.75
    large-change-collapsed yes 3/3 3/3 each 2/3 0.93
    record-fields yes 3/3 3/3 each 3/3 1.00
    small-change-inline-table yes 3/3 3/3 each 1/3 0.87

    Verdict VALID, with no permission denial in 12 traces.

  • I read the posted comment-body.md in all 6 runs that failed body-written-with-write, and in
    one passing run per case. Each body has the structure its graders require, so no content grader
    passed a wrong body or failed a right one.

  • The traces show:

    • every run calls <skill-dir>/scripts/target-repo.sh directly;
    • no run lists or searches the plugin copy;
    • no run reads app-control.
  • An earlier pass at 9786d58034 was also VALID: content graders 12/12, the Write grader passing
    5/12. Its traces showed the target-repo.sh search, which dcf3e0037d fixes.

  • Cost 5.39 USD (list-price estimate) across a 1-run smoke and the two passes.

  • The new body-written-with-write grader passed in 6 of 12 runs at this head (5 of 12 at
    9786d58034). In the other runs the skill's step 4 ("with the Write tool") was ignored: the body
    was written with a Bash heredoc or echo. That was happening before this PR too, hidden because
    it failed every content grader at once; it is now measured as one grader.

  • Left out: the without-plugin arm (--ablation none; this PR repairs the suite, and the A/B
    belongs to feat(verification): carry one row per criterion into the PR evidence table #17183), and a second tested model.

Related

  • #17183: the held feature
    PR. It rebases onto this, keeps only its own graders (its criteria-table moves to the
    posted-body target), then gets an A/B of main against its head.

session: AI Hero

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 18, 2026 11:27
…e the skill

The four pull-request-evidence-* prompts name the pull-request skill, and
the fixture's gh answers `repo set-default --view`, so the skill fires and
step 1 can resolve the repository. Their content graders read the posted
comment (.git/eval-forge/comment-body.md) instead of the Write call, so a
body written another way is judged on what it holds. A new
body-written-with-write grader checks step 4's Write instruction on its
own.

evidence.md step 5 states the leak scan's normalization and credential
pattern itself instead of pointing at /app-control:drive, whose files a
session without that plugin cannot read. Step 4 says to read the comment
template with the Read tool.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… the evidence step

Step 1 wrote `scripts/target-repo.sh` with no `<skill-dir>/`, and the
plugin root has a `scripts/` directory without it, so runs ran the missing
path and then listed and searched the plugin copy for the script.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 18, 2026 17:00
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T17:02:33.647196Z dcf3e00 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed dcf3e0037d15284cd127819a2421a5a5a40770de: read 35 of 35 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

This PR repairs four pull-request-evidence-* eval cases in the source-control plugin and edits plugins/source-control/skills/pull-request/reference/evidence.md. I read the whole change in all 29 files on the read list. No changed file matches a trusted-path glob, and no plugin or marketplace manifest changes.

What I checked

  • Leak scan in step 5 of evidence.md (plugins/source-control/skills/pull-request/reference/evidence.md, lines 164-183). Before this change, step 5 pointed at /app-control:drive's Mask post-check. Now it states the rules inline. Changing a standing guardrail like this needs the instruction-surface lens, so I compared it line by line with what it replaces, plugins/app-control/skills/drive/reference/evidence.md lines 97-108.
    • The normalization matches: box-drawing characters U+2500 to U+257F are deleted, then line wraps are joined.
    • Mask-value matching still ignores case, whitespace and |.
    • The credential pattern matches word for word: email, Bearer plus 8 or more non-whitespace characters, token/secret/password/apikey/api_key key-value pairs, and the PEM private-key header.
    • The fail-closed rules are unchanged: a hit posts nothing, the matched text is never named, a values: source that fails or yields nothing posts nothing, a scan that cannot run posts nothing, and the --before hub union still applies.
    • The added parenthetical "(a null control_skill, or no affected.json)" only spells out what "no hub" means. It admits nothing new.
    • The scan is not narrowed, so there is no instruction-surface finding. Nothing was deleted from a protected class, so I did not need the instruction-exception register.
  • Step 1 in evidence.md. It now invokes bash "<skill-dir>/scripts/target-repo.sh". That is a fixed path under the skill directory, and it removes the ambiguity that made runs search for the script elsewhere. No user-controlled input reaches the path.
  • Step 4 in evidence.md. It adds an instruction to read the template with the Read tool. This has no security effect.
  • Eval fixture plugins/source-control/evals/fixtures/gh-forge/gh. The new repo set-default branch accepts only --view, refuses anything else through the existing refuse, and prints a fixed message to stderr. It is a test-only fake forge with no network or credential access.
  • Graders, samples and prompts. These are eval data only. The new regex graders read .git/eval-forge/comment-body.md inside the eval workspace, and the new tool_used: Write graders and their samples are data. No credentialed lane consumes them.
  • PR context. No embedded text tells the lane to pass, skip, or drop anything.

Spend (not a hold): the PR description reports about 5.39 USD of model usage at list price for eval runs done outside CI. The diff changes no workflow, schedule or runner.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed dcf3e0037d15284cd127819a2421a5a5a40770de: read 35 of 35 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

This PR fixes the four pull-request-evidence-* eval cases so they measure the skill. Each prompt now names the skill. The fixture gh answers repo set-default --view. The content graders now read the posted comment body instead of the Write tool's input, and a new body-written-with-write grader checks the Write step on its own. In reference/evidence.md, step 1 names target-repo.sh under <skill-dir>, step 4 says to read the template with the Read tool, and step 5 spells out the leak-scan normalization and credential pattern itself. I read all 29 files in scope; the copies listed in identical.txt sit at ordinary eval-grader paths, and their path does not change what they do.

What I checked against the source:

  • Fixture repo set-default. cmd/sub come from $1/$2 and this arm does not shift, so ${3:-} is the --view argument. It prints No default remote repository has been set… to stderr and exits 0. target-repo.sh lines 66-74 expects exactly that: it greps for that text and goes on to the remotes, the same contract the script's unit-test stubs use. Any other set-default call is refused.
  • Regex graders. None of them sets flags: m, so ^ matches only at the start of the body. Each negative lookahead ((?![\s\S]*?<details), (?![\s\S]*?Verified by), the \n| Before | table check) therefore covers the whole body, as the old tool-input form did. The text-first translation from (?:\\n)+…[^\\"] to \n+…[^\n] cannot backtrack into a false pass on a blank line. The target path .git/eval-forge/comment-body.md is the file the fixture writes for pr comment -F/--body-file/-b/--body (fixture lines 403-406). That matches the precedent pull-request-reassess-rebase-comparison/graders/comparison-body.md. The sample answers are now plain body strings and still sort into the same pass and fail groups.
  • body-written-with-write. The pass sample uses the Write tool with the evidence heading. The three fail samples are no call, a Bash heredoc, and a Write call with no heading. Each lands on the intended side of the input_match.
  • Leak-scan text in step 5. It matches word for word the normalization and credential pattern in app-control/skills/drive/reference/evidence.md lines 98-108. Copying it keeps the exported plugin self-contained, and the repo already keeps per-plugin copies of these patterns (lib/publish-gate.mjs, redact.py).
  • <skill-dir> form. Step 1's bash "<skill-dir>/scripts/target-repo.sh" matches how the other steps call their scripts and the definition at SKILL.md:282. create.md:621 and media.md:80 still name bare scripts/target-repo.sh. Those lines are unchanged and no changed line calls them, so this is not a finding here, but they have the same ambiguity step 1 fixes.
  • Changelog fragment. The bump: patch fits a fix to an eval and a reference doc. No plugin manifest changed.

Closing issue: the PR closes no issue, so there are no acceptance criteria to check. The PR text contains no instructions aimed at the review lane.

Eval results: the eval results and VALID verdict in the PR's Verification section are author-claimed and unverified. This lane ran no evals.

Loosened checks: I judged the grader change as a restructure, not a loosening. No case loses a grader. Before, each content grader required Write-tool input that held the body's structure. Now each requires that structure in the body actually posted, which also fails a run that writes a correct body but never posts it. The Write requirement moved to its own grader, body-written-with-write, in all four cases rather than being dropped. The PR closes no issue, so there was no spec reason to rely on had it been a loosening.

Spend: none. The new grader is a deterministic tool_used match and adds no model calls.

Loosened-check verdict: fail (default; the prompt gave no loosened_check_verdict: or loosened_check_patterns: line); patterns: 0

Verifier dropped 0 of 0 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit ada48dd Nov 18, 2026
103 checks passed
@kyle-sexton
kyle-sexton deleted the fix/evidence-eval-cases-measure-skill branch November 18, 2026 17:23
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant