Skip to content

test(source-control): port ready's evidence case to a runnable eval - #17219

Merged
kyle-sexton merged 4 commits into
mainfrom
test/15787-ready-evidence-case
Nov 19, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
test/15787-ready-evidence-case

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Refs: #15787

Summary

Ports the skill's evidence case for ready (entry 64 of skills/pull-request/evals/evals.json, which claude plugin eval cannot run) to a runnable plugin-eval case. This is the case the issue's "One new eval case shows the call" asks for: it drives ready, not the evidence action alone, and checks that the flip is followed by the evidence comment.

Fix

  • New case pull-request-ready-posts-evidence-after-flip. It sets up an offline draft PR whose head has a passing verify record and a CONFIRMED verdict. The base's team config turns the review steps off. An ignored evidence/e2e-summary.json holds one publishable screenshot. The prompt flips the PR with --evidence.
  • Its graders read the forge's call record and the posted comment body. They check four things:
    • the evidence comment is posted after gh pr ready;
    • it attaches the capture;
    • it opens with the evidence marker and the full head;
    • the report names the created comment.
  • The comment-body grader follows fix(source-control): make the pull-request evidence eval cases measure the skill #17198's posted-body target.
  • gh-forge.test.sh covers the stand-in's gh repo set-default answers: --view reports no default, and setting a default is refused.
  • A changelog fragment is under .changes/source-control/.

#17198 already made the stand-in answer --view and repaired the four pull-request-evidence-* cases. Those cases drive the evidence action directly. This case covers ready's step 2.5.5, which calls that action after the flip, so it does not repeat them.

Verification

  • bash plugins/source-control/evals/gh-forge.test.sh: 86 passed.
  • /evals:validate on plugins/source-control/evals: no FAIL. The new case's only findings are the Bash and Write grant notes.
  • The new scaffold was run in a scratch directory on main's fixture:
    • confirm-verdict.sh show prints CONFIRMED for the head;
    • verify-gate.sh check exits 0;
    • target-repo.sh resolves eval-fixture/app from origin;
    • the base's team config is served.
  • scripts/check-affected.sh: 17 passed, 2 skipped.
  • Two-version compare of PR 15907's text: before 18692ebd, after d82c9c8e. Run as the registration eval-15787b with Claude Code 2.1.327, Sonnet, three runs a side, --case 'p15907-*' and a --max-cost-usd ceiling per batch. The cases are this branch's copies. Verdict: PASS, 6.7294 USD. The record is on Post the evidence comment from the ready step once the head is confirmed #15787.
    • pull-request-ready-merges-base-never-rebases: 1.000 before, 1.000 after (no loss).
    • pull-request-ready-posts-evidence-after-flip: 0.867 before, 1.000 after. evidence-line-reported passed 1/3 before and 3/3 after. comment-after-flip, capture-attached and comment-names-head passed 3/3 on both sides. The registered target (comment-after-flip in at least 2 of 3 after runs) is met.
    • ready-for-review.md (step 2.5.5) was opened in 3 of 3 runs on each side.
    • The case posts the evidence comment on the before-text too. The evidence action and the prompt's --evidence already existed before PR 15907. The case shows the call, but the compare cannot show a rise in posting.
    • pull-request-ready-hands-pr-to-explain-change was dropped under the two-smoke-stop rule. It stopped the smoke on the skill-fired gate in this registration and in the earlier one. Its digest handoff after the flip (/review:explain-change --event ready) is unmeasured.
    • Fixture caveat: the compare's case copies carried this branch's earlier stand-in answer for gh repo set-default --view, which printed eval-fixture/app. The branch now keeps main's answer from fix(source-control): make the pull-request evidence eval cases measure the skill #17198, which reports no default. Under both answers target-repo.sh resolves eval-fixture/app.

Remaining

  • From Post the evidence comment from the ready step once the head is confirmed #15787's done-when list: the two-version compare on the opus alias, which was not run (Sonnet only).
  • From the same list: the existing ready case pull-request-ready-hands-pr-to-explain-change, which stays unmeasured in the compare.
  • The dogfooding drive (/app-control:drive claude-code-plugins source-control/pull-request), which PR 15907 named but nobody has run.
  • A re-run of the compare on this head: after a review finding, the offline gh stand-in now serves gh run list for the pull request's head commit (it refused the call before), so a draft following ready's "confirm a ready run" step reaches the evidence step. The compare above ran before that change; the case's prompt and graders are unchanged, its fixture behaviour is not.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits November 18, 2026 10:18
…t offline

Port evals.json entry 64 (ready-posts-evidence-after-flip-for-confirmed-head)
to a runnable plugin-eval case: ready --evidence on an offline draft whose
head is verified and confirmed must post the evidence comment after the
flip, attach the publishable capture, and name the comment in its report.

The gh-forge stand-in now answers `gh repo set-default --view` with its
repository, the read target-repo.sh makes first; without it the evidence
step and the other ready case stopped on "not served offline".

