Skip to content
Merged
Show file tree
Hide file tree
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
39 changes: 39 additions & 0 deletions config/aws/model-gateway/strategy-response.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://switchrecomp.local/schemas/model-gateway/strategy-response.schema.json",
"title": "Model Gateway Strategy Response",
"type": "object",
"additionalProperties": false,
"required": ["schema_version", "strategy", "confidence", "reason"],
"properties": {
"schema_version": {
"type": "string",
"const": "1"
},
"strategy": {
"type": "string",
"enum": [
"capture_alignment_profile",
"input_timing_variant",
"service_stub_profile_switch",
"patch_set_variant",
"lift_mode_variant",
"runtime_mode_variant"
]
},
"confidence": {
"type": "number",
"minimum": 0.0,
"maximum": 1.0
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"estimated_cost_usd": {
"type": "number",
"minimum": 0
}
}
}
80 changes: 80 additions & 0 deletions config/aws/step-functions/round-trip-automation.asl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"Comment": "SwitchRecomp round-trip automation workflow (AWS hybrid scaffold)",
"StartAt": "SubmitRun",
"States": {
"SubmitRun": {
"Type": "Pass",
"ResultPath": "$.submission",
"Next": "ExecuteAttempt"
},
"ExecuteAttempt": {
"Type": "Task",
"Resource": "arn:aws:states:::ecs:runTask.sync",
"Parameters": {
"LaunchType": "FARGATE",
"Cluster.$": "$.clusterArn",
"TaskDefinition.$": "$.taskDefinitionArn",
"NetworkConfiguration": {
"AwsvpcConfiguration": {
"AssignPublicIp": "ENABLED",
"Subnets.$": "$.subnetIds",
"SecurityGroups.$": "$.securityGroupIds"
}
},
"Overrides": {
"ContainerOverrides": [
{
"Name": "recomp-worker",
"Environment": [
{ "Name": "RECOMP_RUN_REQUEST_PATH", "Value.$": "$.runRequestPath" },
{ "Name": "RECOMP_ARTIFACT_URI", "Value.$": "$.artifactUri" }
]
}
]
}
},
"Retry": [
{
"ErrorEquals": ["States.Timeout", "States.TaskFailed"],
"IntervalSeconds": 10,
"BackoffRate": 2.0,
"MaxAttempts": 3
}
],
"Catch": [
{
"ErrorEquals": ["States.ALL"],
"Next": "MarkFailed"
}
],
"Next": "EvaluateResult"
},
"EvaluateResult": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.workerOutput.final_status",
"StringEquals": "passed",
"Next": "MarkPassed"
},
{
"Variable": "$.workerOutput.final_status",
"StringEquals": "needs_review",
"Next": "MarkNeedsReview"
}
],
"Default": "MarkFailed"
},
"MarkPassed": {
"Type": "Succeed"
},
"MarkNeedsReview": {
"Type": "Succeed"
},
"MarkFailed": {
"Type": "Fail",
"Error": "RoundTripAutomationFailed",
"Cause": "Attempt lifecycle terminated without a passing validation gate"
}
}
}
Loading