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
@@ -174,7 +174,9 @@ describe("JSON client configuration migration and provider paths", () => {
const client = { name: "cursor", configPath };
const original = "{}\n";
await writeFile(configPath, original);
expect(await configureJsonClient(client, hopperPath)).toMatchObject({
expect(
await configureJsonClient(client, { HOPPER_LAUNCHER_PATH: hopperPath }),
).toMatchObject({
status: "configured",
});
expect(JSON.parse(await readFile(configPath, "utf8"))).toMatchObject({
@@ -186,11 +188,15 @@ describe("JSON client configuration migration and provider paths", () => {
},
},
});
expect(await configureJsonClient(client, hopperPath)).toEqual({
expect(
await configureJsonClient(client, { HOPPER_LAUNCHER_PATH: hopperPath }),
).toEqual({
status: "unchanged",
});
expect(
await configureJsonClient(client, "/opt/hopper/bin/Hopper"),
await configureJsonClient(client, {
HOPPER_LAUNCHER_PATH: "/opt/hopper/bin/Hopper",
}),
).toMatchObject({ status: "configured" });
expect(await readFile(`${configPath}.rea.backup`, "utf8")).toBe(original);
});