Refs: #15787

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Main (#17198) made the stand-in answer `gh repo set-default --view` as a
checkout with no default set; this branch printed eval-fixture/app. Both
make target-repo.sh resolve offline (with no default it falls back to the
one github.com remote). Main's evidence cases depend on its answer, so the
fixture keeps main's arm; this branch's test now expects it, and the
changelog fragment no longer claims the fixture change.

Refs: #15787

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 18, 2026 21:02
@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-18T21:04:25.080330Z 696ced0 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.

@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: 696ced0da7

ℹ️ 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".

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-security-review: 3 inline finding(s) on 696ced0da725bc09f855d5c10b2cada592a217b0; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #17219, incremental (696ced0 → eea2a95)

Blocking only. This lane already reviewed an earlier head, so this review reports only CRITICAL and IMPORTANT findings.

I read every hunk of the 3 files in scope:

  • .changes/source-control/test-15787-ready-evidence-case-3f9a1c62.md
  • plugins/source-control/evals/fixtures/gh-forge/gh
  • plugins/source-control/evals/gh-forge.test.sh

None of them matches a trusted-path glob. The push changes no workflow, token request, trusted-actor list, kill switch, merge hold or standing instruction.

No new security issue in this push.

  • The offline forge's new run list branch (gh L358-L383) answers from local fixture state only: the origin bare repo's head ref and the draft file. It makes no network call and handles no credential.
    • The --json field list goes to jq through --arg, so it is passed as data, never as program text.
    • The -q expression follows the same jq -r "$jq_expr" pattern as the forge's other read commands. The caller is the eval session, which already holds the shell.
    • The "${!i}" argument indirection only reads positional parameters.
    • Any call the forge does not serve still exits 1.
  • The test additions (gh-forge.test.sh L139-L149) run the stand-in against a temporary forge only.
  • The changelog fragment is prose.

Prior findings. The three manifest flags on the eval-only fixture gh-forge-path/.claude-plugin/plugin.json are unchanged since they were posted. That file is not in this push. They are restated below as already posted and counted, not re-posted.

Manifest lines (3)

critical-findings: 0

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: PR #17219, incremental from 696ced0d to eea2a959

No blocking findings. This was a blocking-only review: the prior-findings file says this lane already reviewed an earlier head (blocking only: yes), so only blocking findings would be posted. I read all three files in .claude-lane/incremental.diff.

What I checked

This push adds a run list command to the offline forge. I compared it with the forge code it calls. I ran nothing, so none of this is a run result.

  • fixtures/gh-forge/gh, the new run list branch. The --commit, -c and --commit= forms are read before parse.
    • parse puts the leftover values (the commit, pull_request, 100) into args. Nothing in this branch reads args, so they do no harm.
    • The head's commit comes from the existing head_ref(). It is compared as a prefix, so a short SHA also matches.
    • When the forge has no pull request yet (--no-pr before pr create), rev-parse returns an empty commit. The match then fails and the list is empty, so $forge/draft is never read before it exists.
    • The draft state is read from $forge/draft, the same file pr ready flips at line 333. So the forge returns run 1 while the PR is a draft and runs 1 and 2 after the flip.
    • Cutting each run to the --json fields uses the per-row form of emit()'s reduce, then applies --jq in the same way emit() does.
  • gh-forge.test.sh. The new assertions use make_forge draft (no --open, so the PR starts as a draft).
    • Before the flip, the snapshot reads [1].
    • After pr ready, the not-in-snapshot expression counts 1. The snapshot array is spliced into it as a jq array literal, which is valid even when it spans several lines.
    • An unrelated commit gets an empty list.
  • Changelog fragment. It now describes the forge's run list support. The bump is still patch, which fits a change to a test fixture only.

Settled and prior items

  • The settled thread on scaffold.sh line 23 is answered by this push: ready_run_seen can now see a new run after the flip. I did not raise it again.
  • The prior post from this lane is a summary with no line anchor and no findings, so there is nothing to carry forward.

Context

  • The PR closes no issue (Refs: #15787 only), so I checked no acceptance criteria.
  • The PR context and the thread text contain no embedded instructions.
  • Path rule .claude/rules/eval-case-transcripts.md applies to plugins/*/evals/**. Nothing in this push adds a transcript or any machine-specific details.
  • Loosened-check verdict: fail. This is the default, because the prompt had no loosened_check_verdict: or loosened_check_patterns: line. There are 0 patterns. The change loosens no check: the test file only gains assertions. The prompt had no loosened_check_decision_record: line, so I did not check the citation requirement.
  • Spend: none new. The eval case's prompt, graders and run settings are unchanged in this push.

Verifier dropped 0 of 0 candidates.

ready's flip confirmation (2.5.4, "Confirm a ready run") polls gh run
list for a run on the head that did not exist before the flip, and
stops before the evidence step when none appears. The forge refused
every run list call, so a run that followed the skill could not reach
2.5.5. The forge now serves run 1 for the PR's head commit, and run 2
once the PR is out of draft; any other commit has no runs.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 18, 2026
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 18, 2026
@kyle-sexton
kyle-sexton removed this pull request from the merge queue due to a manual request Nov 18, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Owner decision, 2026-11-18, typed in the owning agent session: "go w/ recommendations" on the question about the three manifest flags, option A: accepted; the flagged manifest is byte-identical to the one already on main in pull-request-ready-merges-base-never-rebases. The hold is lifted.

@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 19, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 83a8f87 Nov 19, 2026
127 of 128 checks passed
@kyle-sexton
kyle-sexton deleted the test/15787-ready-evidence-case branch November 19, 2026 01:47
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 19, 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