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

推荐订阅源

A
About on SuperTechFans
量子位
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
V
Visual Studio Blog
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 司徒正美
V
V2EX
The GitHub Blog
The GitHub Blog
博客园_首页
月光博客
月光博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MyScale Blog
MyScale Blog
博客园 - 叶小钗
F
Fortinet All Blogs
T
Tailwind CSS Blog
GbyAI
GbyAI
酷 壳 – CoolShell
酷 壳 – CoolShell
IT之家
IT之家
WordPress大学
WordPress大学
B
Blog
H
Help Net Security

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
fix(memory-core): add runtime cron service fallback for d...
mara-mindles · 2026-04-26 · via Recent Commits to openclaw:main

@@ -663,6 +663,12 @@ export async function runShortTermDreamingPromotionIfTriggered(params: {

663663664664

export function registerShortTermPromotionDreaming(api: OpenClawPluginApi): void {

665665

let resolveStartupCron: (() => CronServiceLike | null) | null = null;

666+

// Hold a live reference to the gateway context so we can retry cron resolution at runtime.

667+

// The startup capture may fail if the cron service isn't available yet (race condition in

668+

// startGatewaySidecars — the startup event fires via setTimeout(250ms) before deps.cron is

669+

// attached). By keeping the context, we can call getCron() again on later reconciliation

670+

// attempts when the service is guaranteed to be ready. Fixes #67362.

671+

let gatewayContext: { getCron?: () => CronServiceLike | null } | null = null;

666672

let unavailableCronWarningEmitted = false;

667673

let lastRuntimeReconcileAtMs = 0;

668674

let lastRuntimeConfigKey: string | null = null;

@@ -707,7 +713,22 @@ export function registerShortTermPromotionDreaming(api: OpenClawPluginApi): void

707713

if (params.reason === "startup") {

708714

resolveStartupCron = params.startupCron ?? null;

709715

}

710-

const cron = resolveStartupCron?.() ?? null;

716+

let cron = resolveStartupCron?.() ?? null;

717+

// Runtime fallback: retry resolving the cron service from the gateway context.

718+

// This handles the case where the cron service was not yet available during

719+

// gateway_start (250ms deferred init race in startGatewaySidecars) but is

720+

// available now. Fixes #67362.

721+

if (!cron && params.reason === "runtime" && gatewayContext) {

722+

try {

723+

cron = resolveCronServiceFromGatewayContext(gatewayContext);

724+

if (cron) {

725+

// Refresh the startup capture so subsequent calls resolve immediately.

726+

resolveStartupCron = () => cron;

727+

}

728+

} catch {

729+

// Ignore — fall through with cron = null

730+

}

731+

}

711732

const configKey = runtimeConfigKey(config);

712733

if (!cron && config.enabled && !unavailableCronWarningEmitted) {

713734

// Avoid a noisy startup-path warning when the gateway has not exposed cron yet.

@@ -751,6 +772,8 @@ export function registerShortTermPromotionDreaming(api: OpenClawPluginApi): void

751772

};

752773753774

api.on("gateway_start", async (_event, ctx) => {

775+

// Store the gateway context for runtime cron resolution retries.

776+

gatewayContext = ctx as unknown as { getCron?: () => CronServiceLike | null };

754777

try {

755778

await reconcileManagedDreamingCron({

756779

reason: "startup",