diff --git a/src/application/WorkflowAnalysisProfile.ts b/src/application/WorkflowAnalysisProfile.ts index 9683a80c61..9b6eae3f06 100644 --- a/src/application/WorkflowAnalysisProfile.ts +++ b/src/application/WorkflowAnalysisProfile.ts @@ -5,6 +5,15 @@ import { } from "../domain/analysisProfile.js"; import { REA_WORKFLOW_PROVIDER } from "../domain/investigationProviders.js"; +const workflowRevisions = new Map([ + ["binary_overview", 5], + ["batch_decompile", 4], + ["trace_feature", 9], + ["get_call_graph", 3], + ["trace_native_values", 3], + ["trace_call_path", 2], +]); + /** Commit a workflow result to its upstream profile and applicable semantic revision. */ export const workflowAnalysisProfile = ( upstream: AnalysisProfileCommitment, @@ -28,17 +37,5 @@ export const workflowAnalysisProfileParameters = ( value_flow_absence: "recorded-versus-unavailable-v1", } : {}), - ...(operation === "binary_overview" - ? { workflow_revision: 5 } - : operation === "batch_decompile" - ? { workflow_revision: 4 } - : operation === "trace_feature" - ? { workflow_revision: 9 } - : operation === "get_call_graph" - ? { workflow_revision: 3 } - : operation === "trace_native_values" - ? { workflow_revision: 3 } - : operation === "trace_call_path" - ? { workflow_revision: 2 } - : { workflow_revision: 1 }), + workflow_revision: workflowRevisions.get(operation) ?? 1, });