Skip to content

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

chore: files changed bench/harnesses/report.test.mjs

Steven Enamakel506194566301
diff --git a/bench/harnesses/report.test.mjs b/bench/harnesses/report.test.mjs
index 2fa04d4248..a82f1d645f 100644
--- a/bench/harnesses/report.test.mjs
+++ b/bench/harnesses/report.test.mjs
@@ -116,3 +116,17 @@ test("rankRow marks best and worst per direction, skips ties and single values",
assert.deepEqual(rankRow([1, 1, 9], "low"), ["best", "best", "worst"]);
assert.deepEqual(rankRow([1, 2], null), [null, null]);
});
+
+import { mainRequest } from "./report.mjs";
+
+test("mainRequest skips a tool-less side request and returns the call with the largest static prompt", () => {
+ const calls = [
+ { task: "t", seq: 0, system_prompt_tokens: 500, tool_schema_tokens: 0 }, // e.g. a title generator
+ { task: "t", seq: 1, system_prompt_tokens: 2400, tool_schema_tokens: 3000 },
+ { task: "t", seq: 2, system_prompt_tokens: 2400, tool_schema_tokens: 3000 },
+ { task: "other", seq: 3, system_prompt_tokens: 9999, tool_schema_tokens: 9999 },
+ { task: "t", seq: 4 }, // unsized records (older runs) are ignored
+ ];
+ assert.equal(mainRequest(calls, "t").seq, 1);
+ assert.equal(mainRequest(calls, "missing"), null);
+});