Impossible OS Docs

The scripted integrator: lane handoffs land without the runner

Operator direction, 2026-12-02. Build order: next after the runner's current section (operator, 2026-12-02). Status: design, built through the scripted-integrator sections of the automation-hardening roadmap.

Why

With three worker lanes the runner on main is already the bottleneck. Measured on the lane bus on 2026-12-02 over 17 handoffs since 2026-12-01:

  • A ready handoff took 0.2 to 10 hours to land, mostly 1 to 2; the three handed off between 14:37 and 15:41 were still integrating five hours later.
  • 9 of the 14 landed handoffs were adapted: the runner resolved their conflicts by hand.
  • The runner integrates only at its own section boundary (.claude/skills/overnight-sequencer/SKILL.md, "Worker lanes"), one handoff at a time, and pushes once per section. Its own bootloader cross-section defects section ran past round 28, so 41 commits, the integrated lane work among them, waited on one push.
  • It re-runs the Astra chain on every integrated candidate, which the worker has already reviewed.

Helper lanes 4 to 8 would multiply the queue by about 2.5. The fix has to make integration cost independent of the number of lanes and of the runner's own review chain, and it has to spend no model on a green integration: Claude sessions are the expensive resource (operator, 2026-12-02: a builder, an integrator and a watcher all on Claude is too much).

The shape

Role Runs as Does
Builder the runner, Claude, primary checkout builds its own sections and pushes them, as today; never integrates while the integrator is live
Integrator scripts/overnight/integrate.py, no model, its own worktree ../impossible-os-integrator lands every ready handoff, batch by batch
Watcher Claude, self-paced watches all of it, including the integrator's log
Lanes 1 to 8 agy build, review the whole chain, rebase, hand off

The integrator starts with the lanes: starting any lane starts it if it is not running, in shadow mode until its shadow record passes and live after that, with no operator step (operator, 2026-12-02); stopping the lanes stops it. It lives only beside a live runner and holds a single-instance lock. With no integrator live, the runner integrates as it does today, so the change is reversible by not starting it.

1. Receipts bind to the diff, and workers run the whole chain

