Repository navigation
fix(benchmark): keep an arm's recall when a record is read back - #1740
Conversation
`Tencent#1728` gave an arm `recall: true` and the run wrote it onto the record's arms, which are the plan's arms. `BenchmarkRecordSchema.arms` had no `recall`, and a record is read back through that schema, so zod dropped it: the file on disk said an arm ran with recall and every reader saw an arm that never had. The results gain a Recall column (`on`/`off`) once any arm runs with it, the shape the Role column already has, and the guides say the record keeps it. Tencent#1564 asks the run record to show recall was on; this is that field. Co-Authored-By: Claude Code <[email protected]>
|
No findings in the specified PR diff. The PR description satisfies the testing requirement: it records a build followed by a passing representative real-CLI E2E run, plus unit tests and lint/type checks. Review was read-only; I did not run, build, or install anything from the PR. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
@Walternater @jeff-r2026 This reviews da434312. BenchmarkRecordSchema.arms now keeps recall (src/benchmark/result.ts:74). A record written by the CLI already has that field on main; only this head still has it after the schema and the dashboard read. The dashboard then shows Recall as on or off. @jeff-r2026 your call on this one: the record schema readers already parse gains a field.
No new flag, default, or exit code. A boolean or a missing recall still parses. A non-boolean value such as "yes" now fails the whole record, where main stripped it and kept the record. The CLI only writes a boolean or omits the key.
What we ran: benchmark run on this head, on the merge-base 603a0aa, and on main df06b5a0. All three write recall: true and exit 0. Parsed with this head's schema, with-recall.recall stays true and the dashboard table includes Recall. Parsed with main's schema, the field is gone and the table has no Recall column.
The CI review (#1740 (comment)) reports no findings and accepts the built-CLI e2e. We agree there is no defect in the diff. That e2e reads benchmark.json as JSON, which already contains recall on main. The strip shows up only after the schema read, which is the run above. CI run 42038692511 is green at this head.
[P3 nit] The new Recall header has no Chinese dashboard string, so a Chinese dashboard shows the English word. The cells stay on and off.
#1564 still owes the measurement runs, the per-arm recall index, and the table on #1552. This change is only the "the run record shows it" half. #1728 remains the write half.
jeff-r2026
left a comment
There was a problem hiding this comment.
Approved: verified on latest main 65b31b9 (tsc, build, 893 related unit tests, benchmark-recall E2E all pass). SaulMoro leaves the record-schema field decision to jeff-r2026; accepted as low risk (CLI only writes a boolean or omits recall).
Tencent#1740 added the column; SaulMoro's review left it as a [P3 nit]: the header has no dashboardMessages entry, so a Chinese dashboard shows "Recall" in English where the other columns of that table are translated. Co-Authored-By: Claude Sonnet 5 <[email protected]>
#1740 added the column; SaulMoro's review left it as a [P3 nit]: the header has no dashboardMessages entry, so a Chinese dashboard shows "Recall" in English where the other columns of that table are translated. Co-authored-by: Claude Sonnet 5 <[email protected]>
…sue in its test SaulMoro's review of Tencent#1759 asked for both: the Bug Fixes line recent fixes carry, and the test comment cited Tencent#1740, an unrelated benchmark PR. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Problem
#1728 gave a benchmark arm
recall: true, and the run wrote it into the record:armson the record are the plan's arms, and a planned arm carriesrecall. ButBenchmarkRecordSchema.armshas norecall, and a record is read back through that schema —dashboard/benchmarks.ts,dashboard/workflow-runs.ts. Zod strips what the schema does not name, so every reader saw an arm that never had recall, while the file on disk said it did.That matters for #1564: its first acceptance item is "Both arms run with recall enabled, and the run record shows it". A run that measured recall and one that did not were indistinguishable through every reader, including the dashboard that compares runs.
Change
BenchmarkRecordSchema.armsgainsrecall, so a written record reads back as written.ArmResultscarries it, and the results gain aRecallcolumn (on/off) once any arm runs with it — the same shape theRolecolumn has, and absent for suites that never set it.BenchmarkRecord's arms areplan.arms, so the write path needed no change; only the read side did.Tests
New, in
benchmark-table.test.ts:Recallcolumn names each armon/off, and an arm without it readsoff;Recallcolumn when no arm runs with recall;recallparses back equal to what was written.Each was checked to fail without the change it covers:
- "recall": true— the field is strippedRecallcolumnReal CLI (
npm run test:e2e -- src/__tests__/e2e/benchmark-recall.test.ts,npm run buildfirst), extending the recall e2e #1728 added:It now also asserts the written record's arms are
[{ name: 'with-recall', recall: true }, { name: 'baseline', recall: undefined }], and that the report the run prints carries| Arm | Tool | Model (source) | Recall | Planned |withwith-recall … onandbaseline … off.Unit tests:
benchmark-table,benchmark-history,benchmark-suite,dashboard-benchmarks-view— 178 passed.npm run lint,node scripts/check-docs.mjsandtsc --noEmitpass.The full suite has 26 failures in 8 files (
gitlab-*,git-discovery,workflow-pr-providers,dry-run-load-path,env-exec,workflow-commands); none of them reads a benchmark record.Limitations
Recallcolumn appears only where the arms table already is; the compare-by chart does not group arms by recall. Recall is a measurement's control in the suites that use it (docs/guide/benchmarks.md), so two arms that differ only in recall cannot appear in one suite —ARM_DIMENSIONSstays as it is.recallin the file but no reader can see it; they were written by feat(benchmark): give an arm a clone that deploys the team's recall #1728, which merged an hour ago.Fixes the first acceptance item of #1564; the rest (the run record reporting each arm's recall index commit) is untouched.