refactor!: enforce canonical evidence and provider boundaries
Deliver complete Evidence directly through MCP with required nullable analysis profiles and immutable per-server delivery settings. Bind selected environments at construction and require typed cleanup outcomes with retained retry ownership. Remove test-only routing, duplicate session and snapshot metadata, producer-field repairs, and ambiguous provider arguments. Separate artifact byte identity from occurrence classification and retain typed source-map and partial native facts across CLI, MCP, and verifier consumers. BREAKING CHANGE: obsolete Evidence envelopes, session aliases, incomplete snapshots, and missing normalized producer facts are no longer accepted.
This commit is contained in:
@@ -29,19 +29,6 @@ import type {
|
||||
} from "./BrowserScenarioSessionPort.js";
|
||||
|
||||
const OPERATION = "capture_browser_scenario" as const;
|
||||
let defaultFactory: Promise<BrowserScenarioSessionFactory> | undefined;
|
||||
|
||||
const lazyPlaywrightFactory: BrowserScenarioSessionFactory = {
|
||||
async open(scenario, options) {
|
||||
defaultFactory ??= import("./PlaywrightScenarioSession.js").then(
|
||||
({ PlaywrightScenarioSessionFactory }) =>
|
||||
new PlaywrightScenarioSessionFactory(),
|
||||
);
|
||||
return (await defaultFactory).open(scenario, options);
|
||||
},
|
||||
};
|
||||
|
||||
export { PLAYWRIGHT_BROWSER_SCENARIO_PROVIDER_IDENTITY } from "./providerIdentities.js";
|
||||
import { PLAYWRIGHT_BROWSER_SCENARIO_PROVIDER_IDENTITY } from "./providerIdentities.js";
|
||||
|
||||
type SnapshotKind = BrowserScenario["capture"]["after_each_step"][number];
|
||||
@@ -310,9 +297,7 @@ const runScenario = async (
|
||||
|
||||
/** Controlled Playwright/CDP scenario driver with exact process ownership. */
|
||||
export class PlaywrightBrowserScenarioProvider implements BrowserScenarioCapturePort {
|
||||
constructor(
|
||||
private readonly factory: BrowserScenarioSessionFactory = lazyPlaywrightFactory,
|
||||
) {}
|
||||
constructor(private readonly factory: BrowserScenarioSessionFactory) {}
|
||||
|
||||
identity(): ProviderIdentity {
|
||||
return PLAYWRIGHT_BROWSER_SCENARIO_PROVIDER_IDENTITY;
|
||||
|
||||
Reference in New Issue
Block a user