mirror of
https://github.com/morluto/rea.git
synced 2026-12-03 01:28:15 +00:00
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.
61 lines
1.8 KiB
TypeScript
61 lines
1.8 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { NativeMacOSProvider } from "./NativeMacOSProvider.js";
|
|
import type { JsonValue } from "../domain/jsonValue.js";
|
|
import { projectAnalysisError } from "../domain/analysisErrorProjection.js";
|
|
import {
|
|
NativeFixtureRunner,
|
|
nativeMachoTarget,
|
|
} from "../../tests/fixtures/nativeCommands.js";
|
|
|
|
describe("native dispatch metadata input boundary", () => {
|
|
it("retains canonical argument failures before attempting target inspection", async () => {
|
|
const client = new NativeMacOSProvider(
|
|
{},
|
|
new NativeFixtureRunner(),
|
|
"darwin",
|
|
).createClient(nativeMachoTarget("/does-not-exist"));
|
|
const cases: ReadonlyArray<{
|
|
parameters: Readonly<Record<string, JsonValue>>;
|
|
path: string;
|
|
reason: string;
|
|
}> = [
|
|
{
|
|
parameters: { max_records: null },
|
|
path: "max_records",
|
|
reason: "invalid_type",
|
|
},
|
|
{
|
|
parameters: { max_records: "5" },
|
|
path: "max_records",
|
|
reason: "invalid_type",
|
|
},
|
|
{
|
|
parameters: { max_records: 0 },
|
|
path: "max_records",
|
|
reason: "out_of_range",
|
|
},
|
|
{
|
|
parameters: { max_record: 5 },
|
|
path: "max_record",
|
|
reason: "unknown_argument",
|
|
},
|
|
];
|
|
for (const { parameters, path, reason } of cases) {
|
|
const result = await client.execute(
|
|
"inspect_native_dispatch_metadata",
|
|
parameters,
|
|
);
|
|
if (result.ok)
|
|
throw new Error("Expected invalid dispatch metadata input");
|
|
expect(projectAnalysisError(result.error)).toMatchObject({
|
|
code: "invalid_request",
|
|
details: {
|
|
operation: "inspect_native_dispatch_metadata",
|
|
issues: [{ path: [path], reason }],
|
|
},
|
|
});
|
|
}
|
|
});
|
|
});
|