fabro/lib/apps/fabro-cli/tests/it/scenario
Bryan Helmkamp 2b30689e77
Settle a worker's run at Petri's finish, not at the worker's exit
A worker-backed run's in-memory managed run settled only when the
worker process exited. GET /runs/{id} reads the stored summary, which
the projector ends at Petri's own `run.finished` record, a moment
before the worker stores Fabro's terminal lifecycle record and exits.
The delete precheck prefers the managed run, so a delete issued in that
window was refused with 409 "cannot remove active run". Against a real
worker the window hit about six times in ten.

The server sees both records before they are stored: `run.finished` on
the coordinator log through the worker's records endpoint, and the
terminal lifecycle record through the platform-records endpoint. The
managed run now settles at either, ahead of the store, so the view
never reports the run ended while the managed run still says running.
The stream follower no longer reopens a settled run with the records
that precede its terminal one, and the worker's exit keeps the settled
status: it reaps the process, records a missing terminal record as it
did, and takes the store's status only when the store ended the run
differently. The mapping from Petri's finish to the run's status is the
projection's own, shared with its fold.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-21 03:49:44 -04:00
..
archive.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
artifacts.rs Fix what the gates found after the removal sweep 2026-09-19 10:15:15 -04:00
auth.rs Remove the [server.slatedb] settings and the SlateDB prefix probe 2026-09-18 16:00:24 -04:00
exec.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
lifecycle.rs Assert the graph name field in local_run_lifecycle 2026-09-14 09:41:05 -06:00
mod.rs Cover fork, retry, rewind and the timeline with real-binary scenarios 2026-09-18 23:17:25 -04:00
petri.rs Settle a worker's run at Petri's finish, not at the worker's exit 2026-09-21 03:49:44 -04:00
petri_controls.rs Answer steer and interrupt with the worker's acknowledgement 2026-09-18 23:54:11 -04:00
petri_docker.rs Read the resume action off the unified restore log line 2026-09-20 15:31:39 -04:00
petri_fork.rs Cover fork, retry, rewind and the timeline with real-binary scenarios 2026-09-18 23:17:25 -04:00
petri_tools.rs Format the Petri test fixtures after the engine key removal 2026-09-18 10:54:45 -04:00
server_lifecycle.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
smoke.rs Serve the run stream as the only run event API 2026-09-18 13:36:00 -04:00