Today a receipt binds to a commit id: main's stamp gate accepts a pass whose head is HEAD or an ancestor of it (section_commit_gate.py _pass_covers), so a cherry-picked or rebased commit loses its review, and workers run only plan and round, so the runner owes performance and completion on every integrated candidate.

  • codex-dispatch.sh records diff_id on every receipt: git diff <base> <head> | git patch-id --stable over the section's range.
  • A pass covers a candidate when its head is HEAD or an ancestor (today's rule) or its diff_id equals the diff_id of the handoff's integrated range on the candidate. A clean pick and a clean rebase keep the diff, so they keep the review; any change to the diff, including a conflict resolution, loses it.
  • Workers run the whole chain (plan, round, performance, completion, reconciliation after gaps) in their worktree, and the handoff record carries the receipt lines. The integrator imports them into its own manifest, so the stamp gate reads them where it already looks.
  • What a moved diff does not prove (an interaction with code that landed after the worker's base) is what the integration build and tests are for, exactly as for a git merge. This is the accepted limit.

2. Checks follow the paths a batch touches

scripts/overnight/verify_tier.py classifies a path set; a batch takes the highest tier of its handoffs.

Tier Paths Checks
docs docs/, todo/, gh-pages/, other *.md lint, scripts/site/build.py --check, todo-plan.py --check
tooling scripts/, .claude/, .githooks/, .conclave/, host tools/ the above, plus the tooling tests the paths reach (TEST_TOOLING_CHANGED_PATHS) and the control-plane suite when its manifest is touched
product src/, include/, user/, the build and linker files the above, plus build.sh and the CI-parity test.sh
boot the boot-path list the above, plus the smoke matrix

The boot-path list moves from post_commit_smoketest_boot.py into verify_tier.py, and the hook imports it, so there is one list. Heavy checks run through bosun run -- and run-artifact.sh. The pre-push gates still run on the push.

3. The integrator lands batches

One cycle, in its own worktree, so nothing it does touches the primary checkout:

  1. Fetch and reset the worktree to origin/main.
  2. Take the ready handoffs, oldest first, at most six. For each: integrate-begin, cherry-pick its range, integrate-record. A pick that conflicts is aborted and rejected with a fix_request naming the origin/main tip to rebase onto; the worker rebases and hands off again (section 1 keeps its receipts when the rebase is clean). A handoff whose receipts do not cover the whole chain for its diff is rejected the same way.
  3. Run the batch's tier. On a red check the candidate is still local, so the integrator rebuilds it from halves until the failing handoff is isolated, rejects that one with the log artifact, and re-verifies the rest.
  4. Write each section's stamps (implementation-order box, Verified: and Quality reviewed: lines citing the receipts), run todo-plan.py --sync, and commit; the commit gates judge it as they judge any commit.
  5. Take the push lock, push once, release. A non-fast-forward rejection rebuilds the candidate from step 1 with the same handoffs, at most three times.
  6. Wait for CI on the pushed commit (ci-wait.py). Green: integrate-done for every handoff in the batch. Red: revert the batch in one commit, push it, and return its handoffs to ready; the next cycles land them one at a time, which isolates the culprit without guessing.

Two judge calls, through the provider APIs

The integrator asks the Conclave judge (scripts/mechanics.py, smart mechanics) two narrow questions; every other step is a script. The judge advises and the script decides, it never reviews or writes a receipt, a judge failure keeps the plain behaviour, and each use acts only once its replay passes.

Use Model and effort Question Without it
Pre-read (§80) Google first, then OpenAI, then Sonnet 5.5; medium over a diff excerpt: does it leave its lease, weaken a test, or repeat a fixed finding class? hold keeps the handoff ready with the reason the handoff is picked as today
Red-batch culprit Opus 5.5 first, then OpenAI; medium over the failing log excerpt and each handoff's diffstat: which handoff broke it? One verify run confirms the answer halving, about three more verify rounds for six handoffs

The judge never resolves a code conflict: a resolved diff is a new diff that Astra has not reviewed, so the conflict goes back to the worker.

Cost (API rates, billed per token outside the run's subscription): a pre-read is about 20K tokens in, about $0.05; a culprit call about 30K in and 2K out including thinking, about $0.16. With eight lanes that is about $2 to $3 on a busy day, on top of the run's other judge uses (about $2.50 a day, 2026-11-30 to 2026-12-02). The judge picks the model per request and always runs at medium effort.

The judge stays in Conclave-SDK, shared by every repository, and gains three things there (operator, 2026-12-02; asked over Heliograph, this repository's side is §95): one daily cap of $8 over all its uses, past which every use keeps its plain behaviour until the next day and the watcher is told once; a key chosen per request; and a provider order per use, falling back across Anthropic, OpenAI and Google so the OpenAI and Google credits are spent too. A provider acts for a use only once that use's replay passes on it. The integrator keeps no ledger of its own.

The push lock is a file lock in the lane bus directory, taken by the integrator and by the runner's ship step, so the two never push into each other's pre-push window (on 2026-12-02 a watcher fix was rejected three times that way).

4. The runner hands integration over

  • The sequencer skill's "Worker lanes" step runs only when the integrator is not live; otherwise the runner leaves handoffs alone and takes the push lock in its ship step.
  • Handoffs already integrating on the runner stay with it until they land or are rejected; the integrator takes only ready ones.
  • The rule "one push per section, watched to green" becomes: the runner pushes once per section, the integrator once per batch, each watched to green (todo/answers.md Q83).
  • The Orchestrator switch's item "At each section boundary the runner integrates finished worker branches" is replaced by this design when the integrator is live and stays as the fallback.

Quality bar: no loss against the runner integrating by hand

Operator, 2026-12-02: the integrator must not cost any quality. It is cheaper only where it is at least as strict, and every place it could be weaker has a guard:

Where quality could drop Guard
Nobody reads the diff on main any more the worker's whole Astra chain, plus the pre-read; a pre-read hold or a judge failure never lands a handoff on its own say-so
A path tier skips a check a change needed a path the classifier does not know is boot; a script, tool or generator that feeds the build or the image (tools/, scripts/build*, the Makefile, linker scripts, resources/ that ship) is product or higher
A carried receipt reviewed the code against an older base a receipt carries only when no commit between the worker's base and the integration base touched a file the handoff touches; otherwise the handoff goes back for a fresh round on the new base
A batch hides one handoff's failure the batch runs the highest tier of any member, so every handoff gets checks at least as strict as alone; a red result never lands any part of the batch
The script is wrong in a way no test caught a shadow trial (below) before it lands anything

Shadow trial. Before the first landing, the integrator runs in shadow beside the runner for at least ten handoffs: it builds and checks each candidate and records the verdict it would have given, but the runner still integrates. Shadow mode never pushes and never changes lane-bus state, so it cannot take a handoff from the runner; it reads the bus, and compares its verdict with the runner's outcome when the handoff lands, is rejected or is reverted. The script refuses live mode until the shadow record passes, so going live is a check, not a judgment. It goes live only when it would have landed nothing the runner rejected or reverted, and rejected nothing the runner landed cleanly, except where its verdict was stricter for a reason in this table. The trial's record is kept beside the integrator's log, and any disagreement is a defect fixed before the integrator goes live.

Cost

  • A green batch spends no session model; its only model spend is the pre-read, through the API. Conflicts go back to the agy worker that wrote the code; a red batch costs one culprit call.
  • The runner's duplicate Astra chain on integrated work disappears; workers run the closing passes once instead. Review cost is about even, slightly lower.
  • Build and boot-matrix runs drop from one per handoff to one per batch, and to none for docs and tooling batches.

What it does not cover

  • Semantic conflicts that build and test do not catch: the same limit as any merge, owned by the tier checks.
  • Frozen launch files: none change. RUN_PROMPT only names the sequencer skill, and run.sh is untouched.
  • The helpers' admission rule (main's landing queue at most 3) still applies; the queue now drains in batches.
Impossible OS is free software under the GPL-3.0-only license. Last updated Privacy Edit this page on GitHub