fix(bridge): harden bounded Hopper boundaries

This commit is contained in:
morluto
2026-07-13 03:14:15 +00:00
parent 151469f093
commit f8e8ea35ff
11 changed files with 275 additions and 19 deletions
+11
View File
@@ -131,6 +131,17 @@ describe("HopperClient", () => {
if (!result.ok) expect(result.error._tag).toBe(expectedTag);
});
it("preserves a sanitized bridge exception diagnostic", async () => {
const client = await startClient();
const result = await client.callTool("remote_error");
expect(result.ok).toBe(false);
if (!result.ok)
expect(result.error).toMatchObject({
_tag: "HopperRemoteError",
diagnosticType: "bridge_exception",
});
});
it("cancels and ignores late responses without corrupting the session", async () => {
const client = await startClient();
const controller = new AbortController();