Skip to content

Commit da45738

Browse files
authored
fix(cli): remove eval benchmark json flag (#1348)
1 parent 4936834 commit da45738

8 files changed

Lines changed: 43 additions & 190 deletions

File tree

apps/cli/src/commands/eval/benchmark-writer.ts

Lines changed: 0 additions & 85 deletions
This file was deleted.

apps/cli/src/commands/eval/commands/run.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,6 @@ export const evalRunCommand = command({
179179
long: 'strict',
180180
description: 'Exit with error on version mismatch (instead of warning)',
181181
}),
182-
benchmarkJson: option({
183-
type: optional(string),
184-
long: 'benchmark-json',
185-
description:
186-
'[Deprecated: benchmark.json is included in artifact dir] Write Agent Skills benchmark.json to the specified path',
187-
}),
188182
artifacts: option({
189183
type: optional(string),
190184
long: 'artifacts',
@@ -282,7 +276,6 @@ export const evalRunCommand = command({
282276
resume: args.resume,
283277
rerunFailed: args.rerunFailed,
284278
strict: args.strict,
285-
benchmarkJson: args.benchmarkJson,
286279
artifacts: args.artifacts,
287280
graderTarget: args.graderTarget,
288281
model: args.model,

apps/cli/src/commands/eval/run-eval.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import {
4040
writeArtifactsFromResults,
4141
writeInitialBenchmarkArtifact,
4242
} from './artifact-writer.js';
43-
import { writeBenchmarkJson } from './benchmark-writer.js';
4443
import { loadEnvFromHierarchy } from './env.js';
4544
import { type OutputWriter, createOutputWriter, createWriterFromPath } from './output-writer.js';
4645
import { ProgressDisplay, type Verdict, type WorkerProgress } from './progress-display.js';
@@ -113,8 +112,6 @@ interface NormalizedOptions {
113112
readonly workspaceMode?: 'pooled' | 'temp' | 'static';
114113
readonly workspacePath?: string;
115114
readonly keepWorkspaces: boolean;
116-
/** Deprecated: benchmark.json is always written to artifact dir */
117-
readonly benchmarkJson?: string;
118115
/** Removed: use --output instead */
119116
readonly artifacts?: string;
120117
/** Removed: the run directory always uses index.jsonl */
@@ -461,7 +458,6 @@ function normalizeOptions(
461458
normalizeBoolean(rawOptions.keepWorkspaces) ||
462459
yamlExecution?.keep_workspaces === true ||
463460
config?.execution?.keepWorkspaces === true,
464-
benchmarkJson: normalizeString(rawOptions.benchmarkJson),
465461
artifacts: normalizeString(rawOptions.artifacts),
466462
outputFormat: normalizeString(rawOptions.outputFormat),
467463
graderTarget: normalizeString(rawOptions.graderTarget),
@@ -1250,13 +1246,6 @@ export async function runEvalCommand(
12501246
console.log(`Repository root: ${repoRoot}`);
12511247
}
12521248

1253-
// Emit deprecation warnings for remaining legacy flags.
1254-
if (options.benchmarkJson) {
1255-
console.warn(
1256-
'Warning: --benchmark-json is deprecated. benchmark.json is always written to the artifact directory.',
1257-
);
1258-
}
1259-
12601249
// Resolve artifact directory (runDir) and primary output path.
12611250
// Precedence: --output > config output.dir > default
12621251
const explicitDir = options.outputDir;
@@ -1776,13 +1765,6 @@ export async function runEvalCommand(
17761765
console.log(formatMatrixSummary(summaryResults));
17771766
}
17781767

1779-
// Write Agent Skills benchmark.json if requested (deprecated flag — backward compat)
1780-
if (options.benchmarkJson && allResults.length > 0) {
1781-
const benchmarkPath = path.resolve(options.benchmarkJson);
1782-
await writeBenchmarkJson(benchmarkPath, allResults);
1783-
console.log(`Benchmark written to: ${benchmarkPath}`);
1784-
}
1785-
17861768
// Write artifacts to the run directory (always, not conditional on flags)
17871769
if (allResults.length > 0) {
17881770
const evalFile = activeTestFiles.length === 1 ? activeTestFiles[0] : '';

apps/cli/test/commands/eval/benchmark-writer.test.ts

Lines changed: 0 additions & 74 deletions
This file was deleted.

apps/cli/test/eval.integration.test.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,4 +557,35 @@ describe('agentv eval CLI', () => {
557557
.toLowerCase();
558558
expect(transcriptHelp).not.toContain('cache');
559559
}, 30_000);
560+
561+
it('omits removed benchmark JSON export flag from help', async () => {
562+
const result = await execa('bun', ['--no-env-file', CLI_ENTRY, 'eval', 'run', '--help'], {
563+
cwd: projectRoot,
564+
env: { ...process.env, CI: 'true' },
565+
reject: false,
566+
});
567+
const helpText = `${result.stdout}\n${result.stderr}`;
568+
expect(helpText).not.toContain('--benchmark-json');
569+
expect(helpText).toContain('--output');
570+
expect(helpText).toContain('benchmark.json');
571+
}, 30_000);
572+
573+
it('rejects the removed benchmark JSON export flag as an unknown argument', async () => {
574+
const fixture = await createFixture();
575+
try {
576+
const result = await runCli(fixture, [
577+
'eval',
578+
fixture.testFilePath,
579+
'--benchmark-json',
580+
path.join(fixture.baseDir, 'benchmark.json'),
581+
]);
582+
583+
expect(result.exitCode).not.toBe(0);
584+
const output = `${result.stdout}\n${result.stderr}`;
585+
expect(output).toContain('Unknown arguments');
586+
expect(output).toContain('--benchmark-json');
587+
} finally {
588+
await rm(fixture.baseDir, { recursive: true, force: true });
589+
}
590+
}, 30_000);
560591
});

apps/web/src/content/docs/docs/guides/skill-improvement-workflow.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ If you've been using the Agent Skills skill-creator workflow, AgentV reads your
255255
| `evals.json` | `agentv eval evals.json` | Direct — no conversion needed |
256256
| `claude -p "prompt"` | `agentv eval evals.json --target claude` | Same eval, richer engine |
257257
| `grading.json` (read) | `<test-id>/grading.json` (write) | Same per-test schema, AgentV writes one grading file per test case |
258-
| `benchmark.json` (read) | `benchmark.json` (write) | Same schema, AgentV produces it |
258+
| `benchmark.json` (read) | `<output>/benchmark.json` (write) | AgentV writes the canonical run summary; convert it in a wrapper if another tool needs a narrower compatibility shape |
259259
| n/a | `index.jsonl` (write) | AgentV-specific per-test manifest for filtering, retry, and replay workflows |
260260
| with-skill vs without-skill | `--target baseline --target candidate` | Structured comparison |
261261
| Graduate to richer evals | `agentv convert evals.json` → EVAL.yaml | Adds workspace, code graders, etc. |

apps/web/src/content/docs/docs/integrations/agent-skills-evals.mdx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,19 +107,23 @@ The rest of the bundle follows the same pattern:
107107

108108
## Benchmark output
109109

110-
Generate an Agent Skills compatible `benchmark.json` alongside the standard result JSONL. The `benchmark.json` is automatically written to the artifact directory:
110+
Generate the run `benchmark.json` alongside the standard result JSONL. The `benchmark.json` is automatically written to the artifact directory:
111111

112112
```bash
113113
agentv eval evals.json --target claude --output ./results
114114
# benchmark.json is written to ./results/benchmark.json
115115
```
116116

117-
The benchmark uses AgentV's pass threshold (score >= 0.8) to map continuous scores to the binary pass/fail that Agent Skills `pass_rate` expects:
117+
The benchmark uses AgentV's pass threshold (score >= 0.8) for each target's `pass_rate`, plus timing and token summaries:
118118

119119
```json
120120
{
121+
"metadata": {
122+
"targets": ["claude"],
123+
"tests_run": ["example-test"]
124+
},
121125
"run_summary": {
122-
"with_skill": {
126+
"claude": {
123127
"pass_rate": {"mean": 0.83, "stddev": 0.06},
124128
"time_seconds": {"mean": 45.0, "stddev": 12.0},
125129
"tokens": {"mean": 3800, "stddev": 400}
@@ -128,6 +132,8 @@ The benchmark uses AgentV's pass threshold (score >= 0.8) to map continuous scor
128132
}
129133
```
130134

135+
If another tool needs a different benchmark shape, keep `--output` as the source of truth and convert `<output>/benchmark.json` in a wrapper.
136+
131137
## Converting to EVAL.yaml
132138

133139
When you're ready to graduate, convert your evals.json to EVAL.yaml:

docs/plans/2026-06-09-eval-output-surface.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The eval run command currently exposes several overlapping ways to choose where
1414
- `--out <path>` is deprecated and currently treated as a file path whose dirname becomes the artifact directory.
1515
- `--artifacts <dir>` is deprecated and currently aliases the artifact directory.
1616
- `--output-format` is deprecated and ignored because run directories always use `index.jsonl`.
17-
- `--benchmark-json` is deprecated, still writes an extra Agent Skills compatibility file, and is outside this cleanup's requested removal set.
17+
- `--benchmark-json` was a deprecated extra Agent Skills compatibility output path outside this cleanup's requested removal set; a follow-up cleanup removes that flag and keeps the run directory `benchmark.json` as canonical.
1818
- Dashboard launch paths already pass `--output <dir>` and expect `<dir>/index.jsonl`.
1919
- Repository docs/examples still contain old `agentv eval --out <file>` guidance in compare workflows, grader-score helper comments, and local scripts.
2020

@@ -51,7 +51,7 @@ Removed now:
5151

5252
Warned/scheduled:
5353

54-
- `--benchmark-json` remains deprecated for now because the Bead did not list it as a known surface and it writes a specialized compatibility artifact. Follow-up cleanup should remove it after a separate audit.
54+
- `--benchmark-json` is removed by the follow-up cleanup after auditing for consumers; use `--output <dir>` and read `<dir>/benchmark.json` instead of requesting a second benchmark file.
5555

5656
## Migration
5757

0 commit comments

Comments
 (0)