test(eval): record prismic calls as the argv the CLI received - #297
Merged
Conversation
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
3 tasks
angeloashmore
added this pull request to stack #298
September 10, 2026 12:51
lihbr
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Preview
One recorded call, before and after:
How to QA 1
Run one eval that uses
toHaveRun, for exampleedit-models-precisely, withEVAL_TRIALS=1. It passes, and itscallsinresults.local.jsonare 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
prismicbin is a small wrapper that appendsprocess.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.callsis loaded from that log;toHaveRun/not.toHaveRunmatch positional args against those arrays (the"prismic"bin argument was dropped from the matcher API).AgentResultexposescallsalongside rawcommands, andresults.jsonstores 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
Please use these labels when submitting a review:
⚠️ #issue: Strongly suggest a change.
❓ #ask: Ask a question.
💡 #idea: Suggest an idea.
🎉 #nice: Share a compliment. ↩