mirror of
https://github.com/morluto/rea.git
synced 2026-12-06 17:23:37 +08:00
refactor(workflow): share profile revision selection (#17359)
This commit is contained in:
@@ -5,6 +5,15 @@ import {
|
||||
} from "../domain/analysisProfile.js";
|
||||
import { REA_WORKFLOW_PROVIDER } from "../domain/investigationProviders.js";
|
||||
|
||||
const workflowRevisions = new Map<AnalysisOperation | undefined, number>([
|
||||
["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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user