Skip to content

feat(benchmark)!: judge every arm with one pinned judge, and show what a passed trial costs - #1802

Merged
SaulMoro merged 50 commits into
Tencent:mainfrom
hz89Dev:feat/1793-benchmark-judges
Nov 9, 2026
Merged

SaulMoro merged 50 commits into
Tencent:mainfrom
hz89Dev:feat/1793-benchmark-judges

Conversation

@hz89Dev

@hz89Dev hz89Dev commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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:

# benchmarks/fix-auth/suite.yaml
defaults: { tool: claude }          # judges every scorer that names no tool
arms: [{ name: claude }, { name: opencode, tool: opencode }]
scorers: [review-quality]
calibration: { rate: 100 }          # the correctness judge also labels this % of failed-check trials, storing nothing

# tasks/expired-token.yaml          -> decided by its check, no judge launched
check: { run: node --test test/token.test.js, protect: ['test/**', package.json] }

# tasks/login-copy.yaml             -> a failing check decides; a passing one leaves the trial to the judge
check: { run: node --test test/login.test.js, protect: ['test/**', package.json] }
successCriteria: The error names the wrong field and still reveals nothing about which accounts exist.
scorers: [security-review]          # this task's own scorer, beside the suite's

# tasks/token-docs.yaml             -> decided by the correctness judge
successCriteria: isUsable has a JSDoc comment that describes its return value and both parameters.

What a run now prints, from the real run on this head (ra33b98bcd5b1c959):

ℹ Suite fix-auth: 6 trials (2 arms × 3 tasks × 1 repetition), 10 judge calls, 2 calibration judge calls.
ℹ Estimated 0.848–0.948 USD (agents 0.637–0.703, judges 0.211–0.245), from run r726c3227deba7240.
| Arm      | … | Deviations | Not verified | Pass rate | Mean correctness score |
| claude   | … | 0          | 0            | 67% (2/3) | 0.67                   |
| opencode | … | 0          | 0            | 67% (2/3) | 0.67                   |

| Arm      | Cost           | Estimated         | Cost per passed trial | Against claude (defaults arm) |
| claude   | 0.5826 USD (3) | 0.562–0.616 USD   | 0.2913 USD            |                               |
| opencode | 0.0622 USD (3) | 0.0752–0.0871 USD | 0.0311 USD            | dominates: same pass rate, 89% cheaper per passed trial; 0 pp (-47 to +47, not separated) |

| Arm      | Scorer          | Passed | Labelled | Pass rate  | 95% interval | Batched |
| opencode | security-review | 0      | 1        | 0% (0/1)   | 0% to 79%    | yes     |

Judge calibration · teamai:correctness
| Judge                   | Judged with a failed check | Labelled passing | False pass rate | 95% interval |
| claude claude-haiku-5-5 | 1                          | 0                | 0%              | 0% to 79%    |

Judge claude is also arm claude's tool; set tool in the scorer to judge with another.
Arm claude: 3 comparable pairs against run r726c3227deba7240.
No arm's pass rate dropped by more than chance against run r726c3227deba7240.

The record says who decided each verdict, and whether that is the judge the plan pinned (login-copy, same run):

claude    check passed  -> teamai:correctness:login-copy  incorrect  claude claude-haiku-5-5    asPlanned: match
opencode  check failed  -> teamai:correctness:login-copy  incorrect  check                      (no judge launched)
          calibration   -> the same judge said "partial" on that failed work, stored nowhere: not a false pass
both      review-quality + security-review: one batched claude-sonnet-5-5 call; scoringCost complete

Slices and commits (each commit type checks on its own):

