fix: consolidate boundary ownership and cleanup failure paths (#477)

This commit is contained in:
morluto
2026-09-08 10:59:13 +08:00
committed by GitHub
parent c490d85045
commit 2160d4fae5
138 changed files with 2220 additions and 1781 deletions
@@ -1,3 +1,4 @@
import { recordSessionEvidenceSources } from "../sessionEvidence.js";
import type { McpServer } from "@modelcontextprotocol/server";
import { runControlledReplayValidated } from "../../application/JavaScriptReplayService.js";
@@ -8,7 +9,7 @@ import { mcpProgressReporter } from "../mcpProgress.js";
import { logToolExecution } from "../toolLogging.js";
import { toolRegistrationOptions } from "../toolRegistrationOptions.js";
import { toCallToolResult } from "../toolResult.js";
import { recordSources } from "./helpers.js";
import type { ApplicationToolRegistration } from "./types.js";
const replayContract = applicationToolContract("run_controlled_replay");
@@ -34,7 +35,7 @@ export const registerControlledReplayTool = (
if (!result.ok) return toCallToolResult(result, replayContract);
const output = controlledReplayOutputSchema.parse(result.value);
if (output.phase === "execute") {
const sourcesRecorded = recordSources(
const sourcesRecorded = recordSessionEvidenceSources(
options.recordEvidence,
output.source_evidence.map((item) => parseEvidence(item)),
);