feat(process): compare repeatable paired experiments
This commit is contained in:
@@ -86,7 +86,9 @@ export const processCaptureComparisonSchema = z
|
||||
path: ["status"],
|
||||
});
|
||||
});
|
||||
type ProcessCaptureComparison = z.infer<typeof processCaptureComparisonSchema>;
|
||||
export type ProcessCaptureComparison = z.infer<
|
||||
typeof processCaptureComparisonSchema
|
||||
>;
|
||||
|
||||
const terminalObservations = (capture: ProcessCapture): readonly unknown[] =>
|
||||
[
|
||||
@@ -113,6 +115,29 @@ const filesystemObservations = (
|
||||
},
|
||||
];
|
||||
|
||||
/** Canonical observations for one process-comparison dimension. */
|
||||
export const processDimensionObservations = (
|
||||
capture: ProcessCapture,
|
||||
dimension: (typeof PROCESS_COMPARISON_DIMENSIONS)[number],
|
||||
): readonly unknown[] => {
|
||||
switch (dimension) {
|
||||
case "terminal":
|
||||
return terminalObservations(capture);
|
||||
case "interaction":
|
||||
return capture.interaction_events;
|
||||
case "exit":
|
||||
return [{ ...capture.exit, settlement: capture.settlement }];
|
||||
case "filesystem":
|
||||
return filesystemObservations(capture);
|
||||
case "protocol":
|
||||
return capture.protocol_events;
|
||||
case "process":
|
||||
return capture.process_samples;
|
||||
case "shim":
|
||||
return capture.shim_events;
|
||||
}
|
||||
};
|
||||
|
||||
const classifyCollection = (
|
||||
left: readonly unknown[],
|
||||
right: readonly unknown[],
|
||||
|
||||
Reference in New Issue
Block a user