Skip to content

evolve: phase-1 measurement infra — foreach concurrency, partial run summaries, eval/matrix - #1624

Open
Evanfeenstra wants to merge 1 commit into
mainfrom
evolve-phase1-measurement
Open

evolve: phase-1 measurement infra — foreach concurrency, partial run summaries, eval/matrix#1624
Evanfeenstra wants to merge 1 commit into
mainfrom
evolve-phase1-measurement

Conversation

@Evanfeenstra

Copy link
Copy Markdown
Collaborator

Phase 1 of the version-scoreboard restructure plan (#1623), deliberately scoped to files #1621 does not touch. Three independent pieces, all motivated by the post-mortem of prod run gaia-evolve/1788061734710:

  • vein foreach gets concurrency (default 1) — bounded worker pool; results in input order, #i paths + journal replay unchanged, checkpoint before each start (pause parks new starts), lowest-index error wins, cancellation beats error. The prod run spent 17h strictly serial on 225 produce runs; repeated measurement is unaffordable without this.
  • GET /runs/:runId serves a partial summary instead of a 404 when run.json is missing — reconstructed from the durable event log via a new exported summarizeFromEvents (partial: true discriminator, status from live controller or stale). No write-path change: run.json stays terminal-only. A dead 17-hour run no longer costs its whole report (and this works retroactively for every existing stale run).
  • eval/matrix seeded lab step — the task×version matrix across measurements: floor/movable/ceiling bands, an empirical noise floor from same-version re-measurements (reported UNKNOWN, never 0, when no version has n≥2), and bias-vs-variance tags on never-correct tasks (byte-identical wrong answer ×≥3 = bias). Verdict channel only; gold never enters. Smoke fixtures model the prod pathologies ("36"×9, the v11 0.76/0.80 resample pair).

Tests: vein 544/544 (11 new); gaia/evolve-smoke + new eval/matrix-smoke pass; both packages typecheck.

Follow-up (blocked on #1621 merging, then rebased on it): wire baselineSamples + the matrix into gaia-evolve, and the Phase-2 scoreboard loop.

🤖 Generated with Claude Code

…summaries, eval/matrix

Phase 1 of plans/evolve-scoreboard-and-task-matrix.md (#1623), scoped to
avoid #1621's files. Three independent pieces:

vein foreach `concurrency` (default 1): bounded worker pool over
iterations — results stay in input order, `#i` event paths and journal
replay are unchanged, the cooperative checkpoint moves to just before
each iteration starts (pause parks new starts, in-flight drain), a
failure stops new starts and surfaces the lowest-index error, and
cancellation always wins over an ordinary error. The prod evolve run
spent 17h strictly serial on 225 produce runs; repeats are unaffordable
without this.

vein partial run summaries: `GET /workflows/:name/runs/:runId` now serves
a summary reconstructed from the event log (`partial: true`, status from
the live controller or "stale") instead of a 404 when `run.json` is
missing — in-flight and crash-orphaned runs alike. The event log is
already durable per-step; refusing to read it is what turned a dead
17-hour run into event-log archaeology. Reconstruction is a pure
`summarizeFromEvents` (exported) over run.start / top-level step.end /
step.error. No write-path changes: run.json stays terminal-only, so
"summary exists = finalized" consumers are untouched.

eval/matrix (seeded lab step): the task×version matrix across
measurements — per-task bands (floor / movable / ceiling), an EMPIRICAL
noise floor from same-version re-measurements (fitness deltas + task
flips on identical YAML; UNKNOWN rather than 0 when no version has n≥2),
and bias-vs-variance tags on never-correct tasks (byte-identical wrong
answer ×≥3 = bias, distinct answers = variance). Verdict channel only —
gold never enters (EVOLVE_SPEC §6). Offline smoke:
`npx tsx src/lab/eval/matrix-smoke.ts`, fixtures modeled on prod run
1788061734710 ("36"×9 bias, the v11 0.76/0.80 resample pair).

vein: 544/544 tests pass (6 new foreach-concurrency, 4 summarize, 1
endpoint). gaia evolve-smoke + matrix-smoke pass; both packages typecheck.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant