Skip to content

feat(runtime): structuralRollout strategy + rollout-policy improve surface (measured +8..+21pp)#503

Merged
drewstone merged 12 commits into
mainfrom
feat/structural-rollout
Jul 9, 2026
Merged

feat(runtime): structuralRollout strategy + rollout-policy improve surface (measured +8..+21pp)#503
drewstone merged 12 commits into
mainfrom
feat/structural-rollout

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

What

  • structuralRollout strategy — a new member of the Strategy family: sample k candidates, self-check each against visible checks, select the best, then guarded repair for candidates that fail. The design doc maps the integration: CheckSource is the only net-new seam; everything else extends the existing strategy family, verifier-environment, and field routing.
  • Rollout-policy improve surface — a deterministic policy surface so improve() can tune the structuralRollout dials (k, repair budget, testgen on/off) under the held-out promotion gate.
  • Two runtime fixes found by the live smoke:
    • tool-loop dropped the stopping content-only assistant reply from the conversation;
    • trajectory-less consults sent instruction and task as separate messages instead of one fused user message.
  • Measurement rigs (HumanEval + MBPP structural-lever benches, TESTGEN oracle, DIVERSE mode), the prompt-evolution rigs behind the documented null result, and the live runtime smoke script.

Evidence

  • 2 models x 2 datasets grid; flagship cell: MBPP-Llama 51.8% -> 73.1% (+21.3pp, p=2.3e-51, n=427).
  • Live runtime smoke: 63% -> 85% (+22pp) on 20 tasks, real model, hidden grading script-side.
  • Independent verification: 1968/1968 regrade cells, 0 leaks.
  • Full writeup: supervisor-lab docs/results/structural-lever-humaneval.md.

Design doc

docs/design/structural-rollout-integration.md

🤖 Generated with Claude Code

drewstone added 12 commits July 9, 2026 14:51
…f-k + self-repair on docstring examples)

Selection + repair grounded only on visible docstring >>> examples (doctest,
nonce-sentinel), hidden check() grading physically after all harness decisions.
Paired bootstrap + exact sign test. Calibrated: 164/164 hidden self-check,
75/164 coverage, 2/75 false-fail (dataset bugs). First result: Llama-3-8B
44.3%->57.3% pass@1 (+13.0pp, CI [+7.8,+18.4], p=1.5e-5, n=164).
humaneval.ts: HUMANEVAL_GZ local-cache support (GitHub raw 429s under reps).
…ructural-lever rig

Model writes single-line asserts from the prompt alone, BEFORE any candidate
exists; asserts run individually in the jail and add to the doctest signal
(split counts kept for audit). Extends honest-oracle coverage from 46% of
HumanEval toward 100%. Opt-in via TESTGEN=<count>; default off keeps prior
runs reproducible.
…EN), hidden=remaining asserts

Same architecture as hev-structural (nonce judges, phase separation, incremental
persistence, bootstrap+sign-test). Calibration: 427/427 hidden self-check, 0/427
visible false-fail, 0 dropped. Official-first scoring: MBPP one-sentence specs
make model-guessed asserts ~70% wrong on passing code — shown assert ranks first,
guesses break ties (pilot: selection -6.7pp -> +16.7pp).
… only net-new seam; extend strategy family, verifier-environment, field routing
…tool-loop conversation

runBrainLoop returned on a no-tool-call turn WITHOUT pushing the final assistant
message, so ToolLoopResult.messages violated its own contract (seed + every
assistant/tool turn): a shot that answers without tools came back with a transcript
missing its own answer. Depth continuation then criticized a solution absent from the
model's history, and structuralRollout's fenced-code candidate extraction
(defaultExtractCandidate's designed fallback) read an empty conversation on
non-tool-calling models (Llama-3-8B-Instruct-Lite never tool-calls under
tool_choice:auto — measured on Together).

Proven by the runtime smoke (bench/src/smoke-structural-rollout.mts): candidates now
flow through the strategy on a real non-tool-calling model.
…ory-less consults

consultAnalyst rendered EVERY raw consult in analyst framing (instruction as system,
'TASK: ...TRAJECTORY:' as the user turn). With no trajectory — the pre-task case,
i.e. structuralRollout's authored-check generation — that user turn is just the coding
task, which a weak model answers directly, ignoring the system instruction: measured
on Llama-3-8B-Instruct-Lite, authored-assert yield 6/18 reps (0 asserts on the rest)
vs 18/18 with the instruction and task fused into one user message (the proven
hev-structural rig shape). Trajectory-bearing consults keep the analyst framing
unchanged.

Runtime smoke after the fix: authored checks on 20/20 HumanEval tasks (was 14/20).
…Eval, hidden grading script-side

The ship gate for the ported strategy: runAgentic + structuralRollout(default policy:
k=5, repairs<=2, testgen=6) over createVerifierEnvironment with an INERT check, so no
hidden-test signal reaches selection/repair; visible checks are the strategy's own
model-authored asserts run by the shipped sandboxCheckRunner over a docker
--network=none exec channel (the script's thin adapter). The task's own check() suite
grades every locked candidate script-side (runChecker) after each rollout finishes.
Receipts are hard-verified against the recorded outcomes per candidate.

Llama-3-8B-Instruct-Lite (Together), first 20 tasks: blind mean-of-k 63.0% ->
selected 80.0% -> final 85.0% (+22pp), authored checks 20/20, 4 tasks rescued
(selection or guarded repair passes hidden where sample 0 fails), 0 crashes.
@drewstone drewstone merged commit 81a534d into main Jul 9, 2026
1 check passed
@drewstone drewstone deleted the feat/structural-rollout branch July 9, 2026 21:16
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