mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-24 09:01:28 +01:00
/eval-plan refuses gpt-4o and older-generation models in every role, and asks for 100 judge labels from 2026-11-22 (GST-3384) (#4630)
/eval-plan now refuses gpt-4o and older-generation models in every role a plan picks (arms, judge, readers, simulators) and names the replacement; a competitor tested as its vendor ships it keeps its built-in model on its own arm. Why: eval numbers should come from current frontier models, and from 2026-11-22 a model judge must agree with 100 hand labels, not 40. Nothing to do. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: lib/eval-plan-checks.ts:153:functional-contract reader=qa Review-Finding: p1/red-team#2 reader=red-team
This commit is contained in:
1 parent
79eea6d5fc
commit
5db285c1a4
71 files changed
+458
-139
No files matched your search
+1
-2
@@ -175,8 +175,7 @@ test moves, because its calibration fixtures are keyed to it:
|
||||
- Claude session, PTY, and Agent SDK eval runners and the Claude benchmark adapter: explicit model > `EVALS_MODEL` > `GSTACK_EVAL_MODEL_CAPTURE` > `GSTACK_EVAL_MODEL` > default.
|
||||
- Shared judge calls (including benchmark quality scoring): explicit model > `GSTACK_EVAL_MODEL_JUDGE` > `GSTACK_EVAL_MODEL` > default. `EVALS_MODEL` applies to capture runners, not judges.
|
||||
|
||||
Warmup stays on `claude-haiku-4-5`; distill stays on
|
||||
`claude-haiku-4-5-20251001`. Explicit test and historical benchmark model
|
||||
Warmup and distill stay on `claude-haiku-5-5`. Explicit test and historical benchmark model
|
||||
selections still win. These eval defaults stay pinned independently from the
|
||||
[runtime model tiers](docs/model-policy.md); the tier freshness workflow does
|
||||
not discover or change evaluation models automatically. Paid-run costs shown below are
|
||||
|
||||
+11
-5
@@ -34,6 +34,7 @@
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { renderModelGenerations, modelGenerationProblems } from '../lib/eval-plan-checks';
|
||||
import { armIdentities, armModel, checkPrereg, DEFAULT_TOKENS, dryRun, pilotReport, preregTemplate, quickLookTemplate, priceGate, releasePilot, renderArms, renderDryRun, renderGatePrice, renderPilotReport, renderPreregDiagnostics, resolveArms, resolvePlanSource, runPreregDiagnostics, settlePilot, startPilot } from '../lib/eval-plan';
|
||||
import { checkResults } from '../lib/eval-plan-report';
|
||||
import { checkJudgeLabels, renderJudgeLabels } from '../lib/eval-plan-checks';
|
||||
@@ -49,10 +50,12 @@ const HELP = `gstack-eval-plan — preregistration, priced arms, $0 dry run, pri
|
||||
the required sections exist and are filled: Bars, Decisions, Arms, Comparison, Scoring,
|
||||
Decoys, Stop rules, Held-out exposure, and No-gstack arm when the Comparison says stack: loaded;
|
||||
Decisions needs two or more "if <result>: <action>" lines with different actions; Scoring a
|
||||
judge (none, or another model family with labels >= 40 and agreement >= 0.6) and, with two or
|
||||
judge (none, or another model family with labels >= 100, 40 if frozen before 2026-11-22, and agreement >= 0.6) and, with two or
|
||||
more arms, paired: yes, interval: 95% and mdd:; a frozen: date before 2026-11-15 skips both;
|
||||
an optional Diagnostics section's summarizer runs on its synthetic fixture only with
|
||||
--allow-repo-commands (else it is listed and exit 3) and every count must match
|
||||
--allow-repo-commands (else it is listed and exit 3) and every count must match;
|
||||
no arm, judge, reader or simulator is gpt-4o or a superseded_by row (R116, MODEL_GENERATION
|
||||
lines; a frozen: date before 2026-11-21 keeps its models); vendor-default lines print MODEL_EXCEPTION
|
||||
prereg --init <file> [--title <t>] [--quick] write the template (--quick: a quick look)
|
||||
arms [--arms m,m] [--policy-doc f] [--input-tokens N] [--output-tokens N] [--json]
|
||||
arms from \`gstack-models resolve --role eval-arms\`, else the repo policy doc, each priced per item
|
||||
@@ -60,7 +63,8 @@ const HELP = `gstack-eval-plan — preregistration, priced arms, $0 dry run, pri
|
||||
stub model over the real rows; checklist: price table, output budget, retry prompt text,
|
||||
and with --cap reservation-fits-cap (one call: largest row + output budget, priced);
|
||||
frontier: refuses a plan whose every arm is Haiku or Sonnet unless --tier-question
|
||||
names what it asks about that tier, and re-costs the plan on frontier prices (R54)
|
||||
names what it asks about that tier, and re-costs the plan on frontier prices (R54);
|
||||
model-generation: refuses an arm that is gpt-4o or a lib/pricing.ts superseded_by row (R116)
|
||||
pilot start --out dir --cap usd --arms m,m#no-gstack --dry-run dry-run.json [--n 3] [--seat-metered arm,...]
|
||||
--seat-metered: arms on a subscription with no incremental charge; they reserve $0,
|
||||
settle unknown, and sit outside the cap and the projection until one settles a charge
|
||||
@@ -136,12 +140,14 @@ function doPrereg(rest: string[]): number {
|
||||
const run = runnable && allowed ? runPreregDiagnostics(d, repoRoot) : null;
|
||||
if (rest.includes('--json')) process.stdout.write(JSON.stringify({ file, ...r, diagnostics_run: run }) + '\n');
|
||||
else {
|
||||
process.stdout.write(`PREREG: ${r.ok ? 'ok' : 'incomplete'} present=${r.present.length}/${r.present.length + r.missing.length + r.empty.length}${r.missing.length ? ` missing=${r.missing.join(',')}` : ''}${r.empty.length ? ` empty=${r.empty.join(',')}` : ''}${r.comparison.stack ? ` stack=${r.comparison.stack}` : ''}${r.no_gstack.required ? ` no_gstack_arm=${r.no_gstack.ok ? 'ok' : r.no_gstack.problems[0] === 'missing section' ? 'missing' : 'incomplete'}` : ''}${d ? ` diagnostics=${d.errors.length ? 'invalid' : d.expected.length}` : ''}${r.quick ? ` kind=quick-look cap=${r.quick.cap ?? 'missing'}` : ''}${r.loop.interim_required ? ' interim_look=required' : ''}${r.grandfathered ? ` frozen=${r.frozen} result_checks=exempt` : ''}${r.loop_grandfathered ? `${r.grandfathered ? '' : ` frozen=${r.frozen}`} loop_checks=exempt` : ''} file=${file}\n`);
|
||||
process.stdout.write(`PREREG: ${r.ok ? 'ok' : 'incomplete'} present=${r.present.length}/${r.present.length + r.missing.length + r.empty.length}${r.missing.length ? ` missing=${r.missing.join(',')}` : ''}${r.empty.length ? ` empty=${r.empty.join(',')}` : ''}${r.comparison.stack ? ` stack=${r.comparison.stack}` : ''}${r.no_gstack.required ? ` no_gstack_arm=${r.no_gstack.ok ? 'ok' : r.no_gstack.problems[0] === 'missing section' ? 'missing' : 'incomplete'}` : ''}${d ? ` diagnostics=${d.errors.length ? 'invalid' : d.expected.length}` : ''}${r.quick ? ` kind=quick-look cap=${r.quick.cap ?? 'missing'}` : ''}${r.loop.interim_required ? ' interim_look=required' : ''}${r.models.ok ? '' : ' models=refused'}${r.grandfathered ? ` frozen=${r.frozen} result_checks=exempt` : ''}${r.loop_grandfathered ? `${r.grandfathered ? '' : ` frozen=${r.frozen}`} loop_checks=exempt` : ''} file=${file}\n`);
|
||||
if (runnable && !allowed) process.stdout.write(`PREREG_COMMAND: summarizer=${JSON.stringify(d.summarizer)} fixture=${d.fixture} cwd=${repoRoot}\n`);
|
||||
if (run) process.stdout.write(renderPreregDiagnostics(run));
|
||||
process.stdout.write(renderModelGenerations(r.models));
|
||||
}
|
||||
const incomplete = [...r.missing.map(m => `missing ${m}`), ...r.empty.map(e => `empty ${e}`), ...r.comparison.errors.map(e => `comparison: ${e}`), ...r.decisions.errors.map(e => `decisions: ${e}`), ...r.scoring.errors.map(e => `scoring: ${e}`), ...r.loop.errors.map(e => `${e.section.toLowerCase()}: ${e.message}`), ...(r.quick?.errors ?? []).map(e => `quick look: ${e}`), ...(d?.errors ?? []).map(e => `diagnostics: ${e}`)];
|
||||
if (incomplete.length) process.stderr.write(resultLine('gstack-eval-plan prereg', 'PREREG_INCOMPLETE', incomplete.join('; ')) + '\n');
|
||||
if (!r.models.ok) process.stderr.write(resultLine('gstack-eval-plan prereg', 'EVAL_MODEL_OLD_GENERATION', modelGenerationProblems(r.models).join('; ')) + '\n');
|
||||
if (!r.no_gstack.ok) process.stderr.write(resultLine('gstack-eval-plan prereg', 'PREREG_NO_GSTACK_ARM', `no-gstack arm: ${r.no_gstack.problems.join('; ')}`) + '\n');
|
||||
if (run && !run.ok) process.stderr.write(resultLine('gstack-eval-plan prereg', 'PREREG_DIAGNOSTIC_UNTESTED', run.error ?? run.rows.filter(row => row.status !== 'ok').map(row => `${row.name} ${row.status} (expected ${row.expected ?? 'undeclared'}, got ${row.got ?? 'none'})`).join('; ')) + '\n');
|
||||
if (!r.ok || (run && !run.ok)) return EXIT.fail;
|
||||
@@ -201,7 +207,7 @@ function doDryRun(rest: string[]): number {
|
||||
if (rest.includes('--json')) process.stdout.write(JSON.stringify(r) + '\n'); else process.stdout.write(renderDryRun(r));
|
||||
if (out) process.stdout.write(`DRY_RUN_RECORD: ${path.join(out, 'dry-run.json')}\n`);
|
||||
if (!r.pass) {
|
||||
const why = [r.rows === 0 ? 'no rows' : '', r.bad_rows.length ? `${r.bad_rows.length} bad rows` : '', !r.checks.price_table.ok ? `price missing: ${r.checks.price_table.missing.join(',') || 'no arms'}` : '', !r.checks.output_budget.ok ? 'output budget below the reasoning floor' : '', !r.checks.retry_prompt.ok ? 'retry prompt missing' : '', r.checks.reservation_fits_cap && !r.checks.reservation_fits_cap.ok ? `one call exceeds --cap $${r.checks.reservation_fits_cap.cap}` : '', r.checks.model_rules && !r.checks.model_rules.ok ? 'model rules refused an arm (EVAL_MODEL lines above)' : '', !r.checks.frontier.ok ? 'every arm is Haiku or Sonnet (R54; CHECK: frontier above)' : ''].filter(Boolean).join('; ');
|
||||
const why = [r.rows === 0 ? 'no rows' : '', r.bad_rows.length ? `${r.bad_rows.length} bad rows` : '', !r.checks.price_table.ok ? `price missing: ${r.checks.price_table.missing.join(',') || 'no arms'}` : '', !r.checks.output_budget.ok ? 'output budget below the reasoning floor' : '', !r.checks.retry_prompt.ok ? 'retry prompt missing' : '', r.checks.reservation_fits_cap && !r.checks.reservation_fits_cap.ok ? `one call exceeds --cap $${r.checks.reservation_fits_cap.cap}` : '', r.checks.model_rules && !r.checks.model_rules.ok ? 'model rules refused an arm (EVAL_MODEL lines above)' : '', !r.checks.frontier.ok ? 'every arm is Haiku or Sonnet (R54; CHECK: frontier above)' : '', !r.checks.generation.ok ? 'an arm is gpt-4o or an older generation (R116; CHECK: model-generation above)' : ''].filter(Boolean).join('; ');
|
||||
process.stderr.write(resultLine('gstack-eval-plan dry-run', r.checks.price_table.ok ? 'EVAL_DRY_RUN_FAILED' : 'EVAL_PRICE_MISSING', why) + '\n');
|
||||
return EXIT.fail;
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
**`/eval-plan` refuses gpt-4o and older-generation models in every role a plan chooses.** A preregistration's arms, judge, readers and simulators, and every dry-run and pilot arm, are checked against gpt-4o (any variant) and the models `lib/pricing.ts` marks as replaced by a newer generation; each refusal names the model, its role and the current replacement. A competitor system tested as its vendor ships it keeps its built-in model through a recorded `vendor-default:` line. Plans frozen on or after 2026-11-22 also check a model judge against at least 100 hand labels instead of 40. gstack's own eval warmup, distill and recommendation-judge defaults and five canary tests move from Claude Haiku 4.5 to Haiku 5.5.
|
||||
@@ -2094,7 +2094,7 @@ refusal from `bin/gstack-eval-plan` (logic in `lib/eval-plan-checks.ts` and
|
||||
| Check | When it runs | Refusal |
|
||||
|---|---|---|
|
||||
| `## Decisions`: one `if <result>: <what we do>` line per possible result, at least two, with different actions | `prereg --check`, before anything is spent | `PREREG_INCOMPLETE` |
|
||||
| `## Scoring`: `judge: none`, or a judge model from another family than every arm with `labels:` (40 or more) and `agreement:` (kappa 0.6 or more); with two or more arms, `paired: yes`, `interval: 95%` and `mdd:` stated before the run | `prereg --check` | `PREREG_INCOMPLETE` |
|
||||
| `## Scoring`: `judge: none`, or a judge model from another family than every arm with `labels:` (100 or more; 40 for a plan frozen before 2026-11-22) and `agreement:` (kappa 0.6 or more); with two or more arms, `paired: yes`, `interval: 95%` and `mdd:` stated before the run | `prereg --check` | `PREREG_INCOMPLETE` |
|
||||
| The judge's Cohen's kappa against `{"id", "human", "judge"}` hand labels, at the preregistered count and bar | `judge --check` before the approval ask; `results --check --labels` before any number goes out | `EVAL_JUDGE_UNCHECKED` |
|
||||
| A zero in any results table comes from a column named after a `## Diagnostics` counter whose synthetic fixture plants at least one case (expected 1 or more) | `results --check` | `EVAL_REPORT_UNPLANTED_ZERO` |
|
||||
| A results table with a failures column also has an `answer-only` column: failures by the grader's own rule on the final answer | `results --check` | `EVAL_REPORT_NO_ANSWER_ONLY` |
|
||||
@@ -2171,9 +2171,32 @@ preregistration says it is asking about that tier.
|
||||
can't carry a KEEP, FIX-METHOD or CUT-CANDIDATE verdict under R48. Rerun it on a
|
||||
frontier model first.
|
||||
|
||||
**What the rule leaves alone.** Judges, cross-family review voices and a
|
||||
harness's shipped housekeeping model aren't models under test, so they keep the
|
||||
model they already use.
|
||||
**No older generations in any role we choose (R116).** Garry, 2026-11-21: "Can
|
||||
we suspend tests with gpt-4o and audit our models? We should be using frontier
|
||||
models and mainly focused on opus 5.5 or whatever model is like that at the
|
||||
current moment." So no plan uses gpt-4o (any variant, snapshot or provider
|
||||
form), or any model `lib/pricing.ts` marks `superseded_by`, as an arm, a judge,
|
||||
a reader or a simulator. A row is marked when a newer major generation of its
|
||||
family has its own row (`claude-opus-4-7` → `claude-opus-5-5`, `gpt-5.4` →
|
||||
`gpt-6.2-sol`, `gemini-2.5-flash` → `gemini-3.8-flash`); a point release in
|
||||
the same generation is not, so `gpt-6-astra` stays a valid judge beside
|
||||
`gpt-6.2-astra` and `claude-fable-5-1` stays current until Fable 5.2 has a
|
||||
price row. Readers and simulators go in an optional `## Models` section as
|
||||
`reader: <model>` and `simulator: <model>` lines.
|
||||
|
||||
The one exception: a competitor system tested as its vendor ships it keeps its
|
||||
built-in model. Name it on a `vendor-default: <model> <system>` line in `## Models`
|
||||
(for example `vendor-default: gpt-4o-mini Mem0 1.2 as shipped`). It covers that
|
||||
system's arm only: the arm whose loadout names the system (`gpt-4o-mini#mem0`),
|
||||
never a plain or `#no-gstack` arm on the same model, a judge, a reader or a
|
||||
simulator. `prereg --check` prints
|
||||
it as `MODEL_EXCEPTION:`, and `results --check` refuses results that never name
|
||||
the model. Published rows measured on gpt-4o stay up, labelled with the model
|
||||
they ran; a plan with a `frozen:` date before 2026-11-21 keeps the models it
|
||||
named.
|
||||
|
||||
Cross-family review voices and a harness's shipped housekeeping model aren't eval
|
||||
roles a plan chooses, so this check doesn't read them.
|
||||
|
||||
**The check.** `gstack-eval-plan dry-run` prints `CHECK: frontier` whenever an arm
|
||||
is Haiku or Sonnet. When every arm is one, the dry run fails unless
|
||||
@@ -2184,6 +2207,18 @@ compare it with the brief cap before any arm is swapped. `pilot start` refuses a
|
||||
pilot whose every arm is Haiku or Sonnet unless its dry run recorded a tier
|
||||
question.
|
||||
|
||||
For R116, `prereg --check` prints `MODEL_GENERATION: refused <model> role=<role>
|
||||
replacement=<model>` for each refused use, adds `models=refused` to its `PREREG:`
|
||||
line and exits 1 with `EVAL_MODEL_OLD_GENERATION`. `dry-run` prints `CHECK:
|
||||
model-generation refused …` and fails, and `pilot start` refuses an
|
||||
older-generation arm even when its dry run passed on other arms.
|
||||
|
||||
**Judge labels (R78 amendment).** Garry approved on 2026-11-21: a plan frozen on
|
||||
or after 2026-11-22, or with no `frozen:` line, checks its model judge against at
|
||||
least 100 hand-labelled outputs before the judge's numbers count. The kappa bar
|
||||
stays 0.6. A plan frozen earlier keeps 40. `prereg --check`, `judge --check` and
|
||||
`results --check` all read the bar from the plan's `frozen:` date.
|
||||
|
||||
## Running evals as an agent: detach
|
||||
|
||||
Moved verbatim from CLAUDE.md (#2096 size limit). The short rule stays in
|
||||
|
||||
+14
-6
@@ -5189,7 +5189,8 @@ a `why:` line, and when a `## Diagnostics` declaration is malformed. The
|
||||
result checks add two more (`decisions:` and `scoring:` in the message):
|
||||
`## Decisions` needs two or more `if <result>: <action>` lines with different
|
||||
actions, and `## Scoring` needs a `judge:` line, a model judge from another
|
||||
model family than every arm with `labels:` of 40 or more and `agreement:` of
|
||||
model family than every arm with `labels:` of 100 or more (40 for a plan
|
||||
frozen before 2026-11-22) and `agreement:` of
|
||||
0.6 or more, and with two or more arms `paired: yes`, `interval: 95%` and
|
||||
`mdd:`. A `frozen:` date before 2026-11-15 exempts both
|
||||
([docs/TESTING_INTERNALS.md](TESTING_INTERNALS.md#result-checks)). The
|
||||
@@ -5243,7 +5244,8 @@ in [docs/TESTING_INTERNALS.md](TESTING_INTERNALS.md#no-gstack-arm).
|
||||
|
||||
**Meaning.** The preregistration's `## Scoring` names a model judge, and
|
||||
`gstack-eval-plan judge --check` or `results --check` found no `--labels`
|
||||
file, fewer labelled outputs than the preregistered count (at least 40), labels
|
||||
file, fewer labelled outputs than the preregistered count (at least 100, or 40 for a
|
||||
plan frozen before 2026-11-22), labels
|
||||
that are all one class (agreement is undefined), a repeated id, or a Cohen's
|
||||
kappa between the hand labels and the judge below the preregistered bar (at
|
||||
least 0.6). With `per-arm: yes` in `## Scoring`, it also refuses a label row
|
||||
@@ -5925,11 +5927,17 @@ edit `.gstack/eval-models.json` in a reviewed PR.
|
||||
<a id="eval-model-old-generation"></a>
|
||||
### `EVAL_MODEL_OLD_GENERATION`
|
||||
|
||||
**Meaning.** The rules declare `families` (newest first), and an arm uses an id
|
||||
that is not the first one in its family.
|
||||
**Meaning.** One of two rules refused a model. R116: a preregistration's arm,
|
||||
judge, reader or simulator, or a dry-run or pilot arm, is gpt-4o (any variant or
|
||||
snapshot) or a model `lib/pricing.ts` marks `superseded_by`; the
|
||||
`MODEL_GENERATION:` line names the model, its role and the replacement. Or the
|
||||
eval model rules declare `families` (newest first), and an arm uses an id that
|
||||
is not the first one in its family.
|
||||
|
||||
**Fix.** Use the family's newest id, which the `EVAL_MODEL:` line names. If the
|
||||
order is wrong, fix `families` in a reviewed PR.
|
||||
**Fix.** Use the replacement the `MODEL_GENERATION:` or `EVAL_MODEL:` line names.
|
||||
A competitor system tested as its vendor ships it keeps its built-in model with a
|
||||
`vendor-default: <model> <system>` line in `## Models`; the results must name it.
|
||||
If the `families` order is wrong, fix it in a reviewed PR.
|
||||
|
||||
<a id="eval-model-generation-unresolved"></a>
|
||||
### `EVAL_MODEL_GENERATION_UNRESOLVED`
|
||||
|
||||
+10
-3
@@ -154,6 +154,7 @@ Write (or open) the preregistration file. Each section is required and must be f
|
||||
| Decisions | one `if <result>: <what we do>` line per way the run can come out, at least two, with different actions |
|
||||
| Arms | one line per arm: the arm identity first (`<model>` or `<model>#<loadout>`), settings, per-item cost from Step 1b |
|
||||
| Comparison | `stack: loaded` when any arm loads gstack or another skill stack; otherwise `stack: none` and a `why:` line |
|
||||
| Models | optional: `reader:` and `simulator:` lines for every other model the run starts; `vendor-default: <model> <system>` for a competitor system's built-in model when that system is tested as its vendor ships it |
|
||||
| Scoring | `judge: none` or the judge model with `labels:`, `agreement:`, `per-arm: yes` and `effort:`; with two or more arms, `paired: yes`, `interval: 95%`, `mdd:` |
|
||||
| Pilot | per arm, uncounted: `share:` (at most 10% of the arm's budget), `counted: no`, `ran:`, `judge:`, `supply:`, `units:` (every unit type), `seed:` (a draw order that doesn't depend on the number of workers) |
|
||||
| Cost | `paid:` a plain dollar amount (no k, ranges or arithmetic), `meter:`, `ledger:` (the private file that gets the actual cost and the decision it settled) |
|
||||
@@ -210,8 +211,8 @@ at least one, so `expected` is 1 or more and the summarizer is shown to find it.
|
||||
1. **Decisions before spend.** Each possible result names what we do differently. If
|
||||
every result leads to the same action, the eval changes nothing: do not run it.
|
||||
2. **A checked judge.** A model judge comes from another model family than every arm,
|
||||
is checked against at least 40 hand-labelled outputs (never held-out rows) at a
|
||||
kappa of 0.6 or better, and the comparison is paired with a 95% interval and its
|
||||
is checked against at least 100 hand-labelled outputs (40 for a plan frozen before
|
||||
2026-11-22; never held-out rows) at a kappa of 0.6 or better, and the comparison is paired with a 95% interval and its
|
||||
smallest detectable difference stated now.
|
||||
|
||||
3. **The eval-loop checks** (docs/TESTING_INTERNALS.md#eval-loop-checks): the Pilot,
|
||||
@@ -242,7 +243,12 @@ gets its own pilot attempts; naming one identity twice is `EVAL_ARM_DUPLICATE`.
|
||||
Models under test are frontier models (`claude-opus-5-5`, `gpt-6.2-sol`, at most one named
|
||||
low-cost primary); a Haiku or Sonnet arm only with a stated tier question
|
||||
(docs/TESTING_INTERNALS.md#frontier-models-under-test). Judges: `gpt-6-astra` or
|
||||
`gpt-6.2-astra` for Claude arms, `claude-opus-5-5` for GPT arms.
|
||||
`gpt-6.2-astra` for Claude arms, `claude-opus-5-5` for GPT arms. No arm, judge, reader or
|
||||
simulator may be gpt-4o or a model `lib/pricing.ts` marks `superseded_by` (R116): `prereg
|
||||
--check` prints `MODEL_GENERATION: refused <model> role=<role> replacement=<model>` and
|
||||
exits 1 (`EVAL_MODEL_OLD_GENERATION`); `dry-run` and `pilot start` refuse such an arm too.
|
||||
The one exception is a competitor system tested as its vendor ships it: its built-in model
|
||||
goes on a `vendor-default:` line, `MODEL_EXCEPTION:` records it, and the results name it.
|
||||
|
||||
When the repo commits `.gstack/eval-models.json` (allow, deny, per-scope lists, families
|
||||
newest first; `docs/eval-models.md` in gstack), `arms`, `dry-run`, `pilot start` and
|
||||
@@ -299,6 +305,7 @@ the budget the run will use. The checklist printed must be all `ok`:
|
||||
- `CHECK: reservation-fits-cap` (with `--cap <cap-usd>`) — one call, the largest row plus the
|
||||
output budget, priced, fits under the cap; a provider refuses a reservation the cap cannot hold.
|
||||
- `CHECK: frontier` — Haiku/Sonnet arms: `refused` if all (pass `--tier-question "<why>"`), `warn` if some; re-costs on frontier prices.
|
||||
- `CHECK: model-generation` — an arm is gpt-4o or superseded (R116): refused, with the replacement.
|
||||
- `DRY_RUN_ROW:` lines name rows missing a field; fix the rows, not the prompt.
|
||||
|
||||
`DRY_RUN_RESULT: pass` writes `dry-run.json` to `--out`; the pilot refuses to start on
|
||||
|
||||
+10
-3
@@ -69,6 +69,7 @@ Write (or open) the preregistration file. Each section is required and must be f
|
||||
| Decisions | one `if <result>: <what we do>` line per way the run can come out, at least two, with different actions |
|
||||
| Arms | one line per arm: the arm identity first (`<model>` or `<model>#<loadout>`), settings, per-item cost from Step 1b |
|
||||
| Comparison | `stack: loaded` when any arm loads gstack or another skill stack; otherwise `stack: none` and a `why:` line |
|
||||
| Models | optional: `reader:` and `simulator:` lines for every other model the run starts; `vendor-default: <model> <system>` for a competitor system's built-in model when that system is tested as its vendor ships it |
|
||||
| Scoring | `judge: none` or the judge model with `labels:`, `agreement:`, `per-arm: yes` and `effort:`; with two or more arms, `paired: yes`, `interval: 95%`, `mdd:` |
|
||||
| Pilot | per arm, uncounted: `share:` (at most 10% of the arm's budget), `counted: no`, `ran:`, `judge:`, `supply:`, `units:` (every unit type), `seed:` (a draw order that doesn't depend on the number of workers) |
|
||||
| Cost | `paid:` a plain dollar amount (no k, ranges or arithmetic), `meter:`, `ledger:` (the private file that gets the actual cost and the decision it settled) |
|
||||
@@ -125,8 +126,8 @@ at least one, so `expected` is 1 or more and the summarizer is shown to find it.
|
||||
1. **Decisions before spend.** Each possible result names what we do differently. If
|
||||
every result leads to the same action, the eval changes nothing: do not run it.
|
||||
2. **A checked judge.** A model judge comes from another model family than every arm,
|
||||
is checked against at least 40 hand-labelled outputs (never held-out rows) at a
|
||||
kappa of 0.6 or better, and the comparison is paired with a 95% interval and its
|
||||
is checked against at least 100 hand-labelled outputs (40 for a plan frozen before
|
||||
2026-11-22; never held-out rows) at a kappa of 0.6 or better, and the comparison is paired with a 95% interval and its
|
||||
smallest detectable difference stated now.
|
||||
|
||||
3. **The eval-loop checks** (docs/TESTING_INTERNALS.md#eval-loop-checks): the Pilot,
|
||||
@@ -157,7 +158,12 @@ gets its own pilot attempts; naming one identity twice is `EVAL_ARM_DUPLICATE`.
|
||||
Models under test are frontier models (`claude-opus-5-5`, `gpt-6.2-sol`, at most one named
|
||||
low-cost primary); a Haiku or Sonnet arm only with a stated tier question
|
||||
(docs/TESTING_INTERNALS.md#frontier-models-under-test). Judges: `gpt-6-astra` or
|
||||
`gpt-6.2-astra` for Claude arms, `claude-opus-5-5` for GPT arms.
|
||||
`gpt-6.2-astra` for Claude arms, `claude-opus-5-5` for GPT arms. No arm, judge, reader or
|
||||
simulator may be gpt-4o or a model `lib/pricing.ts` marks `superseded_by` (R116): `prereg
|
||||
--check` prints `MODEL_GENERATION: refused <model> role=<role> replacement=<model>` and
|
||||
exits 1 (`EVAL_MODEL_OLD_GENERATION`); `dry-run` and `pilot start` refuse such an arm too.
|
||||
The one exception is a competitor system tested as its vendor ships it: its built-in model
|
||||
goes on a `vendor-default:` line, `MODEL_EXCEPTION:` records it, and the results name it.
|
||||
|
||||
When the repo commits `.gstack/eval-models.json` (allow, deny, per-scope lists, families
|
||||
newest first; `docs/eval-models.md` in gstack), `arms`, `dry-run`, `pilot start` and
|
||||
@@ -214,6 +220,7 @@ the budget the run will use. The checklist printed must be all `ok`:
|
||||
- `CHECK: reservation-fits-cap` (with `--cap <cap-usd>`) — one call, the largest row plus the
|
||||
output budget, priced, fits under the cap; a provider refuses a reservation the cap cannot hold.
|
||||
- `CHECK: frontier` — Haiku/Sonnet arms: `refused` if all (pass `--tier-question "<why>"`), `warn` if some; re-costs on frontier prices.
|
||||
- `CHECK: model-generation` — an arm is gpt-4o or superseded (R116): refused, with the replacement.
|
||||
- `DRY_RUN_ROW:` lines name rows missing a field; fix the rows, not the prompt.
|
||||
|
||||
`DRY_RUN_RESULT: pass` writes `dry-run.json` to `--out`; the pilot refuses to start on
|
||||
|
||||
+2
-2
@@ -36,8 +36,8 @@ const DEFAULTS = {
|
||||
// Tests needing a cheaper or historical model pass it explicitly or set
|
||||
// GSTACK_EVAL_MODEL_CAPTURE / GSTACK_EVAL_MODEL_JUDGE / GSTACK_EVAL_MODEL.
|
||||
capture: CLAUDE_CAPTURE_EVAL_MODEL,
|
||||
warmup: "claude-haiku-4-5",
|
||||
distill: "claude-haiku-4-5-20251001",
|
||||
warmup: "claude-haiku-5-5",
|
||||
distill: "claude-haiku-5-5",
|
||||
judge: CLAUDE_JUDGE_EVAL_MODEL,
|
||||
} as const satisfies Record<string, string>;
|
||||
|
||||
|
||||
+61
-7
@@ -7,8 +7,14 @@
|
||||
* `frozen:` date is before RESULT_CHECKS_SINCE keeps the rules it was frozen
|
||||
* under. Reads text only; executes nothing.
|
||||
*/
|
||||
import { currentReplacement } from './pricing';
|
||||
|
||||
export const RESULT_CHECKS_SINCE = '2026-11-15';
|
||||
export const JUDGE_MIN_LABELS = 40;
|
||||
/** R78 amendment (Garry, 2026-11-21): a plan frozen on or after this date (or with no frozen: line) checks its judge on at least JUDGE_RAISED_MIN_LABELS labels; earlier plans keep JUDGE_MIN_LABELS. */
|
||||
export const JUDGE_LABELS_RAISED_SINCE = '2026-11-22';
|
||||
export const JUDGE_RAISED_MIN_LABELS = 100;
|
||||
export const judgeMinLabels = (frozen: string | null) => (frozen !== null && frozen < JUDGE_LABELS_RAISED_SINCE ? JUDGE_MIN_LABELS : JUDGE_RAISED_MIN_LABELS);
|
||||
export const JUDGE_MIN_KAPPA = 0.6;
|
||||
|
||||
const PLACEHOLDER = /^(?:|-+|—|n\/a|none|tbd|todo|\?)\.?$/i;
|
||||
@@ -110,6 +116,53 @@ export function checkLoop(s: LoopSections): LoopCheck {
|
||||
return { paid, interim_required, errors };
|
||||
}
|
||||
|
||||
/**
|
||||
* R116 (Garry, 2026-11-21): no gpt-4o, and no model lib/pricing.ts marks
|
||||
* `superseded_by`, in any role a plan chooses: an arm, the judge, a reader or
|
||||
* a simulator (docs/TESTING_INTERNALS.md#frontier-models-under-test). A
|
||||
* competitor system tested as its vendor ships it keeps its built-in model
|
||||
* through a `vendor-default: <model> <system>` line in `## Models`; the
|
||||
* check records it and results --check wants the results to name it. A
|
||||
* preregistration frozen before MODEL_GENERATIONS_SINCE keeps its models.
|
||||
*/
|
||||
export const MODEL_GENERATIONS_SINCE = '2026-11-21';
|
||||
export type ModelRole = 'arm' | 'judge' | 'reader' | 'simulator';
|
||||
export interface ModelUse { model: string; role: ModelRole; loadout?: string }
|
||||
export interface ModelGenerationCheck { ok: boolean; exempt: boolean; refused: Array<{ model: string; role: ModelRole; replacement: string }>; exceptions: Array<{ model: string; system: string; roles: ModelRole[] }>; errors: string[] }
|
||||
export function checkModelGenerations(o: { arms: string[]; judge?: string | null; models?: string[] | null; frozen?: string | null }): ModelGenerationCheck {
|
||||
if (o.frozen && o.frozen < MODEL_GENERATIONS_SINCE) return { ok: true, exempt: true, refused: [], exceptions: [], errors: [] };
|
||||
const list = (v: string) => v.split(/[\s,]+/).map(m => m.replace(/^`|`$/g, '')).filter(m => m && !PLACEHOLDER.test(m));
|
||||
const uses: ModelUse[] = [...o.arms.map(a => ({ model: a.split('#')[0]!, loadout: a.split('#')[1], role: 'arm' as const })), ...list(o.judge ?? '').map(model => ({ model, role: 'judge' as const }))];
|
||||
const errors: string[] = [];
|
||||
const exceptions: ModelGenerationCheck['exceptions'] = [];
|
||||
for (const line of o.models ?? []) {
|
||||
const m = /^\s*(?:[-*]\s+)?(readers?|simulators?|vendor-default):(.*)$/i.exec(line);
|
||||
if (!m) continue;
|
||||
const key = m[1]!.toLowerCase().replace(/s$/, '');
|
||||
if (key !== 'vendor-default') { uses.push(...list(m[2]!).map(model => ({ model, role: key as ModelRole }))); continue; }
|
||||
const [model = '', ...rest] = m[2]!.trim().split(/\s+/);
|
||||
const system = rest.join(' ').replace(/^(?:[—–:|-]+|in|for)\s+/i, '').trim();
|
||||
if (!model || !filled(system)) errors.push(`vendor-default: ${m[2]!.trim() || '(empty)'} needs the model and the competitor system that ships it as its default, such as "vendor-default: gpt-4o-mini Mem0 1.2 as shipped"`);
|
||||
else exceptions.push({ model: model.replace(/^`|`$/g, '').split('#')[0]!, system, roles: [] });
|
||||
}
|
||||
const bare = (m: string) => m.toLowerCase().replace(/^(?:[a-z-]+[/:])+/, '');
|
||||
const word = (s: string) => s.toLowerCase().replace(/[^a-z0-9]/g, '');
|
||||
const refused: ModelGenerationCheck['refused'] = [];
|
||||
for (const use of uses) {
|
||||
const replacement = currentReplacement(use.model);
|
||||
if (!replacement) continue;
|
||||
const exception = use.role === 'arm' && use.loadout ? exceptions.find(e => bare(e.model) === bare(use.model) && word(e.system).startsWith(word(use.loadout!)) && word(use.loadout!) !== '') : undefined;
|
||||
if (exception) { if (!exception.roles.includes('arm')) exception.roles.push('arm'); continue; }
|
||||
if (!refused.some(r => r.model === use.model && r.role === use.role)) refused.push({ model: use.model, role: use.role, replacement });
|
||||
}
|
||||
return { ok: !refused.length && !errors.length, exempt: false, refused, exceptions, errors };
|
||||
}
|
||||
export const modelGenerationProblems = (c: ModelGenerationCheck) => [...c.refused.map(r => `${r.model} as ${r.role} is an older generation; use ${r.replacement} (R116)`), ...c.errors];
|
||||
export const renderModelGenerations = (c: ModelGenerationCheck) => [
|
||||
...c.refused.map(r => `MODEL_GENERATION: refused ${r.model} role=${r.role} replacement=${r.replacement} (R116, docs/TESTING_INTERNALS.md#frontier-models-under-test)`),
|
||||
...c.exceptions.map(e => `MODEL_EXCEPTION: ${e.model} vendor-default system=${JSON.stringify(e.system)} roles=${e.roles.join(',') || 'declared'} (the results must name it)`),
|
||||
].map(l => `${l}\n`).join('');
|
||||
|
||||
export interface DecisionsCheck { outcomes: Array<{ result: string; action: string }>; errors: string[] }
|
||||
/** `## Decisions`: one `if <result>: <what we do>` line per possible result, at least two, and not all the same action. */
|
||||
export function checkDecisions(body: string[] | null): DecisionsCheck {
|
||||
@@ -127,15 +180,16 @@ export function checkDecisions(body: string[] | null): DecisionsCheck {
|
||||
return { outcomes, errors };
|
||||
}
|
||||
|
||||
export interface ScoringCheck { judge: string | null; labels: number | null; agreement: number | null; errors: string[]; per_arm?: boolean }
|
||||
export interface ScoringCheck { judge: string | null; labels: number | null; agreement: number | null; errors: string[]; per_arm?: boolean; min_labels?: number }
|
||||
/**
|
||||
* `## Scoring`: `judge: none` or the judge model; a model judge needs `labels:`
|
||||
* (at least 40) and `agreement:` (a kappa bar of at least 0.6) and a family no
|
||||
* (at least judgeMinLabels(frozen): 100, or 40 for a plan frozen before 2026-11-22) and `agreement:` (a kappa bar of at least 0.6) and a family no
|
||||
* arm shares. Two or more arms need `paired: yes`, `interval: 95%` and `mdd:`,
|
||||
* the smallest difference the run can detect.
|
||||
*/
|
||||
export function checkScoring(body: string[] | null, arms: string[]): ScoringCheck {
|
||||
if (!body?.length) return { judge: null, labels: null, agreement: null, errors: [] };
|
||||
export function checkScoring(body: string[] | null, arms: string[], frozen: string | null = null): ScoringCheck {
|
||||
const min_labels = judgeMinLabels(frozen);
|
||||
if (!body?.length) return { judge: null, labels: null, agreement: null, errors: [], min_labels };
|
||||
const kv = keyValues(body);
|
||||
const judge = kv.judge || null;
|
||||
const labels = firstNumber(kv.labels);
|
||||
@@ -143,7 +197,7 @@ export function checkScoring(body: string[] | null, arms: string[]): ScoringChec
|
||||
const errors: string[] = [];
|
||||
if (!judge) errors.push('no judge: line (judge: none, or the judge model)');
|
||||
else if (judge.toLowerCase() !== 'none') {
|
||||
if (labels === null || labels < JUDGE_MIN_LABELS) errors.push(`labels: needs at least ${JUDGE_MIN_LABELS} hand-labelled outputs the judge is checked against`);
|
||||
if (labels === null || labels < min_labels) errors.push(`labels: needs at least ${min_labels} hand-labelled outputs the judge is checked against${min_labels > JUDGE_MIN_LABELS ? ` (${JUDGE_MIN_LABELS} only for a plan frozen before ${JUDGE_LABELS_RAISED_SINCE})` : ''}`);
|
||||
if (agreement === null || agreement < JUDGE_MIN_KAPPA || agreement > 1) errors.push(`agreement: needs a kappa bar from ${JUDGE_MIN_KAPPA} to 1`);
|
||||
const family = modelFamily(judge);
|
||||
for (const arm of [...new Set(arms)]) if (modelFamily(arm) === family) errors.push(`judge ${judge} is the same model family (${family}) as arm ${arm}; use a judge from another family`);
|
||||
@@ -153,7 +207,7 @@ export function checkScoring(body: string[] | null, arms: string[]): ScoringChec
|
||||
if (firstNumber(kv.interval) !== 95) errors.push('interval: 95% (the interval every comparison is reported with)');
|
||||
if (PLACEHOLDER.test(kv.mdd ?? '')) errors.push('mdd: the smallest difference this run can detect, stated before the run');
|
||||
}
|
||||
return { judge, labels, agreement, errors, per_arm: /^yes\b/i.test(kv['per-arm'] ?? '') };
|
||||
return { judge, labels, agreement, errors, per_arm: /^yes\b/i.test(kv['per-arm'] ?? ''), min_labels };
|
||||
}
|
||||
|
||||
export interface JudgeLabelCheck { ok: boolean; judge: string; n: number; kappa: number | null; need_n: number; need_kappa: number; problems: string[]; arms: Array<{ arm: string; n: number; kappa: number | null }> }
|
||||
@@ -171,7 +225,7 @@ export function cohensKappa(pairs: Array<[string, string]>): number | null {
|
||||
|
||||
/** Score the preregistered judge against a JSONL file of `{"id", "human", "judge"}` rows. */
|
||||
export function checkJudgeLabels(scoring: ScoringCheck, labelsText: string, planArms: string[] = []): JudgeLabelCheck {
|
||||
const need_n = Math.max(JUDGE_MIN_LABELS, scoring.labels ?? 0);
|
||||
const need_n = Math.max(scoring.min_labels ?? JUDGE_RAISED_MIN_LABELS, scoring.labels ?? 0);
|
||||
const need_kappa = Math.max(JUDGE_MIN_KAPPA, scoring.agreement ?? 0);
|
||||
const problems: string[] = [];
|
||||
const pairs: Array<[string, string]> = [];
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* Reads text only; executes nothing.
|
||||
*/
|
||||
import { armIdentities, checkPrereg } from './eval-plan';
|
||||
import { checkJudgeLabels, type JudgeLabelCheck } from './eval-plan-checks';
|
||||
import { checkJudgeLabels, modelGenerationProblems, type JudgeLabelCheck } from './eval-plan-checks';
|
||||
import type { ResultCodeName } from './result-codes';
|
||||
|
||||
export interface ResultsIssue { code: ResultCodeName; message: string }
|
||||
@@ -59,6 +59,8 @@ export function checkResults(preregText: string, resultsText: string, labelsText
|
||||
for (const s of prereg.missing) issues.push({ code: 'PREREG_INCOMPLETE', message: `## ${s}: missing` });
|
||||
for (const s of prereg.empty) issues.push({ code: 'PREREG_INCOMPLETE', message: `## ${s}: empty` });
|
||||
for (const e of prereg.loop.errors) issues.push({ code: 'PREREG_INCOMPLETE', message: `## ${e.section}: ${e.message}` });
|
||||
for (const p of modelGenerationProblems(prereg.models)) issues.push({ code: 'EVAL_MODEL_OLD_GENERATION', message: p });
|
||||
for (const e of prereg.models.exceptions) if (!resultsText.toLowerCase().includes(e.model.toLowerCase())) issues.push({ code: 'EVAL_MODEL_OLD_GENERATION', message: `the results never name ${e.model}, the vendor default kept for ${e.system}; the results row names it` });
|
||||
let judge: JudgeLabelCheck | null = null;
|
||||
if (!prereg.grandfathered) {
|
||||
for (const [section, errors] of [['Decisions', prereg.decisions.errors], ['Scoring', prereg.scoring.errors]] as const) {
|
||||
|
||||
+18
-9
@@ -19,7 +19,7 @@ import { EXCLUDED_BILLING_CATEGORIES, estimateCostUsd, hasPricing, PRICING, pric
|
||||
import type { ResultCodeName } from './result-codes';
|
||||
import type { ModelRulesCheck } from './eval-models';
|
||||
import { readLedger, release, reserve, settle, SpendCapExceeded, summarize, type SpendLedger, type SpendSummary } from './spend-ledger';
|
||||
import { checkDecisions, checkLoop, checkQuickLook, checkScoring, frozenDate, grandfathered, isQuickLook, loopGrandfathered, type DecisionsCheck, type LoopCheck, type QuickLookCheck, type ScoringCheck } from './eval-plan-checks';
|
||||
import { checkDecisions, checkLoop, checkModelGenerations, checkQuickLook, checkScoring, frozenDate, grandfathered, isQuickLook, loopGrandfathered, type DecisionsCheck, type LoopCheck, type ModelGenerationCheck, type QuickLookCheck, type ScoringCheck } from './eval-plan-checks';
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// preregistration
|
||||
@@ -33,7 +33,7 @@ const LOOP_CHECK_SECTIONS: readonly string[] = ['Pilot', 'Cost'];
|
||||
export interface ComparisonCheck { stack: 'loaded' | 'none' | null; why: string | null; errors: string[] }
|
||||
/** `## No-gstack arm`, required when `stack: loaded`: one `<model>#no-gstack` Arms line per model, the inputs, prompt, panel and report it shares with the variants, and its masking, install and audit lines. */
|
||||
export interface NoGstackArmCheck { required: boolean; ok: boolean; arms: string[]; problems: string[] }
|
||||
export interface PreregCheck { ok: boolean; present: string[]; missing: string[]; empty: string[]; comparison: ComparisonCheck; no_gstack: NoGstackArmCheck; diagnostics: PreregDiagnostics | null; decisions: DecisionsCheck; scoring: ScoringCheck; frozen: string | null; grandfathered: boolean; loop: LoopCheck; loop_grandfathered: boolean; quick: QuickLookCheck | null }
|
||||
export interface PreregCheck { ok: boolean; present: string[]; missing: string[]; empty: string[]; comparison: ComparisonCheck; no_gstack: NoGstackArmCheck; diagnostics: PreregDiagnostics | null; decisions: DecisionsCheck; scoring: ScoringCheck; frozen: string | null; grandfathered: boolean; loop: LoopCheck; loop_grandfathered: boolean; quick: QuickLookCheck | null; models: ModelGenerationCheck }
|
||||
export const NO_GSTACK_LOADOUT = 'no-gstack';
|
||||
/** masking, install and audit keep the arm clean (TESTING_INTERNALS.md#no-gstack-arm): an arm that read a gstack skill file is contaminated. */
|
||||
export const NO_GSTACK_KEYS = ['arms', 'inputs', 'prompt', 'panel', 'report', 'masking', 'install', 'audit'] as const;
|
||||
@@ -48,7 +48,7 @@ export function preregTemplate(title = 'Eval preregistration'): string {
|
||||
<!-- One \`if <result>: <what we do>\` line per way the run can come out (a pass, a miss, no difference), at least two, written before anything is spent. If every result leads to the same action, the eval changes nothing: do not run it. -->
|
||||
|
||||
## Arms
|
||||
<!-- One line per arm: the arm identity first (\`<model>\` or \`<model>#<loadout>\`, the model in lib/pricing.ts, e.g. \`claude-opus-5-5#no-gstack\`), settings, and the per-item cost from \`gstack-eval-plan arms\`. Models under test are frontier models (today \`claude-opus-5-5\`, \`gpt-6.2-sol\`) plus at most one named low-cost primary; a Haiku or Sonnet arm only with a stated tier question. -->
|
||||
<!-- One line per arm: the arm identity first (\`<model>\` or \`<model>#<loadout>\`, the model in lib/pricing.ts, e.g. \`claude-opus-5-5#no-gstack\`), settings, and the per-item cost from \`gstack-eval-plan arms\`. Models under test are frontier models (today \`claude-opus-5-5\`, \`gpt-6.2-sol\`) plus at most one named low-cost primary; a Haiku or Sonnet arm only with a stated tier question. No gpt-4o and no model lib/pricing.ts marks \`superseded_by\` (R116). -->
|
||||
|
||||
## Comparison
|
||||
<!-- \`stack: loaded\` when any arm loads gstack or another skill stack (review variants, preamble loadouts, skill diets, a model panel under a stack); otherwise \`stack: none\` and a \`why:\` line. -->
|
||||
@@ -57,7 +57,10 @@ export function preregTemplate(title = 'Eval preregistration'): string {
|
||||
<!-- Required with \`stack: loaded\`: \`arms:\` one \`<model>#no-gstack\` Arms line per model; \`inputs:\` the same rows and fixture; \`prompt:\` the task only (no SKILL.md, preamble, hooks or installed skills); \`panel:\` the same E2E kind, trials and judge; \`report:\` its row beside the variants; \`masking:\` how the run agent is kept from gstack (an empty directory bind-mounted over ~/.capy/drive/user-garry-tan and ~/.capy/drive/org-gstack-gbrain before it starts, or a container that sees no Capy drive); \`install:\` no gstack at ~/.local/share/gstack or ~/.claude/skills; \`audit:\` the per-arm drive-read audit (an arm that read a gstack skill file is contaminated and gets zero credit). -->
|
||||
|
||||
## Scoring
|
||||
<!-- \`judge: none\` when a rule scores every metric; otherwise \`judge: <model>\` from another model family than every arm, \`labels: <n>\` hand-labelled outputs it is checked against (at least 40, never held-out rows) and \`agreement: <kappa bar>\` (at least 0.6), \`per-arm: yes\` (agreement read on each arm's outputs, not pooled) and \`effort: <the reasoning effort set in the judge's start>\`; GPT-6 Astra or GPT-6.2 Astra judges Claude arms, Claude Opus 5.5 judges GPT arms. With two or more arms: \`paired: yes\`, \`interval: 95%\` and \`mdd: <the smallest difference this run can detect>\`. -->
|
||||
<!-- \`judge: none\` when a rule scores every metric; otherwise \`judge: <model>\` from another model family than every arm, \`labels: <n>\` hand-labelled outputs it is checked against (at least 100, or 40 for a plan frozen before 2026-11-22; never held-out rows) and \`agreement: <kappa bar>\` (at least 0.6), \`per-arm: yes\` (agreement read on each arm's outputs, not pooled) and \`effort: <the reasoning effort set in the judge's start>\`; GPT-6 Astra or GPT-6.2 Astra judges Claude arms, Claude Opus 5.5 judges GPT arms. With two or more arms: \`paired: yes\`, \`interval: 95%\` and \`mdd: <the smallest difference this run can detect>\`. -->
|
||||
|
||||
## Models
|
||||
<!-- Optional: every other model the run starts, as \`reader: <model>\` and \`simulator: <model>\` lines. R116 refuses gpt-4o and any model lib/pricing.ts marks \`superseded_by\` in every role, arms and the judge included, and names the replacement. \`vendor-default: <model> <system>\` keeps a competitor system's built-in model when that system (an arm) is tested as its vendor ships it; the check records it and the results must name it. -->
|
||||
|
||||
## Pilot
|
||||
<!-- Uncounted, per arm, before its counted run: \`share: <at most 10>%\` of that arm's budget; \`counted: no\`; \`ran:\` how the arm's own outputs show the part under test ran; \`judge:\` the judge's label check on that arm's pilot outputs (with a model judge); \`supply:\` how the units are shown to be suppliable at the planned rate; \`units:\` every unit type the counted run uses, each drawn at least once; \`seed:\` the fixed seed for the draw order, independent of the number of workers. An arm that fails is fixed or left out, and reported as left out. -->
|
||||
@@ -170,7 +173,7 @@ export function checkPrereg(text: string): PreregCheck {
|
||||
const noLoop: LoopCheck = { paid: null, interim_required: false, errors: [] };
|
||||
if (isQuickLook(text)) {
|
||||
const quick = checkQuickLook(text);
|
||||
return { ok: !quick.errors.length, present, missing, empty, comparison: { stack: null, why: null, errors: [] }, no_gstack: { required: false, ok: true, arms: [], problems: [] }, diagnostics: null, decisions: { outcomes: [], errors: [] }, scoring: { judge: null, labels: null, agreement: null, errors: [] }, frozen: frozenDate(text), grandfathered: exempt, loop: noLoop, loop_grandfathered: loopExempt, quick };
|
||||
return { ok: !quick.errors.length, models: checkModelGenerations({ arms: [] }), present, missing, empty, comparison: { stack: null, why: null, errors: [] }, no_gstack: { required: false, ok: true, arms: [], problems: [] }, diagnostics: null, decisions: { outcomes: [], errors: [] }, scoring: { judge: null, labels: null, agreement: null, errors: [] }, frozen: frozenDate(text), grandfathered: exempt, loop: noLoop, loop_grandfathered: loopExempt, quick };
|
||||
}
|
||||
for (const name of PREREG_SECTIONS) {
|
||||
if (exempt && RESULT_CHECK_SECTIONS.includes(name)) continue;
|
||||
@@ -182,11 +185,12 @@ export function checkPrereg(text: string): PreregCheck {
|
||||
const no_gstack = checkNoGstackArm(text, comparison.stack);
|
||||
const diagnostics = parsePreregDiagnostics(text);
|
||||
const decisions = exempt ? { outcomes: [], errors: [] } : checkDecisions(sectionBody(text, 'Decisions'));
|
||||
const scoring = exempt ? { judge: null, labels: null, agreement: null, errors: [] } : checkScoring(sectionBody(text, 'Scoring'), armIdentities(text));
|
||||
const scoring = exempt ? { judge: null, labels: null, agreement: null, errors: [] } : checkScoring(sectionBody(text, 'Scoring'), armIdentities(text), frozenDate(text));
|
||||
const section = (name: string) => sectionBody(text, name);
|
||||
const loop = loopExempt ? noLoop : checkLoop({ pilot: section('Pilot'), cost: section('Cost'), interim: section('Interim look'), scoring: section('Scoring'), bars: section('Bars'), arms: section('Arms'), heldOut: section('Held-out exposure') });
|
||||
const ok = missing.length === 0 && empty.length === 0 && !comparison.errors.length && no_gstack.ok && !diagnostics?.errors.length && !decisions.errors.length && !scoring.errors.length && !loop.errors.length;
|
||||
return { ok, present, missing, empty, comparison, no_gstack, diagnostics, decisions, scoring, frozen: frozenDate(text), grandfathered: exempt, loop, loop_grandfathered: loopExempt, quick: null };
|
||||
const models = checkModelGenerations({ arms: armIdentities(text), judge: scoring.judge, models: section('Models'), frozen: frozenDate(text) });
|
||||
const ok = missing.length === 0 && empty.length === 0 && !comparison.errors.length && no_gstack.ok && !diagnostics?.errors.length && !decisions.errors.length && !scoring.errors.length && !loop.errors.length && models.ok;
|
||||
return { ok, models, present, missing, empty, comparison, no_gstack, diagnostics, decisions, scoring, frozen: frozenDate(text), grandfathered: exempt, loop, loop_grandfathered: loopExempt, quick: null };
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -345,6 +349,8 @@ export interface DryRunResult {
|
||||
model_rules?: { ok: boolean; source: string; refused: string[] };
|
||||
/** R54: Haiku and Sonnet are not models under test; arms on them alone are refused unless the plan asks about that tier. */
|
||||
frontier: { ok: boolean; small_tier: string[]; tier_question: string | null; recost_usd: Record<string, number> };
|
||||
/** R116: no arm is gpt-4o or a model lib/pricing.ts marks superseded_by. */
|
||||
generation: ModelGenerationCheck;
|
||||
};
|
||||
per_item_usd: Record<string, number | null>; excluded_billing: readonly string[]; pass: boolean; stub: 'stub-model (no network, $0)';
|
||||
}
|
||||
@@ -395,9 +401,10 @@ export function dryRun(o: DryRunOptions): DryRunResult {
|
||||
const smallTier = o.arms.filter(a => isSmallTierModel(armModel(a)));
|
||||
const recost = Object.fromEntries(FRONTIER_MODELS.map(m => [m, rows * o.arms.length * estimateCostUsd({ input: avgIn, output: budget }, m)]));
|
||||
checks.frontier = { ok: smallTier.length < o.arms.length || !!o.tierQuestion?.trim(), small_tier: smallTier, tier_question: o.tierQuestion?.trim() || null, recost_usd: recost };
|
||||
checks.generation = checkModelGenerations({ arms: o.arms });
|
||||
return {
|
||||
schema_version: 1, input: o.input, rows, bad_rows: bad, est_input_tokens: inputTokens, est_output_tokens: rows * budget, arms: o.arms, checks, per_item_usd: perItem,
|
||||
excluded_billing: EXCLUDED_BILLING_CATEGORIES, pass: rows > 0 && bad.length === 0 && checks.price_table.ok && checks.output_budget.ok && checks.retry_prompt.ok && (checks.reservation_fits_cap?.ok ?? true) && (checks.model_rules?.ok ?? true) && checks.frontier.ok, stub: 'stub-model (no network, $0)',
|
||||
excluded_billing: EXCLUDED_BILLING_CATEGORIES, pass: rows > 0 && bad.length === 0 && checks.price_table.ok && checks.output_budget.ok && checks.retry_prompt.ok && (checks.reservation_fits_cap?.ok ?? true) && (checks.model_rules?.ok ?? true) && checks.frontier.ok && checks.generation.ok, stub: 'stub-model (no network, $0)',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -410,6 +417,7 @@ export function renderDryRun(r: DryRunResult): string {
|
||||
`CHECK: retry-prompt ${r.checks.retry_prompt.ok ? `ok — ${JSON.stringify(r.checks.retry_prompt.text)}` : 'missing (pass --retry-prompt <file> with the exact text the run will send)'}`,
|
||||
...(r.checks.reservation_fits_cap ? [renderReservationCheck(r.checks.reservation_fits_cap, r.checks.output_budget.budget)] : []),
|
||||
...(r.checks.frontier.small_tier.length ? [renderFrontierCheck(r.checks.frontier, r.arms.length)] : []),
|
||||
...(r.checks.generation?.refused.length ? [`CHECK: model-generation refused ${r.checks.generation.refused.map(a => `${a.model} (use ${a.replacement})`).join(', ')} (R116, docs/TESTING_INTERNALS.md#frontier-models-under-test)`] : []),
|
||||
...(r.checks.model_rules ? [`CHECK: model-rules ${r.checks.model_rules.ok ? 'ok' : `refused ${r.checks.model_rules.refused.join('; ') || 'invalid rules'}`} (source ${r.checks.model_rules.source})`] : []),
|
||||
...Object.entries(r.per_item_usd).map(([m, usd]) => `ESTIMATE: ${m} per_item=${usd === null ? 'unknown (no price)' : `$${usd.toFixed(4)}`} (estimate: excludes ${r.excluded_billing.length} billing categories, see lib/pricing.ts)`),
|
||||
`DRY_RUN_RESULT: ${r.pass ? 'pass' : 'fail'}`,
|
||||
@@ -445,6 +453,7 @@ export function startPilot(o: PilotStartOptions): { record: PilotRecord; error?:
|
||||
const dry = JSON.parse(fs.readFileSync(o.dryRun, 'utf8')) as DryRunResult;
|
||||
if (!dry.pass) return { record: null as unknown as PilotRecord, error: { code: 'EVAL_DRY_RUN_FAILED', message: `${o.dryRun} did not pass; the pilot never starts on a failed dry run` } };
|
||||
if (o.arms.length && o.arms.every(a => isSmallTierModel(armModel(a))) && !dry.checks.frontier?.tier_question) return { record: null as unknown as PilotRecord, error: { code: 'EVAL_DRY_RUN_FAILED', message: `every pilot arm is Haiku or Sonnet and ${o.dryRun} records no --tier-question (R54, docs/TESTING_INTERNALS.md#frontier-models-under-test)` } };
|
||||
const stale = checkModelGenerations({ arms: o.arms }).refused; if (stale.length) return { record: null as unknown as PilotRecord, error: { code: 'EVAL_MODEL_OLD_GENERATION', message: stale.map(a => `${a.model} is an older generation; use ${a.replacement} (R116)`).join('; ') } };
|
||||
const tokens = o.tokens ?? { input: dry.rows ? Math.ceil(dry.est_input_tokens / dry.rows) : DEFAULT_TOKENS.input, output: dry.checks.output_budget.budget };
|
||||
const seat = o.seatMetered ?? [];
|
||||
const stray = seat.filter(a => !o.arms.includes(a));
|
||||
|
||||
+28
-11
@@ -28,6 +28,13 @@ export interface ModelPricing {
|
||||
input_per_mtok: number;
|
||||
output_per_mtok: number;
|
||||
cached_input_per_mtok?: number;
|
||||
/**
|
||||
* Set when a newer major generation of this model's family has its own row
|
||||
* here: the row that replaces it. gstack-eval-plan refuses a superseded
|
||||
* model in every role a plan chooses (R116, docs/TESTING_INTERNALS.md#frontier-models-under-test).
|
||||
* A point release (gpt-6-astra beside gpt-6.2-astra) is the same generation.
|
||||
*/
|
||||
superseded_by?: string;
|
||||
as_of: string; // YYYY-MM
|
||||
}
|
||||
|
||||
@@ -47,14 +54,14 @@ export const PRICING: Record<string, ModelPricing> = {
|
||||
// https://platform.claude.com/docs/en/models/opus-5-5/overview#pricing (list prices effective 2026-10-07)
|
||||
'claude-opus-5-5': { input_per_mtok: 4.00, output_per_mtok: 20.00, cached_input_per_mtok: 0.20, as_of: '2026-10' },
|
||||
// https://platform.claude.com/docs/en/about-claude/pricing (fetched 2026-10-12)
|
||||
'claude-opus-4-7': { input_per_mtok: 5.00, output_per_mtok: 25.00, cached_input_per_mtok: 0.50, as_of: '2026-10' },
|
||||
'claude-opus-4-7': { input_per_mtok: 5.00, output_per_mtok: 25.00, cached_input_per_mtok: 0.50, superseded_by: 'claude-opus-5-5', as_of: '2026-10' },
|
||||
// https://platform.claude.com/docs/en/about-claude/pricing (fetched 2026-10-12)
|
||||
'claude-sonnet-5-5': { input_per_mtok: 2.00, output_per_mtok: 10.00, cached_input_per_mtok: 0.10, as_of: '2026-10' },
|
||||
'claude-sonnet-4-6': { input_per_mtok: 3.00, output_per_mtok: 15.00, as_of: '2026-04' },
|
||||
'claude-sonnet-4-6': { input_per_mtok: 3.00, output_per_mtok: 15.00, superseded_by: 'claude-sonnet-5-5', as_of: '2026-04' },
|
||||
// https://platform.claude.com/docs/en/about-claude/pricing (fetched 2026-10-31; standard tier, prompts up to
|
||||
// 100,000 tokens; the $0.50 / $2.50 / $0.05 rate above that is excluded like the other long-context surcharges)
|
||||
'claude-haiku-5-5': { input_per_mtok: 0.10, output_per_mtok: 0.50, cached_input_per_mtok: 0.01, as_of: '2026-10' },
|
||||
'claude-haiku-4-5': { input_per_mtok: 1.00, output_per_mtok: 5.00, as_of: '2026-04' },
|
||||
'claude-haiku-4-5': { input_per_mtok: 1.00, output_per_mtok: 5.00, superseded_by: 'claude-haiku-5-5', as_of: '2026-04' },
|
||||
|
||||
// OpenAI (GPT + o-series)
|
||||
// https://developers.openai.com/api/docs/models/gpt-6-astra
|
||||
@@ -67,13 +74,13 @@ export const PRICING: Record<string, ModelPricing> = {
|
||||
'gpt-6.2-astra': { input_per_mtok: 8.00, output_per_mtok: 40.00, cached_input_per_mtok: 0.40, as_of: '2026-11' },
|
||||
// https://developers.openai.com/api/docs/models/gpt-6-luna (fetched 2026-10-31; standard tier, up to 272K input)
|
||||
'gpt-6-luna': { input_per_mtok: 0.10, output_per_mtok: 0.50, cached_input_per_mtok: 0.01, as_of: '2026-10' },
|
||||
'gpt-5.4': { input_per_mtok: 2.50, output_per_mtok: 10.00, as_of: '2026-04' },
|
||||
'gpt-5.4': { input_per_mtok: 2.50, output_per_mtok: 10.00, superseded_by: 'gpt-6.2-sol', as_of: '2026-04' },
|
||||
// https://developers.openai.com/api/docs/models/gpt-4o (fetched 2026-10-13; gbrain's LongMemEval judge, the official scorer's model;
|
||||
// the alias only: the gpt-4o-2024-05-13 snapshot has its own price)
|
||||
'gpt-4o': { input_per_mtok: 2.50, output_per_mtok: 10.00, cached_input_per_mtok: 1.25, as_of: '2026-10' },
|
||||
'gpt-5.4-mini': { input_per_mtok: 0.60, output_per_mtok: 2.40, as_of: '2026-04' },
|
||||
'o3': { input_per_mtok: 15.00, output_per_mtok: 60.00, as_of: '2026-04' },
|
||||
'o4-mini': { input_per_mtok: 1.10, output_per_mtok: 4.40, as_of: '2026-04' },
|
||||
'gpt-4o': { input_per_mtok: 2.50, output_per_mtok: 10.00, cached_input_per_mtok: 1.25, superseded_by: 'gpt-6.2-sol', as_of: '2026-10' },
|
||||
'gpt-5.4-mini': { input_per_mtok: 0.60, output_per_mtok: 2.40, superseded_by: 'gpt-6-luna', as_of: '2026-04' },
|
||||
'o3': { input_per_mtok: 15.00, output_per_mtok: 60.00, superseded_by: 'gpt-6.2-sol', as_of: '2026-04' },
|
||||
'o4-mini': { input_per_mtok: 1.10, output_per_mtok: 4.40, superseded_by: 'gpt-6-luna', as_of: '2026-04' },
|
||||
|
||||
// Google
|
||||
// https://ai.google.dev/gemini-api/docs/pricing (fetched 2026-10-31; the rates starting 2026-12-01, so estimates
|
||||
@@ -85,9 +92,9 @@ export const PRICING: Record<string, ModelPricing> = {
|
||||
// https://ai.google.dev/gemini-api/docs/pricing (fetched 2026-10-12; same schedule as gemini-3.8-flash)
|
||||
'gemini-3.6-flash': { input_per_mtok: 0.75, output_per_mtok: 3.75, cached_input_per_mtok: 0.075, as_of: '2026-10' },
|
||||
// https://ai.google.dev/gemini-api/docs/pricing (fetched 2026-10-12; prompts <= 200k tokens, the long-context rate is excluded)
|
||||
'gemini-3.1-pro-preview': { input_per_mtok: 2.00, output_per_mtok: 12.00, cached_input_per_mtok: 0.20, as_of: '2026-10' },
|
||||
'gemini-2.5-pro': { input_per_mtok: 1.25, output_per_mtok: 5.00, as_of: '2026-04' },
|
||||
'gemini-2.5-flash': { input_per_mtok: 0.30, output_per_mtok: 1.20, as_of: '2026-04' },
|
||||
'gemini-3.1-pro-preview': { input_per_mtok: 2.00, output_per_mtok: 12.00, cached_input_per_mtok: 0.20, superseded_by: 'gemini-4-argon', as_of: '2026-10' },
|
||||
'gemini-2.5-pro': { input_per_mtok: 1.25, output_per_mtok: 5.00, superseded_by: 'gemini-4-argon', as_of: '2026-04' },
|
||||
'gemini-2.5-flash': { input_per_mtok: 0.30, output_per_mtok: 1.20, superseded_by: 'gemini-3.8-flash', as_of: '2026-04' },
|
||||
|
||||
// Particle AI: https://docs.particle.ai/usage-billing (fetched 2026-10-30; peak rates, off-peak and flex are 50% lower;
|
||||
// OpenRouter serves particle-ai/particle-1 at the same rates)
|
||||
@@ -138,6 +145,16 @@ export function hasPricing(model: string | undefined): boolean {
|
||||
return pricingRow(model) !== undefined;
|
||||
}
|
||||
|
||||
/** gpt-4o in any variant, snapshot or provider form (`openrouter:openai/gpt-4o`, `gpt-4o-mini-2024-07-18`, `chatgpt-4o-latest`), priced or not. */
|
||||
const GPT_4O = /^(?:chatgpt-4o|gpt-4o)(?:$|-)/;
|
||||
|
||||
/** The current model that replaces `model` when it is gpt-4o or a row marked `superseded_by` (R116), else null. */
|
||||
export function currentReplacement(model: string): string | null {
|
||||
const segments = model.trim().toLowerCase().split(/[:/]/);
|
||||
if (segments.some(s => GPT_4O.test(s))) return segments.some(s => /4o-mini/.test(s)) ? 'gpt-6-luna' : PRICING['gpt-4o']!.superseded_by!;
|
||||
return pricingRow(model)?.superseded_by ?? null;
|
||||
}
|
||||
|
||||
const WARNED = new Set<string>();
|
||||
|
||||
export function estimateCostUsd(
|
||||
|
||||
@@ -11,7 +11,7 @@ export const EVAL_RESULT_CODES = {
|
||||
PREREG_INCOMPLETE: {
|
||||
anchor: 'prereg-incomplete',
|
||||
summary: 'the preregistration file lacks a required section, a section is empty, or the Comparison, Decisions, Scoring or Diagnostics declaration is malformed',
|
||||
fix: 'fill every section `gstack-eval-plan prereg --check` names (bars, decisions, arms, comparison, scoring, decoys, stop rules, held-out exposure) before any priced call: at least two decisions with different actions, and a judge from another model family checked against at least 40 labels at kappa 0.6 or better',
|
||||
fix: 'fill every section `gstack-eval-plan prereg --check` names (bars, decisions, arms, comparison, scoring, decoys, stop rules, held-out exposure) before any priced call: at least two decisions with different actions, and a judge from another model family checked against at least 100 labels (40 for a plan frozen before 2026-11-22) at kappa 0.6 or better',
|
||||
},
|
||||
// Field list 2 (2026-10-16), W8: preregistered diagnostics run before the freeze commit.
|
||||
PREREG_DIAGNOSTIC_UNTESTED: {
|
||||
|
||||
+2
-2
@@ -684,8 +684,8 @@ export const RESULT_CODES = {
|
||||
},
|
||||
EVAL_MODEL_OLD_GENERATION: {
|
||||
anchor: 'eval-model-old-generation',
|
||||
summary: 'an arm names an older generation of a model family the eval model rules order newest first',
|
||||
fix: 'use the newest id of the family the EVAL_MODEL line names, or reorder families in .gstack/eval-models.json in a reviewed PR',
|
||||
summary: 'an arm, judge, reader or simulator is gpt-4o or a model lib/pricing.ts marks superseded_by (R116), or an arm is not the newest id of a family the eval model rules order newest first',
|
||||
fix: 'use the replacement the MODEL_GENERATION or EVAL_MODEL line names; a competitor system tested as its vendor ships it declares its built-in model with a vendor-default: line in ## Models; or reorder families in .gstack/eval-models.json in a reviewed PR',
|
||||
},
|
||||
EVAL_MODEL_GENERATION_UNRESOLVED: {
|
||||
anchor: 'eval-model-generation-unresolved',
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"blob":"b88614aba91757dc9cd096e2333533de3bd57efe","since":6,"nonBehavioral":"Merge of main (GST-1698 plan-eng-review case retirement) with GST-1717: paid-cases.ts drops both retired skills' files and test-pr-profile.ts stops requiring full validation for a deleted prompt; no remaining case's prompt, runner or grading changes"}
|
||||
{"blob":"b88614aba91757dc9cd096e2333533de3bd57efe","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"e8ce3cb98474dded38c5128a631d283b0ca35b63","since":6,"nonBehavioral":"F1 rule-16 flaky rerun: report aggregation, rerun planning and the gate slice exit code; no case's execution, trial outcome, trial record or panel verdict changes, so no pass-rate series resets"}
|
||||
{"blob":"e8ce3cb98474dded38c5128a631d283b0ca35b63","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"31355b5a97706943e5fccb2946adeba5fa17a08c","since":6,"nonBehavioral":"GST-1371 removes the 21 skill-prose clarity judges: llm-judge.ts drops judge() and two prompt builders no remaining case calls, paid-report.ts rejects manual-review claims that only the removed cookie judge made, and eval-budgets.ts shrinks the skill-llm-eval file wall to the three kept cases, whose own JUDGE_MS timeouts are unchanged; no kept case's prompt, threshold, samples or verdict can change"}
|
||||
{"blob":"31355b5a97706943e5fccb2946adeba5fa17a08c","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"3f2e4d616b5dd0204035710c66b64d49055c5714","since":6}
|
||||
{"blob":"3f2e4d616b5dd0204035710c66b64d49055c5714","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"77f0039e555cf695bdda02e123b4d6af6d378682","since":6,"nonBehavioral":"CAPY_LAUNCH_MARKERS gains GSTACK_PREFERENCES_FILE and GSTACK_LOADOUT_SKILL_ROOT, which the shard sandbox strips from fixture children; CI never sets either, so no case there sees a different input or verdict, and a Capy machine stops leaking the owner's settings into fixtures"}
|
||||
{"blob":"77f0039e555cf695bdda02e123b4d6af6d378682","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"5439d0a8f6e1569fa7c924af20d67c30c81d5d30","since":6,"nonBehavioral":"credential rejections are classed infra instead of assertion: no case's pass or fail changes; only failed trials whose provider rejected the run's key move class, so no rerun spends on a rejected key"}
|
||||
{"blob":"5439d0a8f6e1569fa7c924af20d67c30c81d5d30","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"c1d0b8ffabc86df40aa8785a7af87b0dae64f3f2","since":6,"nonBehavioral":"adds the new free-lane-only workflow trunk-flaky-tests.yml to FREE_ONLY_PR_FILES; no eval case reads it and no verdict can change"}
|
||||
{"blob":"c1d0b8ffabc86df40aa8785a7af87b0dae64f3f2","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"01185d20dc9761b04b9b2f751ec98664fe0eaf93","since":6}
|
||||
{"blob":"01185d20dc9761b04b9b2f751ec98664fe0eaf93","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"d66dac458b8c13250973e550edf8087d4044cd0b","since":6,"nonBehavioral":"Cost attribution only (GSTA-150 PR 2): a display-label record carries cost_case_id from runSkillTest's testName and the report binds its cost by it while the failed record and failure class still come from the named records (test/paid-report-cost.test.ts pins both); an aborted Agent SDK session logs its streamed usage as streamed_cost_usd, used only when a case has no record; a listed model-free case with no record or session is a known $0. No case's execution, outcome, failure class, rerun eligibility or panel verdict changes, so no pass-rate series resets. Also: runAgentSdkTest now validates systemPrompt before starting; every live caller already passed the claude_code preset, so the prompt the model sees is unchanged and no verdict can change"}
|
||||
{"blob":"d66dac458b8c13250973e550edf8087d4044cd0b","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"4881260ef793668e4963a062db6d06a5e1f7a40f","since":6}
|
||||
{"blob":"4881260ef793668e4963a062db6d06a5e1f7a40f","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"ce7a5eaa66e502a052ea9c53348dd2ab25db6148","since":6,"nonBehavioral":"Removes the plan-design 0D focus picker from the shared harness; floor.ts gains an optional pickSetupChoice hook that no other caller passes, so no other case's input or verdict can change. plan-design-finding-floor, the only case whose seed raises that menu, passes the picker from its owned fixture test/fixtures/design-floor-focus-picker.ts, so its owned bytes start its own new series."}
|
||||
{"blob":"ce7a5eaa66e502a052ea9c53348dd2ab25db6148","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"4596f41514cf87e2fe5f1791c00ea4991cba548c","since":6,"nonBehavioral":"Only GSTACK_SAFETY_ARM=removed runs on the Codex host change (GST-840): the installed ~/.codex/skills copies lose the registered rule paragraph, as the removed-arm fixture already did, so the removed control measures a missing rule. That arm is a manual comparison arm; gate and CI panels run the default rule arm, whose installed skills, prompts and verdicts are unchanged, and Claude-host runs never load this runner"}
|
||||
{"blob":"4596f41514cf87e2fe5f1791c00ea4991cba548c","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"c040ebbfa815b8cce19ef80c6133bd5a5474149a","since":6,"nonBehavioral":"Claude-host verdicts are unchanged: the Codex host (EVALS_HOST=codex, codex-host-runner) runs only when selected and records its own per-model series; the Codex runner refactor (execCodex extraction, onSpawn hook) keeps its events and verdicts and adds token cost accounting; host fields on the plan/report are absent for claude"}
|
||||
{"blob":"c040ebbfa815b8cce19ef80c6133bd5a5474149a","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"efb7e197dd5f66c3ad0e34074b14e640754f7a45","since":6}
|
||||
{"blob":"efb7e197dd5f66c3ad0e34074b14e640754f7a45","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"91996ff2bc303ee29f4e6f1705d1468b2536b32e","since":6,"nonBehavioral":"Cost attribution only (GSTA-150 PR 2): a display-label record carries cost_case_id from runSkillTest's testName and the report binds its cost by it while the failed record and failure class still come from the named records (test/paid-report-cost.test.ts pins both); an aborted Agent SDK session logs its streamed usage as streamed_cost_usd, used only when a case has no record; a listed model-free case with no record or session is a known $0. No case's execution, outcome, failure class, rerun eligibility or panel verdict changes, so no pass-rate series resets"}
|
||||
{"blob":"91996ff2bc303ee29f4e6f1705d1468b2536b32e","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"5a16324a47b7c3c770e64322ae357f90c405a249","since":6,"nonBehavioral":"Retired standalone /plan-eng-review cases (GST-1698): removed their budgets and paid-case rows; remaining files' walls shrink with their case counts, and no remaining case's budget or verdict changes"}
|
||||
{"blob":"5a16324a47b7c3c770e64322ae357f90c405a249","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"4085ad18cd99698f675deadad2a76a796427b693","since":6,"nonBehavioral":"Cost attribution only (GSTA-150 PR 2): a display-label record carries cost_case_id from runSkillTest's testName and the report binds its cost by it while the failed record and failure class still come from the named records (test/paid-report-cost.test.ts pins both); an aborted Agent SDK session logs its streamed usage as streamed_cost_usd, used only when a case has no record; a listed model-free case with no record or session is a known $0. No case's execution, outcome, failure class, rerun eligibility or panel verdict changes, so no pass-rate series resets"}
|
||||
{"blob":"4085ad18cd99698f675deadad2a76a796427b693","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"3b09ccc64c43dfcbe1e08b362b0ec998ee858512","since":6,"nonBehavioral":"test/helpers/hermetic-env.ts adds crew/ to the runtime view because the modules it seeded under lib/ and scripts/ moved there unchanged (GST-1833); the agent sees the same code at new paths, so no verdict can change"}
|
||||
{"blob":"3b09ccc64c43dfcbe1e08b362b0ec998ee858512","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"85b9cb59b8d7cce1e75804e92bddae188a9cdf8a","since":6,"nonBehavioral":"GST-1403 removes the last three standalone LLM judges (qa anti-refusal, voice directive tone, cross-skill greptile consistency): llm-judge.ts drops their three schemas and three prompt builders, which no remaining case calls, and eval-budgets.ts drops the deleted test/skill-llm-eval.test.ts file wall; no kept case's prompt, threshold, samples, budget or verdict can change"}
|
||||
{"blob":"81904a2a0fdff124713b743253d209f6e394dac8","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"ff9bfe43c43ec2bdd11114f7b8ec7c5736116f75","since":6}
|
||||
{"blob":"ff9bfe43c43ec2bdd11114f7b8ec7c5736116f75","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"4f77569f9ce11f9cee9f347216e468cd7c956820","since":6}
|
||||
{"blob":"4f77569f9ce11f9cee9f347216e468cd7c956820","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"16e5ea2bb5b9f28f44808a1a09024dbd3e6f28c4","since":6}
|
||||
{"blob":"16e5ea2bb5b9f28f44808a1a09024dbd3e6f28c4","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"404d7515076d5c00804f89e23ea69296312c00e1","since":6}
|
||||
{"blob":"404d7515076d5c00804f89e23ea69296312c00e1","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"c09b69611fb22ddf093adb2baa83434494e5f8fa","since":6,"nonBehavioral":"Widens the two plan-eng-review boundary predicates' qid regex to also accept the optional ;signal=<key> hint suffix (#3442). Only a question carrying that suffix can change verdict, and only the changed question-tuning resolver asks for it; every case that runs a skill with that resolver owns its generated SKILL.md, which this change also edits, so those cases already start their own series. No other case's input or verdict can change."}
|
||||
{"blob":"c09b69611fb22ddf093adb2baa83434494e5f8fa","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"3f2daa12ff6484f96b8d28d910a50231c4bb3ae8","since":6}
|
||||
{"blob":"3f2daa12ff6484f96b8d28d910a50231c4bb3ae8","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"554e064ef259b8444280eddfe9b0db93c66a8202","since":6}
|
||||
{"blob":"554e064ef259b8444280eddfe9b0db93c66a8202","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"81c5bb4c48ab928aca2f186a1ade9df7169d7fbe","since":6}
|
||||
{"blob":"2f29f01ca3b47353a419a75c72154580d6145a74","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"4f0731ef39bc3a6a7c5c592ce98690a24cb1ed7f","since":6,"nonBehavioral":"PTY transcript pricing finds the session by the caller's --session-id or the one new transcript for the launch cwd; the launcher adds no argument; native AUQ capture opts out; ledger cost fields only, no prompt, argv, answer, timeout or verdict changes"}
|
||||
{"blob":"4f0731ef39bc3a6a7c5c592ce98690a24cb1ed7f","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"ddba9cb68c7c0da935cff7c1cea258dee2dff740","since":6}
|
||||
{"blob":"ddba9cb68c7c0da935cff7c1cea258dee2dff740","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"8c5c05e54abf961259d34d9c3d77db67138d7794","since":6}
|
||||
{"blob":"8c5c05e54abf961259d34d9c3d77db67138d7794","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"a9938cb98f285474ebc4860cd61012504a36466e","since":6,"nonBehavioral":"The PTY floor and observation runners end a plan-mode turn at an idle prompt (the plan-mode footer without its running 'esc to interrupt' segment, after a 10 s settle) instead of waiting out the deadline. The floor runner exits as api_error only after the idle screen with its error panel held still for 10 s and every tick's question and assessment steps found nothing to credit (the transcript is re-read each tick), so a native or prose question already on screen is credited as before, even when its transcript line lands after the screen draws done (test/helpers/claude-pty-runner.runners.unit.test.ts, the prose-question-before-panel case). With no qualifying question an idle turn stays idle, so a trial that failed at the deadline as observer_timeout now fails earlier as api_error. An observation returns what the deadline would have returned. A running footer, extra footer text and a cut footer still wait for the deadline. No pass becomes a fail or a fail a pass. The session ledger may now record failure_cause api_error or refusal instead of observer_timeout or session_timeout for a plan-mode session whose last idle turn shows a panel; failure_class, the gate red class and pass rates are unchanged, so no pass-rate series resets"}
|
||||
{"blob":"a9938cb98f285474ebc4860cd61012504a36466e","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"1c2b75fbb984708725abaa8939125f7cab969f9f","since":6}
|
||||
{"blob":"1c2b75fbb984708725abaa8939125f7cab969f9f","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"1384f765e48e511d5f843df2660b2ec70bbcb6b2","since":6,"nonBehavioral":"The PTY floor and observation runners end a plan-mode turn at an idle prompt (the plan-mode footer without its running 'esc to interrupt' segment, after a 10 s settle) instead of waiting out the deadline. The floor runner exits as api_error only after the idle screen with its error panel held still for 10 s and every tick's question and assessment steps found nothing to credit (the transcript is re-read each tick), so a native or prose question already on screen is credited as before, even when its transcript line lands after the screen draws done (test/helpers/claude-pty-runner.runners.unit.test.ts, the prose-question-before-panel case). With no qualifying question an idle turn stays idle, so a trial that failed at the deadline as observer_timeout now fails earlier as api_error. An observation returns what the deadline would have returned. A running footer, extra footer text and a cut footer still wait for the deadline. No pass becomes a fail or a fail a pass. The session ledger may now record failure_cause api_error or refusal instead of observer_timeout or session_timeout for a plan-mode session whose last idle turn shows a panel; failure_class, the gate red class and pass rates are unchanged, so no pass-rate series resets"}
|
||||
{"blob":"1384f765e48e511d5f843df2660b2ec70bbcb6b2","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"8fd1749a62f24dc37ae186c8a21c2165f7f7645e","since":6,"nonBehavioral":"PTY sessions price their ledger row (streamed_cost_usd) from the session transcript found by the caller's --session-id or the one new transcript for the launch cwd; ledger cost fields only, no prompt, argv, answer, timeout or verdict changes"}
|
||||
{"blob":"8fd1749a62f24dc37ae186c8a21c2165f7f7645e","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"08f7ccbdbd9d71a5dc86edd2f8fced423a78ad9a","since":6,"nonBehavioral":"PTY transcript pricing finds the session by the caller's --session-id or the one new transcript for the launch cwd; the launcher adds no argument; native AUQ capture opts out; ledger cost fields only, no prompt, argv, answer, timeout or verdict changes"}
|
||||
{"blob":"08f7ccbdbd9d71a5dc86edd2f8fced423a78ad9a","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"6211239dd0485e6495a700b824a7e0e61d1bcd97","since":6}
|
||||
{"blob":"6211239dd0485e6495a700b824a7e0e61d1bcd97","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"c99baaaa0a77a5a72384493fd8a85a4253ecb05d","since":6,"nonBehavioral":"PTY sessions price their ledger row (streamed_cost_usd) from the session transcript found by the caller's --session-id or the one new transcript for the launch cwd; ledger cost fields only, no prompt, argv, answer, timeout or verdict changes"}
|
||||
{"blob":"c99baaaa0a77a5a72384493fd8a85a4253ecb05d","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"6a0fad8792221a97dd27c01837af368be81d5bf5","since":6,"nonBehavioral":"widens browseNavigatedTo, whose only caller is the changed scrape-prototype-path case file, to credit a goto with stdout sent to /dev/null when the call proves it exited 0 (a file:// target, no || directly before the goto's pipeline, only && after it); no other caller or case changes (GST-2338)"}
|
||||
{"blob":"6a0fad8792221a97dd27c01837af368be81d5bf5","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"9fdd82f483d8edb440156d891443ae51114a2778","since":6,"nonBehavioral":"adds helpers called only by the changed scrape-prototype-path, codex-review and ship-coverage-value case files (the codex-review excerpt now rewrites the whole install prefix, lib/ included) and turns off git auto-maintenance in the AUQ capture fixture; no existing caller's behavior changes (GST-2131)"}
|
||||
{"blob":"9fdd82f483d8edb440156d891443ae51114a2778","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"a8d21e3817c3f35a1d06af325c92fde7d420e377","since":6,"nonBehavioral":"readSkillEffective also appends a variant's added ### subsections (office-hours' Open-ended questions); readSkillStartup, readSharedSections and readSkillEffective return bytes identical to the pinned helper for every tier 2+ render without added subsections (735 across all hosts) and for office-hours' SKILL.md before this PR, so office-hours' fixture input changes only because its prompt changed in this PR, not because the helper did"}
|
||||
{"blob":"a8d21e3817c3f35a1d06af325c92fde7d420e377","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"e1b54ad5e3d3eadd8027de1b44e57554d6d99a41","since":6,"nonBehavioral":"selection only: fragment exemption narrowed to .md files directly in the fragments dir; changed-file lists include a rename's old path; no case prompt, fixture, judge or verdict logic changes (GST-400)"}
|
||||
{"blob":"e1b54ad5e3d3eadd8027de1b44e57554d6d99a41","since":7}
|
||||
@@ -1 +1 @@
|
||||
{"blob":"15f369056d41b9dc42dcd86f81f60c878074704c","since":6}
|
||||
{"blob":"15f369056d41b9dc42dcd86f81f60c878074704c","since":7}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": 6,
|
||||
"version": 7,
|
||||
"patterns": [
|
||||
"test/helpers/agent-sdk-runner.ts",
|
||||
"test/helpers/codex-session-runner.ts",
|
||||
|
||||
@@ -55,7 +55,7 @@ function exercise(spec: Spec) {
|
||||
maxTurns: 12, timeoutMs: 240_000 });
|
||||
}
|
||||
for (const { request } of facts.judgeRequests) {
|
||||
expect(request).toMatchObject({ model: 'claude-haiku-4-5-20251001', max_tokens: 8192 });
|
||||
expect(request).toMatchObject({ model: 'claude-haiku-5-5', max_tokens: 8192 });
|
||||
}
|
||||
for (const input of facts.inputs) {
|
||||
expect(input).toMatchObject({ model: 'fixture-model', maxTurns: 12, tools: ['Read', 'Write', 'AskUserQuestion'],
|
||||
|
||||
@@ -14,8 +14,8 @@ describe("resolveEvalModel", () => {
|
||||
});
|
||||
test("defaults per kind", () => {
|
||||
expect(resolveEvalModel("capture", null, {} as never)).toBe(CLAUDE_CAPTURE_EVAL_MODEL);
|
||||
expect(resolveEvalModel("warmup", null, {} as never)).toBe("claude-haiku-4-5");
|
||||
expect(resolveEvalModel("distill", null, {} as never)).toBe("claude-haiku-4-5-20251001");
|
||||
expect(resolveEvalModel("warmup", null, {} as never)).toBe("claude-haiku-5-5");
|
||||
expect(resolveEvalModel("distill", null, {} as never)).toBe("claude-haiku-5-5");
|
||||
expect(resolveEvalModel("judge", null, {} as never)).toBe(CLAUDE_JUDGE_EVAL_MODEL);
|
||||
});
|
||||
test("unknown kind throws instead of silently defaulting", () => {
|
||||
|
||||
@@ -15,8 +15,10 @@ const COST: Record<string, string> = { paid: '$200', meter: '$40', ledger: 'the
|
||||
const INTERIM: Record<string, string> = { at: '50%', looks: '1', bounds: "O'Brien-Fleming, |z| >= 2.80 at the look, 1.98 at the end", futility: 'stop when the paired difference is below zero at the look' };
|
||||
const kv = (o: Record<string, string>) => Object.entries(o).map(([k, v]) => `${k}: ${v}`).join('\n');
|
||||
const without = (o: Record<string, string>, k: string) => Object.fromEntries(Object.entries(o).filter(([key]) => key !== k));
|
||||
/** A freeze date before the R78 amendment's 100-label bar (2026-11-22), so these fixtures keep testing the 40-label rules they were written for. */
|
||||
const JUDGE_40_FROZEN = '2026-11-21';
|
||||
const plan = (o: { pilot?: Record<string, string>; cost?: Record<string, string>; interim?: Record<string, string> | null; scoring?: string; arms?: string; bars?: string; heldOut?: string; frozen?: string } = {}) => [
|
||||
o.frozen ? `frozen: ${o.frozen}\n` : '',
|
||||
`frozen: ${o.frozen ?? JUDGE_40_FROZEN}\n`,
|
||||
`## Bars\n${o.bars ?? '- pass rate, higher is better'}\n`,
|
||||
'## Decisions\nif the skill arm passes more items: keep the skill\nif there is no difference: cut the skill\n',
|
||||
`## Arms\n${o.arms ?? '- claude-opus-5-5 the skill installed\n- claude-opus-5-5#plain no skill'}\n`,
|
||||
@@ -54,7 +56,7 @@ describe('## Scoring per arm and effort (R78, G14)', () => {
|
||||
});
|
||||
|
||||
test('with per-arm: yes, every label row names its arm and each arm meets the bar', () => {
|
||||
const scoring = { judge: 'gpt-6.2-astra', labels: 40, agreement: 0.6, errors: [], per_arm: true };
|
||||
const scoring = { judge: 'gpt-6.2-astra', labels: 40, agreement: 0.6, errors: [], per_arm: true, min_labels: 40 };
|
||||
const row = (i: number, arm: string | null, flip: boolean) => JSON.stringify({ id: `i${i}`, ...(arm ? { arm } : {}), human: i % 2 ? 'pass' : 'fail', judge: (i % 2 ? 'pass' : 'fail') === 'pass' !== flip ? 'pass' : 'fail' });
|
||||
const rows = (arm: (i: number) => string | null, flip: (i: number) => boolean) => Array.from({ length: 40 }, (_, i) => row(i, arm(i), flip(i))).join('\n');
|
||||
const good = checkJudgeLabels(scoring, rows(i => (i < 20 ? 'a' : 'b'), i => i === 0));
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
/**
|
||||
* R116 (Garry, 2026-11-21): /eval-plan refuses gpt-4o and every model
|
||||
* lib/pricing.ts marks superseded_by, in every role a plan chooses (arm,
|
||||
* judge, reader, simulator), naming the role and the current replacement. A
|
||||
* competitor system's vendor default is an explicit, recorded exception
|
||||
* (docs/TESTING_INTERNALS.md#frontier-models-under-test).
|
||||
*/
|
||||
import { afterEach, describe, expect, test } from 'bun:test';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import * as fs from 'node:fs';
|
||||
import * as os from 'node:os';
|
||||
import * as path from 'node:path';
|
||||
import { checkPrereg, dryRun, renderDryRun, startPilot } from '../lib/eval-plan';
|
||||
import { checkModelGenerations, MODEL_GENERATIONS_SINCE } from '../lib/eval-plan-checks';
|
||||
import { checkResults } from '../lib/eval-plan-report';
|
||||
import { currentReplacement, PRICING } from '../lib/pricing';
|
||||
|
||||
const BIN = path.resolve(import.meta.dir, '..', 'bin', 'gstack-eval-plan');
|
||||
const dirs: string[] = [];
|
||||
afterEach(() => { while (dirs.length) fs.rmSync(dirs.pop()!, { recursive: true, force: true }); });
|
||||
const tmp = () => { const d = fs.mkdtempSync(path.join(os.tmpdir(), 'gstack-model-gen-')); dirs.push(d); return d; };
|
||||
|
||||
const LOOP = '\n## Pilot\nshare: 10%\ncounted: no\nran: the part under test shows in each arm\'s own transcripts\njudge: labels checked on each arm\'s pilot outputs\nsupply: three development rows per arm at the planned rate\nunits: every task type, one each\nseed: 7, independent of the number of workers\n\n## Cost\npaid: $200\nmeter: $0\nledger: the private spend ledger\n\n## Held-out exposure\n- filled in\nanswers: other git refs and build caches checked on each task machine\n';
|
||||
const prereg = (o: { arms?: string[]; judge?: string; models?: string; frozen?: string } = {}) => [
|
||||
o.frozen ? `frozen: ${o.frozen}\n` : '',
|
||||
'## Bars\n- pass rate, higher is better\n',
|
||||
'## Decisions\nif the skill arm passes more items: keep the skill\nif there is no difference: cut the skill\n',
|
||||
`## Arms\n${(o.arms ?? ['claude-opus-5-5', 'claude-opus-5-5#plain']).map(a => `- ${a} settings`).join('\n')}\n`,
|
||||
'## Comparison\nstack: none\nwhy: the scorer calibration compares prompts, not skill stacks\n',
|
||||
`## Scoring\njudge: ${o.judge ?? 'gpt-6-astra'}\nlabels: 100\nagreement: 0.6\nper-arm: yes\neffort: high\npaired: yes\ninterval: 95%\nmdd: 3 of 20 items\n`,
|
||||
o.models ? `## Models\n${o.models}\n` : '',
|
||||
...['Decoys', 'Stop rules'].map(s => `## ${s}\n- filled in\n`),
|
||||
LOOP,
|
||||
].join('\n');
|
||||
const cli = (args: string[], files: Record<string, string>) => {
|
||||
const d = tmp();
|
||||
for (const [name, text] of Object.entries(files)) fs.writeFileSync(path.join(d, name), text);
|
||||
const r = spawnSync(BIN, args, { cwd: d, encoding: 'utf8', timeout: 60_000 });
|
||||
return { code: r.status, out: r.stdout ?? '', err: r.stderr ?? '' };
|
||||
};
|
||||
|
||||
describe('lib/pricing.ts generation marks', () => {
|
||||
test('every superseded_by names a priced row that is itself current', () => {
|
||||
const marked = Object.entries(PRICING).filter(([, row]) => row.superseded_by);
|
||||
expect(marked.length).toBeGreaterThan(0);
|
||||
for (const [model, row] of marked) {
|
||||
const next = PRICING[row.superseded_by!];
|
||||
expect(next, `${model} -> ${row.superseded_by}`).toBeDefined();
|
||||
expect(next!.superseded_by, `${row.superseded_by} is itself superseded`).toBeUndefined();
|
||||
}
|
||||
});
|
||||
|
||||
test('gpt-4o in every form, and dated or prefixed older ids, resolve to their replacement; point releases stay current', () => {
|
||||
expect(currentReplacement('gpt-4o')).toBe('gpt-6.2-sol');
|
||||
expect(currentReplacement('openrouter:openai/gpt-4o')).toBe('gpt-6.2-sol');
|
||||
expect(currentReplacement('chatgpt-4o-latest')).toBe('gpt-6.2-sol');
|
||||
expect(currentReplacement('gpt-4o-2024-05-13')).toBe('gpt-6.2-sol');
|
||||
expect(currentReplacement('openai/gpt-4o-mini')).toBe('gpt-6-luna');
|
||||
expect(currentReplacement('ft:gpt-4o-mini-2024-07-18:org::id')).toBe('gpt-6-luna');
|
||||
expect(currentReplacement('claude-haiku-4-5-20251001')).toBe('claude-haiku-5-5');
|
||||
expect(currentReplacement('anthropic/claude-opus-4-7')).toBe('claude-opus-5-5');
|
||||
for (const current of ['claude-opus-5-5', 'gpt-6.2-sol', 'gpt-6-astra', 'gpt-6.2-astra', 'gpt-6.1-sol', 'claude-fable-5-1', 'gemini-3.6-flash', 'gpt-6-luna', 'particle-1', 'no-such-model', 'gpt-40-turbo']) expect(currentReplacement(current), current).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe('checkModelGenerations', () => {
|
||||
test('negative control: Opus 5.5 and GPT-6.2 Sol arms with a GPT-6 Astra judge pass', () => {
|
||||
const c = checkModelGenerations({ arms: ['claude-opus-5-5', 'gpt-6.2-sol#no-gstack'], judge: 'gpt-6-astra', models: ['reader: claude-opus-5-5', 'simulator: gpt-6.2-sol'] });
|
||||
expect(c).toEqual({ ok: true, exempt: false, refused: [], exceptions: [], errors: [] });
|
||||
});
|
||||
|
||||
test('refuses each role and names the replacement', () => {
|
||||
const c = checkModelGenerations({ arms: ['claude-sonnet-4-6', 'claude-sonnet-4-6#no-gstack'], judge: 'gpt-4o', models: ['- reader: claude-haiku-4-5-20251001, claude-opus-5-5', 'simulators: openai/gpt-4o-mini'] });
|
||||
expect(c.ok).toBe(false);
|
||||
expect(c.refused).toEqual([
|
||||
{ model: 'claude-sonnet-4-6', role: 'arm', replacement: 'claude-sonnet-5-5' },
|
||||
{ model: 'gpt-4o', role: 'judge', replacement: 'gpt-6.2-sol' },
|
||||
{ model: 'claude-haiku-4-5-20251001', role: 'reader', replacement: 'claude-haiku-5-5' },
|
||||
{ model: 'openai/gpt-4o-mini', role: 'simulator', replacement: 'gpt-6-luna' },
|
||||
]);
|
||||
});
|
||||
|
||||
test('a vendor default covers the competitor arm only, and needs the system it ships with', () => {
|
||||
const c = checkModelGenerations({ arms: ['claude-opus-5-5', 'gpt-4o-mini#mem0'], judge: 'gpt-4o-mini', models: ['vendor-default: gpt-4o-mini — Mem0 1.2 as its vendor ships it'] });
|
||||
expect(c.exceptions).toEqual([{ model: 'gpt-4o-mini', system: 'Mem0 1.2 as its vendor ships it', roles: ['arm'] }]);
|
||||
expect(c.refused).toEqual([{ model: 'gpt-4o-mini', role: 'judge', replacement: 'gpt-6-luna' }]);
|
||||
const others = checkModelGenerations({ arms: ['openrouter:openai/gpt-4o-mini#mem0', 'gpt-4o-mini', 'gpt-4o-mini#no-gstack'], models: ['vendor-default: gpt-4o-mini Mem0 1.2 as shipped'] });
|
||||
expect(others.refused).toEqual([{ model: 'gpt-4o-mini', role: 'arm', replacement: 'gpt-6-luna' }]);
|
||||
expect(others.exceptions[0]!.roles).toEqual(['arm']);
|
||||
const bare = checkModelGenerations({ arms: ['gpt-4o#mem0'], models: ['vendor-default: gpt-4o'] });
|
||||
expect(bare.ok).toBe(false);
|
||||
expect(bare.errors[0]).toContain('competitor system');
|
||||
});
|
||||
|
||||
test(`a plan frozen before ${MODEL_GENERATIONS_SINCE} keeps its models`, () => {
|
||||
expect(checkModelGenerations({ arms: ['gpt-4o'], judge: 'gpt-4o', frozen: '2026-11-20' })).toMatchObject({ ok: true, exempt: true });
|
||||
expect(checkModelGenerations({ arms: ['gpt-4o'], frozen: MODEL_GENERATIONS_SINCE }).ok).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('gstack-eval-plan prereg --check', () => {
|
||||
test('negative control: a current plan prints no MODEL lines and passes', () => {
|
||||
const r = cli(['prereg', '--check', 'prereg.md'], { 'prereg.md': prereg() });
|
||||
expect(r.code, r.err).toBe(0);
|
||||
expect(r.out).not.toContain('MODEL_');
|
||||
expect(checkPrereg(prereg()).models.ok).toBe(true);
|
||||
});
|
||||
|
||||
test('a gpt-4o judge is refused with the role and the replacement', () => {
|
||||
const r = cli(['prereg', '--check', 'prereg.md'], { 'prereg.md': prereg({ judge: 'gpt-4o' }) });
|
||||
expect(r.code).toBe(1);
|
||||
expect(r.out).toContain(' models=refused ');
|
||||
expect(r.out).toContain('MODEL_GENERATION: refused gpt-4o role=judge replacement=gpt-6.2-sol');
|
||||
expect(r.err).toContain('EVAL_MODEL_OLD_GENERATION');
|
||||
expect(r.err).toContain('gpt-4o as judge is an older generation; use gpt-6.2-sol (R116)');
|
||||
});
|
||||
|
||||
test('a vendor-default exception passes and is recorded; the results must name it', () => {
|
||||
const text = prereg({ arms: ['claude-opus-5-5', 'gpt-4o-mini#mem0'], judge: 'gemini-4-argon', models: 'reader: claude-opus-5-5\nvendor-default: gpt-4o-mini Mem0 1.2 as its vendor ships it' });
|
||||
const r = cli(['prereg', '--check', 'prereg.md', '--json'], { 'prereg.md': text });
|
||||
expect(r.code, r.err).toBe(0);
|
||||
expect(JSON.parse(r.out).models.exceptions).toEqual([{ model: 'gpt-4o-mini', system: 'Mem0 1.2 as its vendor ships it', roles: ['arm'] }]);
|
||||
const plain = cli(['prereg', '--check', 'prereg.md'], { 'prereg.md': text });
|
||||
expect(plain.out).toContain('MODEL_EXCEPTION: gpt-4o-mini vendor-default system="Mem0 1.2 as its vendor ships it" roles=arm');
|
||||
const issues = (results: string) => checkResults(text, results).issues.filter(i => i.code === 'EVAL_MODEL_OLD_GENERATION');
|
||||
expect(issues('| arm | pass |\n|---|---|\n| claude-opus-5-5 | 12/20 |\n')[0]!.message).toContain('never name gpt-4o-mini');
|
||||
expect(issues('| arm | pass |\n|---|---|\n| claude-opus-5-5 | 12/20 |\n| gpt-4o-mini#mem0 (vendor default gpt-4o-mini) | 9/20 |\n')).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('dry run and pilot start', () => {
|
||||
test('a gpt-4o arm fails the dry run, and pilot start refuses an older-generation arm', () => {
|
||||
const d = tmp();
|
||||
const rows = path.join(d, 'rows.jsonl'); fs.writeFileSync(rows, JSON.stringify({ prompt: 'hello world' }) + '\n');
|
||||
const retry = path.join(d, 'retry.txt'); fs.writeFileSync(retry, 'retry\n');
|
||||
const stale = dryRun({ input: rows, arms: ['claude-opus-5-5', 'gpt-4o'], retryPrompt: retry });
|
||||
expect(stale.pass).toBe(false);
|
||||
expect(renderDryRun(stale)).toContain('CHECK: model-generation refused gpt-4o (use gpt-6.2-sol)');
|
||||
const current = dryRun({ input: rows, arms: ['claude-opus-5-5', 'gpt-6.2-sol'], retryPrompt: retry });
|
||||
expect(current.pass).toBe(true);
|
||||
expect(renderDryRun(current)).not.toContain('model-generation');
|
||||
const dry = path.join(d, 'dry.json'); fs.writeFileSync(dry, JSON.stringify(current));
|
||||
const pilot = startPilot({ out: path.join(d, 'pilot'), cap: 5, n: 1, arms: ['claude-opus-4-7'], dryRun: dry });
|
||||
expect(pilot.error).toEqual({ code: 'EVAL_MODEL_OLD_GENERATION', message: 'claude-opus-4-7 is an older generation; use claude-opus-5-5 (R116)' });
|
||||
});
|
||||
});
|
||||
@@ -11,7 +11,7 @@ import * as fs from 'node:fs';
|
||||
import * as os from 'node:os';
|
||||
import * as path from 'node:path';
|
||||
import { checkPrereg } from '../lib/eval-plan';
|
||||
import { checkDecisions, checkJudgeLabels, checkScoring, cohensKappa, modelFamily } from '../lib/eval-plan-checks';
|
||||
import { checkDecisions, checkJudgeLabels, checkScoring, cohensKappa, JUDGE_LABELS_RAISED_SINCE, modelFamily } from '../lib/eval-plan-checks';
|
||||
import { checkResults } from '../lib/eval-plan-report';
|
||||
|
||||
const BIN = path.resolve(import.meta.dir, '..', 'bin', 'gstack-eval-plan');
|
||||
@@ -21,8 +21,10 @@ afterEach(() => { while (dirs.length) fs.rmSync(dirs.pop()!, { recursive: true,
|
||||
const DECISIONS = '## Decisions\nif the skill arm passes more items: keep the skill\nif there is no difference: cut the skill\n';
|
||||
const LOOP = '\n## Pilot\nshare: 10%\ncounted: no\nran: the part under test shows in each arm\'s own transcripts\njudge: labels checked on each arm\'s pilot outputs\nsupply: three development rows per arm at the planned rate\nunits: every task type, one each\nseed: 7, independent of the number of workers\n\n## Cost\npaid: $200\nmeter: $0\nledger: the private spend ledger\n\n## Held-out exposure\n- filled in\nanswers: other git refs and build caches checked on each task machine\n';
|
||||
const SCORING = (judge = 'gpt-6-astra', extra = 'labels: 40\nagreement: 0.6\nper-arm: yes\neffort: high\npaired: yes\ninterval: 95%\nmdd: 3 of 20 items\n') => `## Scoring\njudge: ${judge}\n${extra}`;
|
||||
/** A freeze date before the R78 amendment's 100-label bar (2026-11-22), so these fixtures keep testing the 40-label rules they were written for. */
|
||||
const JUDGE_40_FROZEN = '2026-11-21';
|
||||
const prereg = (o: { decisions?: string; scoring?: string; frozen?: string; diagnostics?: string } = {}) => [
|
||||
o.frozen ? `frozen: ${o.frozen}\n` : '',
|
||||
`frozen: ${o.frozen ?? JUDGE_40_FROZEN}\n`,
|
||||
'## Bars\n- pass rate, higher is better\n',
|
||||
o.decisions ?? DECISIONS,
|
||||
'## Arms\n- claude-opus-5-5 the skill installed\n- claude-opus-5-5#plain no skill\n',
|
||||
@@ -54,13 +56,13 @@ describe('## Decisions', () => {
|
||||
describe('## Scoring', () => {
|
||||
const arms = ['claude-opus-5-5', 'claude-opus-5-5#plain'];
|
||||
test('a judge from another family with 40 labels, kappa 0.6 and the paired statistics passes', () => {
|
||||
expect(checkScoring(SCORING().split('\n').slice(1), arms).errors).toEqual([]);
|
||||
expect(checkScoring(SCORING().split('\n').slice(1), arms, JUDGE_40_FROZEN).errors).toEqual([]);
|
||||
});
|
||||
|
||||
test('a same-family judge, too few labels, a low kappa bar or missing statistics fail', () => {
|
||||
expect(checkScoring(SCORING('claude-fable-5-2').split('\n').slice(1), arms).errors.join()).toContain('same model family (anthropic)');
|
||||
expect(checkScoring(SCORING('gpt-6-astra', 'labels: 39\nagreement: 0.6\npaired: yes\ninterval: 95%\nmdd: 3\n').split('\n').slice(1), arms).errors[0]).toContain('at least 40');
|
||||
expect(checkScoring(SCORING('gpt-6-astra', 'labels: 40\nagreement: 0.5\npaired: yes\ninterval: 95%\nmdd: 3\n').split('\n').slice(1), arms).errors[0]).toContain('kappa bar');
|
||||
expect(checkScoring(SCORING('claude-fable-5-2').split('\n').slice(1), arms, JUDGE_40_FROZEN).errors.join()).toContain('same model family (anthropic)');
|
||||
expect(checkScoring(SCORING('gpt-6-astra', 'labels: 39\nagreement: 0.6\npaired: yes\ninterval: 95%\nmdd: 3\n').split('\n').slice(1), arms, JUDGE_40_FROZEN).errors[0]).toContain('at least 40');
|
||||
expect(checkScoring(SCORING('gpt-6-astra', 'labels: 40\nagreement: 0.5\npaired: yes\ninterval: 95%\nmdd: 3\n').split('\n').slice(1), arms, JUDGE_40_FROZEN).errors[0]).toContain('kappa bar');
|
||||
expect(checkScoring(['judge: none'], arms).errors).toEqual(['paired: yes (every comparison is reported on paired items)', 'interval: 95% (the interval every comparison is reported with)', 'mdd: the smallest difference this run can detect, stated before the run']);
|
||||
expect(checkScoring(['judge: none'], ['claude-opus-5-5']).errors).toEqual([]);
|
||||
expect(checkScoring(['labels: 40'], arms).errors[0]).toContain('no judge: line');
|
||||
@@ -79,8 +81,32 @@ describe('## Scoring', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe(`R78 amendment: a plan frozen on or after ${JUDGE_LABELS_RAISED_SINCE} checks its judge on 100 labels`, () => {
|
||||
const scoring100 = 'labels: 100\nagreement: 0.6\nper-arm: yes\neffort: high\npaired: yes\ninterval: 95%\nmdd: 3 of 20 items\n';
|
||||
test('the day before keeps 40; the day itself and a plan with no frozen: line need 100', () => {
|
||||
expect(checkPrereg(prereg({ frozen: '2026-11-21' })).scoring).toMatchObject({ errors: [], min_labels: 40 });
|
||||
for (const frozen of [JUDGE_LABELS_RAISED_SINCE, '2026-12-01']) {
|
||||
const s = checkPrereg(prereg({ frozen })).scoring;
|
||||
expect(s.min_labels).toBe(100);
|
||||
expect(s.errors).toEqual(['labels: needs at least 100 hand-labelled outputs the judge is checked against (40 only for a plan frozen before 2026-11-22)']);
|
||||
expect(checkPrereg(prereg({ frozen, scoring: SCORING('gpt-6-astra', scoring100) })).ok).toBe(true);
|
||||
}
|
||||
expect(checkScoring(SCORING().split('\n').slice(1), ['claude-opus-5-5'], null).min_labels).toBe(100);
|
||||
});
|
||||
|
||||
test('judge --check counts against the bar of the freeze date; kappa stays 0.6', () => {
|
||||
const labels100 = labels(100, 10);
|
||||
const late = checkPrereg(prereg({ frozen: JUDGE_LABELS_RAISED_SINCE, scoring: SCORING('gpt-6-astra', scoring100) })).scoring;
|
||||
expect(checkJudgeLabels(late, labels(40, 4)).problems).toEqual(['40 labelled outputs, needs 100']);
|
||||
expect(checkJudgeLabels(late, labels100)).toMatchObject({ ok: true, n: 100, need_n: 100, need_kappa: 0.6 });
|
||||
const early = checkPrereg(prereg({ frozen: '2026-11-21' })).scoring;
|
||||
expect(checkJudgeLabels(early, labels(40, 4))).toMatchObject({ ok: true, need_n: 40 });
|
||||
expect(checkJudgeLabels({ judge: 'gpt-6-astra', labels: 40, agreement: 0.6, errors: [] }, labels(40, 4)).need_n).toBe(100);
|
||||
});
|
||||
});
|
||||
|
||||
describe('judge labels', () => {
|
||||
const scoring = { judge: 'gpt-6-astra', labels: 40, agreement: 0.6, errors: [] };
|
||||
const scoring = { judge: 'gpt-6-astra', labels: 40, agreement: 0.6, errors: [], min_labels: 40 };
|
||||
test("Cohen's kappa: perfect, chance and undefined agreement", () => {
|
||||
expect(cohensKappa([['a', 'a'], ['b', 'b']])).toBe(1);
|
||||
expect(cohensKappa([['a', 'a'], ['a', 'b'], ['b', 'a'], ['b', 'b']])).toBe(0);
|
||||
|
||||
@@ -88,7 +88,7 @@ export interface RecommendationScore {
|
||||
* Call an Anthropic model with a prompt, extract JSON response.
|
||||
* Jittered exponential backoff over three 429 retries. Model resolves via
|
||||
* lib/eval-model's `judge` kind (CLAUDE_JUDGE_EVAL_MODEL); pass a model id
|
||||
* (e.g. claude-haiku-4-5-20251001) for cheaper bounded judgments like
|
||||
* (e.g. claude-haiku-5-5) for cheaper bounded judgments like
|
||||
* judgeRecommendation.
|
||||
*/
|
||||
// Default judge model: CLAUDE_JUDGE_EVAL_MODEL, kept apart from the model under
|
||||
@@ -582,7 +582,7 @@ Respond with ONLY valid JSON:
|
||||
|
||||
const out = await callJudge<{ reason_substance: number; reasoning: string }>(
|
||||
prompt,
|
||||
'claude-haiku-4-5-20251001',
|
||||
'claude-haiku-5-5',
|
||||
{ signal, jsonSchema: RECOMMENDATION_JUDGE_SCHEMA },
|
||||
);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import { resolveClaudeBinary } from './binary';
|
||||
// Used by polling loops as a fallback after N seconds with no terminal
|
||||
// classification. On 'waiting' verdict, return outcome='asked' early.
|
||||
//
|
||||
// Cost: ~$0.0005 per call using claude haiku 4.5. Cached by snapshot hash so
|
||||
// Cost: ~$0.0005 per call using claude haiku 5.5 (the warmup default). Cached by snapshot hash so
|
||||
// identical TTY frames don't re-charge. All verdicts logged to
|
||||
// ~/.gstack/analytics/pty-judge.jsonl for offline analysis.
|
||||
// ────────────────────────────────────────────────────────────────────────────
|
||||
@@ -82,7 +82,7 @@ export function logPtySnapshot(visible: string, ctx: { testName: string; elapsed
|
||||
/**
|
||||
* Ask Claude Haiku 4.5 to classify a TTY snapshot as waiting/working/hung.
|
||||
*
|
||||
* Implementation: spawns `claude -p --model claude-haiku-4-5` synchronously
|
||||
* Implementation: spawns `claude -p --model <resolveEvalModel("warmup"), claude-haiku-5-5 by default>` synchronously
|
||||
* with the prompt piped via stdin. Uses subscription auth (no API key env
|
||||
* required). 30-second timeout; returns 'unknown' on any failure mode
|
||||
* (timeout, malformed JSON, missing claude binary). Asynchronous: a PTY
|
||||
|
||||
@@ -206,7 +206,7 @@ describe('frontier Claude judge compatibility', () => {
|
||||
expect(score.reason_substance).toBe(4);
|
||||
expect(score.reason_text).toBe('at 1/10 every dimension has gaps and none are obviously safe to skip.');
|
||||
expect(create.mock.calls[0][0].output_config).toEqual({ format: { type: 'json_schema', schema: RECOMMENDATION_JUDGE_SCHEMA } });
|
||||
expect(create.mock.calls[0][0].model).toBe('claude-haiku-4-5-20251001');
|
||||
expect(create.mock.calls[0][0].model).toBe('claude-haiku-5-5');
|
||||
});
|
||||
|
||||
test('the captured unescaped reply is unparseable free-form text and fails without a score', async () => {
|
||||
|
||||
@@ -138,14 +138,14 @@ describe('dry run', () => {
|
||||
const rows = path.join(d, 'rows.jsonl');
|
||||
fs.writeFileSync(rows, [JSON.stringify({ prompt: 'hello world' }), JSON.stringify({ prompt: 'second row' })].join('\n') + '\n');
|
||||
const retry = path.join(d, 'retry.txt'); fs.writeFileSync(retry, 'retry\n');
|
||||
const small = dryRun({ input: rows, arms: ['claude-haiku-4-5', 'claude-sonnet-5-5#no-gstack'], retryPrompt: retry });
|
||||
const small = dryRun({ input: rows, arms: ['claude-haiku-5-5', 'claude-sonnet-5-5#no-gstack'], retryPrompt: retry });
|
||||
expect(small.pass).toBe(false);
|
||||
expect(small.checks.frontier).toMatchObject({ ok: false, small_tier: ['claude-haiku-4-5', 'claude-sonnet-5-5#no-gstack'], tier_question: null });
|
||||
expect(small.checks.frontier).toMatchObject({ ok: false, small_tier: ['claude-haiku-5-5', 'claude-sonnet-5-5#no-gstack'], tier_question: null });
|
||||
const avgIn = Math.ceil((estimateTokens('hello world') + estimateTokens('second row')) / 2);
|
||||
expect(small.checks.frontier.recost_usd['claude-opus-5-5']).toBe(2 * 2 * estimateCostUsd({ input: avgIn, output: REASONING_OUTPUT_FLOOR }, 'claude-opus-5-5'));
|
||||
expect(small.checks.frontier.recost_usd['gpt-6.2-sol']).toBeGreaterThan(0);
|
||||
expect(renderDryRun(small)).toContain('CHECK: frontier refused');
|
||||
const asked = dryRun({ input: rows, arms: ['claude-haiku-4-5'], retryPrompt: retry, tierQuestion: 'does the diet hold on Haiku' });
|
||||
const asked = dryRun({ input: rows, arms: ['claude-haiku-5-5'], retryPrompt: retry, tierQuestion: 'does the diet hold on Haiku' });
|
||||
expect(asked.pass).toBe(true);
|
||||
expect(renderDryRun(asked)).toContain('CHECK: frontier ok (tier question');
|
||||
const mixed = dryRun({ input: rows, arms: ['claude-opus-5-5', 'claude-sonnet-5-5'], retryPrompt: retry });
|
||||
@@ -156,10 +156,10 @@ describe('dry run', () => {
|
||||
expect(renderDryRun(frontier)).not.toContain('CHECK: frontier');
|
||||
expect(['claude-opus-5-5', 'gpt-6.1-sol', 'gpt-6-luna', 'gemini-3.8-flash'].some(isSmallTierModel)).toBe(false);
|
||||
const dryFile = (name: string, r: unknown) => { const f = path.join(d, name); fs.writeFileSync(f, JSON.stringify(r)); return f; };
|
||||
const swapped = startPilot({ out: path.join(d, 'swapped'), cap: 5, n: 1, arms: ['claude-haiku-4-5'], dryRun: dryFile('frontier.json', frontier) });
|
||||
const swapped = startPilot({ out: path.join(d, 'swapped'), cap: 5, n: 1, arms: ['claude-haiku-5-5'], dryRun: dryFile('frontier.json', frontier) });
|
||||
expect(swapped.error?.code).toBe('EVAL_DRY_RUN_FAILED');
|
||||
expect(fs.existsSync(path.join(d, 'swapped'))).toBe(false);
|
||||
expect(startPilot({ out: path.join(d, 'asked'), cap: 5, n: 1, arms: ['claude-haiku-4-5'], dryRun: dryFile('asked.json', asked) }).error).toBeUndefined();
|
||||
expect(startPilot({ out: path.join(d, 'asked'), cap: 5, n: 1, arms: ['claude-haiku-5-5'], dryRun: dryFile('asked.json', asked) }).error).toBeUndefined();
|
||||
expect(startPilot({ out: path.join(d, 'mixed'), cap: 5, n: 1, arms: ['claude-opus-5-5', 'claude-sonnet-5-5'], dryRun: dryFile('frontier2.json', frontier) }).error).toBeUndefined();
|
||||
});
|
||||
|
||||
@@ -168,7 +168,7 @@ describe('dry run', () => {
|
||||
try {
|
||||
const rows = path.join(host.base, 'rows.jsonl'); fs.writeFileSync(rows, JSON.stringify({ prompt: 'hello world' }) + '\n');
|
||||
const retry = path.join(host.base, 'retry.txt'); fs.writeFileSync(retry, 'retry\n');
|
||||
const run = (...extra: string[]) => spawnSync(BIN, ['dry-run', '--input', rows, '--arms', 'claude-haiku-4-5', '--retry-prompt', retry, ...extra], { cwd: host.base, env: host.env, encoding: 'utf8', timeout: 30_000 });
|
||||
const run = (...extra: string[]) => spawnSync(BIN, ['dry-run', '--input', rows, '--arms', 'claude-haiku-5-5', '--retry-prompt', retry, ...extra], { cwd: host.base, env: host.env, encoding: 'utf8', timeout: 30_000 });
|
||||
const flagAnswer = run('--tier-question', '--json');
|
||||
expect(flagAnswer.status).not.toBe(0);
|
||||
expect(flagAnswer.stderr).toContain('--tier-question needs the question');
|
||||
@@ -231,23 +231,23 @@ describe('priced pilot', () => {
|
||||
test('#3653: each arm is projected on its own, so arms at different prices that fit the cap are not told they exceed it', () => {
|
||||
const d = tmp();
|
||||
const out = path.join(d, 'mixed');
|
||||
const s = startPilot({ out, cap: 2, n: 3, arms: ['gpt-6-astra', 'gpt-5.4-mini'], dryRun: passingDryRun(d) });
|
||||
const s = startPilot({ out, cap: 2, n: 3, arms: ['gpt-6-astra', 'gpt-6-luna'], dryRun: passingDryRun(d) });
|
||||
expect(s.error).toBeUndefined();
|
||||
const usd: Record<string, number[]> = { 'gpt-6-astra': [0.001, 0.001, 0.001], 'gpt-5.4-mini': [0.10, 0.11, 0.12] };
|
||||
const usd: Record<string, number[]> = { 'gpt-6-astra': [0.001, 0.001, 0.001], 'gpt-6-luna': [0.10, 0.11, 0.12] };
|
||||
for (const a of s.record.attempts) settlePilot(out, a.attempt, usd[a.model]![a.row - 1]!);
|
||||
const r = pilotReport(out, { total: 10, workers: 1 });
|
||||
expect(r.projection.projected_usd).toBeCloseTo(1.11, 6);
|
||||
expect(r.projection.band_usd![0]).toBeCloseTo(1.11 - 4.303 * 0.01 / Math.sqrt(3) * 10, 4);
|
||||
expect(r.projection.band_usd![1]).toBeCloseTo(1.11 + 4.303 * 0.01 / Math.sqrt(3) * 10, 4);
|
||||
expect(r.projection.verdict).toBe('within');
|
||||
expect(r.projection.arms.map(a => [a.arm, a.n])).toEqual([['gpt-6-astra', 3], ['gpt-5.4-mini', 3]]);
|
||||
expect(renderPilotReport(r)).toContain('PILOT_ARM: arm=gpt-5.4-mini n=3 per_item=$0.1100');
|
||||
expect(r.projection.arms.map(a => [a.arm, a.n])).toEqual([['gpt-6-astra', 3], ['gpt-6-luna', 3]]);
|
||||
expect(renderPilotReport(r)).toContain('PILOT_ARM: arm=gpt-6-luna n=3 per_item=$0.1100');
|
||||
});
|
||||
|
||||
test('#3653: a priced arm mean is never multiplied across an arm settled unknown', () => {
|
||||
const d = tmp();
|
||||
const out = path.join(d, 'partial');
|
||||
const s = startPilot({ out, cap: 10, n: 3, arms: ['gpt-6-astra', 'gpt-5.4-mini'], dryRun: passingDryRun(d) });
|
||||
const s = startPilot({ out, cap: 10, n: 3, arms: ['gpt-6-astra', 'gpt-6-luna'], dryRun: passingDryRun(d) });
|
||||
for (const a of s.record.attempts) settlePilot(out, a.attempt, a.model === 'gpt-6-astra' ? 0.0003 : 'unknown');
|
||||
const r = pilotReport(out, { total: 400 });
|
||||
expect(r.projection.projected_usd).toBeCloseTo(0.12, 6);
|
||||
@@ -261,12 +261,12 @@ describe('priced pilot', () => {
|
||||
test('#3653: a declared seat-metered arm holds none of the cap, stays out of the verdict and gets its own line', () => {
|
||||
const d = tmp();
|
||||
const dry = passingDryRun(d);
|
||||
const est = startPilot({ out: path.join(d, 'probe'), cap: 100, n: 1, arms: ['gpt-6-astra', 'gpt-5.4-mini'], dryRun: dry }).record.attempts;
|
||||
const astra = est.find(a => a.model === 'gpt-6-astra')!.estimate_usd, mini = est.find(a => a.model === 'gpt-5.4-mini')!.estimate_usd;
|
||||
const est = startPilot({ out: path.join(d, 'probe'), cap: 100, n: 1, arms: ['gpt-6-astra', 'gpt-6-luna'], dryRun: dry }).record.attempts;
|
||||
const astra = est.find(a => a.model === 'gpt-6-astra')!.estimate_usd, mini = est.find(a => a.model === 'gpt-6-luna')!.estimate_usd;
|
||||
const cap = Number((3 * mini + 2 * astra).toFixed(4));
|
||||
expect(startPilot({ out: path.join(d, 'undeclared'), cap, n: 3, arms: ['gpt-5.4-mini', 'gpt-6-astra'], dryRun: dry }).error?.code).toBe('EVAL_BUDGET_EXHAUSTED');
|
||||
expect(startPilot({ out: path.join(d, 'undeclared'), cap, n: 3, arms: ['gpt-6-luna', 'gpt-6-astra'], dryRun: dry }).error?.code).toBe('EVAL_BUDGET_EXHAUSTED');
|
||||
const out = path.join(d, 'seat');
|
||||
const s = startPilot({ out, cap, n: 3, arms: ['gpt-5.4-mini', 'gpt-6-astra'], seatMetered: ['gpt-6-astra'], dryRun: dry });
|
||||
const s = startPilot({ out, cap, n: 3, arms: ['gpt-6-luna', 'gpt-6-astra'], seatMetered: ['gpt-6-astra'], dryRun: dry });
|
||||
expect(s.error).toBeUndefined();
|
||||
expect(s.record.seat_metered).toEqual(['gpt-6-astra']);
|
||||
expect(s.record.attempts.filter(a => a.model === 'gpt-6-astra').map(a => a.estimate_usd)).toEqual([0, 0, 0]);
|
||||
@@ -292,7 +292,7 @@ describe('priced pilot', () => {
|
||||
expect(charged.seat_metered).toEqual([]);
|
||||
expect(charged.projection.arms.map(a => [a.arm, a.n])).toEqual([['gpt-6-astra', 1]]);
|
||||
expect(charged.projection.verdict).toBe('unknown');
|
||||
expect(() => startPilot({ out: path.join(d, 'stray'), cap: 10, n: 1, arms: ['gpt-6-astra'], seatMetered: ['gpt-5.4-mini'], dryRun: dry })).toThrow('--seat-metered');
|
||||
expect(() => startPilot({ out: path.join(d, 'stray'), cap: 10, n: 1, arms: ['gpt-6-astra'], seatMetered: ['gpt-6-luna'], dryRun: dry })).toThrow('--seat-metered');
|
||||
const switched = path.join(d, 'switched');
|
||||
startPilot({ out: switched, cap: 1, n: 3, arms: ['gpt-6-astra'], seatMetered: ['gpt-6-astra'], dryRun: dry });
|
||||
expect(() => startPilot({ out: switched, cap: 1, n: 3, arms: ['gpt-6-astra'], dryRun: dry })).toThrow('needs a new --out');
|
||||
@@ -317,14 +317,14 @@ describe('priced pilot', () => {
|
||||
|
||||
test('#3653: a seat-metered arm still needs a price row, as the dry run does', () => {
|
||||
const d = tmp();
|
||||
const s = startPilot({ out: path.join(d, 'seat'), cap: 1, n: 2, arms: ['gpt-5.4-mini', 'seat-only-model'], seatMetered: ['seat-only-model'], dryRun: passingDryRun(d) });
|
||||
const s = startPilot({ out: path.join(d, 'seat'), cap: 1, n: 2, arms: ['gpt-6-luna', 'seat-only-model'], seatMetered: ['seat-only-model'], dryRun: passingDryRun(d) });
|
||||
expect(s.error?.code).toBe('EVAL_PRICE_MISSING');
|
||||
});
|
||||
|
||||
test('#3653: pilot start --seat-metered reaches the ledger through the CLI', () => {
|
||||
const d = tmp();
|
||||
const out = path.join(d, 'cli');
|
||||
const r = spawnSync(BIN, ['pilot', 'start', '--out', out, '--cap', '10', '--arms', 'gpt-5.4-mini,gpt-6-astra', '--seat-metered', 'gpt-6-astra', '--dry-run', passingDryRun(d)], { cwd: d, encoding: 'utf8', timeout: 30_000 });
|
||||
const r = spawnSync(BIN, ['pilot', 'start', '--out', out, '--cap', '10', '--arms', 'gpt-6-luna,gpt-6-astra', '--seat-metered', 'gpt-6-astra', '--dry-run', passingDryRun(d)], { cwd: d, encoding: 'utf8', timeout: 30_000 });
|
||||
expect(r.status).toBe(0);
|
||||
expect(r.stdout).toContain('PILOT_ATTEMPT: pilot-gpt-6-astra-1 model=gpt-6-astra estimate=$0.0000');
|
||||
expect(JSON.parse(fs.readFileSync(path.join(out, 'pilot.json'), 'utf8')).seat_metered).toEqual(['gpt-6-astra']);
|
||||
|
||||
@@ -24,7 +24,7 @@ import { describeIfSelected, testIfSelected } from './helpers/e2e-helpers';
|
||||
import { launchClaudePty, selectPtyNumberedOption } from './helpers/claude-pty-runner';
|
||||
import { closePacketReadAfterNotice, guardRunNeedsJournal, prepareGuardSession, startDispatchRelay, stoppedAtPhaseBoundary } from './helpers/autoplan-guard-pty';
|
||||
|
||||
const MODEL = 'claude-haiku-4-5-20251001';
|
||||
const MODEL = 'claude-haiku-5-5';
|
||||
|
||||
describeIfSelected('autoplan publication guard live PTY', ['autoplan-guard-pty'], () => {
|
||||
testIfSelected('autoplan-guard-pty', async () => {
|
||||
|
||||
@@ -23,7 +23,7 @@ import { resolveClaudeCommand } from '../lib/claude-bin';
|
||||
import { readOwnedClaudePublicTranscript, readPlanCountTranscript } from '../lib/claude-public-transcript';
|
||||
|
||||
const ROOT = path.resolve(import.meta.dir, '..');
|
||||
const CANARY_MODEL = 'claude-haiku-4-5-20251001';
|
||||
const CANARY_MODEL = 'claude-haiku-5-5';
|
||||
const PINNED = /@anthropic-ai\/claude-code@(\d+\.\d+\.\d+)/.exec(
|
||||
fs.readFileSync(path.join(ROOT, '.github/docker/Dockerfile.ci'), 'utf8'))?.[1];
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import { launchClaudePty, resolveClaudeBinary, selectPtyNumberedOption } from '.
|
||||
import { prepareGuardSession } from './helpers/autoplan-guard-pty';
|
||||
import { padBeforeCompactBoundary } from './helpers/journal-padding';
|
||||
|
||||
const MODEL = 'claude-haiku-4-5-20251001';
|
||||
const MODEL = 'claude-haiku-5-5';
|
||||
const PADDED_BYTES = 101 * 1024 * 1024;
|
||||
|
||||
describeIfSelected('autoplan long-session guard', ['autoplan-long-session'], () => {
|
||||
|
||||
@@ -24,7 +24,7 @@ import { resolveClaudeCommand } from '../lib/claude-bin';
|
||||
import { readOwnedClaudePublicTranscript } from '../lib/claude-public-transcript';
|
||||
import { schemaDrift, type HookPayload } from './helpers/schema-canary';
|
||||
|
||||
const CANARY_MODEL = 'claude-haiku-4-5-20251001';
|
||||
const CANARY_MODEL = 'claude-haiku-5-5';
|
||||
const PACKAGE = '@anthropic-ai/claude-code';
|
||||
|
||||
describeIfSelected('autoplan schema canary (latest Claude Code)', ['autoplan-schema-canary'], () => {
|
||||
|
||||
@@ -45,7 +45,7 @@ const evalCollector = createEvalCollector('e2e-hermetic');
|
||||
|
||||
// Cheap + deterministic: the canaries assert environment facts, not model
|
||||
// quality, so the smallest model is the right tool.
|
||||
const CANARY_MODEL = 'claude-haiku-4-5-20251001';
|
||||
const CANARY_MODEL = 'claude-haiku-5-5';
|
||||
|
||||
/** Extract concatenated tool_result text from the stream-json transcript. */
|
||||
function toolResultText(transcript: any[]): string {
|
||||
|
||||
Reference in new issue
Block a user