From 298901208da33010d3202d605be01b901b30ebd7 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 24 Jan 2026 12:10:08 +0000 Subject: [PATCH] fix: align agent id normalization --- src/cli/cron-cli.test.ts | 2 +- src/cron/normalize.test.ts | 2 +- src/infra/outbound/message-action-runner.ts | 2 +- src/routing/resolve-route.test.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli/cron-cli.test.ts b/src/cli/cron-cli.test.ts index cefc030b1..459988246 100644 --- a/src/cli/cron-cli.test.ts +++ b/src/cli/cron-cli.test.ts @@ -162,7 +162,7 @@ describe("cron cli", () => { const updateCall = callGatewayFromCli.mock.calls.find((call) => call[0] === "cron.update"); const patch = updateCall?.[2] as { patch?: { agentId?: unknown } }; - expect(patch?.patch?.agentId).toBe("Ops"); + expect(patch?.patch?.agentId).toBe("ops"); callGatewayFromCli.mockClear(); await program.parseAsync(["cron", "edit", "job-2", "--clear-agent"], { diff --git a/src/cron/normalize.test.ts b/src/cron/normalize.test.ts index fbbfc5e66..7b2d72559 100644 --- a/src/cron/normalize.test.ts +++ b/src/cron/normalize.test.ts @@ -38,7 +38,7 @@ describe("normalizeCronJobCreate", () => { }, }) as unknown as Record; - expect(normalized.agentId).toBe("Ops"); + expect(normalized.agentId).toBe("ops"); const cleared = normalizeCronJobCreate({ name: "agent-clear", diff --git a/src/infra/outbound/message-action-runner.ts b/src/infra/outbound/message-action-runner.ts index a3a01e613..3a4d13580 100644 --- a/src/infra/outbound/message-action-runner.ts +++ b/src/infra/outbound/message-action-runner.ts @@ -665,7 +665,7 @@ async function handleSendAction(ctx: ResolvedActionContext): Promise { accountId: undefined, peer: { kind: "dm", id: "+1000" }, }); - expect(defaultRoute.agentId).toBe("defaultAcct"); + expect(defaultRoute.agentId).toBe("defaultacct"); expect(defaultRoute.matchedBy).toBe("binding.account"); const otherRoute = resolveAgentRoute({