Repository navigation
feat(benchmark)!: judge every arm with one pinned judge, and show what a passed trial costs - #1802
Conversation
A session's starting commit was durable, but its solution commit was not:
a Stop event records gitHead without dirty, in sources that expire
(dashboard log compaction, the usage report's push, a 30-day event
window). Building benchmark tasks from past sessions needs both.
- The Stop hook writes { sessionId, source, end: { commit, dirty }, at }
as `end` in the session's capture directory, through a temporary file
and a rename, so the last Stop wins and a sweep removes it with the
captures. A session with no capture gets none, and a Stop whose git
fails or passes its 2s cap leaves the previous record.
- SessionCaptures.list carries the record as `end`.
- describe of teamai-session-to-task reads the starting commit from the
session's earliest capture instead of dashboard events, so a session
resumed after log compaction still gets it.
Tests: session-captures.test.ts ("the end record a Stop writes beside the
captures": last Stop wins, dirty on modified tracked files, previous
record kept when git fails, none without a capture, swept with the
captures); session-to-task-describe.test.ts now seeds captures only.
vitest-affected: 124 files, 4577 passed.
A suite is best built from work people already finished, but turning
sessions into tasks one by one from inside each session does not scale.
- `teamai session list --finished --all --suite <dir>` lists the
sessions the suite could take a task from: a recorded end, a start and
end with no tracked file modified, two different commits the suite's
repo holds (fetched by SHA into the benchmark commit cache, as start
does), and no task of the suite from the same session or solution
commit. Each entry adds start, solution, files and lines; the answer
says how many sessions were left out and why. A learning contributed
from a session no longer leaves it out there.
- `--sizes "S=40,3 M=200,10 L=800,30"` adds size: the smallest of S, M
and L whose lines and files limits both fit, else XL. The limits live
in the workflow; the command only applies them.
- New default workflow teamai-sessions-to-tasks: candidates, an answer
step that picks per size up to count, then teamai-session-to-task for
each pick, one at a time.
- teamai-session-to-task tells the agent to read a session that is not
its own with teamai session show, takes check, successCriteria or both,
and gains team_session and author (empty by default; describe proposes
them empty for the calling session).
- The place entry's import allow-list in the workflow-boundaries rule
names the candidates module, which reads the commit cache.
Tests: finished-sessions.test.ts ("session list --finished --all
--suite": fields and no-end count, sizes, each left-out reason, the
replaced exclusion, refusals; command output and the --all refusal);
default-workflows.test.ts (the new workflow's steps and its sub-workflow
tree); describe, skills-discovery and status-list expectations for the
new inputs and default. vitest-affected: 192 files; the only other
failure, doctor-rules-delivery, passes on its own (80/80).
A suite could only take tasks from sessions on the machine that drafts them, so a teammate's finished fix never became a task. Push now records the commit a session started at and the one its last Stop ended on, in the archive meta and the session index. Archives pushed before carry no commits and read as such. `teamai session list --suite <dir>` without --finished weighs the sessions the team pushed for the suite's repository the same way as this machine's, and leaves out the ones archived without recorded commits. Each entry names the teamSession and author that `teamai session show <id> --team-session <name> [--author <member>]` takes to print the pushed transcript, redacted as a judge reads it. teamai-sessions-to-tasks lists both sources and passes a pushed pick's name and author to teamai-session-to-task, whose prompt reads the session through show --team-session. Tests cover the commits push writes to meta and index, old archives without them, the pushed listing, and show --team-session redaction and refusals.
…cord verdicts
A check task's trial was decided by the check step's raw result, while a
criteria task's trial was decided by its correctness label. Two channels
meant the record could not say who decided a trial, and a later judge or
pairing could not treat both kinds the same way.
Now only a trial's teamai:correctness:<task> label decides passed, failed
or unscored. error and not_run still come from the work's state.
- The trial check step stores the correctness label itself, decided by
the check (judge kind stage, decidedBy check), kept on this machine like
every label of an isolated run. A passing check gets the highest-scoring
label, a failing one the lowest. It prints { result, cause, label }:
cause says why the check could not run (now including prepare_failed,
when restoring protect or writing check.add failed, which no longer
fails the step), label is the stored label's version.
- Every task pins its correctness scorer in the plan, with the rubric's
labels and passing score. A check-only task lists it on no step, so no
judge runs for it.
- Each recorded trial carries verdicts: the label, its score, whether it
passed, and who decided it (the task's check, or the judge's rubric,
tool, model, effort and batching), plus failure.cause when its check
could not run. Scorers carry their labels and passing score.
- The plan and the record are now schemaVersion 2. A version 1 record
still parses and shows; the dashboard pools, and --fail-on-regression
compares, only runs whose records share a version. workflow resume
refuses a run whose plan has another version, naming
teamai benchmark run <suite>.
BREAKING CHANGE: teamai benchmark check prints { result, cause, label },
and benchmark plans and records are schemaVersion 2. A benchmark run
started before this release cannot resume after it.
Tested:
- Unit: the label on each check outcome (checkLabel), the record of a
check that passed, failed and could not run, a judge-decided verdict's
decider, the compiled bundle of a check-only task (no judge step, no
scorers on any prompt), a version 1 record read beside a version 2 one
on the dashboard, and regressionOf across versions.
- Real CLI (npm run build, npm run test:e2e): a check-only suite run
stores the check's label locally, outputs its version, records
result passed with a check decider, and launches no judge; workflow
resume of a version 1 plan refuses with benchmark_plan_outdated.
… model A judge preferred the tool the judged work ran in, so in a suite whose arms run different tools each arm's trials could be judged by a different tool. A pass-rate gap between arms could then come from the judge rather than the arm. benchmark start now pins, for each judged scorer, the judge every arm gets: the scorer's tool, else the suite's defaults.tool, and its model string. The pin goes in the plan's and the record's judges. Start refuses a scorer whose alias has no model for that tool (judge_model_unavailable), and one whose judge a record would publish (judge_unpublishable). It checks only the pinned tool on this machine. confined.json gains require, which excludes prefer. teamai score evidence writes the pinned tool there, so only a driver that offers it takes the judge; any other driver holds the step. When a skill driver gives that judge up, the trial's verdict is unscored with judge_tool_unavailable, and the results name the tool. Each judged verdict records asPlanned against the pin. A judge on another tool or model counts under Deviations; a judge whose tool reported no model counts under Not verified. When the arms vary the tool, the results also note a judge tool that is also an arm's tool. A correctness scorer is always judged in a call of its own, and the shipped teamai-benchmark workflow now batches the suite's other scorers. Tested with unit tests at each seam (confined candidates and hold, judge checks, plan judges, start refusals, batching, verdicts, table), each seen failing first or failing under a seeded mutation of the code it covers. Also run: the affected unit tests, the benchmark, score and confined E2E files, and a two-arm claude/codex suite with one criteria task. In that suite both arms' trials were judged by claude, and the record marked each as planned.
A benchmark told a judge the skill driver gave up from one that ran by comparing the cancelled group's message with the give-up text, and a judge held only for its model read the same way, as judge_tool_unavailable. The skill driver now passes each held step's missing reasons to giveUp. A step that misses confined cancels its continue_on_failure step with confined_unoffered; one that misses only its model keeps cancelled. TrialVerdicts branches on the code, so the message can be reworded. The code is a recorded failure, so a run record keeps it as it kept cancelled before. Tests: the D29 skill driver case now expects confined_unoffered, and the benchmark give-up case is a table: a confined hold leaves the trial judge_tool_unavailable with the results naming the tool, a model hold leaves it run_ended with no such note. Both failed before the change.
session list --suite repeated benchmark start's cache-then-fetch-by-SHA check. firstUnreachable now lives beside commitCacheOf, the cache it fills, and both call it: start and try with the member's checkout, the session candidates with the cache alone, as before. The candidates pass the solution first, so its fetch usually brings the start it descends from in one fetch, as the batched fetch did. Behaviour is unchanged: finished-sessions (which fetches from a bare origin and counts an unreachable session) and benchmark-plan (which refuses commit_unreachable) pass as they were.
…ther A task carried check or successCriteria, never both. A task whose test proves only part of the request, such as a login error that must name the wrong field and still reveal nothing about accounts, had to drop one half. - A task has check, successCriteria, or both. teamai pull and teamai review --branch refuse a task with neither. - The baseline runs for every task with a check. - On a task with both, a failing check writes the lowest-scoring label, decidedBy check, and no judge runs. A passing check writes no label, and the judge decides on the work as the prompt left it, without the protect paths the check restored or its check.add files. - teamai score plan, run with no named scorers as the benchmark's score step runs it, leaves out a scorer a stage already labelled for the subject's pass. A named scorer is never left out, and a judge's label never causes the skip, so teamai score --run ... --scorer still re-judges. - Start requires a judge tool only for a suite with a successCriteria task or suite scorers. A check-only suite still needs none. - The task and plan types hold the three combinations as a presence union, so a task with neither cannot be built. Docs: benchmarks guide (task keys with the login-copy example, Baselines, Turn a session into a task, Who decides a trial), the record's baseline and result in the workflow guide, and the benchmark check help, in English and Chinese. Tested: - Unit: the suite schema keeps both and refuses neither; the plan of a mixed task has its baseline, check step and correctness scorer; score plan's skip, one case per stage label, judge label and named scorer; the verdicts of a mixed task whose check failed and passed; a clone prompt's evidence leaves out what a later step in the clone wrote. - End to end on the built CLI: a mixed task whose check fails stores a stage label and launches no judge; one whose check passes is judged once, on a diff with the fix and without the check.add file; pull refuses a task with neither key; start refuses a mixed suite with no judge tool. - npm run typecheck, npm run lint, npm run build.
The regression gate compared two runs whenever their tasks and arms
matched, so a run judged by another model than the run before it read as a
drop in the agent. When a member's models/aliases.yaml mapped the judge
alias to claude-sonnet-5-5 instead of claude-opus-5-5, 8/9 against 4/9 made
--fail-on-regression exit 1.
One pure rule now decides whether two trials of one task and repetition
compare, and the first row that matches decides:
1. the task's sourceHash differs -> excluded, task changed
2. both decided by a judge whose rubric, tool, model,
effort or batching differs -> excluded, judge changed
3. anything else: both by the check, one by the check
and one by a judge, the same judge, or a side that
is error, not_run or unscored (not passed) -> compared
- --fail-on-regression takes the newest earlier succeeded run of the same
suite and record version with the same arms. The run-level filter on the
same tasks is gone: a changed task excludes only its own pairs.
- The text says, per arm, how many pairs it compared and how many it
excluded and why, as in "Arm claude: 0 comparable pairs against run rA;
9 excluded: their judge changed (claude claude-opus-5-5 -> claude
claude-sonnet-5-5)." An arm with no compared pair cannot drop. When no
arm has one, regression is no_comparable, naming the run it tried.
- Compare on the dashboard and the asset effect tables pair the arms of one
run with the same rule and show the pairs they left out. Two arms whose
every pair was excluded have no difference to show, so Compare lists no
comparison for them.
Docs: Fail on a regression and Asset effect in the benchmarks guide,
Benchmarks and Compare in the dashboard guide, and the
--fail-on-regression and benchmark report help, in English and Chinese.
Tested:
- Unit: the rule, one case per row (row 2 per facet, row 3 per kind of
pair); regressionOf for each row, with the per-arm text and the
no_comparable text naming the run; Compare and the asset effect tables
within one run for rows 2 and 3 (row 1 cannot occur within one run);
the dashboard's Compare and asset effect show the excluded pairs in
English and Chinese.
- End to end on the built CLI: --fail-on-regression prints each arm's
compared pairs before the drop and exits 1, and the no-run notice.
- npm run typecheck, npm run lint, npm run build.
…am replaces The rubric that decides every trial of a task with success criteria was hard-coded in plan.ts, so a team could neither reword it nor pick its judge's model, and the regression gate could not see it change. teamai now ships scorers/teamai-correctness.md, a default scorer with the variables task.prompt and task.successCriteria. Pull keeps a team file of that name when it reads only those and fills in to a scorer, and refuses it otherwise, as for teamai-routing and teamai-adoption. Start reads the rubric pull kept, else teamai's, and freezePlan and compileBundle fill it in per task (a check-only task gets an empty successCriteria). The filled definition's labels and passing score go into the plan's scorers, and its tool and model into the plan's judges, so a team file's model alias judges every arm. A new rubric is a new rubric hash, so pairs judged across the change are excluded as judge_changed. Tests: scorers-cache "keeps a team's scorers/teamai-correctness.md ...", "refuses a scorers/teamai-correctness.md that %s ...", "names the variables correctness offers ..."; benchmark-plan "benchmark plan correctness rubric" (teamai's rubric filled in, a team rubric with model: fast and a partial label pinned for every arm, and a pair across a rubric change excluded). Each failed before the change. npm run typecheck, npm run lint and the three touched test files pass.
A scorer that applies to a few tasks of a suite had to judge every trial of it, spending judge calls on tasks it does not apply to and diluting its pass rate with them. A task file may now list scorers, named as the suite's scorers are. Its trials are judged by the union of the suite's and the task's, each once (the compiled work step's scorers.names). A task's names are checked as the suite's are: pull warns and review --branch fails on a name with no valid scorers/<name>.md, naming the task file, and start refuses the suite. A name with ":" is refused, since no scorer file has one. The list is part of the task file, so it changes the task's sourceHash. Start pins a task's scorers and their judges as it pins the suite's, and requires a judge tool when any task lists one. Tests: benchmark-suite "keeps the scorers a task lists, each once ...", the ":" refusal row, and "names each scorer a task lists that this member receives no valid scorer of ..."; review-branch "fails a task that lists a scorer the branch does not have"; benchmark-bundle "judges a task's trials with the union of the suite's scorers and the task's ..."; benchmark-plan "benchmark plan scorers a task lists" (pin and judge, scorer_not_found, scoring_unavailable). Each failed before the change. npm run typecheck, npm run lint and the touched test files pass.
A suite's scorers were judged on every trial, but the results showed no number for them: a reader saw only the arm's pass rate, which the correctness scorer alone decides. The results now add a table with one row per arm and per scorer the suite or a task lists, never a correctness scorer, from the record's verdicts. Its pass rate and Wilson 95% interval count labelled verdicts only; a verdict with no label counts under Unscored, and a trial that did not run counts in neither, so a task's scorer counts only the trials it judged. Batched says yes, no or mixed, since a batched label is not the same instrument as the scorer judged alone on real sessions. The dashboard's run detail renders the table, with Chinese column names. These scorers still never change a trial's result or the gate. Tests: benchmark-table "benchmark pass rate per scorer" (rows, the labelled denominator and interval, a task's scorer and mixed batching, no and absent batch, no table without scorers). Each failed before the change. npm run typecheck, npm run lint and the table, plan, asset-effects and dashboard benchmark test files pass.
A team rubric with a partial label tells apart work that is nearly done from work that misses, but the pass rate counts both as failed, so two arms with the same pass rate looked the same. When a correctness scorer of the record has more than two labels, the arms table adds a Mean correctness score column: the mean score of each arm's labelled correctness verdicts, those a check wrote included, and the table's JSON carries it as correctnessScore with how many labels it used. An arm with none shows "-". With two labels the column is left out, since the mean would repeat the pass rate. The regression gate still reads only the pass rate. The dashboard names the column in Chinese. Tests: benchmark-table "benchmark mean correctness score" (each arm's mean with check-written labels counted, an unscored verdict left out and an arm with none shown "-", no column with two labels). The first two failed before the change. npm run typecheck, npm run lint and the table, plan, asset-effects and dashboard benchmark test files pass.
A benchmark run pins each scorer's judge model as written, an alias staying an alias, and counts a label whose judge ran another alias as a deviation. The local driver resolved a confined judge's alias and dropped it, so every label it wrote named only the resolved model and every judged trial counted as a deviation. A real two-arm run showed it: Deviations 3 of 3 on the claude arm, with the plan and the labels agreeing on the model. The local driver now reports the alias beside the model it resolved, as the skill driver already does, and `teamai score label` names the scorer's alias on the label when a driver's report of the judge leaves it out, so a third-party driver needs nothing new. Tests: workflow-confined-step "keeps the alias the step asked for beside the model it resolved to"; score-verbs "names on the label the model alias its scorer asked for". Both failed before the change on the missing alias.
OpenCode's run works in the directory PWD names, not in the process's cwd. A benchmark trial started from a member's checkout inherited that checkout's PWD, so the opencode arm edited the member's files instead of its trial clone, and every check then failed in the clone. A shell sets PWD to the directory it starts in; the prompt-step launch and runTool now do the same.
…fused A task's scorers already refused a name with ":", since no scorer file has one and the generated teamai:correctness:<task> must not be listed by hand. A suite's scorers still accepted it, and start then failed later with a less direct message. Both lists now parse through one scorer name schema with the same message. Proven by benchmark-suite.test.ts "reports a scorer name with ":", which no scorer file has at its suite file": red (the suite parsed), then green.
Every pass rate a judge decides, and a cheaper correctness model, rests on
the judge being right, and nothing measured it. A task with both a check and
success criteria gives ground truth: when its check fails, the work is not
done, so a judge that labels it passing is wrong.
The suite key calibration: { rate } (0 to 100, default 0) samples those
trials by a hash of the run id and the trial's step, so a resumed run
samples the same ones. teamai score subjects --calibration lists them with
their correctness scorer, and two new steps in teamai-benchmark.yaml label
each through teamai-score with store: false and the scorer named, so no
label is stored, no mark opens and the trial keeps the check's result. The
report reads the label and the judge's confined report from the run state,
records calibration: { label, passed, decider } on the trial, and prints a
Judge calibration table per judge with the false pass rate and its Wilson
interval. Calibration labels never decide a trial, never pair and never
reach the regression gate. The plan freezes the rate. The dashboard run
detail renders the new table.
Tested:
- benchmark-calibration.test.ts: deterministic sampling at 0, 20 and 100
percent; score subjects --calibration lists only a mixed task's failed
check, with and without --step, none without a rate, and its refusals;
the calibrate step plans the named correctness scorer past the check's
skip, the trial stays failed with only the check's verdict, and the record
carries the judge's label and decider; a failed judge records nothing.
- benchmark-table.test.ts: the table's rows and Wilson intervals per judge,
and no table without calibration.
- benchmark-suite.test.ts: the rate kept, and refused out of range or with
an unknown key.
- e2e benchmark-judges.test.ts: a real run with rate 100 launches the judge
twice, stores one label for the trial, opens nothing, keeps the trial
failed and prints the table; with the two steps removed from the workflow
it fails.
- vitest-affected since the previous slice: 4704 passed; the one failure is
an uninstall case that needs a passwd entry this machine lacks.
- npm run typecheck, npm run lint, node scripts/check-docs.mjs.
… defaults arm A run's results showed each arm's cost total, but not what a passed trial cost, and nothing said whether a cheaper arm gave up anything for it. The dashboard's Compare already showed Cost per passed trial with its own inline formula. The usage table gains Cost per passed trial, the cost total over the arm's passed trials: "—" with none passed or no total in one unit, and marked incomplete when the total is. usageOf computes it, so the dashboard's Compare now reads the same value instead of its own formula. Each other arm is read against the defaults arm, which the plan and the record now name, else the first arm: the paired difference of the pass rates with its 95% interval, over the pairs compareTrials compares, "not separated" when it crosses zero, and the pairs left out. An arm that costs less per passed trial at a pass rate at least as high dominates; the reverse is dominated. An incomplete or unknown cost marks neither. Neither the exit code nor the regression gate reads it. Tested: - benchmark-table.test.ts, "benchmark cost per passed trial": the column with "—" and incomplete, dominance both ways beside the paired difference, no dominance on an incomplete or unknown cost, a separated difference, excluded pairs named, no Against column for one arm, and the defaults arm frozen into the record. Each test was seen failing first. - Usage header expectations in benchmark-table, dashboard-workflow-runs and benchmark-history follow the new column; the dashboard Compare test for cost per passed trial passes on the shared value. - The guide's examples were checked against real formatBenchmarkTable output. - vitest-affected since the previous slice: 4080 passed; the two usage-header expectations then updated pass, and the remaining failure is an uninstall case that needs a passwd entry this machine lacks. - npm run typecheck, npm run lint, node scripts/check-docs.mjs.
A team learned what a benchmark run cost only after it ran. The newest earlier run of the same suite already records what each arm's trials and their judging cost, so a run can say what it will cost before it starts. Start now estimates the run when it plans the suite: from the newest earlier run of the suite that succeeded with this record version, on this machine or on teamai-reports as the checkout last read it, each arm's trials times the median cost of one of its trials there, matched by armKey, and the judged trials times the median cost of judging one, with the quartiles as the range. An arm with no stated cost, or not in that run, is unknown and the total says incomplete. Judge calls are counted the way score plan groups them: the grouping key moves out of score-plan into scorers/batch.ts as judgeCallKey, and the estimate reuses it, plus the calibration calls the suite's rate expects. teamai benchmark run prints the estimate before the run starts, or that no earlier run exists. The plan and the record keep it, so the report puts it in table.estimate and the usage table shows Estimated beside Cost. Reading earlier runs never refuses a plan, and the estimate never changes the exit code. Tested: - benchmark-estimate.test.ts: the estimate from the newest succeeded run of the suite, with quartiles and judged-trial cost, and its printed lines; unknown arms, another unit left out, an incomplete total; the no-earlier-run line; judge calls with and without batching. Seen failing first. - benchmark-table.test.ts: the Estimated column beside Cost, and none without an earlier run. Seen failing first. - e2e benchmark-local.test.ts: two real runs of one suite; the first says no earlier run, the second prints the estimate from the first and shows it beside the cost at the end. - The score-plan grouping is unchanged: scorers-batch, score-verbs, benchmark-calibration, benchmark-plan and score-drain pass. - vitest-affected since the previous slice, npm run typecheck, npm run lint, node scripts/check-docs.mjs.
The verdicts and the calibrations of a trial looked its labels up by a subject string built by hand, a second spelling of the one Subject.format owns.
formatDifference signed a zero as +0 pp, though its own comment and the cost-per-passed-trial example say 0 pp.
…arks page A team lead opens the Benchmarks page to choose an arm. The run's table already says, per arm, what one passed trial cost, its mean correctness score under a graded rubric, and whether it dominates the defaults arm, but the page showed none of it. Each arm bar, pooled over the runs of the current suite version, and each arm of the last run now shows its cost per passed trial, its mean correctness score when a correctness rubric with more than two labels judged it, and its standing against the defaults arm (else the first arm): dominates, dominated or neither, then the paired difference with its 95% interval, and the pairs left out. Pairs follow the same rules as Compare, through the pairing Compare already used, now shared. dominanceOf in the results table is the one definition of dominance: it now also says neither when both costs compare, which the CLI's Against column still leaves out, so its text and JSON are unchanged. Tested through BenchmarkHistory.of (against the defaults arm, the first arm, neither, the newest run alone, the pooled mean over graded runs) and the rendered page (arm bars and last run). Expected intervals come from an independent Newcombe script.
Before acting on a pass rate, a team lead needs to know which judge decided it and whether that was the judge the run pinned. Each run records this (the plan's judges, and each verdict's decider and asPlanned), but the page showed none of it. A Judges panel under the arm bars lists each scorer over the runs of the current suite version: the judge the runs pinned for every arm (marked changed when the runs pinned more than one), how many labels the check decided and how many each judge did, by tool, model and effort, and how many were deviations, not verified or unscored. Every task's correctness scorer fills in one rubric, so they share one row, teamai:correctness. It warns when a judge tool is also an arm's tool, through selfJudgedOf, the results table's own rule, now exported. Runs whose records keep no verdicts show no panel. Tested through BenchmarkHistory.of (scorers, counts, deviations, the self-judge warning) and the rendered page (rows, warning, no panel for schemaVersion 1 records).
A pass rate a judge decides is only as good as the judge. The run's table already prints Judge calibration for one run; the Benchmarks page had nothing, so a cheap judge that passes failing work went unnoticed across runs. The Arms view now pools each correctness judge's calibration over the runs of the current suite version, with the false pass rate and its Wilson 95% interval, through the table's own calibrationOf. When an interval clears 0 the panel moves above the arms with an amber border and names the judge. When no judge was calibrated it says so plainly, and how many trials failed their check, with the calibration setting to add to suite.yaml. A suite with no task that has both a check and success criteria, or records without verdicts, shows no panel. The record keeps neither the suite's calibration rate nor whether a task has success criteria, so the page infers a mixed task from its baseline and its pinned correctness judge, and cannot tell a rate of 0 from a rate that sampled nothing; the empty state reads true for both. Tested through BenchmarkHistory (pooled rows and intervals, the empty counts) and the rendered page (alert placement, rows, empty states, zh-CN), each empty-state branch confirmed red by mutating it.
…ks page The run's table prints a row per arm for every suite and task scorer, but only for one run. Across runs the page showed tasks by arm and nothing of the scorers a team adds, so a review scorer that one arm keeps failing went unseen. A Scorers by arm heatmap, beside Tasks by arm, pools each scorer's labels per current arm over the runs of the current suite version. It sums each run's own table rows by arm and recomputes the Wilson 95% interval, which the cell's title shows with how many trials the scorer left unscored. The correctness scorers stay out, as they do in the run's table. Records without verdicts show no panel. Tested through BenchmarkHistory (pooled counts and intervals) and the rendered page (cells, titles, placement, zh-CN, no panel on a record without verdicts), the last two confirmed red by mutation.
…marks page Start estimates what a run will cost from an earlier run and the record keeps it, but the Benchmarks page never showed it, so nobody could tell whether the estimate a run printed held. When a run in the window has an estimate from an earlier run, the Runs table adds a Cost column: what the run's agents and judges stated they cost, beside the estimated range to three significant digits as the run's table prints it. A run above the range is tagged; one below it is tagged only when every part stated its cost, since a partial total may still be within the range. An incomplete estimate, or one in another unit, is never compared. The agents' part reuses the usage table's definition: usageOf now takes it from agentCostsOf, and costTotal is exported for the sum. The CLI's output does not change. Tested through BenchmarkHistory (within, above, below, partial costs, incomplete and absent estimates) and the rendered page (the cell, zh-CN, no column without an estimate), the last two confirmed red by mutation.
Below 760 px the card tables print each cell under its own head, taken from the cell's data-label. A cell built without one would show a bare number on a phone. The test checks that each row of the Judges and Judge calibration tables carries every column's head, in order; removing the heads from the calibration rows turns it red.
…nd costs The Benchmarks section now answers the questions the new panels answer, with numbers from the guide's own examples: sonnet against opus on migrate-db, the haiku judge that passes 3 of 10 failing trials, the security-review cell, and a run that cost more than its 41–58 USD estimate. The counting notes say how the standing, the mean correctness score and the cost column are counted, and that records from before judges and verdicts were kept show nothing in the new panels. English and Chinese pages change together.
… a run's estimate .scorer-hint set the muted colour after .amber, so every amber warning on the Benchmarks page rendered grey: the judge that is also an arm's tool, the judge that passes failing work, and the tasks a run did not measure. A run's estimate also overflowed its cell on a narrow screen; it now wraps.
Resolved: All three earlier findings are fixed: unstated costs for retained judging/calibration results remain unknown; batched costs are matched by launch; pushed-session reads carry the suite’s repository context. Testing: The description documents sufficient testing, including a built, representative real-CLI run on I did not run, build, or install PR code. |
Thanks, all four items read right at dadab09. I merged main into the branch (92c99ad). The merge was clean and only brought in #1798 and #1799, so I can approve once CI passes there. One thing first, from the newest CI review. A judge launch that ran but left no verdict still costs money, and
In both cases the total can read |
…st, not only the labels kept A calibration judge whose label was refused, and the correctness judge of a task whose check could not run, spent money that no kept verdict carried, so the trial's cost left it out and a run could read as complete and below its estimate. A trial's scoringCost now sums the judge step of every teamai-score group that ran for it, so a batched launch also counts once without matching labels to launches.
|
Fixed in c6ff12a. A trial's
A launch that stated no cost leaves the cost incomplete. Two E2E tests failed first, with |
Resolved: The first three findings are fixed. The later discarded-label finding is fixed for stated costs, but its unstated-cost case remains above. Testing: The description documents sufficient testing, including a built, representative real-CLI run on I did not run, build, or install PR code. |
If that launch stated no cost, nothing marks the total unknown, so it can still read One way to close it is for |
…ges ran and stated none
A trial whose judge launches stated no cost recorded no scoringCost, the same as a trial no judge launched for, so a run's spend left the launch out and could read as complete and below its estimate. scoringCost is now { complete: false } then, and the run's spend reads it instead of guessing from the verdicts.
|
Fixed in 25f3639. A trial whose judge launches ran and stated no cost now records The E2E with a One earlier test changed on purpose: "labels a trial whose judge stated no usage" asserted that no scoring cost was recorded, which was this gap. It now expects |
|
I fixed it rather than leaving it as a known limit, in 25f3639, with the incomplete cost you suggested. When judge launches of a trial ran and none stated a cost,
Neither case is a known limit now. The description's remaining note on that path is only that the judge still launches when the check could not run, and its cost is counted. Every |
No workflow ran for the previous push.
Resolved: All earlier findings are fixed, including unstated costs from discarded judging/calibration results, launch-specific batch accounting, and pushed-session repository context. Testing: The description documents sufficient testing, including a built, representative real-CLI run. The older build commit and deferred provider/agent coverage are not blocking. I did not run, build, or install PR code. |
Resolved: Findings preceding the latest review pass are fixed, including discarded launches with unstated costs, launch-specific cost accounting, and pushed-session repository context. Testing: The description documents sufficient testing, including a built, representative real-CLI run. The older build commit and provider/agent coverage deferred to CI are not blocking. I only read the specified diff; I did not run, build, or install PR code. |
… too The estimate multiplies judged trials and calibration calls by the median cost of one, but sampled only trials' scoringCost. A run whose calibration judges cost more than its trial judges was estimated low. calibration.scoringCost is now a sample too.
…left out Two arms whose every pair another judge or a changed task excluded had no comparison, so Compare said nothing about them. The suite view now lists them in uncompared, with the reasons, and Compare shows them under Arms with no comparable pair.
|
Both fixed, each with a test that failed first.
Lint, the type check and the build pass at 2a7771f. Unit tests for benchmark, score, scorers and dashboard pass, 1533/1533, and so does every benchmark E2E file, 172/172. |
Resolved: All previously raised findings are fixed, including calibration costs in the estimate’s basis and comparisons whose every pair is excluded. Testing: The description documents sufficient testing, including a built, representative real-CLI run. The older build commit and provider/agent coverage deferred to CI are not blocking. I only read the specified diff; I did not run, build, or install PR code. |
…'s judging cost
A judge step the run cancelled once it had a lease spent something, but judgeLaunches kept only succeeded and failed steps, so a trial whose only judge was cancelled recorded no scoringCost and the run's spend could read complete. A cancelled judge that was ever leased now counts, as { complete: false } when it stated no cost; one cancelled before it started still counts nothing.
…ed pair's judge Compare named an excluded pair's judges by tool, model and effort only, so a pair left out for another rubric or batching read as the same judge on both sides. It now names each facet that differs, as the CLI's formatExcluded does.
|
Both fixed, each with a test that failed first.
Lint, the type check and the build pass at 5cdf7bc. Unit tests for benchmark, score, scorers and dashboard pass, 1535/1535, and so does every benchmark E2E file, 172/172. |
|
I couldn’t review the specified diff: head commit Testing: The supplied PR description documents sufficient testing, including a built, representative real-CLI run. The older build commit and coverage deferred to CI are not blocking. Please provide the diff or make the head commit available locally. I did not run, build, or install PR code. |
Resolved: All earlier findings are fixed, including cancelled judge costs and rubric/batching-only exclusion explanations. Testing: The description documents sufficient testing, including a built, representative real-CLI run. The older build commit and provider/agent coverage deferred to CI are not blocking. I only read the specified diff and trusted base review rules; I did not run, build, or install PR code. |
…e's rates pool The pooled rates count only runs of the newest whole run's suite files and record version, but Runs and Tasks per run picked current runs by suite files alone, so a version 1 record of unchanged files read current and got an empty task column. Each run row now carries isCurrent from the same test, and both panels read it.
|
Fixed in 6885ba7, with a test that failed first. Each run row now carries Lint, the type check and the build pass at 6885ba7. Unit tests for benchmark, score, scorers and dashboard pass, 1536/1536, and so does every benchmark E2E file, 172/172. |
|
No new findings I’m confident are real in the current diff. Resolved: All earlier findings are fixed, including schema-aware dashboard currentness: run rows carry Testing: The PR description documents sufficient testing, including a built, representative real-CLI run. The older build commit and provider/agent coverage deferred to CI are not blocking. I only read the specified diff and trusted base review rules; I did not run, build, or install PR code. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Approving at 6885ba7. Everything from my last review is resolved:
- E2E lists.
5089d1dbaddsteamai-sessions-to-tasksto the three delivered-skill lists that failed. - Unstated judge cost. A judge that decided a verdict, or a calibration, without a complete cost now goes into
spendOfas unknown (5646e2c0). The total readsincompleteand is never flagged below the estimate. - Batched cost. Two batches on the same model no longer borrow each other's cost (first
926aed7b, now by counting each launch once inc6ff12af). - Pushed session for a suite.
session show --team-session ... --suite <dir>reads the session for the suite's repository, andteamai-session-to-taskpasses it (cd0fed6b). Without--team-session,--suiteis refused like--author, andcommands.mdis regenerated. - Changed defaults. The version-2 breaking entry now says why a suite's pass rates can move, naming batched suite scorers and the diff-based correctness rubric (
dadab091).
[P3 nit] In workflows/teamai-session-to-task.yaml, --suite {{ inputs.suite }} is unquoted, while the two values before it are quoted. A suite path with a space would split.
The last CI review item is fixed too. c6ff12af sums a trial's judging cost from every judge launch that ran for it, whether its label was kept or not. That covers a calibration whose label was refused and a correctness judge left out because the check could not run. A batched launch counts once. A launch that stated no cost leaves the total incomplete, so it never reads below the estimate.
25f36398 closes the last gap: a trial whose judge launches ran and stated no cost records scoringCost: { complete: false }, and spendOf reads only that field. The earlier E2E that asserted no scoring cost for such a trial pinned the gap itself, so changing it to { complete: false } is right. Version 2 records are new in this PR, so no published record has the old shape.
The two newest CI review items are fixed too: 0793a48e prices the judging estimate from calibration costs as well, and 2a7771f4 lists, on Compare, the arms whose every trial pair was left out, with the reasons, in both languages.
The two items from the last CI review are fixed as well. 72236f16 counts a judge that was cancelled after it was leased, so a cancelled run's spend reads incomplete rather than complete. 5cdf7bc3 makes Compare name each judge facet that differs (effort, batching, rubric), the same way the CLI's formatExcluded does, in both languages.
The newest CI review item is fixed too. 6885ba7c gives each run row the same isCurrent the pooled rates use (suite files plus record version), so a version-1 run is no longer tagged current, and Tasks per run leaves it out.
|
@SaulMoro ready for another look at 6885ba7. The case you raised is closed in 25f3639: a trial whose judge launches stated no cost records |
Summary
A benchmark compared judges, not arms: each arm's trials were judged by whatever judge its driver offered, a task was decided by a check or a judge but never both, a run said nothing about what it cost per passed trial, and a suite had to be written by hand. This PR implements #1793: one pinned judge per scorer for every arm, tasks decided by a check, success criteria or both, results that pair only trials one decider judged, cost per passed trial with dominance, a calibration of each correctness judge against the check, a cost estimate before a run, and suites drafted from past sessions.
A suite and three tasks, one of each kind, as the real-CLI run below used them:
What a run now prints, from the real run on this head (
ra33b98bcd5b1c959):The record says who decided each verdict, and whether that is the judge the plan pinned (
login-copy, same run):Slices and commits (each commit type checks on its own):
The dashboard's Benchmarks page shows the same facts, from the real run's data: who judged each scorer, each judge's calibration, each arm's pass rate per scorer, each arm against the defaults arm, and a run's cost beside its estimate (
below the estimate, orincompletewhen a tool stated no cost). No width overflows horizontally.Compare names two arms whose every trial pair was left out, instead of saying nothing about them. This record is a copy of the real run's, cut to
token-docs, with opencode's correctness judge set to reportclaude-sonnet-5-5, so each pair's judges differ:Type of Change
Breaking, both in the CHANGELOG:
teamai benchmark runrefuses a suite whose judge cannot run here (scoring_unavailable,judge_model_unavailable) before any trial runs, and refuses a scorer name with:in a suite as in a task.benchmark_plan_outdated); version 1 records still show, but--fail-on-regressionand the dashboard's pooled rates compare only runs of one version. A suite's pass rates can move with the upgrade too:teamai-benchmarknow judges a trial's suite scorers that share a judge tool, model and stages in one batched call, and the defaultteamai-correctnessrubric judges success criteria from the task and the diff, not the transcript.Bug fixes the real run found: a tool teamai starts gets
PWDset to its directory (OpenCode works inPWD, so an OpenCode trial edited the member's checkout instead of its clone), and a confined judge's label keeps the model alias its scorer asked for (without it every judged verdict read as a deviation).Test Plan
npx tsc --noEmitpasses, on every commit of the branchnpm run lintpasses (oxlint type-aware, doc checks)npx vitest runtoo, but for the machine failures belowTests that went red first, then passed:
Real CLI, built from
abe99d2ec, on macOS with claude and opencode. The team repo andacme/auth-serviceare local bare repos reached throughurl.insteadOf; the suite and tasks are the ones in the Summary, with the team's ownscorers/teamai-correctness.md(labelscorrect1,partial0.5,incorrect0,model: fast). Four runs; run 1 had no earlier run to estimate from:Sessions to tasks, on an earlier build of this branch, with two real
claude -psessions in the member's checkout, each ending in a commit (--suiteonsession showcame after; its read is covered bysession-push.test.ts):Not checked here:
Failed to synchronize managed preferences), left to CI.claude --settingswith this build's hooks; the member's own hooks call the published teamai.gitlabandgithubproviders: left to CI.Related Issues
Closes #1793. The judge-pinning exception to #1717's "a scorer's
tool:only reorders" is described there in a comment.Notes for Reviewers
Decisions:
teamai-benchmark.yamlpassesbatch: true: scorers that share a judge tool, model and stages share one call per trial; a correctness scorer is always judged alone.teamai-sessions-to-taskslists sessions of the last 30 days (--within 30d), as long as Claude Code keeps a transcript by default; a team widens it in its copy of the workflow.Beyond the issue's list, in this PR on purpose:
PWDand alias fixes: without them the real run could not pass.scorersrefuses:as a task's does.Known limits:
errorand unscored, as the guide's table says, and the judge's cost is counted in the trial's. Skipping the launch needsscore planto read the benchmark check, which widens the scorers-to-benchmark coupling.session list --suitewithout a left-out count. A missing or empty transcript never reaches the listing.