mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 02:38:26 +00:00
fix cron announce routing and timeout handling
This commit is contained in:
@@ -300,6 +300,18 @@ describe("normalizeCronJobCreate", () => {
|
||||
expect(payload.allowUnsafeExternalContent).toBe(true);
|
||||
});
|
||||
|
||||
it("preserves timeoutSeconds=0 for no-timeout agentTurn payloads", () => {
|
||||
const normalized = normalizeCronJobCreate({
|
||||
name: "legacy no-timeout",
|
||||
schedule: { kind: "every", everyMs: 60_000 },
|
||||
payload: { kind: "agentTurn", message: "hello" },
|
||||
timeoutSeconds: 0,
|
||||
}) as unknown as Record<string, unknown>;
|
||||
|
||||
const payload = normalized.payload as Record<string, unknown>;
|
||||
expect(payload.timeoutSeconds).toBe(0);
|
||||
});
|
||||
|
||||
it("coerces sessionTarget and wakeMode casing", () => {
|
||||
const normalized = normalizeCronJobCreate({
|
||||
name: "casing",
|
||||
|
||||
Reference in New Issue
Block a user