feat(process): record provider and verifier run lineage
This commit is contained in:
@@ -4,6 +4,7 @@ import { accessSync, constants } from "node:fs";
|
||||
import { createAnalysisExecution } from "../application/AnalysisProvider.js";
|
||||
import type {
|
||||
AnalysisClient,
|
||||
AnalysisClientContext,
|
||||
AnalysisProfileResolutionOptions,
|
||||
AnalysisProviderCandidate,
|
||||
CapabilityDescriptor,
|
||||
@@ -186,6 +187,7 @@ export class HopperProvider implements AnalysisProviderCandidate {
|
||||
createClient(
|
||||
target: BinaryTarget,
|
||||
profile?: AnalysisProfileCommitment,
|
||||
context?: AnalysisClientContext,
|
||||
): AnalysisClient {
|
||||
if (target.kind !== "executable" && target.kind !== "database")
|
||||
return {
|
||||
@@ -229,6 +231,7 @@ export class HopperProvider implements AnalysisProviderCandidate {
|
||||
}
|
||||
: { launchMode: "native" as const }),
|
||||
}),
|
||||
...(context === undefined ? {} : { runId: context.runId }),
|
||||
logger: this.logger.child({ layer: "bridge" }),
|
||||
});
|
||||
return {
|
||||
@@ -246,6 +249,12 @@ export class HopperProvider implements AnalysisProviderCandidate {
|
||||
}
|
||||
: result;
|
||||
},
|
||||
runtimeLineageSnapshots: () => {
|
||||
const observation = client.runtimeLineage();
|
||||
return observation === null
|
||||
? []
|
||||
: [{ provider: executionProvider, observation }];
|
||||
},
|
||||
close: () => client.close(),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user