Skip to content

Confirmatory runner: the web stage, its end-of-calculator gate and stage budgets - #257

Draft
MaxGhenis wants to merge 31 commits into
v2-microcosm-batchesfrom
web-stage-runner
Draft

MaxGhenis wants to merge 31 commits into
v2-microcosm-batchesfrom
web-stage-runner

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Draft: work in progress. This adds the confirmatory runner's web stage for PolicyBench v2's pre-registered H5. It runs web against web+pe3 for GPT-6 Luna, Gemini 3.5 Flash-Lite and Claude Sonnet 5.5 on the calculator stage's 120 households, after that stage ends. It builds on #246 (07ee27f) and changes scripts/confirmatory_run.py, scripts/confirmatory_no_tools.py and the runner's tests.

What the commits do

  • f1cbacf, 38721b4, fca2a3f: the web stage. The runner takes each stage's models, arms, folders, profile rule and order stream from a stage table, and leaves the calculator stage's six models, streams, records and failure rules as they were. The web design links the calculator design by path and sha256 and must share its frozen inputs. Preflight starts the web stage only once the calculator stage has ended. That takes a closed host log and a final summary per model, with no request in flight or unresolved. Every attempt must join its record, and the final anchor's push must have succeeded and match the local file.
  • eed0ba5: Gemini's search. Preflight refuses a web stage with a Gemini model unless litellm is the version the harness's search patch supports. Tests capture each request body before it leaves the machine and check that both Flash-Lite arms keep Google Search beside their function declarations.
  • 78315dd, 4dc830b, 9106545, f92c90a: stage budgets, checked before any provider request.
    • The calculator design's cap must be $150 and the web design's $270, each with a $25 margin to its hard ceiling.
    • Preflight refuses a design whose spent_before already reaches its ceiling. If one started anyway, Ceiling records the crossing when the runner builds it, so the run admits no household.
    • Each model's expected cost, cap and reserve must be finite numbers. Caps must sit within $0.005 of the model's share of the stage's $145 or $120, and reserves within $0.0005 of three times its expected cost per household. Preflight checks these directly and in the calculator design a web design links.
    • The web design's spent_before must reach, less $0.000001, the larger of two flat math.fsum totals: the calculator design's spent_before plus every calculator-stage cost, and every saved no-tools cost plus every calculator-stage cost.

Invariants

For every design the preflight accepts:

  • web spent_before >= max(fsum([B, *A]), fsum([*N, *A])) - 0.000001, where B is the calculator design's spent_before, A every calculator-stage cost and N every saved no-tools cost; a total that overflows refuses every finite declaration;
  • spent_before < overall_cap + 25, and Ceiling(ceiling, spent_before).exhausted() holds before any admission whenever spent_before >= ceiling;
  • for every registered model m, abs(caps[m] - S * e[m] / T) <= 0.005 and abs(reserves[m] - 3 * e[m] / 120) <= 0.0005, with S = 145 or 120 and T = fsum(e) finite and positive.

The study's independent report applies the same rules. A differential test there gives both programs 25 designs and requires the same verdict on each. It then runs an accepted web design on fake providers, and the report must pass its records. Removing any one of the 12 new runner checks fails its named test.

Status and plan

  • At 8355176, the runner's confirmatory test files pass in full on a local run: 682 tests in tests/test_confirmatory_run.py, and 25, 11, 50, 205, 200 and 56 in the anchor, board-engine, input-reads, no-tools, no-tools-records and unreadable-evidence files.
  • Two independent reviews of 8355176 asked for changes. We're queuing a build that applies three runner fixes we prepared and tested separately, then fixes the remaining findings; this branch will take its commits.
  • We'll rewrite the description above, which covers the commits through f92c90a, before this leaves draft.
  • After the reviews agree, CI runs through a ci/pr<N>-<sha> branch, since ci.yml runs only for pull requests into main.
  • This merges with a merge commit; never squash or rebase v2-microcosm-batches.

🤖 Generated with Claude Code

MaxGhenis and others added 8 commits November 3, 2026 23:11
Register each stage's models, per-model arms and folder keys, profile rule and order stream. Require design kind calculator or web before a run or operator resume starts. Preserve the calculator stage's six models, labels, streams, records and failure rules. Run Luna, Flash-Lite and Sonnet concurrently with two lanes each and web versus web+pe3 orders from order/web/<model>.

