Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 65 additions & 5 deletions infrastructure/step_function.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"Next": "DataPhase1Wait"
}
],
"Default": "HandleFailure"
"Default": "ExtractDataPhase1Error"
},

"DataPhase1Wait": {
Expand Down Expand Up @@ -182,7 +182,7 @@
"Next": "RAGWait"
}
],
"Default": "HandleFailure"
"Default": "ExtractRAGError"
},

"RAGWait": {
Expand Down Expand Up @@ -237,7 +237,7 @@
"Next": "DataPhase2"
}
],
"Default": "HandleFailure"
"Default": "ExtractResearchError"
},

"DataPhase2": {
Expand Down Expand Up @@ -356,7 +356,7 @@
"Next": "PredictorWait"
}
],
"Default": "HandleFailure"
"Default": "ExtractPredictorError"
},

"PredictorWait": {
Expand Down Expand Up @@ -483,7 +483,7 @@
"Next": "BacktesterWait"
}
],
"Default": "HandleFailure"
"Default": "ExtractBacktesterError"
},

"BacktesterWait": {
Expand Down Expand Up @@ -562,6 +562,66 @@
"End": true
},

"ExtractDataPhase1Error": {
"Type": "Pass",
"Comment": "Normalize DataPhase1 SSM non-Success poll into $.error so HandleFailure's States.Format template has something to serialize (the soft-failure path from CheckDataPhase1Status.Default does not populate $.error — only Task Catch blocks do).",
"Parameters": {
"phase": "DataPhase1",
"source": "CheckDataPhase1Status.Default",
"poll.$": "$.data_phase1_poll"
},
"ResultPath": "$.error",
"Next": "HandleFailure"
},

"ExtractRAGError": {
"Type": "Pass",
"Comment": "Normalize RAGIngestion SSM non-Success poll into $.error.",
"Parameters": {
"phase": "RAGIngestion",
"source": "CheckRAGStatus.Default",
"poll.$": "$.rag_poll"
},
"ResultPath": "$.error",
"Next": "HandleFailure"
},

"ExtractResearchError": {
"Type": "Pass",
"Comment": "Normalize Research Lambda soft-failure payload (status != OK) into $.error. Research handler always returns {status, date, error} on the ERROR path so copying the whole Payload is safe and preserves the real traceback string.",
"Parameters": {
"phase": "Research",
"source": "CheckResearchStatus.Default",
"payload.$": "$.research_result.Payload"
},
"ResultPath": "$.error",
"Next": "HandleFailure"
},

"ExtractPredictorError": {
"Type": "Pass",
"Comment": "Normalize PredictorTraining SSM non-Success poll into $.error.",
"Parameters": {
"phase": "PredictorTraining",
"source": "CheckPredictorStatus.Default",
"poll.$": "$.predictor_poll"
},
"ResultPath": "$.error",
"Next": "HandleFailure"
},

"ExtractBacktesterError": {
"Type": "Pass",
"Comment": "Normalize Backtester SSM non-Success poll into $.error.",
"Parameters": {
"phase": "Backtester",
"source": "CheckBacktesterStatus.Default",
"poll.$": "$.backtester_poll"
},
"ResultPath": "$.error",
"Next": "HandleFailure"
},

"HandleFailure": {
"Type": "Task",
"Comment": "Failure alert via SNS — pipeline halts",
Expand Down
Loading