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:
@@ -1,3 +1,4 @@
|
||||
import { ok as resultOk } from "../../../src/domain/result.js";
|
||||
import { rm, writeFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import { pathToFileURL } from "node:url";
|
||||
@@ -119,7 +120,7 @@ describe("JavaScript runtime observation MCP tools", () => {
|
||||
});
|
||||
expect(listed.isError).not.toBe(true);
|
||||
expect(listed.structuredContent).toMatchObject({
|
||||
result: {
|
||||
normalized_result: {
|
||||
targets: [{ target_id: inspector.targetId }],
|
||||
},
|
||||
});
|
||||
@@ -134,7 +135,7 @@ describe("JavaScript runtime observation MCP tools", () => {
|
||||
});
|
||||
expect(observedRuntime.isError).not.toBe(true);
|
||||
expect(observedRuntime.structuredContent).toMatchObject({
|
||||
result: {
|
||||
normalized_result: {
|
||||
target: {
|
||||
target_id: inspector.targetId,
|
||||
runtime_kind: "node",
|
||||
@@ -151,11 +152,9 @@ describe("JavaScript runtime observation MCP tools", () => {
|
||||
});
|
||||
const evidenceId = evidenceIdFrom(observedRuntime.structuredContent);
|
||||
expect(observedRuntime.structuredContent).toMatchObject({
|
||||
evidence: {
|
||||
evidence_id: evidenceId,
|
||||
operation: "observe_javascript_runtime",
|
||||
parameters: expect.any(Object),
|
||||
},
|
||||
evidence_id: evidenceId,
|
||||
operation: "observe_javascript_runtime",
|
||||
parameters: expect.any(Object),
|
||||
});
|
||||
expect(new Set(inspector.commands.map(({ method }) => method))).toEqual(
|
||||
new Set(["Runtime.enable", "Debugger.enable"]),
|
||||
@@ -178,7 +177,7 @@ const createObservationClient = async (
|
||||
resources.push(inspector);
|
||||
const session = createTestBinarySession(() => ({
|
||||
execute: () => Promise.resolve(observed(null)),
|
||||
close: () => Promise.resolve(),
|
||||
close: () => Promise.resolve(resultOk(null)),
|
||||
}));
|
||||
const server = createServer(session, session, {
|
||||
javascriptRuntimeObservation: new V8InspectorProvider(),
|
||||
|
||||
Reference in New Issue
Block a user