Repository navigation
Add --runs repetition and pass^k reporting to the eval runner - #2247
Conversation
…2241) Every score this project has quoted from the agent matrix was a single draw from a distribution the repo documents as wide — 6/12, 9/12, 8/12 across three consecutive runs with identical guidance and no code changes. That has two consequences: a change worth +1 or +2 scenarios sits entirely inside the noise band, so the instrument cannot see the improvements we ship; and single runs produce confidently wrong structural claims that survive exactly one rep. - `--runs N` repeats the whole fixture, recording every rep in one results file. - pass^k is the headline (a scenario counts only if it passed in EVERY rep), with pass^1 alongside it, since reliability rather than best-case capability is what matters for a model that writes to a user's graph. - Per-scenario flip rate in the summary: "fails 3/3" and "fails 1/3" are different findings that a single run renders identically, and only the second is debuggable. - Provenance is recorded per rep, so a rep that hit a degraded environment is identifiable after the fact rather than attributed to rep 1's conditions. Trace lines carry their rep for the same reason. The runner asserts reps are comparable rather than owning the daemon: the caller owns the lifecycle everywhere else in this harness, so `--between-runs` takes the operator's purge/restart command, and the runner then re-runs preflight before each rep, aborts on any seeded-guidance drift, aborts if the hook exits non-zero, and keeps the uniformity guard per-rep rather than pooled. Each of these writes no results file, as the rest of the gate does. Baseline diffing now compares pass^k and names the rate on both sides; pre-`--runs` baselines still join, read as a single rep. Results files are rep-shaped even at `--runs 1` so readers need one code path — the single-rep shape being the one that produced the wrong conclusions. Empty-generation exclusions leave a scenario's denominator rather than counting as failures, so a stray inference bug cannot make a reliable scenario read as a flipping one; a scenario excluded in every rep drops out of the scored count instead of being invented as a result. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QZaSrSHQHAaaCcRvXtknGH
Pragmatic Code Review — PR #2247Review Type: Initial Review SummaryThis is a well-executed change to measurement code, and it is a clear net improvement. The core insight — that every number this project has quoted is a single draw from a distribution documented as 6/12–9/12 — is correct, and the fix addresses it at the right layer. The restructure that extracts the scenario loop into I verified the aggregation math empirically rather than by reading it, exercising the edge cases the unit tests do not cover (fully-excluded scenarios, uneven reps, I also diffed the restructure against Requirements Check
📝 On (2): 📝 On (5) — the deliberate deviation, and I think it is correct. The issue asked
I would accept this deviation and consider the issue's item 5 satisfied in intent. Verification PerformedAggregation math — probed beyond the committed tests:
Safety-property preservation (diffed against
Tests: Findings🟢 Suggestions📁 scripts/eval/runner.ts:404-414 — 📁 scripts/eval/runner.ts:180-200 ( 📁 scripts/eval/runner.ts:612-627 ( Non-findings (checked and cleared)
Documentation📁 ../nodespace-docs/development/agent-eval.md (commit RecommendationAPPROVE This is a net improvement by a wide margin, and it is the rare case where the measurement code got the same rigor usually reserved for production code. The aggregation math is correct under adversarial probing, every pre-existing safety guard survived a substantial restructure with three of them strengthened, and the one deliberate deviation from the issue is better-reasoned than the requirement it replaces. The three suggestions above are polish and none should block merge. One thing worth calling out as genuinely good practice: making the results file rep-shaped even at 🤖 Automated pragmatic-code-review |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Two of the three review suggestions; the third is skipped with reasoning below. pass^1 and pass^k are computed over different populations — pass^k counts scenarios scored in at least one rep, pass^1 averages what each rep actually scored. Printing both over pass^k's denominator rendered e.g. "2.33/4" beside "pass^3: 2/4" whenever exclusions were uneven across reps: both correct, but inviting the pair to be read as one rate over one population. pass^1 now states its own denominator (2.33/3.67), staying an integer when exclusions are even. Adds a test for scenarios present in only some reps — a rep that aborts partway contributes fewer scenarios, and each scenario must be judged against the reps that actually reached it rather than the run's rep count, or everything after the abort point reads as unreliable because of where the run stopped. Skipped: adding a comment marking takeFlag's extraction order as load-bearing. The stated rationale does not hold — indexOf finds the first occurrence, which is the real flag, so a hook command *containing* "--runs" parses correctly in either order (verified). Order only matters when a hook's value is the bare string "--runs", which is contrived; a comment asserting a hazard that is not the one described would mislead a future reader more than silence does. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QZaSrSHQHAaaCcRvXtknGH
Review addressed — 2 of 3 suggestions implemented, 1 skippedAll three findings were 🟢 suggestions with no blockers. Commit ✅ Addressed1. pass^1 / pass^k denominators ( The two numbers are computed over different populations — pass^k counts scenarios scored in at least one rep; pass^1 averages what each rep actually scored. Printing both over pass^k's denominator rendered pass^1 now carries its own denominator, and stays an integer when exclusions are even: Verified live against stub binaries in both cases. 2. Uneven-rep behavior untested ( Added a test for scenarios present in only some reps. A rep that aborts partway contributes fewer scenarios, and each scenario must be judged against the reps that actually reached it rather than against the run's rep count — otherwise every scenario after the abort point reads as unreliable because of where the run stopped rather than how the model behaved. ⏭️ Skipped3. Comment marking The stated rationale does not hold, so I verified it before writing anything. Order only diverges when a hook's value is the bare string Verification
|
Three sibling PRs landed on main touching the same files. They compose rather than conflict, but the seams needed real resolution: #2247 (--runs / pass^k) restructured the runner around reps: the flat `summary`/`results` on EvalResults became `aggregate`/`reps`, and the scenario loop moved into a per-rep function. My per-run counts moved to RepSummary, and the report sums them across reps rather than quoting the first. The seam that actually mattered: `aggregateReps` filtered only `excludedAsEmptyGeneration`, so setup scenarios would have counted toward pass^k — putting the cascade back one level up, where a flaky setup turn reads as an unreliable SCENARIO rather than as its successors' reps not being comparable. ScenarioReliability now carries `setup`, the aggregate excludes it, and the reliability table renders it as ⊙ setup rather than as a degenerate empty generation (both have scoredReps === 0). Four tests pin it; verified they fail if the filter is reverted. #2246 (scenario audit) added scenario 11c2, which had no `end` clause — caught by my own fixture invariant rather than by the merge. It asserts both halves (the note exists AND the edge reaches it), because it is the create-and-link-in-one-turn shape: asserting only the edge would pass on a turn that linked the wrong node, and only the node would pass on the prose-instead-of-an-edge failure 11c exists to catch. It is also the shape the asymmetric `after` walk was built to see. Notably #2246 reached the same conclusion for scenario 6 independently — assert the outcome, not the route — and relaxed its trajectory expectation for the reason this PR exists. test:all green: 227 frontend files / 4794 tests, 214 scripts, 24 skill, 53 Rust binaries including #2246's new winnability suite. Co-Authored-By: Claude <[email protected]>
Closes #2241.
The problem
Every score this project has quoted from the agent matrix was a single draw from a distribution the repo itself documents as wide — 6/12, 9/12, 8/12 across three consecutive runs with identical guidance and no code changes.
Two consequences, and the second is worse:
What this adds
--runs N— repeats the whole fixture, recording every rep in one results file.fails 3/3andfails 1/3are different findings that a single run renders identically, and only the second is debuggable.Design note: the runner asserts, it does not own the daemon
The issue proposed that
--runsown the purge + daemon restart between reps. It does not, deliberately — the caller owns the daemon, socket, and database everywhere else in this harness, and a runner that started killing processes it did not start would own a lifecycle it cannot see (a daemon under a launch agent, a remote socket, a model that takes a minute to load).Instead
--between-runs <cmd>takes the operator's purge/restart command, and the runner asserts what it was supposed to achieve:Each of these writes no results file, consistent with the rest of the gate. Without a hook, the runner says explicitly that reps share one daemon and database.
Other behavior
passed all 3 baseline rep(s), now 2/3). Pre---runsbaselines still join, read as a single rep; two single-draw sides are called out as within the known spread.--runs 1, so readers need one code path — the single-rep shape being the one that produced the wrong conclusions.Testing
25 new unit tests covering aggregation (pass^k, pass^1, flip detection, exclusion handling, fixture ordering), guidance-drift detection (including reorder-insensitivity), the reliability table's rendering, and baseline reading in both formats.
Verified end to end against stub binaries (no model required): a 3-rep run producing
pass^3: 1/3 · pass^1: 1.67/3 · Flipped: 1/3with a scenario passing all reps, one failing all, one flipping, and one excluded throughout; the guidance-drift abort; the uniformity guard firing on rep 1 and skipping the remaining reps; legacy-format baseline joining; and the single-rep path.bun run test:allpasses: frontend 4794/4794, scripts 153/153, browser 24/24, Rust green.Docs updated in
nodespace-docs(ea3487f): new "Repetition and pass^k" section, plus the rep-shaped results file, the trace'srepfield, pass^k baseline comparison, and the exit-code description.🤖 Generated with Claude Code
https://claude.ai/code/session_01QZaSrSHQHAaaCcRvXtknGH