fabro/lib/foundation
Bryan Helmkamp 01beea0a6c
Checkpoint a Petri run's stages and recover its workspaces on restart
Fabro's hooks on a Petri run wrap the hooks the runtime installed for
`[[run.hooks]]` and forward every point. In `prepare_result`, before the
finish is recorded, they commit the stage's files on the run branch of
its host workspace with Fabro's author identity and the run, execution,
firing and attempt as trailers, and publish the commit to a snapshot
repository beside the run's workspaces under a ref per checkpoint. A
stage that failed on its own terms is committed like a successful one; a
commit that fails is fatal: the outcome becomes a `checkpoint_failed`
failure, the run is cancelled through the coordinator handle, and the
transition refuses the firing's routes. In `transition` they write the
platform checkpoint record, keyed on the Petri position and the
checkpoint's operation identity, and a failed write is a recorded
problem.

On restart the server runs the recovery protocol before it relaunches a
worker: a run with a failed checkpoint is reported failed; otherwise
every live execution's last durable finish names the snapshot its
workspace is verified against, reset to, or restored from, with a lost
record reconciled from the snapshot repository, and a finish with no
snapshot fails the run rather than resume it on stale files.

The worker reaches the platform records over two new worker-scoped
endpoints; the server reaches the table directly. A test gate directory
lets the CLI scenarios hold a checkpoint at a named point.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 00:12:14 -04:00
..
build-support refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-api Carry usage as lithos-llm's Usage and rename billing to usage 2026-09-14 12:31:34 -06:00
fabro-auth Name built-in providers through lithos catalog::builtin 2026-09-10 09:48:37 -06:00
fabro-client Checkpoint a Petri run's stages and recover its workspaces on restart 2026-09-18 00:12:14 -04:00
fabro-config Add the engine flag and record the engine on the run spec 2026-09-17 20:02:47 -04:00
fabro-core Harden succeed failure policy routing 2026-08-26 09:13:04 -04:00
fabro-db Add platform records and the Petri projection tables 2026-09-17 21:46:21 -04:00
fabro-dev Document the catalog overlay without the metadata.fabro namespace 2026-09-09 23:26:48 -06:00
fabro-http Depend on lithos-llm and the published twin-openai crate 2026-09-09 17:26:57 -06:00
fabro-macros refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-oauth refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-options-metadata refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-proc Consolidate server Git subprocess ownership 2026-09-11 17:36:40 -06:00
fabro-redact Give the checkout its GitHub credentials through the driver's store 2026-09-11 10:02:01 -06:00
fabro-static Checkpoint a Petri run's stages and recover its workspaces on restart 2026-09-18 00:12:14 -04:00
fabro-telemetry refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-template Simplify model stylesheet template plumbing 2026-08-25 18:54:06 -04:00
fabro-test Carry Petri's sandbox plugin variables into workers and test servers 2026-09-17 21:20:22 -04:00
fabro-types Add the engine flag and record the engine on the run spec 2026-09-17 20:02:47 -04:00
fabro-util Neutralize runtime for_each labels before display 2026-07-28 19:52:59 -04:00
fabro-vault refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00