mirror of
https://github.com/morluto/rea.git
synced 2026-11-19 13:12:26 +00:00
Use one named input-schema projection for clients and catalog identity, preserve dialect declarations, and bound compact schema depth. Keep canonical SDK output validation when output advertisements are disabled. Release request-owned state on cancellation and carry upstream limitations through composed workflows. Preserve doctor full-output envelopes and validate navigation facts at their owner. Reviewed fixes: #2088, #2108, #2513, #2684, #2693, #2695, #2836, #2864, #2868, #2877, #2933, #2998, #3002, #3015. Validation: focused schema, SDK output-validation, context, and workflow tests passed; no schema dialect or canonical output validation was relaxed.
25 lines
774 B
TypeScript
25 lines
774 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { forgetPendingMcpRequest } from "./EvidenceMcpServer.js";
|
|
|
|
describe("MCP request bookkeeping", () => {
|
|
it("releases list, tool, and completion state when cancellation arrives", () => {
|
|
const completion = new AbortController();
|
|
const pendingTools = new Map([[7, "inspect_artifact"]]);
|
|
const pendingToolLists = new Set([7]);
|
|
const pendingCompletions = new Map([[7, completion]]);
|
|
|
|
forgetPendingMcpRequest(
|
|
pendingTools,
|
|
pendingToolLists,
|
|
pendingCompletions,
|
|
7,
|
|
);
|
|
|
|
expect(pendingTools.has(7)).toBe(false);
|
|
expect(pendingToolLists.has(7)).toBe(false);
|
|
expect(completion.signal.aborted).toBe(true);
|
|
expect(pendingCompletions.has(7)).toBe(false);
|
|
});
|
|
});
|