summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-21 12:53:57 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-21 12:53:57 +0800
commitc332e2efa767c76037540a3fa1c649c9f2e0498e (patch)
treef47af0c39492af6d786d0a3133a3cbd774172477 /src
parent7a4e0b4677e0241ab19489ef40a462810f841415 (diff)
downloadsomhairles-dream-fsharp-c332e2efa767c76037540a3fa1c649c9f2e0498e.tar.gz
fix(steps): failed/idle live entries no longer shadow on-disk step artifacts; running stays protected
Diffstat (limited to 'src')
-rw-r--r--src/SomhairlesDream.Server/ArtifactRunCoordinator.fs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/SomhairlesDream.Server/ArtifactRunCoordinator.fs b/src/SomhairlesDream.Server/ArtifactRunCoordinator.fs
index 6cd5fd3..c77d22b 100644
--- a/src/SomhairlesDream.Server/ArtifactRunCoordinator.fs
+++ b/src/SomhairlesDream.Server/ArtifactRunCoordinator.fs
@@ -342,7 +342,15 @@ type ArtifactRunCoordinator(
elif snapshot.CompletedSteps |> Array.exists (fun recorded -> recorded = normalized) then
checkpointDigest projectId runId normalized
else
- Error ArtifactNotFound
+ // A live entry that failed or is idling (e.g. a
+ // re-run rejected because the run was already
+ // pre-published on disk) must not shadow the
+ // historical artifact; only a completed on-disk
+ // manifest may back it, so an in-flight failure
+ // never serves half-written files.
+ match snapshot.Status with
+ | "running" -> Error ArtifactNotFound
+ | _ -> completedDigest projectId runId normalized
match digest with
| Error lookupError -> Error lookupError