惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
V
Visual Studio Blog
雷峰网
雷峰网
博客园_首页
The Cloudflare Blog
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
小众软件
小众软件
D
Docker
P
Proofpoint News Feed
B
Blog
Vercel News
Vercel News
B
Blog RSS Feed
U
Unit 42
月光博客
月光博客
The GitHub Blog
The GitHub Blog
Apple Machine Learning Research
Apple Machine Learning Research
Y
Y Combinator Blog
I
InfoQ
Recent Announcements
Recent Announcements

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
refactor(sqlite): share numeric column decoding · opencla...
vincentkoc · 2026-06-23 · via Recent Commits to openclaw:main

@@ -6,6 +6,7 @@ import {

66

executeSqliteQueryTakeFirstSync,

77

getNodeSqliteKysely,

88

} from "../../infra/kysely-sync.js";

9+

import { normalizeSqliteNumber } from "../../infra/sqlite-number.js";

910

import type { DB as OpenClawStateKyselyDatabase } from "../../state/openclaw-state-db.generated.js";

1011

import type { CronRunLogEntry } from "../run-log-types.js";

1112

import type { CronDeliveryStatus, CronRunStatus } from "../types.js";

@@ -27,19 +28,12 @@ function getCronRunLogKysely(db: DatabaseSync) {

2728

return getNodeSqliteKysely<CronRunLogDatabase>(db);

2829

}

293030-

function normalizeNumber(value: number | bigint | null): number | undefined {

31-

if (typeof value === "bigint") {

32-

return Number(value);

33-

}

34-

return typeof value === "number" ? value : undefined;

35-

}

36-3731

function booleanToInteger(value: boolean | undefined): number | null {

3832

return typeof value === "boolean" ? (value ? 1 : 0) : null;

3933

}

40344135

function integerToBoolean(value: number | bigint | null): boolean | undefined {

42-

const normalized = normalizeNumber(value);

36+

const normalized = normalizeSqliteNumber(value);

4337

return normalized == null ? undefined : normalized !== 0;

4438

}

4539

@@ -91,7 +85,7 @@ export function parseStoredRunLogEntry(row: CronRunLogRow): CronRunLogEntry | nu

9185

}

9286

return {

9387

...parsed,

94-

ts: normalizeNumber(row.ts) ?? parsed.ts,

88+

ts: normalizeSqliteNumber(row.ts) ?? parsed.ts,

9589

jobId: row.job_id,

9690

status: (row.status as CronRunStatus | null) ?? parsed.status,

9791

error: row.error ?? parsed.error,

@@ -102,9 +96,9 @@ export function parseStoredRunLogEntry(row: CronRunLogRow): CronRunLogEntry | nu

10296

sessionId: row.session_id ?? parsed.sessionId,

10397

sessionKey: row.session_key ?? parsed.sessionKey,

10498

runId: row.run_id ?? parsed.runId,

105-

runAtMs: normalizeNumber(row.run_at_ms) ?? parsed.runAtMs,

106-

durationMs: normalizeNumber(row.duration_ms) ?? parsed.durationMs,

107-

nextRunAtMs: normalizeNumber(row.next_run_at_ms) ?? parsed.nextRunAtMs,

99+

runAtMs: normalizeSqliteNumber(row.run_at_ms) ?? parsed.runAtMs,

100+

durationMs: normalizeSqliteNumber(row.duration_ms) ?? parsed.durationMs,

101+

nextRunAtMs: normalizeSqliteNumber(row.next_run_at_ms) ?? parsed.nextRunAtMs,

108102

model: row.model ?? parsed.model,

109103

provider: row.provider ?? parsed.provider,

110104

};

@@ -175,7 +169,7 @@ export function countCronRunLogRows(params: {

175169

params,

176170

),

177171

);

178-

return normalizeNumber(row?.count ?? null) ?? 0;

172+

return normalizeSqliteNumber(row?.count ?? null) ?? 0;

179173

}

180174181175

/** Reads a sorted, filtered page of cron run-log rows. */

@@ -211,7 +205,7 @@ function nextCronRunLogSeq(db: DatabaseSync, storeKey: string, jobId: string): n

211205

.where("store_key", "=", storeKey)

212206

.where("job_id", "=", jobId),

213207

);

214-

return (normalizeNumber(row?.seq ?? null) ?? 0) + 1;

208+

return (normalizeSqliteNumber(row?.seq ?? null) ?? 0) + 1;

215209

}

216210217211

/** Appends a cron run-log entry with a per-job monotonic sequence number. */