summaryrefslogtreecommitdiff
path: root/src/SomhairlesDream.Modeling/Pipeline.fs
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-21 09:27:28 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-21 09:27:28 +0800
commit07d6690b9b9de7db7debe25e8e3def5c0d68bb26 (patch)
treedad82e0b692bc34ea1764652c63cb36bc67bcec8 /src/SomhairlesDream.Modeling/Pipeline.fs
parentbba99bea934fe397b6aed59d3f33a5315799fa28 (diff)
downloadsomhairles-dream-fsharp-07d6690b9b9de7db7debe25e8e3def5c0d68bb26.tar.gz
feat(probe): YJ-01 real-probe 7-stage dataset + probe design branch in pipeline/CLI
Diffstat (limited to 'src/SomhairlesDream.Modeling/Pipeline.fs')
-rw-r--r--src/SomhairlesDream.Modeling/Pipeline.fs13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/SomhairlesDream.Modeling/Pipeline.fs b/src/SomhairlesDream.Modeling/Pipeline.fs
index 3f1f105..d9db5f6 100644
--- a/src/SomhairlesDream.Modeling/Pipeline.fs
+++ b/src/SomhairlesDream.Modeling/Pipeline.fs
@@ -33,6 +33,7 @@ type IArtifactBridge =
type PipelineOptions =
{ ArtifactRoot: string
Ids: RunIds
+ Steps: DesignStep array
Render: bool
Bridge: IArtifactBridge
Clock: unit -> DateTimeOffset
@@ -214,10 +215,12 @@ module Pipeline =
let emit event = appendEvent log options.OnEvent event
let ids = options.Ids
- emit (RunEvent.Start { Ids = ids; At = startedAt; TotalSteps = Design.steps.Length })
+ let steps = options.Steps
+
+ emit (RunEvent.Start { Ids = ids; At = startedAt; TotalSteps = steps.Length })
let artifacts =
- [| for step in Design.steps do
+ [| for step in steps do
currentStep <- Some step.StepId
emit (RunEvent.Heartbeat { Ids = ids; At = options.Clock(); Message = $"starting {step.StepId}" })
@@ -275,7 +278,7 @@ module Pipeline =
At = options.Clock()
StepId = step.StepId
StepIndex = step.Index
- TotalSteps = Design.steps.Length
+ TotalSteps = steps.Length
Message = "artifact verified"
ArtifactPath = relativePath }
@@ -424,12 +427,12 @@ module ArtifactVerifier =
|| Ids.validateResourceId manifest.BaseId |> Result.isError
|| Ids.validateResourceId manifest.TargetId |> Result.isError then
Error "manifest contains an invalid resource id"
- elif manifest.Steps.Length <> Design.steps.Length then
+ elif manifest.Steps.Length <> (Design.forProject manifest.ProjectId).Length then
Error "manifest step count does not match design"
else
let mutable failure: string option = None
- for expected, actual in Array.zip Design.steps manifest.Steps do
+ for expected, actual in Array.zip (Design.forProject manifest.ProjectId) manifest.Steps do
if failure.IsNone && actual.StepId <> expected.StepId then
failure <- Some $"manifest step id mismatch: {expected.StepId}"
elif failure.IsNone && actual.StepIndex <> expected.Index then