Require web search in both web profiles, prohibit a calculator in web, require every calculator feature in web+pe3, and retain development's benchmark-search prohibition. Use each model's single engine pool for calculator calls and refuse calculator calls in web. Apply the pinned Gemini search compatibility patch and record actual web request timeouts, search tools, benchmark-search rules, timeout retry settings and provider search prices in the manifests.

Require the web design's hashed calculator-design link, its calculator kind, and equality of the frozen inputs, engine, draw, treatment, runner commit, workers and no-tools design. Preserve scoring metadata equality for build, exclusions, baseline exclusions, supplementary exclusions, disputed cells, adjudication, adjudicator, judge and published sources. Require overall_cap 270, registered web arms with distinct folders, and absent frontier arms and models. Refuse overlapping web, no-tools and calculator roots.

Require closed calculator host evidence, ended model summaries, empty in-flight inventories, settled requests, matching admissions and ended household supervisors, complete hashed finals and sequential archives, complete log chains, matching manifests and final anchors, and a successful final push with its exact immutable snapshot. Allow a terminally stopped calculator stage once its requests settle. Count every prior model's finals, replacements, paid stubs and late spend in one math.fsum and refuse spent_before below that total less one microdollar. Keep admission, reserves, reruns, operator pauses, deadlines, host evidence and the overall cap plus 25 dollar ceiling unchanged.

Add synthetic tests for each stage rule, profile refusal, stream, design link, shared field, root overlap, end-evidence refusal, exact spend boundary, paid and late attempts, web lanes, admission, provider reruns, operator resume, dry runs and the ceiling. Check web timeout classifications against the existing failure precedence.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the calculator runner's explicit models override compatible with harness models outside the registered roster by assigning those overrides the frontier arms and frontier_arms folder mapping. Store both fallback choices in the calculator stage table and resolve models through its arms_for and folder_key_for helpers. Keep the command line's registered six-model calculator roster unchanged and require web overrides to belong to the registered three-model web roster.

Use the same table helpers in the fake record checker and folder fixture. Extend the stage table regression to cover the existing Gemini JSON-contract override and web refusal, while preserving the existing harness conversation test unchanged.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Require calculator archive link numbers to be integers in their sequential positions, and require a successful calculator final push to carry integer return code zero. This keeps booleans from satisfying those web-stage closure gates through Python's numeric equality and agrees with the report's existing integer checks.

Add 74 isolated negative cases for summary identity, abandoned-request types, UTC timestamps, attempt and final counts, ended household supervisors, finite closed host spans, every chained log, unsettled and unresolved attempts, record objects and histories, totals and finite nonnegative numeric costs, archive sequence and byte links, run-log reconciliation and ended times, late costs, manifest counts and hashes, complete model and log anchor coverage, and final push identity, return code and chronology. Require one preflight refusal with the named guard's diagnostic for each fault, including the previous nine closure cases.

Keep surrounding record digests, archive links, chains, anchor prefixes, push references and snapshots consistent when planting a payload fault, so an unrelated hash failure cannot satisfy its test. Preserve the calculator and web record writers, model rosters, treatment pin and run procedure.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refuse incompatible Gemini web designs during preflight so the search patch cannot terminate a run after startup writes. Verify the runner applies its patch before the first Gemini completion and that both web arms retain search and every function declaration in serialized HTTP requests. Restore LiteLLM class descriptors after each runner test.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Require complete prior spend, the fixed calculator cap, starts below the ceiling, and proportional caps with three-times reserves for each stage and linked calculator design.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Set caps and reserves from finite nonpositive synthetic costs so that the positivity gate is the sole failing rule.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Derive reserve fixtures from the patched household count and retain the calculator world needed by root-overlap tests.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use one math.fsum for expected costs and refuse overflow before cap or reserve calculations for both stages.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
policybench-site Ready Ready Preview Nov 8, 2026 6:24pm UTC

Request Review

MaxGhenis and others added 5 commits November 4, 2026 16:48
Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r before spending.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oor.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…inputs.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 10 commits November 6, 2026 06:03
Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ered paths.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…itive rounding ties.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…amed reversion.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… check.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 4 commits November 7, 2026 08:40
…sal messages.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k corrections.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pending.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 4 commits November 7, 2026 13:00
Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uses.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ery.

Co-Authored-By: GPT-6.1 Sol (Subfleet) <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 8355176d Deployed Nov 8, 2026 by vercel[bot]
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