feat(cli): incremental eval runs — resume, append, and aggregate#1110
Merged
feat(cli): incremental eval runs — resume, append, and aggregate#1110
Conversation
Add three related capabilities for incremental eval runs: 1. `agentv eval aggregate <runDir>` subcommand - Reads index.jsonl, deduplicates by (test_id, target) keeping last entry - Recomputes benchmark.json and timing.json - Prints summary to stdout 2. `--resume` flag on `agentv eval run` - Skips already-completed (non-error) tests - Appends new results to existing index.jsonl - Aggregates with deduplication at the end 3. `--rerun-failed` flag on `agentv eval run` - Like --resume but only skips tests with execution_status "ok" - Reruns execution_error and quality_failure tests - New results replace old ones via last-entry-wins deduplication Key changes: - artifact-writer.ts: Add deduplicateByTestIdTarget(), aggregateRunDir(), writePerTestArtifacts() - jsonl-writer.ts: Support append mode (flags: "a") - output-writer.ts: Pass append option through - commands/aggregate.ts: New subcommand - commands/run.ts: Add --resume and --rerun-failed flags - run-eval.ts: Resume/rerun skip logic, append writer, aggregate after run Closes #1071 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Without this, `agentv eval aggregate <dir>` was rewritten to `agentv eval run aggregate <dir>` by preprocessArgv(), causing aggregate to be treated as an eval file path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…isplay - Close outputWriter before reading index.jsonl for summary computation to avoid race condition with unflushed stream data - Use summaryResults (all deduplicated) instead of allResults (new only) for matrix summary in resume mode Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collaborator
Author
E2E UAT ResultsRed (main)
Green (branch)1. Full baseline run — 3 tests, all pass (100%, 96%, 82%) 2. Partial run + resume — ran 1/3 tests, then 3. Artifact parity — resumed run produces identical file structure to baseline: 4. Compare compatibility — 5. 6. 7. Edge case: all tests complete — exits cleanly: Verdict: ✅ PASS — all scenarios verified with live Azure OpenAI (gpt-5.4-mini) |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Implements three related capabilities for incremental eval runs (#1071):
1.
agentv eval aggregate <runDir>subcommandA pure function: reads
index.jsonl, deduplicates by(test_id, target)keeping the last entry, recomputesbenchmark.json+timing.json, prints summary.agentv eval aggregate .agentv/results/runs/2026-04-13T12-00-00/2.
--resumeflag onagentv eval runResume an interrupted run: skip completed tests, append new results, aggregate at end.
agentv eval foo.yaml --output ./my-run/ --resume3.
--rerun-failedflag onagentv eval runRerun failed/errored tests while keeping passing results. Implies
--resume.agentv eval foo.yaml --output ./my-run/ --rerun-failedChanges
deduplicateByTestIdTarget(),aggregateRunDir(),writePerTestArtifacts()flags: 'a')--resumeand--rerun-failedflagsTesting
Closes #1071