Skip to content

Commit 46a67d3

Browse files
committed
fix(ci): restore persisted state guards
1 parent b05fcad commit 46a67d3

4 files changed

Lines changed: 21 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Docs: https://docs.openclaw.ai
3838
- Commitments: strip malformed optional reminder scope metadata from persisted commitments before matching pending follow-ups.
3939
- Config persistence: normalize malformed auth profile credential fields/state, skip JSON-valid garbage transcript checkpoint rows, and let `openclaw doctor --fix` remove unrepairable cron job rows.
4040
- Cron: skip persisted job rows with malformed schedule or payload shapes in memory, leaving the store for `openclaw doctor --fix` instead of hydrating them into runtime state.
41+
- Cron: keep legacy string schedules and blank system-event jobs available for runtime repair/skip handling instead of dropping them as malformed persisted rows.
4142
- Task persistence: drop malformed array/scalar requester-origin JSON from task and task-flow SQLite sidecars instead of restoring it as delivery metadata.
4243
- Agents/timeouts: clarify model idle-timeout errors and docs so provider `timeoutSeconds` is shown as bounded by the whole agent/run timeout ceiling.
4344
- Release tooling: align the published launcher Node floor, `npm start`, package script checks, sharded lint locking, Vitest root project coverage, and plugin-SDK declaration build cache metadata so release/package validation does not silently skip or ship stale surfaces.

extensions/discord/src/monitor/model-picker.view.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,12 +370,17 @@ function buildModelRows(params: {
370370
modelIndex: params.pendingModelIndex,
371371
userId: params.userId,
372372
}),
373-
options: runtimeChoices.map((choice) => ({
374-
label: choice.label,
375-
value: choice.id,
376-
default: choice.id === selectedRuntime,
377-
...(choice.description ? { description: choice.description } : {}),
378-
})),
373+
options: runtimeChoices.map((choice) => {
374+
const option: APISelectMenuOption = {
375+
label: choice.label,
376+
value: choice.id,
377+
default: choice.id === selectedRuntime,
378+
};
379+
if (choice.description) {
380+
option.description = choice.description;
381+
}
382+
return option;
383+
}),
379384
placeholder: "Select runtime",
380385
}),
381386
]),

src/cron/persisted-shape.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ export function getInvalidPersistedCronJobReason(
1515
return "missing-id";
1616
}
1717
const schedule = candidate.schedule;
18-
if (!schedule || typeof schedule !== "object" || Array.isArray(schedule)) {
18+
if (!schedule || Array.isArray(schedule)) {
19+
return "missing-schedule";
20+
}
21+
if (typeof schedule === "string") {
22+
return null;
23+
}
24+
if (typeof schedule !== "object") {
1925
return "missing-schedule";
2026
}
2127
const scheduleRecord = schedule as Record<string, unknown>;
@@ -52,7 +58,7 @@ export function getInvalidPersistedCronJobReason(
5258
}
5359
if (payloadKind === "systemEvent") {
5460
const text = payloadRecord.text;
55-
if (typeof text !== "string" || text.trim().length === 0) {
61+
if (typeof text !== "string") {
5662
return "invalid-payload";
5763
}
5864
}

src/pairing/pairing-store.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ async function expectPendingPairingRequestsIsolatedByAccount(params: {
301301
describe("pairing store", () => {
302302
it("skips malformed persisted pairing requests while approving valid codes", async () => {
303303
await withTempStateDir(async (stateDir) => {
304-
const now = new Date("2026-05-16T05:20:00.000Z").toISOString();
304+
const now = new Date().toISOString();
305305
writeJsonFixture(resolvePairingFilePath(stateDir, "telegram"), {
306306
version: 1,
307307
requests: [

0 commit comments

Comments
 (0)