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 format and report harnesses

Steven Enamakel873a8bb87b43
diff --git a/bench/harnesses/format.mjs b/bench/harnesses/format.mjs
index 5dff424ff7..73339c83b4 100644
--- a/bench/harnesses/format.mjs
+++ b/bench/harnesses/format.mjs
@@ -51,3 +51,13 @@ export function usd(v) {
}
export const pct = (v, d = 1) => (has(v) ? `${grouped(Number(v), d)}%` : NONE);
+
+// OpenHuman is the harness under test, so it always leads; the rest follow the lineup order
+// (the same as the charts), and anything unknown goes last, alphabetically.
+const LINEUP = ["openhuman", "claude-code", "codex", "opencode", "openclaw", "hermes", "deepseek-harness", "deepseek-harness-minimal"];
+const slot = (name) => (LINEUP.includes(name) ? LINEUP.indexOf(name) : LINEUP.length);
+
+/** Sort harness names (or objects, with `key`) into display order. Does not mutate. */
+export function orderHarnesses(items, key = (x) => x) {
+ return [...items].sort((a, b) => slot(key(a)) - slot(key(b)) || String(key(a)).localeCompare(String(key(b))));
+}
diff --git a/bench/harnesses/format.test.mjs b/bench/harnesses/format.test.mjs
index 9988ce12c1..d581d3f73b 100644
--- a/bench/harnesses/format.test.mjs
+++ b/bench/harnesses/format.test.mjs
@@ -33,3 +33,13 @@ test("usd and pct", () => {
assert.equal(usd(1.5), "$1.50");
assert.equal(pct(97.31), "97.3%");
});
+
+import { orderHarnesses } from "./format.mjs";
+
+test("orderHarnesses puts openhuman first, then the lineup, unknowns last", () => {
+ assert.deepEqual(
+ orderHarnesses(["hermes", "zeta", "codex", "openhuman", "claude-code", "alpha"]),
+ ["openhuman", "claude-code", "codex", "hermes", "alpha", "zeta"],
+ );
+ assert.deepEqual(orderHarnesses([{ h: "codex" }, { h: "openhuman" }], (x) => x.h).map((x) => x.h), ["openhuman", "codex"]);
+});
diff --git a/bench/harnesses/report.mjs b/bench/harnesses/report.mjs
index 0f99fefee4..5d7a38dba2 100644
--- a/bench/harnesses/report.mjs
+++ b/bench/harnesses/report.mjs
@@ -140,7 +140,7 @@ export function aggregate(meter, tasks) {
return out;
}
-import { count, mem, ms, pct, secs, usd } from "./format.mjs";
+import { count, mem, ms, orderHarnesses, pct, secs, usd } from "./format.mjs";
const f = (v, d = 0) => (v === null || v === undefined ? "-" : Number(v).toFixed(d));
const money = (v) => (v === null || v === undefined ? "-" : usd(v));
@@ -164,7 +164,7 @@ export function rankRow(values, better) {
const rate = (num, den) => (den ? num / den : null);
export function toMarkdown(meta, summary) {
- const names = Object.keys(summary);
+ const names = orderHarnesses(Object.keys(summary));
// [label, display(s), raw(s) used for ranking, better: "low" | "high" | null]
const rows = [
["resolved (SWE) / checks passed", (s) => (s.swe_resolved === null ? `${s.check_passed}/${s.tasks} checks` : `${s.swe_resolved}/${s.swe_graded} resolved`), (s) => (s.swe_resolved === null ? rate(s.check_passed, s.tasks) : rate(s.swe_resolved, s.swe_graded)), "high"],
@@ -266,7 +266,8 @@ function main() {
return { ...row, result: read("result.json"), grade: grades?.[row.task] ?? null };
});
- const summary = aggregate(meter, tasks);
+ const aggregated = aggregate(meter, tasks);
+ const summary = Object.fromEntries(orderHarnesses(Object.keys(aggregated)).map((n) => [n, aggregated[n]]));
const meta = {
run_id: runId,
suite: [...new Set(index.map((r) => r.suite))].join(","),
diff --git a/bench/harnesses/viewer/server.mjs b/bench/harnesses/viewer/server.mjs
index ed7e19fa0b..e3f52be682 100644
--- a/bench/harnesses/viewer/server.mjs
+++ b/bench/harnesses/viewer/server.mjs
@@ -14,6 +14,7 @@ import http from "node:http";
import path from "node:path";
import readline from "node:readline";
import { fileURLToPath } from "node:url";
+import { orderHarnesses } from "../format.mjs";
import { toMarkdown } from "./transcript.mjs";
const here = path.dirname(fileURLToPath(import.meta.url));
@@ -113,7 +114,7 @@ const routes = [
[/^\/api\/runs\/([^/]+)$/, async ([run]) => {
seg(run);
const summaryMd = path.join(RESULTS, run, "summary.md");
- const harnesses = aggregate(await meterRecords(run));
+ const harnesses = orderHarnesses(aggregate(await meterRecords(run)), (h) => h.harness);
// The system prompt the first call of each harness sent, from the captures.
for (const h of harnesses) {
const tasks = dirs(capDir(run, h.harness));