Skip to content

test(eval): record prismic calls as the argv the CLI received - #297

Merged
angeloashmore merged 1 commit into
mainfrom
claude/eval-record-argv
Sep 10, 2026
Merged

test(eval): record prismic calls as the argv the CLI received#297
angeloashmore merged 1 commit into
mainfrom
claude/eval-record-argv

Conversation

@angeloashmore

@angeloashmore angeloashmore commented Sep 9, 2026

Copy link
Copy Markdown
Member

Resolves:

Description

This PR changes the eval harness to record full command calls. The calls are expanded, allowing us to record things like shell variables and inline commands.

This is necessary to properly check the values of the new intent options in #295.

Checklist

  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

One recorded call, before and after:

"field add rich-text title --to-type article --label \"Title\" --analytics-task-id \"$TASK_ID\""

["field","add","rich-text","title","--to-type","article","--label","Title","--analytics-task-id","753f2fda-386e-4454-90ff-2badac7181d3"]

How to QA 1

Run one eval that uses toHaveRun, for example edit-models-precisely, with EVAL_TRIALS=1. It passes, and its calls in results.local.json are argv arrays.

🤖 Generated with Claude Code

https://claude.ai/code/session_015pufvNWHTyTcd38NnNPyPK


Generated by Claude Code


Note

Low Risk
Test-only eval harness and reporter changes; no production CLI or runtime behavior.

Overview
Eval harness now records Prismic CLI invocations as resolved argv arrays instead of parsing the agent’s shell command text.

The project prismic bin is a small wrapper that appends process.argv (post-prismic) to a temp JSONL log before delegating to the real CLI, so each invocation is one entry with expanded variables and no &&-chained ambiguity. After each trial, trial.calls is loaded from that log; toHaveRun / not.toHaveRun match positional args against those arrays (the "prismic" bin argument was dropped from the matcher API). AgentResult exposes calls alongside raw commands, and results.json stores argv arrays per call.

All eval specs were updated to the new toHaveRun([...]) signature.

Reviewed by Cursor Bugbot for commit 3cad9a5. Bugbot is set up for automated code reviews on this repo. Configure here.

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

The project's prismic bin is now a small script that logs each call's
argv before it runs the CLI. Evals see resolved values instead of the
shell text the agent typed, and one entry per call even when the agent
chains commands. The toHaveRun matcher reads that list, so it no longer
splits shell text.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015pufvNWHTyTcd38NnNPyPK
@angeloashmore
angeloashmore merged commit 38435ea into main Sep 10, 2026
14 of 16 checks passed
@angeloashmore
angeloashmore deleted the claude/eval-record-argv branch September 10, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants