fabro/lib/apps/fabro-server/src
Bryan Helmkamp 968c46d69b
Settle an in-process run at Petri's finish, not at its terminal record
The in-process Petri path settled the run's in-memory managed run once
Fabro's terminal lifecycle record was stored, after the engine returned.
GET /runs/{id} reads the stored summary, which the projector ends at
Petri's own `run.finished` record, a moment earlier, so a delete issued
the moment the run read as ended could reach the delete precheck, which
prefers the managed run, while it still said running, and was refused
with 409 "cannot remove active run". Against the real engine the window
hit eight times in thirty.

The worker path settles its run at the worker's records endpoint, ahead
of the store (#888). The in-process run now settles at the same record
through the run store it executes over: a store whose coordinator
appends settle the managed run at the `run.finished` record before the
record reaches the store and the projector's signal, with the same
finish mapping and settle the worker path uses. The settle is in memory
only. The terminal lifecycle record stored once the engine returns
refines the status and error and ends the run's live state as before,
and stays the settle of a run that ends without an engine finish.

The prune scenario no longer waits for the managed run to settle before
its delete: the wait guarded only this window.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-21 12:08:48 -04:00
..
auth Keep auth code store naming consistent 2026-08-24 17:26:17 -04:00
demo Build the run's display graph from Petri's admission 2026-09-19 11:41:58 -04:00
prompts Render the run title prompt with Jinja instead of string replacement 2026-07-27 17:23:16 -04:00
server Settle an in-process run at Petri's finish, not at its terminal record 2026-09-21 12:08:48 -04:00
worker_control Answer steer and interrupt with the worker's acknowledgement 2026-09-18 23:54:11 -04:00
automation_materializer.rs Delete the legacy run event log, its reducer and its types 2026-09-18 14:09:17 -04:00
canonical_host.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
canonical_origin.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
csp.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
diagnostics.rs Reach run sandboxes from the server through the sandbox driver 2026-09-19 13:47:02 -04:00
error.rs Add the Petri run store endpoints to the API 2026-09-17 20:12:20 -04:00
git_checkout.rs Consolidate server Git subprocess ownership 2026-09-11 17:36:40 -06:00
github_webhooks.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
install.rs Reach run sandboxes from the server through the sandbox driver 2026-09-19 13:47:02 -04:00
interp.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
jwt_auth.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
lib.rs Reach run sandboxes from the server through the sandbox driver 2026-09-19 13:47:02 -04:00
manifest_validation.rs Read workflow graphs through Petri's DOT parser 2026-09-19 12:23:57 -04:00
petri_check.rs Bind the run's resolved goal into Petri's check 2026-09-21 03:48:35 -04:00
petri_runs.rs Settle a worker's run at Petri's finish, not at the worker's exit 2026-09-21 03:49:44 -04:00
principal_middleware.rs Delete the stage artifact upload endpoint 2026-09-19 09:23:47 -04:00
request_id.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_compiler.rs Build the run's display graph from Petri's admission 2026-09-19 11:41:58 -04:00
run_files.rs Serve the sandbox tab, Run Files, and deletion on the driver handle 2026-09-19 13:56:13 -04:00
run_files_security.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_intent.rs Return 404 when a worker's originating run is missing 2026-09-12 10:58:05 -06:00
run_manifest.rs Fix the gate findings in the sandbox tests 2026-09-19 14:07:52 -04:00
run_selector.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_title_generation.rs Build the run's display graph from Petri's admission 2026-09-19 11:41:58 -04:00
run_tool_create.rs Delete fabro-sandbox's clone and push chain 2026-09-19 09:18:29 -04:00
sandbox_access.rs Keep the Daytona key rendering out of the test's assertion messages 2026-09-19 18:05:01 -04:00
security_headers.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
serve.rs Remove the [server.slatedb] settings and the SlateDB prefix probe 2026-09-18 16:00:24 -04:00
server.rs Settle a worker's run at Petri's finish, not at the worker's exit 2026-09-21 03:49:44 -04:00
server_secrets.rs Expose lithos request and response shapes through the API, server, CLI, and web 2026-09-09 17:26:57 -06:00
spawn_env.rs Forward every configured sandbox plugin to the Petri worker 2026-09-19 14:45:42 -04:00
startup.rs Remove expired startup secret migrations 2026-09-05 14:05:48 -04:00
static_files.rs feat(web): tell open tabs when a new build ships 2026-07-25 14:45:26 -04:00
test_support.rs Reach run sandboxes from the server through the sandbox driver 2026-09-19 13:47:02 -04:00
web_auth.rs Serve CLI auth sessions from SQLite 2026-07-26 00:00:15 -04:00
worker_runtime.rs Forward every configured sandbox plugin to the Petri worker 2026-09-19 14:45:42 -04:00
worker_token.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00