Repository navigation
[1.2.0] - 2026-04-21
Within-stage crash-resume. A pipeline killed mid-Stage-N no longer loses
that stage's partial progress — the rerun skips any artifact whose
input hash still matches the checkpoint. Budget-cap halts are now
graceful exits with a resume-message format.
Added
- Within-stage checkpointing. Stages 2 (file summaries), 3 (class
docs), 4 (package rollups), 5 (mermaid), and 6 (tech-debt topics) now
write tostate.artifact_indexafter every completed artifact, under
anasyncio.Lock. Mid-stage crash + rerun never re-calls the LLM for
already-produced artifacts. - Atomic artifact writes. New
designdoc.io_utils.atomic_write(path, content)writes to a sibling.tmpthenos.replace()(POSIX-atomic).
Every artifact and the.designdoc-state.jsonfile itself use it. - Graceful budget halt.
BudgetExceededErrormid-stage now sets
state.halted_on_budget=True, marks the stage FAILED, saves state, and
the CLI printsbudget exhausted at $X / cap $Y. Rundesigndoc resume --budget <new-cap>to continuewith exit 0. - Observability. Orchestrator stage-start log lines include the
count of already-checkpointed artifacts (e.g.,[3/9] stage class_docs: 40 artifacts checkpointed).
Changed
PipelineState.artifact_indexis nowdict[str, dict[str, str]]
(wasdict[str, str]) carrying{"path": ..., "input_hash": ...}
per artifact. Old-shape state files are migrated in-memory on load
with emptyinput_hash— safe fallback that forces reprocessing.Orchestrator.run()no longer re-raisesBudgetExceededError. The
CLI readsstate.halted_on_budgetafter the run and formats the
resume message itself. Exit code 0 (resumable), not 4 (crash).
Fixed
- Concurrent
state.save()underasyncio.gatheris now serialized by
a module-levelasyncio.Lock, preventing lost writes when
parallelism > 1.