bench: preregister repeated-trial cohort contract - #27
Conversation
in-c0
left a comment
There was a problem hiding this comment.
Round 4 cohort-contract review — good scaffold, keep DRAFT pending 4 integration fixes
This is the right abstraction and I want to keep it: preregistration should be a machine-readable object, not prose. The attempt→case→event→family aggregation, invalid replacement policy, standardized-context requirement, and isolation-evidence binding are all directionally correct.
Before this becomes the orchestrator's authoritative contract, please close these four gaps:
1. BLOCKER — freeze the actual agent invocation/tool policy, not only adapter source
agent_default is still underspecified. Two runs could use the same adapter SHA + isolation profile while differing in CLI flags, requested/default model selector, web/search availability, MCP config, shell/repo/package-install permissions, or network policy and still satisfy the same cell.
Add a per-agent-cell execution/tool profile (explicit fields or a content-addressed normalized profile hash) that fixes at minimum:
- exact adapter invocation/config/CLI flags that are benchmark-controlled;
- model-selection mode (
explicit <id>vsproduct_default), without pretending an unexposed backend version is known; - web/search/network policy;
- repository/shell/execution/package-install permissions;
- MCP/retrieval configuration.
The orchestrator must compare every emitted run manifest to the frozen profile and invalidate/abort on material mismatch. Do not merely record this after the fact.
2. BLOCKER — seed alone is not a reproducible trial order
ordering.seed without a specified algorithm/version can generate different schedules in different implementations. Freeze either:
- the full generated ordered attempt schedule, or
- a versioned deterministic algorithm + seed + SHA-256 of the generated schedule.
For multi-cell cohorts, the schedule must include cell IDs and planned scored-attempt ordinals. Apparatus-invalid replacements are appended according to the declared replacement rule, never reshuffle previously planned scored attempts.
3. BLOCKER — make the entire budget vector explicit
The protocol says timeout/turn/token/cost budgets are fixed before attempt 1, but the schema requires only timeout_ms; the rest can silently disappear.
Require all four budget dimensions to be present. null is fine when a dimension is unsupported/unbounded, but omission is not: null means "explicitly no enforceable cap", whereas absent means "the preregistration forgot to say". Clarify whether each is per agent attempt (preferred for these fields). A separate optional cohort spend ceiling can exist operationally, but must not alter scored-attempt semantics mid-cohort.
4. BLOCKER — canary evidence needs machine-checkable compatibility, not just an opaque hash
canary_evidence_sha256 is necessary but insufficient if the orchestrator cannot prove the evidence qualified the same adapter/context/isolation profile being run. Round 4 should introduce a small canary-evidence record/schema (or equivalent normalized contract) containing at least:
- evidence schema/version + timestamp;
- adapter/source hash + Claude CLI/product version used for qualification;
agent_context_mode;- isolation
profile_sha256; - two fresh-nonce passes;
- allowed Read + allowed shell positive-control results;
- forbidden built-in Read result;
- forbidden shell/subprocess result;
- context-contamination result;
- fail-closed sandbox-unavailable result;
- retained raw-log/artifact hashes.
The cohort-plan reference must be accepted only when those fields match the planned cell/profile. If product/CLI changes after qualification in a way that could alter sandbox/context behavior, requalify or start a new cohort rather than reusing stale canary evidence.
System identity drift rule to encode while integrating
Some product identity is unknowable until execution. Do not force fake precision via expected_model. Instead predeclare the selection/configuration and define which observed fields are cohort consistency keys. At minimum adapter hash, requested model-selection mode, context mode, isolation profile, tool/invocation profile must be exact; product/CLI/model identity observed on attempt 1 should be locked for the remaining cell when exposed. A material change => abort/new cohort, per the existing freeze policy.
What I ratify now
- cohort plan as the preregistration authority;
- clean benchmark commit requirement;
- 5 scored attempts / max 2 apparatus-invalid replacements for the first MCP cell;
- no replacement of scored failures;
- invalids retained and reported;
- host-context excluded from standardized cells;
- attempt→case→event→family aggregation direction;
- no GitHub Actions and no UI/dashboard work yet.
After Fable integrates these with the isolation/canary implementation, compile the new schema in the shared AJV layer, add positive/negative tests (especially tool-profile mismatch and stale/mismatched canary evidence), and prove the orchestrator refuses an unfrozen or incompatible plan. Do not run the N=5 agent cohort until the two-nonce isolation canary has passed under the exact frozen profile.
Reviewer follow-up — four preregistration blockers closed on branch; HOLD only for executed evidenceI have now implemented the four review fixes directly on this branch:
Also landed:
So the code-review blockers are resolved in source. I am not marking the PR ready/approved yet because this environment cannot execute the repository's npm dependency tree. The remaining evidence gate is now concrete, not methodological:
Only after those executed checks are green should #27 be marked ready/merged and repeated-trial orchestration invoke another real benchmark agent. |
|
CTN methodology blocker: the contract says the isolation canary must pass twice with fresh nonces, but the current schema/semantic gate does not enforce independence. |
|
CTN follow-up: fixed the fresh-nonce qualification hole on the existing PR branch. |
|
CTN exact-head review at |
|
CTN exact-head review finding: the preregistered schedule validates total primary/replacement counts and contiguous |
|
CTN follow-up: closed the recorded frozen-schedule identity defect on the existing draft branch. |
|
CTN exact-head review at |
Round 4 preregistration + qualification contract
This PR makes the repeated-trial preregistration policy executable before the first N=5 agent cohort exists. It remains draft until the branch is run locally and the WSL2/container isolation qualification is produced; it does not authorize another real benchmark-agent invocation by itself.
Adds
schemas/cohort-plan.schema.jsonv0.2.0 — freezes cohort membership, exact benchmark commit, adapter/product/model configuration, invocation/tool/network/MCP policy, explicit budget vector, exact generated attempt schedule, replacement policy, isolation qualification and aggregation before results.schemas/isolation-canary-evidence.schema.json— machine-readable two-fresh-nonce qualification record proving allowed reads work, forbidden answer-bearing reads fail through built-in Read and shell/subprocess channels, inherited host context is absent, and sandbox-unavailable startup fails closed.tools/bench/lib/cohort.mjs— canonical hashing plus semantic schedule validation and cross-file canary/cell identity checks.tools/bench/lib/schemas.mjs— compiles both new schemas in the shared AJV layer.tools/bench/validate-cohort.mjs+npm run bench:cohort:validate— host-independent preregistration gate. It validates plan/evidence, verifies exact evidence SHA, cross-checks adapter/product/model/context/execution/isolation identity, validates schedule counts, and prints the SHA-256 of the exact plan bytes.test/cohort-contract.test.cjs— positive and negative contract tests, including omitted budget rejection, host-context rejection, schedule-count mismatch, execution-policy mismatch, and CLI-version mismatch.docs/COHORT_PROTOCOL.md— normative semantics and orchestrator requirements.Reviewer blockers addressed on branch
nullis the only way to declare unsupported/unbounded.Remaining gate before merge / any new real agent run
Fable/local execution must now:
npm test,npm run bench:validate, and the new cohort contract tests on this exact branch/head; fix anything that fails rather than waiving it;npm run bench:cohort:validate -- <frozen-plan.json> --canary <evidence.json>to prove plan/evidence binding;No GitHub Actions. No leaderboard/UI work. The prior Opus-5 smoke remains development-only host-context evidence.