mirror of https://github.com/openclaw/openclaw.git
fix: stop false cron payload-kind warnings in doctor (#44012) (thanks @shuicici)
This commit is contained in:
parent
42613b9baa
commit
ff2368af57
|
|
@ -81,6 +81,7 @@ Docs: https://docs.openclaw.ai
|
|||
- Agents/compaction: skip the post-compaction `cache-ttl` marker write when a compaction completed in the same attempt, preventing the next turn from immediately triggering a second tiny compaction. (#28548) thanks @MoerAI.
|
||||
- Native chat/macOS: add `/new`, `/reset`, and `/clear` reset triggers, keep shared main-session aliases aligned, and ignore stale model-selection completions so native chat state stays in sync across reset and fast model changes. (#10898) Thanks @Nachx639.
|
||||
- Agents/compaction safeguard: route missing-model and missing-API-key cancellation warnings through the shared subsystem logger so they land in structured and file logs. (#9974) Thanks @dinakars777.
|
||||
- Cron/doctor: stop flagging canonical `agentTurn` and `systemEvent` payload kinds as legacy cron storage, while still normalizing whitespace-padded and non-canonical variants. (#44012) Thanks @shuicici.
|
||||
|
||||
## 2026.3.11
|
||||
|
||||
|
|
|
|||
|
|
@ -96,4 +96,38 @@ describe("normalizeStoredCronJobs", () => {
|
|||
expect(result.mutated).toBe(false);
|
||||
expect(result.issues.legacyPayloadKind).toBeUndefined();
|
||||
});
|
||||
|
||||
it("normalizes whitespace-padded and non-canonical payload kinds", () => {
|
||||
const jobs = [
|
||||
{
|
||||
id: "spaced-agent-turn",
|
||||
name: "normalized",
|
||||
enabled: true,
|
||||
wakeMode: "now",
|
||||
schedule: { kind: "every", everyMs: 60_000, anchorMs: 1 },
|
||||
payload: { kind: " agentTurn ", message: "ping" },
|
||||
sessionTarget: "isolated",
|
||||
delivery: { mode: "announce" },
|
||||
state: {},
|
||||
},
|
||||
{
|
||||
id: "upper-system-event",
|
||||
name: "normalized",
|
||||
enabled: true,
|
||||
wakeMode: "now",
|
||||
schedule: { kind: "every", everyMs: 60_000, anchorMs: 1 },
|
||||
payload: { kind: "SYSTEMEVENT", text: "pong" },
|
||||
sessionTarget: "main",
|
||||
delivery: { mode: "announce" },
|
||||
state: {},
|
||||
},
|
||||
] as Array<Record<string, unknown>>;
|
||||
|
||||
const result = normalizeStoredCronJobs(jobs);
|
||||
|
||||
expect(result.mutated).toBe(true);
|
||||
expect(result.issues.legacyPayloadKind).toBe(2);
|
||||
expect(jobs[0]?.payload).toMatchObject({ kind: "agentTurn", message: "ping" });
|
||||
expect(jobs[1]?.payload).toMatchObject({ kind: "systemEvent", text: "pong" });
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue