fix(evaluation): canonicalize Unicode argument keys (#980)

This commit is contained in:
morluto
2026-10-07 23:19:49 +08:00
committed by GitHub
parent 98b2b027af
commit 0a4caf4a0a
4 changed files with 58 additions and 7 deletions
@@ -100,6 +100,29 @@ describe("Codex agent release evaluation", () => {
.repeatedCallCount,
).toBe(1);
});
it("counts identical arguments with reversed Unicode key insertion order", () => {
const call = (id: string, arguments_: Record<string, number>) => ({
type: "item.completed",
item: {
id,
type: "mcp_tool_call",
server: "rea",
tool: "inspect_artifact",
arguments: arguments_,
},
});
expect(
evaluateCodexEvents(
[
call("item-1", { "e\u0301": 1, "\u00e9": 2 }),
call("item-2", { "\u00e9": 2, "e\u0301": 1 }),
],
"inspect_artifact",
).repeatedCallCount,
).toBe(1);
});
});
describe("Codex agent completion evaluation", () => {