skip to content
Replays

Resume Any Job Type Where It Stopped

Teaching a flagless resume to route every driver, not just the layouts it already recognised.

Gantry milestones

0 milestones 3 sprints

Teaching a flagless resume to route every driver, not just the layouts it already recognised.

54m 43s total 15m 8s per sprint

21.1M tokens in 179.5k tokens out

$21.91 nominal cost

`gantry resume` already worked for ordinary sprint and milestone runs, because those layouts could be recognized from their committed brief files. Design and map runs used different on-disk shapes, so a bare resume could forget the original driver or stop before that driver had a chance to inspect its own state.

This job turned resume into a driver contract. It persisted the resolved job kind, moved the resumability question behind driver selection, and then proved that design and map re-entry skips completed work instead of replaying it.

How this walkthrough is structured

Feature

What did the run build and ship?

Gantry now carries a run's driver identity in durable state and uses driver-declared resume footprints, with the original implementation relocated into the current build driver modules.

Build

How did Gantry structure the work?

The work was cut as a dependency chain: record the driver identity, ask the selected driver whether its state exists, then lock the resumed behavior for every driver.

Persist Job Kind

0 agents 15m 8s wall time 53.9k tokens out $6.40 nominal cost

The durable driver pin still exists as `job.toml`, now owned by the registry code in the split `build/job.rs` module. It serializes the resolved driver label and the payload needed to reconstruct design, map, goal, and loop runs, while legacy layouts are still inferred when the pin is absent. The original monolithic build file is gone, but the pin format, parser, fallback path, and precedence tests are present in the current tree.

This first piece isolated the fact that a flagless resume had no stable memory of the original driver. A fresh agent could hold it because the boundary was the small per-run job pin and the precedence rule around it: explicit invocation, persisted state, fresh-run inference, then default. It also had to carry legacy layout inference, because older stranded runs had no pin to read. The run record shows no repair or re-plan here, so the foundation landed without forcing later cuts to compensate for it.

Driver-Aware Guard

0 agents 11m 24s wall time 43.4k tokens out $4.95 nominal cost

The old fixed-layout guard has been replaced by driver-declared resume footprints. In the current registry, flat runs look for root sprint briefs, milestone runs look under `milestones`, design runs look for design brief pass state, and map runs use their fan-out ledger. That contract has since grown to cover newer drivers too, which is the visible sign that this sprint's guard change became a shared dispatch rule rather than a design-and-map special case.

Once the selected driver could survive resume, this sprint could move the early stop condition to the right side of routing. Its scope was the guard boundary: keep the existing flat and milestone answers, but make design and map report their own evidence of resumable state. That was small enough for one agent because it did not need to prove idempotence yet; it only had to decide whether a resumed run should enter the chosen driver. The gate and review record stayed green, so the routing rewrite did not expose a hidden conflict with the prior pin work.

Resume Idempotence

0 agents 17m 52s wall time 62.5k tokens out $7.86 nominal cost

Design resume now treats the clean-slate preparation as already applied once the brief pass has begun, and additive design resume remains a no-op before merge when all pass work is complete. Map resume pre-scans units from artifacts and skip tests, records already-complete units as skipped, builds only the remainder, and proceeds to finalization. The README still presents resume as re-running from committed state, while the detailed behavior now lives in driver tests and the driver contract rather than in the original implementation file.

The closing piece handled the part that routing cannot prove by itself: a resumed driver must skip finished work and still reach finalization. The brief called out the risky design case directly, where a resumed redesign could re-run its clean-slate preparation over pages already built by an earlier session. It also paired that with the map driver's fan-out skip behavior and the final merge case, keeping the verification work scoped to re-entry semantics. The run facts show no recovery, so the hazard was contained by the sprint boundary and tests rather than found by a failed gate.