Skip to content

Commit a2787a6

Browse files
committed
Fix ADE RPC action audit test
1 parent aa9cbdd commit a2787a6

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

apps/ade-cli/src/adeRpcServer.test.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3042,19 +3042,16 @@ describe("adeRpcServer", () => {
30423042
expect(payload.rebaseStatus).toBe("idle");
30433043
});
30443044

3045-
it("records succeeded audit metadata for read-only tools", async () => {
3045+
it("does not record operation metadata for read-only action calls", async () => {
30463046
const { runtime, operationStart, operationFinish } = createRuntime();
30473047
const handler = createAdeRpcRequestHandler({ runtime, serverVersion: "test" });
30483048

30493049
await initialize(handler);
30503050
const response = await callTool(handler, "list_lanes", {});
30513051

30523052
expect(response.isError).toBeUndefined();
3053-
expect(operationStart).toHaveBeenCalledTimes(1);
3054-
expect(operationFinish).toHaveBeenCalledTimes(1);
3055-
const finishArgs = operationFinish.mock.calls[0]?.[0] ?? {};
3056-
expect(finishArgs.status).toBe("succeeded");
3057-
expect(finishArgs.metadataPatch?.resultStatus).toBe("success");
3053+
expect(operationStart).not.toHaveBeenCalled();
3054+
expect(operationFinish).not.toHaveBeenCalled();
30583055
});
30593056

30603057
// ---------- Rate limit tests ----------

0 commit comments

Comments
 (0)