Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(bench): remove unused test files

Steven Enamakel111c7f949735
diff --git a/bench/harnesses/charts.test.mjs b/bench/harnesses/charts.test.mjs
index 3c1a08e5a8..3cad1aeaea 100644
--- a/bench/harnesses/charts.test.mjs
+++ b/bench/harnesses/charts.test.mjs
@@ -4,9 +4,9 @@ import { METRICS, renderSvg } from "./charts.mjs";
const meta = { run_id: "r", suite: "swe", model: "m", reasoning: "medium", cpus: "4", mem: "8g" };
const row = (over) => ({
- tasks: 10, swe_resolved: 5, swe_graded: 10, check_passed: 0, cost_per_task_usd: 0.0123,
- cost_per_resolved_usd: 0.0246, static_prompt_tokens: 4500, cache_pct: 80, ttft_ms_p50: 1200,
- task_wall_s_p50: 60, cold_start_ms_p50: 300, cpu_seconds_mean: 2, peak_anon_mb_max: 100, ...over,
+ tasks: 10, swe_resolved: 5, swe_graded: 10, check_passed: 0, cost_per_solved_usd: 0.0246,
+ tokens_per_solved: 90000, solved_static_prompt_tokens: 4500, solved_cache_pct: 80, solved_ttft_ms_p50: 1200,
+ solved_task_wall_s_p50: 60, solved_cold_start_ms_p50: 300, solved_cpu_seconds_mean: 2, solved_peak_anon_mb_max: 100, ...over,
});
test("renders one panel per metric and one column per harness, with a star on the best", () => {
@@ -14,14 +14,15 @@ test("renders one panel per metric and one column per harness, with a star on th
assert.match(svg, /^<svg /);
for (const m of METRICS) assert.ok(svg.includes(m.title.replace(/&/g, "&amp;")), m.title);
assert.equal((svg.match(/<path d="M[^>]*fill="url\(#g-/g) ?? []).length, METRICS.length * 2);
- // every panel has a winner, drawn with a gold outline and a translucent halo
- assert.ok((svg.match(/stroke-opacity="0.28"/g) ?? []).length >= METRICS.length);
+ // every panel has a winner, drawn as a gold column with no outline
+ assert.ok((svg.match(/fill="url\(#g-gold\)"/g) ?? []).length >= METRICS.length);
+ assert.ok(!svg.includes("stroke-width"));
assert.match(svg, /<polygon/);
});
test("lower-is-better metrics star the smallest value", () => {
const svg = renderSvg(
- { meta, summary: { openhuman: row({ cpu_seconds_mean: 1 }), codex: row({ cpu_seconds_mean: 9 }) } },
+ { meta, summary: { openhuman: row({ solved_cpu_seconds_mean: 1 }), codex: row({ solved_cpu_seconds_mean: 9 }) } },
{ only: ["cpu"] },
);
assert.equal((svg.match(/<polygon/g) ?? []).length, 1);
@@ -29,8 +30,8 @@ test("lower-is-better metrics star the smallest value", () => {
test("missing values render n/a instead of a zero-height column, and bad text is escaped", () => {
const svg = renderSvg(
- { meta: { ...meta, model: "a<b&c" }, summary: { openhuman: row({ cost_per_resolved_usd: null }), codex: row({}) } },
- { only: ["cost_resolved"] },
+ { meta: { ...meta, model: "a<b&c" }, summary: { openhuman: row({ cost_per_solved_usd: null }), codex: row({}) } },
+ { only: ["cost_solved"] },
);
assert.match(svg, />n\/a</);
assert.ok(svg.includes("a&lt;b&amp;c"));
diff --git a/bench/harnesses/report.test.mjs b/bench/harnesses/report.test.mjs
index fc9a5c5782..117c5d9506 100644
--- a/bench/harnesses/report.test.mjs
+++ b/bench/harnesses/report.test.mjs
@@ -73,3 +73,35 @@ test("latestAttempts keeps only the newest attempt's index row and proxy records
assert.equal(out.index[0].started_epoch_ms, 5000);
assert.equal(out.meter.length, 1);
});
+
+test("per-task KPIs use only solved tasks; cost per solved task includes failed spend", () => {
+ const meter = [
+ // task a: solved, fast. task b: failed, slow and expensive.
+ call({ task: "a", prompt_tokens: 1000, cached_tokens: 900, first_token_ms: 100, total_ms: 200, cost_usd: 0.01, system_prompt_tokens: 500, tool_schema_tokens: 0, tool_count: 0 }),
+ call({ task: "b", prompt_tokens: 1000, cached_tokens: 0, first_token_ms: 9000, total_ms: 9000, cost_usd: 0.03 }),
+ ];
+ const result = (wall, cpu) => ({
+ started_epoch_ms: Date.parse("2026-01-01T00:00:00.000Z"), wall_ms: wall, exit_code: 0, timed_out: false, patch_bytes: 1,
+ resources: { cpu_seconds: cpu, peak_anon_bytes: cpu * 1048576 }, check: { passed: false },
+ });
+ const tasks = [
+ { harness: "h", task_key: "a", task: "a", result: result(10_000, 2), grade: { resolved: true } },
+ { harness: "h", task_key: "b", task: "b", result: result(90_000, 50), grade: { resolved: false } },
+ ];
+ const s = aggregate(meter, tasks).h;
+ assert.equal(s.solved_tasks, 1);
+ assert.equal(s.cost_per_solved_usd, 0.04); // all spend / 1 solved
+ assert.equal(s.solved_cache_pct, 90);
+ assert.equal(s.solved_ttft_ms_p50, 100);
+ assert.equal(s.solved_task_wall_s_p50, 10);
+ assert.equal(s.solved_cpu_seconds_mean, 2);
+ assert.equal(s.solved_peak_anon_mb_max, 2);
+ assert.equal(s.solved_static_prompt_tokens, 500);
+});
+
+test("a harness that solved nothing has null solved-task KPIs, not zeros", () => {
+ const s = aggregate([call({})], [{ harness: "h", task_key: "t1", task: "t1", result: null, grade: { resolved: false } }]).h;
+ assert.equal(s.cost_per_solved_usd, null);
+ assert.equal(s.solved_cache_pct, null);
+ assert.equal(s.solved_task_wall_s_p50, null);
+});