refactor(codemode): split runtime into focused interpreter modules (#36540)

This commit is contained in:
Aiden Cline
2026-07-12 12:47:56 -05:00
committed by GitHub
parent 430750e2f8
commit 49cb73b348
24 changed files with 1911 additions and 2277 deletions
+16
View File
@@ -26,6 +26,22 @@ describe("CodeMode host failure boundary", () => {
})
})
test("does not rewrite explicit safe tool failures", async () => {
const result = await run(
Tool.make({
description: "Fail safely",
input: Schema.Struct({}),
output: Schema.String,
run: () => Effect.fail(toolError("File not found: /tmp/report.json")),
}),
)
expect(result.ok ? undefined : result.error).toStrictEqual({
kind: "ToolFailure",
message: "File not found: /tmp/report.json",
})
})
test("sanitizes unknown host failures and defects", async () => {
for (const failure of [
Effect.fail(new UnsafeHostError({ reason: "Authorization: Bearer typed-secret" })),