fix(browser): retain scenario observations across failures
This commit is contained in:
@@ -89,6 +89,7 @@ import type { NativeCallPartialObservation } from "./native/nativeCallPartialObs
|
||||
import type { ElectronActivePartialObservation } from "./javascript/electronActiveObservation.js";
|
||||
import type { JavaScriptRuntimeObservation } from "./javascript/javascriptRuntimeObservation.js";
|
||||
import type { ArtifactInventoryPartialObservation } from "./artifactPartialObservation.js";
|
||||
import type { BrowserScenarioPartialObservation } from "./browserScenarioCapture.js";
|
||||
|
||||
/** Provider-neutral evidence collected before a typed analysis failure. */
|
||||
export type AnalysisPartialObservation =
|
||||
@@ -96,5 +97,6 @@ export type AnalysisPartialObservation =
|
||||
| NativeCallPartialObservation
|
||||
| FileOffsetPartialObservation
|
||||
| ElectronActivePartialObservation
|
||||
| BrowserScenarioPartialObservation
|
||||
| JavaScriptRuntimeObservation
|
||||
| ArtifactInventoryPartialObservation;
|
||||
|
||||
@@ -108,3 +108,25 @@ export const browserScenarioCaptureSchema = z
|
||||
export type BrowserScenarioCapture = z.infer<
|
||||
typeof browserScenarioCaptureSchema
|
||||
>;
|
||||
|
||||
/** Capture fields shared by complete results and retained partial observations. */
|
||||
export type BrowserScenarioCaptureData = Omit<
|
||||
BrowserScenarioCapture,
|
||||
"browser" | "steps" | "completeness" | "events"
|
||||
> & {
|
||||
readonly browser: Omit<BrowserScenarioCapture["browser"], "cleanup"> & {
|
||||
readonly cleanup:
|
||||
| BrowserScenarioCapture["browser"]["cleanup"]
|
||||
| "incomplete";
|
||||
};
|
||||
readonly steps: readonly BrowserScenarioCapture["steps"][number][];
|
||||
readonly events: Omit<BrowserScenarioCapture["events"], "items"> & {
|
||||
readonly items: readonly BrowserScenarioCapture["events"]["items"][number][];
|
||||
};
|
||||
};
|
||||
|
||||
/** Browser scenario data retained when an operation fails before a complete result. */
|
||||
export interface BrowserScenarioPartialObservation {
|
||||
readonly kind: "browser-scenario-observation";
|
||||
readonly capture: BrowserScenarioCaptureData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user