Skill Tracer
Skills › gstack › ship › measure.md

measure.md

66 lines · ship/sections/measure.md at 3f79d81

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1<!-- AUTO-GENERATED from measure.md.tmpl — do not edit directly -->
2<!-- Regenerate: bun run gen:skill-docs -->

<!-- AUTO-GENERATED from measure.md.tmpl — do not edit directly --> <!-- Regenerate: bun run gen:skill-docs -->

Raw lines 1 to 2
3## Measure-then-fix loop (a red paid eval or a failed free-suite shard)
4
5Every rerun here is **diagnostic, not a verdict**: it never changes the recorded
6verdict of the run that failed, its artifacts are labeled `diagnostic` under
7`.context/ship-measure/` (never the eval history), and the lane verdict comes
8only from the one full gate run at the end. Never raise a budget, lower a
9threshold, add a verdict retry or skip a case to get a pass.
10`ship-measure` below means `bun --no-env-file --config=/dev/null run ~/.claude/skills/gstack/scripts/ship-measure.ts`.
12**Failed free-suite shard (Step 5).** Before calling the failure pre-existing or
13pushing, rerun that shard's exact file list (in run order) with
14`ship-measure free --files <f1,f2,...>` (gstack local runs: `--shard <i>`): 10
15reruns, rerun 1 alone as the baseline and the rest labeled parallel, each with
16its own HOME and state root, the flaky retry off, under a 10-minute cap.
17`ship_rerun_backend=ubicloud` with `UBICLOUD_API_KEY` set runs them on one
18Ubicloud VM. If the runner cannot take a file list, rerun the whole failing
19command 10 times. Report the pass rate, the completed count (for example 6 of 10
20completed at the cap) and one failure capture, then continue the triage.
22**Red paid eval (Step 6).** For each red case:
241. **Classify.** Read the red line's cause, evidence and Expected/Received
25 (`failure_cause`, `failure_detail`; gstack: `bun run eval:pass-rates --run <run> --case <id>`).
26 Name it: product change from this branch, detector or actor defect, fixture
27 defect, provider event, or model miss. A detector fix gets a free replay test
28 before any paid trial. A red that is infrastructure (provider outage, runner
29 loss) may skip measurement: `ship-measure skip --case <id> --reason "<why>"`
30 labels it `unmeasured` in the PR body. It never counts as a pass.
312. **Show the plan.** Print `ship-measure table` (trials, bar and budget per
32 kind, from the `ship_measure_*` gstack config keys) and the estimate:
33 per-trial cost from pass-rate history times trials, or "estimate unknown".
343. **Measure.** `ship-measure measure --case <id> --round baseline [--cost-per-trial <usd>]`
35 runs the case alone on the current head at its kind's count, in parallel,
36 through the project's documented single-case eval command,
37 `--command '<command> {case}'` (found the way Step 4 finds test commands;
38 gstack needs none and accepts judge ids). With no documented command, ask
39 once and record the answer in the report. Exit 2 needs approval: ask once
40 with its reason, then rerun with `--approved`.
414. **Decide by the exit code** (MEETS 9/10, MEETS-qualified 8/10 with every
42 red qualifying, EXTEND 7/10; behavior 11/12, 10/12, 9/12):
43 - 0: MEETS or MEETS-qualified; done.
44 - 5: needs-classify. Record each listed red from its capture:
45 `ship-measure classify --case <id> --round <r> --trials <2,5> --class <class> --evidence "<path:line>"`.
46 Qualifying: `provider` (only on the trial's own provider error),
47 `judge-noise`, `model-miss` (cite the line). Fix round: `timeout`,
48 `hang`, `regression`, `fixable`. `unclassified`: reviewed, no evidence.
49 - 6: EXTEND. `ship-measure extend --case <id> --round <r>` once, on the
50 unchanged tree; never a third batch.
51 - 1: BELOW, a fix round.
525. **Fix at the cause.** Root-cause the failed trials from their captures in
53 `.context/ship-measure/<case>/<round>/tNN/` and change the cause.
546. **Re-measure.** `ship-measure measure --case <id> --round round-<n> --fix "<cause and change>"`,
55 then item 4. Call a case fixed only with a named causal change and every
56 failure in the closing measurement explained;
57 report "observed k/n after fix at <cause>", never a proven rate.
587. **Stop.** Exit 3 is a named red (round limit, budget, or two void
59 batches): stop, do not push, and report `ship-measure report` with every trial.
61**Gate once.** When every red case measures at or above target, run the full
62gate once (Step 6 item 2). When the project's CI runs that gate on push (gstack:
63the pull request's `evals` workflow), the push is the gate run: push and read
64that run, and do not also start the gate command (gstack's `bun run eval:bg:pr`
65on a pushed head dispatches a second paid run). Put the `ship-measure report` table (estimated
66and actual spend per case) in the PR body.

Measure-then-fix loop (a red paid eval or a failed free-suite shard)

Every rerun here is diagnostic, not a verdict: it never changes the recorded verdict of the run that failed, its artifacts are labeled diagnostic under .context/ship-measure/ (never the eval history), and the lane verdict comes only from the one full gate run at the end. Never raise a budget, lower a threshold, add a verdict retry or skip a case to get a pass. ship-measure below means bun --no-env-file --config=/dev/null run ~/.claude/skills/gstack/scripts/ship-measure.ts.

Failed free-suite shard (Step 5). Before calling the failure pre-existing or pushing, rerun that shard's exact file list (in run order) with ship-measure free --files <f1,f2,...> (gstack local runs: --shard <i>): 10 reruns, rerun 1 alone as the baseline and the rest labeled parallel, each with its own HOME and state root, the flaky retry off, under a 10-minute cap. ship_rerun_backend=ubicloud with UBICLOUD_API_KEY set runs them on one Ubicloud VM. If the runner cannot take a file list, rerun the whole failing command 10 times. Report the pass rate, the completed count (for example 6 of 10 completed at the cap) and one failure capture, then continue the triage.

Red paid eval (Step 6). For each red case:

  1. Classify. Read the red line's cause, evidence and Expected/Received (failure_cause, failure_detail; gstack: bun run eval:pass-rates --run <run> --case <id>). Name it: product change from this branch, detector or actor defect, fixture defect, provider event, or model miss. A detector fix gets a free replay test before any paid trial. A red that is infrastructure (provider outage, runner loss) may skip measurement: ship-measure skip --case <id> --reason "<why>" labels it unmeasured in the PR body. It never counts as a pass.
  2. Show the plan. Print ship-measure table (trials, bar and budget per kind, from the ship_measure_* gstack config keys) and the estimate: per-trial cost from pass-rate history times trials, or "estimate unknown".
  3. Measure. ship-measure measure --case <id> --round baseline [--cost-per-trial <usd>] runs the case alone on the current head at its kind's count, in parallel, through the project's documented single-case eval command, --command '<command> {case}' (found the way Step 4 finds test commands; gstack needs none and accepts judge ids). With no documented command, ask once and record the answer in the report. Exit 2 needs approval: ask once with its reason, then rerun with --approved.
  4. Decide by the exit code (MEETS 9/10, MEETS-qualified 8/10 with every red qualifying, EXTEND 7/10; behavior 11/12, 10/12, 9/12):
  5. 0: MEETS or MEETS-qualified; done.
  6. 5: needs-classify. Record each listed red from its capture: ship-measure classify --case <id> --round <r> --trials <2,5> --class <class> --evidence "<path:line>". Qualifying: provider (only on the trial's own provider error), judge-noise, model-miss (cite the line). Fix round: timeout, hang, regression, fixable. unclassified: reviewed, no evidence.
  7. 6: EXTEND. ship-measure extend --case <id> --round <r> once, on the unchanged tree; never a third batch.
  8. 1: BELOW, a fix round.
  9. Fix at the cause. Root-cause the failed trials from their captures in .context/ship-measure/<case>/<round>/tNN/ and change the cause.
  10. Re-measure. ship-measure measure --case <id> --round round-<n> --fix "<cause and change>", then item 4. Call a case fixed only with a named causal change and every failure in the closing measurement explained; report "observed k/n after fix at <cause>", never a proven rate.
  11. Stop. Exit 3 is a named red (round limit, budget, or two void batches): stop, do not push, and report ship-measure report with every trial.

Gate once. When every red case measures at or above target, run the full gate once (Step 6 item 2). When the project's CI runs that gate on push (gstack: the pull request's evals workflow), the push is the gate run: push and read that run, and do not also start the gate command (gstack's bun run eval:bg:pr on a pushed head dispatches a second paid run). Put the ship-measure report table (estimated and actual spend per case) in the PR body.

Raw lines 3 to 66
Runs code scripts/ship-measure.ts :10
Starts an agent dispatches :65