S8a Stop hook end record        22f54d001
S8b session list --suite/--sizes 82d5b97dd, abe99d2ec (a month of sessions, not a week)
S8c pushed sessions             82ee2f4c0, cd0fed6bc (read for the suite's repository)
S1  verdicts, record v2         607de9d72
S0  one pinned judge per scorer 611d8f684, 9888a7985
S3  check, criteria or both     932ba3230, e27fb7b73 (kind), be6037748 (check that could not run)
S2  pairing by decider          702b4ac90
S4  teamai-correctness scorer   2db366a34
S9  per-task scorers            bdf8aef17, 2874f65d1
S7  per-scorer rows             0aec7c56f
S6  mean correctness score      9b1a43b89
S10 calibration                 889ce83ce
S5  cost per passed, dominance  26e5287ab
S11 cost estimate               bd915daa4, 0c58ab26b (batched judge cost), 926aed7bc (per launch), 5646e2c08 (unstated judge cost),
                                c6ff12aff (cost from every judge launch, not the labels kept),
                                25f363988 ({ complete: false } when launches stated no cost),
                                0793a48ef (calibration costs sampled in the estimate),
                                72236f16c (a judge cancelled after it started counts)
record fields                   df9c2cd2e (task judge, calibration rate and cost)
dashboard                       7c87590d1 … 775925e68 (7 commits), 2a7771f4c (arms with no comparable pair),
                                5cdf7bc37 (the rubric or batching that changed in an excluded pair's judge),
                                6885ba7cc (a run is current only in the record version its rates pool)
fixes the real run found        3ed10cf45 (judge's model alias), 197beb45c (PWD)
delivered skill lists           5089d1dba (teamai-sessions-to-tasks in the E2E lists)
changelog                       dadab091a (why pass rates can move)

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, or incomplete when a tool stated no cost). No width overflows horizontally.

Desktop 1440px Tablet 768px Mobile 390px
Benchmarks page, 1440px Benchmarks page, 768px Benchmarks page, 390px
Judges and calibration, 1440px Judges and calibration, 390px Runs, 390px
Judges, 1440px Judges, 390px Runs, 390px
Scorers by arm, 768px Runs, 1440px Run detail, 1440px
Scorers by arm, 768px Runs, 1440px Run detail, 1440px

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 report claude-sonnet-5-5, so each pair's judges differ:

Arms with no comparable pair, 1440px 768px 390px
Arms with no comparable pair, 1440px Arms with no comparable pair, 768px Arms with no comparable pair, 390px

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature causing existing behavior to change)
  • Documentation only
  • Refactor / internal cleanup

Breaking, both in the CHANGELOG:

  • teamai benchmark run refuses 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 plans and records are version 2. A run an older teamai started is not resumed (benchmark_plan_outdated); version 1 records still show, but --fail-on-regression and the dashboard's pooled rates compare only runs of one version. A suite's pass rates can move with the upgrade too: teamai-benchmark now judges a trial's suite scorers that share a judge tool, model and stages in one batched call, and the default teamai-correctness rubric judges success criteria from the task and the diff, not the transcript.

Bug fixes the real run found: a tool teamai starts gets PWD set to its directory (OpenCode works in PWD, 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 --noEmit passes, on every commit of the branch
  • npm run lint passes (oxlint type-aware, doc checks)
  • The test files that cover what I changed pass; the full npx vitest run too, but for the machine failures below
  • Added/updated tests for the change
full unit suite            22699 passed; 270 failed in home, isolate-home, local-agent*, uninstall:
                           os.userInfo()/os.homedir() ENOENT on this machine, files this PR does not touch;
                           doctor-rules-delivery fails in the full run and passes alone
E2E benchmark-*, session-to-task-1402, score-session(s), share-learnings-from-sessions,
    session-show, opencode-hook-launch, skill-session-judge     188/188
E2E at cd0fed6bc: assigned-roles-1186 + local-agent-teardown-915 17/17, source-ambiguous-foreign-claims 4/4
E2E at 6885ba7cc: every benchmark-* file, 23 files, 172/172
unit at 6885ba7cc: benchmark-*, score-*, scorers-*, dashboard-*: 60 files, 1536/1536

Tests that went red first, then passed:

e2e benchmark-judges   a mixed task whose check exits 127 records the judge's "correct" on an error trial
                       -> now unscored, check_could_not_run
e2e benchmark-judges   two scorers batched in one judge call: scoringCost complete false -> true, 0.2 USD
benchmark-plan         a check.add from a missing solution commit is named "e", one character of the SHA
                       -> named eeeeeee (a spread of the commit string, caught by the type-aware lint)
benchmark-history      a judge and a calibration that ran with no stated cost: spent known, "below"
                       -> incomplete (2 unknown), no outside flag
e2e benchmark-judges   two batches the judge reports as one model, one stating no cost: complete true -> false
e2e benchmark-judges   a mixed task whose check could not run, and a calibration whose label was refused:
                       scoringCost absent -> 0.1 USD, the judge launch that ran
e2e benchmark-judges   the same with a judge that states no cost: scoringCost absent -> { complete: false }
benchmark-estimate     a basis whose calibration judges cost 0.2 and 0.25 USD, its trial judges 0.1 and 0.15:
                       perJudgedTrial 0.1–0.15 USD -> 0.15/0.2/0.25 USD (low/median/high)
dashboard-benchmarks   two arms whose every pair another judge decided: Compare said nothing
                       -> Arms with no comparable pair: without skills/auth-tokens → pulled team · claude,
                          2 excluded: their judge changed (claude claude-sonnet-5-5 → claude claude-opus-5-5)
benchmark-calibration  the run cancelled while the calibration judge ran: scoringCost absent -> { complete: false }
dashboard-benchmarks   judges that differ in batching and rubric only: "(claude claude-opus-5-5 → claude claude-opus-5-5)"
                       -> "(claude claude-opus-5-5 alone rubric bbbbbbb → claude claude-opus-5-5 batched rubric aaaaaaa)"
dashboard-benchmarks   a version 1 record of unchanged suite files beside a version 2 run: Runs tagged it current
                       and Tasks per run gave it an empty column -> neither
session-push           session show --team-session from another repository's directory: --suite unknown
                       -> with --suite benchmarks/product, the session pushed for that suite's repository is read

Real CLI, built from abe99d2ec, on macOS with claude and opencode. The team repo and acme/auth-service are local bare repos reached through url.insteadOf; the suite and tasks are the ones in the Summary, with the team's own scorers/teamai-correctness.md (labels correct 1, partial 0.5, incorrect 0, model: fast). Four runs; run 1 had no earlier run to estimate from:

$ teamai benchmark run fix-auth --sandbox
ℹ No earlier run of fix-auth to estimate from.
| claude   | … | 67% (2/3) | 0.83 |
| opencode | … | 33% (1/3) | 0.50 |      # opencode's first request got HTTP 401 from its provider: error, cost unknown
| opencode | … | 0.0395 USD (2), incomplete: 1 unknown | … | -33 pp (-72 to +32, not separated) |

$ teamai benchmark run fix-auth --sandbox --fail-on-regression     # run 4, the output in the Summary
[exit 0]

Sessions to tasks, on an earlier build of this branch, with two real claude -p sessions in the member's checkout, each ending in a commit (--suite on session show came after; its read is covered by session-push.test.ts):

$ teamai session list --finished --all --idle 1m --suite benchmarks/fix-auth --sizes "S=40,3 M=200,10 L=800,30"
  3f3f5376-…  claude-code  0e9f4cc..2d98c1c  1 file, 2 lines  S
  ea4b0657-…  claude-code  2d98c1c..7ac8e24  1 file, 8 lines  S
# before the push to the suite's repo: Left out 1 session: commits not in the suite repo (1).

$ teamai session push --source claude-code --session ea4b0657-…
  ✓ Pushed claude-code session ea4b0657-… to teamai-reports (redacted)
$ teamai session list --all --suite benchmarks/fix-auth --sizes "S=40,3 M=200,10 L=800,30"
  ea4b0657-…  claude-code  2d98c1c..7ac8e24  1 file, 8 lines  S
$ teamai session show ea4b0657-… --team-session claude-code_add-a-short-jsdoc-comment-to-isusable-in-src-token_20261109 --author Ana --suite benchmarks/fix-auth
### user
Add a short JSDoc comment to isUsable in src/token.js …

Not checked here:

  • Codex as an arm or judge: Codex fails to start on this machine (Failed to synchronize managed preferences), left to CI.
  • The Stop hook ran through claude --settings with this build's hooks; the member's own hooks call the published teamai.
  • gitlab and github providers: 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:

  • One version bump per schema for the whole PR (plan 2, record 2): intermediate slices never ship.
  • teamai-benchmark.yaml passes batch: 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-tasks lists 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:

  • The dashboard panels (7 commits). The issue asks only that older records still show and that Compare shows excluded pairs; without the panels a member reads judges, calibration and cost only in the CLI table.
  • The PWD and alias fixes: without them the real run could not pass.
  • A suite's scorers refuses : as a task's does.

Known limits:

  • A task with a check and success criteria whose check could not run (exit 126/127, signal, timeout) still launches its correctness judge. The trial is recorded error and unscored, as the guide's table says, and the judge's cost is counted in the trial's. Skipping the launch needs score plan to read the benchmark check, which widens the scorers-to-benchmark coupling.
  • A session whose transcript exists but reads as no messages is dropped from session list --suite without a left-out count. A missing or empty transcript never reaches the listing.
  • Two Stops of one session that finish out of order can leave the earlier end; the next Stop rewrites it.

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.
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
  • [P2 non-blocking] Preserve costs when a judge’s label is discarded — src/benchmark/verdicts.ts:354: A calibration judge that reports usage but produces no accepted label is omitted entirely. Similarly, src/benchmark/verdicts.ts:332 discards a correctness judge’s cost when a mixed task’s check could not run. Neither launch reaches the spend calculation, so the total can incorrectly appear complete and “below the estimate.” Record launch costs independently of retained verdicts, including an unknown entry when usage is unstated.

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 abe99d2ec. The older commit and deferred provider/agent coverage are not blocking.

I did not run, build, or install PR code.

@SaulMoro

SaulMoro commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

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 spendOf never sees it:

  • verdicts.ts:354: a calibration whose label is not one of the scorer's labels returns [], cost included.
  • verdicts.ts:332: on a mixed task whose check could not run, the correctness judge's verdict is dropped, cost included.

In both cases the total can read known and below the estimate, which is the same gap 5646e2c closed for verdicts that are kept. The second case is the known limit your description already lists. Either record each launch's cost apart from the verdicts it kept (as unknown when it stated none), or say both are known limits and I'll approve with them noted. Your call.

…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.
@hz89Dev

hz89Dev commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in c6ff12a. A trial's scoringCost is now summed from every judge launch that ran for it, whether it succeeded or failed, rather than from the labels kept:

  • A calibration whose label is refused records no calibration, and its launch's cost goes on the trial.
  • When a mixed task's check could not run, the correctness judge's verdict is still dropped, but its launch's cost is counted.
  • A batched launch counts once, so the per-launch label matching from 926aed7 is gone.

A launch that stated no cost leaves the cost incomplete. Two E2E tests failed first, with scoringCost absent, and now record the 0.1 USD the judge launch stated. Every benchmark-* E2E passes (171/171).

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
  • [P2 non-blocking] Discarded judge launches still lose unstated costs — src/benchmark/verdicts.ts:305: For a mixed task whose check exits 127, a judge that runs but reports no cost leaves scoringCost undefined; its discarded verdict also carries no judge decider. spendOf therefore omits the launch and can show a complete total “below the estimate.” Preserve an unknown-cost entry independently of retained verdicts or calibration labels.

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 abe99d2ec. The older build and deferred provider/agent coverage are not blocking.

I did not run, build, or install PR code.

@SaulMoro

SaulMoro commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

c6ff12af reads right, and launch-based cost is the better shape. The newest CI review found one case it still misses, and I agree from the code. When every judge launch of a trial stated no cost, costOfLaunches returns undefined. spendOf then counts the trial only if it kept a verdict decided by a judge. Two kinds of launch keep no such verdict:

  • a mixed task whose check could not run, where the correctness verdict is dropped;
  • a calibration whose label was refused.

If that launch stated no cost, nothing marks the total unknown, so it can still read known and below the estimate.

One way to close it is for judgingCosts to tell spendOf that a launch ran even when none stated a cost, for example an incomplete cost or a launch count, so the trial goes in as unknown. If you would rather leave it, say it is a known limit and I'll approve with it noted. Everything else is ready, and CI is still running at c6ff12a.

…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.
@hz89Dev

hz89Dev commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in 25f3639. A trial whose judge launches ran and stated no cost now records scoringCost: { complete: false }. scoringCost is absent only when no judge launched, so the run's spend reads it and no longer guesses from the verdicts.

The E2E with a states-nothing judge on a mixed task whose check exits 127 failed first, with scoringCost absent. It now records { complete: false }. The record description in docs/guide/workflow.md and its Chinese page says the same.

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 { complete: false }.

@hz89Dev

hz89Dev commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

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, judgingCosts returns { complete: false }, and that is written to the record as scoringCost. spendOf now reads scoringCost alone, so a trial whose verdict was dropped still goes in as unknown:

  • A mixed task whose check could not run, judged by a judge that states no cost: scoringCost: { complete: false }. The new E2E failed first, with scoringCost absent.
  • A calibration whose label was refused: its launch goes on the trial, and is unknown the same way when it stated nothing.

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 benchmark-* E2E passes at 25f3639 (172/172).

No workflow ran for the previous push.
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
  • [P2 non-blocking] Calibration costs are omitted from the estimate’s basis — src/benchmark/estimate.ts:74: For a suite with only mixed tasks, no extra scorers, and failed checks, successful calibration launches keep their costs in trial.calibration.scoringCost, not trial.scoringCost. This lookup ignores every stated judge cost and reports no_cost_stated on the next run. Include calibration costs when deriving the judging estimate.

  • [P2 non-blocking] Compare hides exclusions when every pair is excluded — src/benchmark/history.ts:528: When different judge models decide every pair between two arms, pairsOf returns their exclusion reasons, but the subsequent zero-pairs guard drops the entire comparison. Compare therefore cannot explain why those arms are incomparable. Preserve an exclusion-only comparison without a rate difference.

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.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
  • [P2 non-blocking] Calibration costs remain absent from the estimate’s basis — src/benchmark/estimate.ts:74: For a suite containing only mixed tasks, no extra scorers, and failed checks, accepted calibration costs live in trial.calibration.scoringCost. This lookup reads only trial.scoringCost, so the next run reports judging cost as no_cost_stated despite recorded costs. Include calibration costs in the estimate’s basis.

  • [P2 non-blocking] Compare still hides exclusions when every pair is excluded — src/benchmark/history.ts:532: When different judge models decide every pair between two arms, pairsOf returns exclusion reasons, but this zero-pairs guard discards the comparison. Compare cannot explain why those arms are incomparable. Retain an exclusion-only comparison without a rate difference.

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.
@hz89Dev

hz89Dev commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Both fixed, each with a test that failed first.

  • Calibration costs in the estimate, 0793a48: perJudgedTrial now samples calibration.scoringCost beside each trial's scoringCost, since the estimate already multiplies calibration calls by the same per-call cost. A basis whose only stated judge costs are calibrations now gives a range instead of no_cost_stated. In benchmark-estimate.test.ts, an earlier run whose checks all failed, so no trial was judged, with three calibrations costing 0.1, 0.2 and 0.3 USD, priced the judging no_cost_stated. It now gives 0.15/0.2/0.25 USD per call and 0.9/1.2/1.5 USD for six calibration calls. The benchmarks guide (en and zh-CN) says so.
  • Arms whose every pair was excluded, 2a7771f: the suite view has a new uncompared list beside comparisons. It holds each arm pair that has excluded pairs and no comparable pair, with the reasons. It has no rate difference, so comparisons keeps its shape and the regression gate reads it unchanged. Compare shows the list as Arms with no comparable pair, for example without skills/auth-tokens → pulled team · claude with 2 excluded: their judge changed (claude claude-sonnet-5-5 → claude claude-opus-5-5). Screenshots at 1440, 768 and 390 px are in the description.

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.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
  • [P2 non-blocking] Cancelled judge launches disappear from spend — src/benchmark/verdicts.ts:301: Cancelling a judge after it starts leaves its step cancelled, which this filter excludes entirely. With complete agent costs, the run can therefore show complete spend and “below the estimate” despite unreported judging cost. Count launched-but-cancelled judges, preserving an unknown cost when necessary.

  • [P2 non-blocking] Explain rubric- and batching-only exclusions — src/dashboard/benchmarks-client.ts:33: Pairs excluded because their rubric or batching differs display only tool, model and effort. Compare consequently says “their judge changed (claude model → claude model)” without identifying what changed. Include the differing rubric/batching facets, as the CLI formatter does.

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.
@hz89Dev

hz89Dev commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Both fixed, each with a test that failed first.

  • Cancelled judge launches, 72236f1: judgeLaunches now also counts a judge step that was cancelled after it was leased (wasLeased), so a launch the run stopped mid-call still counts toward its trial's scoringCost, as { complete: false } when it stated no cost. A judge cancelled before it was leased never ran and still counts nothing. In benchmark-calibration.test.ts, a run cancelled while its calibration judge holds the lease recorded no scoringCost on the trial, and now records { complete: false }, so the run's spend reads incomplete and not below the estimate.
  • Rubric- and batching-only exclusions, 5cdf7bc: Compare names each judge facet that differs, as formatExcluded does: effort, batched or alone, and the rubric's first seven characters. Two judges that differ in batching and rubric only read their judge changed (claude claude-opus-5-5 alone rubric bbbbbbb → claude claude-opus-5-5 batched rubric aaaaaaa), in en and zh-CN. The judges and calibration panels, which name one judge on its own, are unchanged.

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.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

I couldn’t review the specified diff: head commit 384b67b9e3fd359ee1f486aa09bb828a47b1c2ac is absent locally, and GitHub access failed. I cannot confirm new findings or whether earlier findings are resolved.

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.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
  • [P2 non-blocking] Carry schema-version currentness into dashboard rows — src/benchmark/history.ts:908: With v1 and v2 runs of unchanged suite/task files, pooling correctly excludes v1, but dashboard rows retain only the source hash. runsPanel therefore labels the v1 run “current,” and taskRunsPanel includes its column despite having no task cells for it. Expose the schema-aware isCurrent result and use it in both panels.

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.
@hz89Dev

hz89Dev commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in 6885ba7, with a test that failed first.

Each run row now carries isCurrent from the same test the pooled rates use: the suite files and the record version of the newest whole run. Runs tags current from it and Tasks per run picks its columns from it, where both compared the source hash alone. In dashboard-benchmarks-view.test.ts, a version 1 record of unchanged files beside a version 2 run was tagged current and got an empty column; now neither. The dashboard guide (en and zh-CN) says the current version includes the record version.

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.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

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 isCurrent, and both Runs and Tasks per run use it.

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 SaulMoro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was generated by AI during triage.

Approving at 6885ba7. Everything from my last review is resolved:

  • E2E lists. 5089d1db adds teamai-sessions-to-tasks to 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 spendOf as unknown (5646e2c0). The total reads incomplete and 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 in c6ff12af).
  • Pushed session for a suite. session show --team-session ... --suite <dir> reads the session for the suite's repository, and teamai-session-to-task passes it (cd0fed6b). Without --team-session, --suite is refused like --author, and commands.md is 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.

@hz89Dev

hz89Dev commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

@SaulMoro ready for another look at 6885ba7. The case you raised is closed in 25f3639: a trial whose judge launches stated no cost records { complete: false }, so the run's spend reads incomplete. The five findings the CI review raised after that are fixed too (calibration costs in the estimate, arms with no comparable pair, judges cancelled after they started, the rubric or batching that changed in an excluded pair's judge, and the run tagged current in an older record version), each with a test that failed first. The last CI review has no new findings, and all 18 checks pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants