Skip to content

feat(ci): keep each eval run's final reply in the dispatched suite artifact - #18676

Merged
kyle-sexton merged 5 commits into
mainfrom
feat/evals-capture-last-message
Nov 24, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
feat/evals-capture-last-message

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #18674
Refs: #18609

Summary

A dispatched suite run of pr-run-plugin-evals.yml now uploads each eval run's final reply. The replies go in <plugin>/last-messages.jsonl beside results.json, inside the eval-browser-<run id>-<attempt> artifact the run already uploads with 3-day retention. With the replies, failing graders and judges can be fixed against what the model said. This is option (A) of the owner's "Eval replies in CI artifacts" decision (melodic-software/architecture#221). This PR builds the capture only. The re-run of the failing cases is separate work.

Fix

  • New .github/scripts/plugin-eval/last-messages.mjs writes one line per case, arm and run: {case, arm, run, last_message}. The reply is the kept trace's result text, else its last assistant text, else null, read the same way as calibrate-judge.py's trace_reply.
  • Before the file is written, lib/publish-gate.mjs scanLeak reads it. That is the same scanner the scan-upload step already runs over the artifact. If the scan blocks, no file is written and a ::warning:: names only the rule, so the rest of the artifact still uploads. No reply is ever printed to the log or the summary.
  • The call sits in the DISPATCHED block of "Summarize the results" in both Run Eval and Run Eval Subscription. Label-started pull request runs skip that block, and compare mode starts neither job, so neither writes replies.
  • docs/review/evals.md "Reading a result" now says where the replies are and how long they are kept.

Verification

  • node --test --test-concurrency=4 .github/scripts/plugin-eval/last-messages.test.mjs .github/scripts/plugin-eval/workflow.test.mjs .github/scripts/plugin-eval/credential-legs.test.mjs: 28 pass, 0 fail. The new tests cover reply extraction, the scan gate (a built-at-run-time sk-ant- key withholds the file and stays out of the output), usage errors, and both workflow call sites.
  • actionlint on the workflow and markdownlint-cli2 on docs/review/evals.md: clean.
  • Left out: a real dispatched run. Per the decision, the re-run comes after this PR merges.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 23, 2026 22:10
…tifact

A dispatched suite run of pr-run-plugin-evals.yml now writes
last-messages.jsonl beside each results.json: one line per case, arm and
run with the kept trace's final reply. last-messages.mjs runs
lib/publish-gate.mjs scanLeak on the file first and, on a block, writes
nothing and prints a warning naming only the rule, so the rest of the
artifact still uploads. Pull request and compare runs write no replies.

Closes #18674
Refs: #18609

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UJUn7LPUb4rRDJ2JhJRGZf
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 24, 2026 03:12
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 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-24T03:14:36.646341Z 32d6b10 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: 32d6b103dd

ℹ️ 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 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #18676 (incremental, blocking only)

No security issues found. I read every hunk of both files in scope (changes since f0ffb107):

  • .github/scripts/plugin-eval/fixtures/dispatched-results.json: the two captured tracePath values change from /home/runner/.ev/... to the literal string $HOME/.ev/.... This is test data and nothing expands it. The test overwrites both paths with temp-dir paths before it runs the script. It adds no tokens, secrets or credentials.
  • .github/scripts/plugin-eval/last-messages.test.mjs: removes one assert.match on the fixture's original tracePath shape. The change only touches a test. It doesn't modify the script, the workflow, permissions:, triggers, token requests, the kill switch, trusted-actor checks or merge holds.

Neither file matches a listed trusted path. The earlier reviews of the rest of the PR still apply, and they had no findings, so there is nothing to restate.

This review was blocking only: an earlier head was already reviewed, so only CRITICAL and IMPORTANT findings would be reported.

Spend: none. The change is a local unit test with no model calls.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: no blocking findings (incremental, blocking only)

This lane has already reviewed an earlier head of this PR (f0ffb107), so this review reports blocking findings only. I read the whole incremental change in both listed files.

  • .github/scripts/plugin-eval/fixtures/dispatched-results.json: both tracePath values change from /home/runner/.ev/... to the literal string $HOME/.ev/....
  • .github/scripts/plugin-eval/last-messages.test.mjs: drops the assertion that the captured withRun.tracePath matches ^/home/runner/....

Test soundness, checked against the head code:

  • The test overwrites both runs' tracePath before it calls the script:
    • withRun gets join(dir, "with-trace.jsonl").
    • withoutRun gets join(dir, "deleted", "trace.jsonl").
  • Both overrides are absolute temp paths, so the fixture's $HOME/... value is never passed to replies().
  • That means the isAbsolute branch still runs, and the expected records (The wizard is ready. and null) still hold.
  • Without the removed assertion, the test no longer pins the fixture's tracePath shape. The test name still says "absolute tracePath", which stays true because of the overrides.
  • That loss of coverage is advisory only, so it is not posted in a blocking-only review.

Closing issue #18674: the earlier reviews found every acceptance criterion met, and this push changes no code path any criterion relies on. node --test passing is only the author's claim: I did not run it, because this lane has no shell.

Spend: none. The change touches only a test and a fixture.

Loosened checks: the change loosens no check. The prompt gave no loosened_check_verdict:, loosened_check_patterns: or loosened_check_decision_record: line, so I used fail with no consumer entries. I did not check whether a decision record is cited.

Loosened checks would be marked: fail (bundled default); patterns: 0

Embedded text: the PR context contains no instructions aimed at this lane.

Verifier dropped 0 of 0 candidates.

kyle-sexton and others added 2 commits November 23, 2026 22:37
The fixture is dispatched run 45302248916's wizard results.json, trimmed to
one run per arm: absolute tracePaths under the runner's eval temp folder,
which run-validity.py reads in the same step.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
machine-specific-paths flags /home/<user>. The dropped assertion checked
only the fixture's own text; the test rewrites both tracePaths.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit ae7557b Nov 24, 2026
81 of 82 checks passed
@kyle-sexton
kyle-sexton deleted the feat/evals-capture-last-message branch November 24, 2026 04:35
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 24, 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.

Upload each eval run's final reply in the dispatched suite run's artifact after a leak scan

1 participant