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:
@@ -130,27 +130,19 @@ it("reports content-selection mismatch as unknown instead of a website change",
|
||||
reason: expect.stringContaining("content selections differ"),
|
||||
}),
|
||||
);
|
||||
const legacy = browserScenarioCaptureSchema.parse({
|
||||
...metadataOnly,
|
||||
scenario: { ...metadataOnly.scenario, network_content: undefined },
|
||||
});
|
||||
expect(legacy.scenario.network_content).toBeUndefined();
|
||||
const legacyComparison = compareBrowserScenarios(
|
||||
compareBrowserScenariosInputSchema.parse({
|
||||
before_scenario: legacy,
|
||||
after_scenario: metadataOnly,
|
||||
}),
|
||||
);
|
||||
expect(legacyComparison.overall_status).toBe("unknown");
|
||||
expect(
|
||||
legacyComparison.steps.flatMap((step) => step.artifact_diffs),
|
||||
).toContainEqual(
|
||||
expect.objectContaining({
|
||||
artifact: "events",
|
||||
status: "unknown",
|
||||
reason: expect.stringContaining("unknown in a legacy capture"),
|
||||
}),
|
||||
);
|
||||
for (const networkContent of [undefined, {}, { request_body: false }])
|
||||
expect(
|
||||
compareBrowserScenariosInputSchema.safeParse({
|
||||
before_scenario: {
|
||||
...metadataOnly,
|
||||
scenario: {
|
||||
...metadataOnly.scenario,
|
||||
network_content: networkContent,
|
||||
},
|
||||
},
|
||||
after_scenario: withBody,
|
||||
}).success,
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
describe("browser scenario comparison", () => {
|
||||
@@ -487,6 +479,11 @@ const scenarioCapture = (
|
||||
start_origin: "https://app.example.test",
|
||||
action_count: 1,
|
||||
secret_references: [],
|
||||
network_content: {
|
||||
request_body: false,
|
||||
response_body: false,
|
||||
header_values: false,
|
||||
},
|
||||
},
|
||||
duration_ms: options.elapsedMs ?? 10,
|
||||
steps: [
|
||||
|
||||
Reference in New Issue
Block a user