fabro/lib/components
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
..
fabro-automation Open sandbox provider identity to plugin kinds 2026-09-09 15:17:32 -06:00
fabro-checkpoint Merge remote-tracking branch 'origin/main' into remove/run-metadata-branches 2026-09-12 16:28:01 -06:00
fabro-dot Read workflow graphs through Petri's DOT parser 2026-09-19 12:23:57 -04:00
fabro-dump Build the run's display graph from Petri's admission 2026-09-19 11:41:58 -04:00
fabro-environment Open sandbox provider identity to plugin kinds 2026-09-09 15:17:32 -06:00
fabro-github Resolve one Git identity per run and inject it everywhere 2026-09-12 11:35:46 -06:00
fabro-graphviz Read workflow graphs through Petri's DOT parser 2026-09-19 12:23:57 -04:00
fabro-install Drop the dependency edges with no production use 2026-09-19 09:33:31 -04:00
fabro-interview Delete the interviewers the Petri cutover left unused 2026-09-19 09:05:52 -04:00
fabro-llm Drop the dependency edges with no production use 2026-09-19 09:33:31 -04:00
fabro-manifest Read workflow graphs through Petri's DOT parser 2026-09-19 12:23:57 -04:00
fabro-mcp-store refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-pebble-sandbox Fix the gate findings in the sandbox tests 2026-09-19 14:07:52 -04:00
fabro-petri Settle a worker's run at Petri's finish, not at the worker's exit 2026-09-21 03:49:44 -04:00
fabro-slack Delete fabro-core and the engine half of fabro-workflow 2026-09-18 10:44:41 -04:00
fabro-store Build the run's display graph from Petri's admission 2026-09-19 11:41:58 -04:00
fabro-tool Answer steer and interrupt with the worker's acknowledgement 2026-09-18 23:54:11 -04:00
fabro-tracker refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-variable refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-workflow Serve the sandbox tab, Run Files, and deletion on the driver handle 2026-09-19 13:56:13 -04:00
fabro-workflow-version Read workflow graphs through Petri's DOT parser 2026-09-19 12:23:57 -04:00