Keep a flow's runs when the flow goes
A run record is a record of what ran, so deleting a flow no longer sweeps its
history: `_forget_runs` is gone from the flow-delete path, and `DELETE /runs/{id}`
is the only thing that removes a run one at a time. The in-flight guard stays —
that is about work, not history.
`DELETE /runs?flow=` is the counterpart to the list's flow filter and what a
reseed needs, sharing the four statements with the single-run delete and
refusing the same way while a run of that flow is still going.
A run whose flow is gone reads as one: `useFlowInputs` reports the 404 rather
than an empty declaration set, so the run page says "flow deleted", explains it,
and disables Retry, which the route would refuse anyway.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CL9zvnnvcp1mvA8o7impxk
This commit is contained in:
+13
-5
@@ -233,8 +233,9 @@ execution that is not happening this time, so its series is not rewritten
|
||||
either. The run it was restored from is recorded instead, and that is where the
|
||||
curve is read back from: asking the reusing run for its metrics answers with
|
||||
the same points, under its own flow's names. The one way to be left with a
|
||||
result and no curve is for that earlier run to have been deleted, which
|
||||
deleting its flow does.
|
||||
result and no curve is for that earlier run to have been deleted. Deleting a
|
||||
flow does not do that — its runs stay — so this only happens when the run
|
||||
itself was deleted.
|
||||
|
||||
## Objects that cannot be serialized
|
||||
|
||||
@@ -346,6 +347,14 @@ the artifacts it made, its metrics and its result. **Retry** submits it again
|
||||
as a run of its own, keeping the flow, the inputs, the seed and the sweep it
|
||||
belonged to.
|
||||
|
||||
A run outlives the flow it ran. Deleting a flow leaves its history standing —
|
||||
being the record of what ran is the point of keeping one — so the Runs screen
|
||||
still lists it, and opening it says **flow deleted** with Retry disabled,
|
||||
because there is nothing left to run it against. Clearing that history is a
|
||||
decision of its own: a run at a time on the screen, or
|
||||
`DELETE /api/v1/runs?flow=<name>` for a whole flow's worth, which is what a
|
||||
reseed wants.
|
||||
|
||||
### Taking it into a dataframe
|
||||
|
||||
An analysis wants a table rather than a screen, and there are two it usually
|
||||
@@ -407,9 +416,8 @@ sweep, or specific runs. It re-reads on its own and whenever a run finishes.
|
||||
### When a run draws nothing
|
||||
|
||||
A node restored from the [stage cache](#stage-caching) has its curve read back
|
||||
from the run that recorded it. Delete that run, which deleting its flow does,
|
||||
and the reusing run is left with a result and an empty curve, and the chart says so
|
||||
rather than looking broken.
|
||||
from the run that recorded it. Delete that run and the reusing run is left with
|
||||
a result and an empty curve, and the chart says so rather than looking broken.
|
||||
|
||||
## What this costs, compared
|
||||
|
||||
|
||||
Reference in New Issue
Block a user