skip to content
Jobs

Replay's Roster Learns the Run's Shape

Rebuild the sprint sidebar from disk when a run has no event tape

Gantry sprints
Rebuild the sprint sidebar from disk when a run has no event tape

Gantry can replay a finished run so you can watch it again — an activity feed plus a sidebar listing the run's sprints. Some runs have no recorded event tape: they predate the tape, or their tape was deleted because git never tracked it. For those, Gantry falls back to a degraded replay, rebuilding a synthetic start-of-run event from the durable files left on disk so the sidebar has something to show.

That rebuild had a blind spot. It read the roster only from the sprint files at the top of the run's directory, which is where a plain flat run keeps them — but a milestone run keeps its top-level rows in a `milestones/` subdirectory, and other run shapes keep theirs elsewhere again. So a tapeless replay of any non-flat run showed an empty sidebar and read as "no run yet," even while the activity feed played back fine. This job taught the rebuild to find the roster where each kind of run actually stores it, so the sidebar is populated for the run shapes that were previously blank.

Build

The whole fix was one self-contained sprint, and its real boundary was a scope line inside that sprint: land the reported milestone case solidly, and leave the harder run shapes producing an honest empty result marked as a documented follow-up.

The plan declared itself indivisible up front — one synthesis-from-disk change, no new event type, nothing touching the tape path or what the durable history records. So there was no decomposition into multiple pieces to get right; the planner produced a single sprint, and the run carried it through without a gate sending it back or a review reopening the work.

The architecturally load-bearing decision lives inside that one brief rather than between sprints. The brief forbids inventing a second way to decide a run's shape: the rebuild must reuse the exact disk-reading path that resume already relies on to recover a run's driver, so the two answers to "what kind of run is this" cannot drift apart over time. And it draws an explicit scope line — the milestone case is the reported bug and must be fixed and covered by tests, but the map-driven shape is called out as the hard one, because a map run's unit list comes from executing an enumerator command in a worktree that a replay of a merged run no longer has. Rather than half-build that arm, the brief instructs leaving it at today's honest empty result with a comment marking it deliberate.

That the run stayed green throughout is consistent with the plan having dissolved the difficulty in advance: it named the one place the change belongs, named the existing machinery to reuse, and drew the line around the part that could not be reached cleanly, so nothing in the build had to be discovered under a red gate.

Feature

Before this job a tapeless replay reconstructed its sidebar roster from one fixed location and came up empty for any run that stored its top-level rows elsewhere; the job made that reconstruction ask the run's own driver where its roster lives, and today that has grown into a per-driver declaration.

The before-state was a rebuild that assumed every run kept its top-level rows in the same spot. That held for a flat run and failed silently for the rest — most visibly a milestone run, whose rows sit under a separate subdirectory, leaving the replayed sidebar blank. The synthetic start-of-run event carried a correct feed but an empty roster.

The design that answers it re-derives the roster the same way the live run's driver first built it, keyed on the shape persisted in the run's config, with a fallback that infers the shape from an older run's directory layout — the same route resume takes, so a new run kind has a single obvious place to wire in. The flat case was held byte-for-byte identical, the fix was covered by direct tests over the synthesis and a fold-through test that builds the full degraded stream and checks the sidebar now shows the milestone rows with their nested sprints, and the run shapes that genuinely cannot be reconstructed were left reporting an honest empty rather than a fabricated one.

Standing in the tree today, the capability is still there and has been generalized past its original form. The single job-kind switch has become a read-side participation declared by each driver: every driver states whether this degraded path can honestly rebuild its top-level roster, milestone and flat runs supply theirs, and map, design, and loop runs declare plainly that they cannot. The original entry point still exists but now routes through that per-driver read side, and the fold-through replay test that pinned the milestone behaviour is still present.

unavailable sessions
unavailable context
45,077 in / 41,618 out tokens
$7.91 cost
0 x 1 milestones x sprints
unavailable edits
unavailable commands
14m duration
unavailable roles
0 x 0 fixes x replans
- harness