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

推荐订阅源

Know Your Adversary
Know Your Adversary
小众软件
小众软件
L
LangChain Blog
月光博客
月光博客
博客园 - Franky
Microsoft Azure Blog
Microsoft Azure Blog
Y
Y Combinator Blog
有赞技术团队
有赞技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
MongoDB | Blog
MongoDB | Blog
Recorded Future
Recorded Future
V
Visual Studio Blog
TaoSecurity Blog
TaoSecurity Blog
S
Schneier on Security
C
Cybersecurity and Infrastructure Security Agency CISA
P
Privacy & Cybersecurity Law Blog
T
Threat Research - Cisco Blogs
D
DataBreaches.Net
L
LINUX DO - 热门话题
C
Check Point Blog
F
Fortinet All Blogs
Hugging Face - Blog
Hugging Face - Blog
The Hacker News
The Hacker News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
L
Lohrmann on Cybersecurity
博客园 - 司徒正美
T
Threatpost
P
Palo Alto Networks Blog
A
About on SuperTechFans
Spread Privacy
Spread Privacy
Engineering at Meta
Engineering at Meta
N
News | PayPal Newsroom
T
Tailwind CSS Blog
The Last Watchdog
The Last Watchdog
Blog — PlanetScale
Blog — PlanetScale
A
Arctic Wolf
量子位
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - 聂微东
Google Online Security Blog
Google Online Security Blog
Google DeepMind News
Google DeepMind News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
Vulnerabilities – Threatpost
H
Hacker News: Front Page

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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
test(gateway): trim cron server memory hotspots · openclaw/openclaw@9577703
vincentkoc · 2026-04-28 · via Recent Commits to openclaw:main

@@ -4,6 +4,7 @@ import path from "node:path";

44

import { setImmediate as setImmediatePromise } from "node:timers/promises";

55

import { afterAll, beforeEach, describe, expect, test, vi } from "vitest";

66

import type WebSocket from "ws";

7+

import { resetConfigRuntimeState } from "../config/config.js";

78

import type { GuardedFetchOptions } from "../infra/net/fetch-guard.js";

89

import {

910

connectOk,

@@ -185,29 +186,37 @@ async function directCronReq(

185186

let result:

186187

| { ok: boolean; payload?: unknown; error?: { code?: string; message?: string } }

187188

| undefined;

188-

await cronHandlers[method]({

189-

req: {} as never,

190-

params,

191-

respond: (ok, payload, error) => {

192-

result = {

193-

ok,

194-

payload,

195-

error,

196-

};

197-

},

198-

context: {

199-

cron: cronState.cron,

200-

cronStorePath: cronState.storePath,

201-

logGateway: {

202-

info: vi.fn(),

203-

warn: vi.fn(),

204-

error: vi.fn(),

205-

},

206-

getRuntimeConfig: cronState.getRuntimeConfig,

207-

} as never,

208-

client: null,

209-

isWebchatConnect: () => false,

210-

});

189+

const respond = (ok: boolean, payload?: unknown, error?: { code?: string; message?: string }) => {

190+

result = {

191+

ok,

192+

payload,

193+

error,

194+

};

195+

};

196+

try {

197+

await cronHandlers[method]({

198+

req: {} as never,

199+

params,

200+

respond,

201+

context: {

202+

cron: cronState.cron,

203+

cronStorePath: cronState.storePath,

204+

logGateway: {

205+

info: vi.fn(),

206+

warn: vi.fn(),

207+

error: vi.fn(),

208+

},

209+

getRuntimeConfig: cronState.getRuntimeConfig,

210+

} as never,

211+

client: null,

212+

isWebchatConnect: () => false,

213+

});

214+

} catch (err) {

215+

respond(false, undefined, {

216+

code: "unavailable",

217+

message: err instanceof Error ? err.message : String(err),

218+

});

219+

}

211220

if (!result) {

212221

throw new Error(`${method} did not respond`);

213222

}

@@ -222,8 +231,12 @@ function expectCronJobIdFromResponse(response: { ok?: unknown; payload?: unknown

222231

return id;

223232

}

224233225-

async function addMainSystemEventCronJob(params: { ws: WebSocket; name: string; text?: string }) {

226-

const response = await rpcReq(params.ws, "cron.add", {

234+

async function addMainSystemEventCronJobDirect(params: {

235+

cronState: DirectCronState;

236+

name: string;

237+

text?: string;

238+

}) {

239+

const response = await directCronReq(params.cronState, "cron.add", {

227240

name: params.name,

228241

enabled: true,

229242

schedule: { kind: "every", everyMs: 60_000 },

@@ -263,6 +276,7 @@ async function writeCronConfig(config: unknown) {

263276

expect(typeof configPath).toBe("string");

264277

await fs.mkdir(path.dirname(configPath as string), { recursive: true });

265278

await fs.writeFile(configPath as string, JSON.stringify(config, null, 2), "utf-8");

279+

resetConfigRuntimeState();

266280

}

267281268282

async function runCronJobForce(ws: WebSocket, id: string) {

@@ -322,11 +336,10 @@ describe("gateway server cron", () => {

322336

cronEnabled: false,

323337

});

324338325-

const { server, ws } = await startServerWithClient();

326-

await connectOk(ws);

339+

const cronState = await createDirectCronState();

327340328341

try {

329-

const addRes = await rpcReq(ws, "cron.add", {

342+

const addRes = await directCronReq(cronState, "cron.add", {

330343

name: "daily",

331344

enabled: true,

332345

schedule: { kind: "every", everyMs: 60_000 },

@@ -339,7 +352,7 @@ describe("gateway server cron", () => {

339352

const dailyJobId = (addRes.payload as { id?: unknown } | null)?.id;

340353

expect(typeof dailyJobId).toBe("string");

341354342-

const listRes = await rpcReq(ws, "cron.list", {

355+

const listRes = await directCronReq(cronState, "cron.list", {

343356

includeDisabled: true,

344357

});

345358

expect(listRes.ok).toBe(true);

@@ -362,7 +375,7 @@ describe("gateway server cron", () => {

362375

});

363376364377

const routeAtMs = Date.now() - 1;

365-

const routeRes = await rpcReq(ws, "cron.add", {

378+

const routeRes = await directCronReq(cronState, "cron.add", {

366379

name: "route test",

367380

enabled: true,

368381

schedule: { kind: "at", at: new Date(routeAtMs).toISOString() },

@@ -375,14 +388,14 @@ describe("gateway server cron", () => {

375388

const routeJobId = typeof routeJobIdValue === "string" ? routeJobIdValue : "";

376389

expect(routeJobId.length > 0).toBe(true);

377390378-

const runRes = await rpcReq(ws, "cron.run", { id: routeJobId, mode: "force" }, 20_000);

391+

const runRes = await directCronReq(cronState, "cron.run", { id: routeJobId, mode: "force" });

379392

expect(runRes.ok).toBe(true);

380393

expect(runRes.payload).toEqual({ ok: true, enqueued: true, runId: expect.any(String) });

381394

const events = await waitForSystemEvent();

382395

expect(events.some((event) => event.includes("cron route check"))).toBe(true);

383396384397

const wrappedAtMs = Date.now() + 1000;

385-

const wrappedRes = await rpcReq(ws, "cron.add", {

398+

const wrappedRes = await directCronReq(cronState, "cron.add", {

386399

data: {

387400

name: "wrapped",

388401

schedule: { at: new Date(wrappedAtMs).toISOString() },

@@ -397,10 +410,13 @@ describe("gateway server cron", () => {

397410

expect(wrappedPayload?.wakeMode).toBe("now");

398411

expect((wrappedPayload?.schedule as { kind?: unknown } | undefined)?.kind).toBe("at");

399412400-

const patchJobId = await addMainSystemEventCronJob({ ws, name: "patch test" });

413+

const patchJobId = await addMainSystemEventCronJobDirect({

414+

cronState,

415+

name: "patch test",

416+

});

401417402418

const atMs = Date.now() + 1_000;

403-

const updateRes = await rpcReq(ws, "cron.update", {

419+

const updateRes = await directCronReq(cronState, "cron.update", {

404420

id: patchJobId,

405421

patch: {

406422

schedule: { at: new Date(atMs).toISOString() },

@@ -414,7 +430,7 @@ describe("gateway server cron", () => {

414430

expect(updated?.schedule?.kind).toBe("at");

415431

expect(updated?.payload?.kind).toBe("systemEvent");

416432417-

const mergeRes = await rpcReq(ws, "cron.add", {

433+

const mergeRes = await directCronReq(cronState, "cron.add", {

418434

name: "patch merge",

419435

enabled: true,

420436

schedule: { kind: "every", everyMs: 60_000 },

@@ -427,7 +443,7 @@ describe("gateway server cron", () => {

427443

const mergeJobId = typeof mergeJobIdValue === "string" ? mergeJobIdValue : "";

428444

expect(mergeJobId.length > 0).toBe(true);

429445430-

const noTimeoutRes = await rpcReq(ws, "cron.add", {

446+

const noTimeoutRes = await directCronReq(cronState, "cron.add", {

431447

name: "no-timeout payload",

432448

enabled: true,

433449

schedule: { kind: "every", everyMs: 60_000 },

@@ -447,7 +463,7 @@ describe("gateway server cron", () => {

447463

expect(noTimeoutPayload?.payload?.kind).toBe("agentTurn");

448464

expect(noTimeoutPayload?.payload?.timeoutSeconds).toBe(0);

449465450-

const mergeUpdateRes = await rpcReq(ws, "cron.update", {

466+

const mergeUpdateRes = await directCronReq(cronState, "cron.update", {

451467

id: mergeJobId,

452468

patch: {

453469

delivery: { mode: "announce", channel: "telegram", to: "19098680" },

@@ -467,7 +483,7 @@ describe("gateway server cron", () => {

467483

expect(merged?.delivery?.channel).toBe("telegram");

468484

expect(merged?.delivery?.to).toBe("19098680");

469485470-

const modelOnlyPatchRes = await rpcReq(ws, "cron.update", {

486+

const modelOnlyPatchRes = await directCronReq(cronState, "cron.update", {

471487

id: mergeJobId,

472488

patch: {

473489

payload: {

@@ -489,7 +505,7 @@ describe("gateway server cron", () => {

489505

expect(modelOnlyPatched?.payload?.message).toBe("hello");

490506

expect(modelOnlyPatched?.payload?.model).toBe("anthropic/claude-sonnet-4-6");

491507492-

const deliveryPatchRes = await rpcReq(ws, "cron.update", {

508+

const deliveryPatchRes = await directCronReq(cronState, "cron.update", {

493509

id: mergeJobId,

494510

patch: {

495511

delivery: {

@@ -514,19 +530,25 @@ describe("gateway server cron", () => {

514530

expect(deliveryPatched?.delivery?.to).toBe("+15550001111");

515531

expect(deliveryPatched?.delivery?.bestEffort).toBe(true);

516532517-

const rejectJobId = await addMainSystemEventCronJob({ ws, name: "patch reject" });

533+

const rejectJobId = await addMainSystemEventCronJobDirect({

534+

cronState,

535+

name: "patch reject",

536+

});

518537519-

const rejectUpdateRes = await rpcReq(ws, "cron.update", {

538+

const rejectUpdateRes = await directCronReq(cronState, "cron.update", {

520539

id: rejectJobId,

521540

patch: {

522541

payload: { kind: "agentTurn", message: "nope" },

523542

},

524543

});

525544

expect(rejectUpdateRes.ok).toBe(false);

526545527-

const jobId = await addMainSystemEventCronJob({ ws, name: "jobId test" });

546+

const jobId = await addMainSystemEventCronJobDirect({

547+

cronState,

548+

name: "jobId test",

549+

});

528550529-

const jobIdUpdateRes = await rpcReq(ws, "cron.update", {

551+

const jobIdUpdateRes = await directCronReq(cronState, "cron.update", {

530552

jobId,

531553

patch: {

532554

schedule: { at: new Date(Date.now() + 2_000).toISOString() },

@@ -535,9 +557,12 @@ describe("gateway server cron", () => {

535557

});

536558

expect(jobIdUpdateRes.ok).toBe(true);

537559538-

const disableJobId = await addMainSystemEventCronJob({ ws, name: "disable test" });

560+

const disableJobId = await addMainSystemEventCronJobDirect({

561+

cronState,

562+

name: "disable test",

563+

});

539564540-

const disableUpdateRes = await rpcReq(ws, "cron.update", {

565+

const disableUpdateRes = await directCronReq(cronState, "cron.update", {

541566

id: disableJobId,

542567

patch: { enabled: false },

543568

});

@@ -546,8 +571,7 @@ describe("gateway server cron", () => {

546571

expect(disabled?.enabled).toBe(false);

547572

} finally {

548573

await cleanupCronTestRun({

549-

ws,

550-

server,

574+

cronState,

551575

prevSkipCron,

552576

clearSessionConfig: true,

553577

});

@@ -619,11 +643,10 @@ describe("gateway server cron", () => {

619643

},

620644

});

621645622-

const { server, ws } = await startServerWithClient();

623-

await connectOk(ws);

646+

const cronState = await createDirectCronState();

624647625648

try {

626-

const addRes = await rpcReq(ws, "cron.add", {

649+

const addRes = await directCronReq(cronState, "cron.add", {

627650

name: "main default agent",

628651

enabled: true,

629652

schedule: { kind: "every", everyMs: 60_000 },

@@ -637,7 +660,7 @@ describe("gateway server cron", () => {

637660

const jobId = typeof jobIdValue === "string" ? jobIdValue : "";

638661

expect(jobId.length > 0).toBe(true);

639662640-

const updateRes = await rpcReq(ws, "cron.update", {

663+

const updateRes = await directCronReq(cronState, "cron.update", {

641664

id: jobId,

642665

patch: {

643666

delivery: { mode: "announce", channel: "telegram", to: "19098680" },

@@ -648,7 +671,7 @@ describe("gateway server cron", () => {

648671

const updated = updateRes.payload as { delivery?: unknown } | undefined;

649672

expect(updated?.delivery).toBeUndefined();

650673

} finally {

651-

await cleanupCronTestRun({ ws, server, prevSkipCron });

674+

await cleanupCronTestRun({ cronState, prevSkipCron });

652675

}

653676

});

654677

@@ -716,11 +739,10 @@ describe("gateway server cron", () => {

716739

},

717740

});

718741719-

const { server, ws } = await startServerWithClient();

720-

await connectOk(ws);

742+

const cronState = await createDirectCronState();

721743722744

try {

723-

const addRes = await rpcReq(ws, "cron.add", {

745+

const addRes = await directCronReq(cronState, "cron.add", {

724746

name: "main default agent drift",

725747

enabled: true,

726748

schedule: { kind: "every", everyMs: 60_000 },

@@ -734,8 +756,7 @@ describe("gateway server cron", () => {

734756

const jobId = typeof jobIdValue === "string" ? jobIdValue : "";

735757

expect(jobId.length > 0).toBe(true);

736758737-

const { writeConfigFile } = await import("../config/config.js");

738-

await writeConfigFile({

759+

await writeCronConfig({

739760

session: {

740761

mainKey: "main",

741762

},

@@ -749,22 +770,15 @@ describe("gateway server cron", () => {

749770

},

750771

});

751772752-

let agentIds: string[] = [];

753-

for (let i = 0; i < 20; i += 1) {

754-

const agentsRes = await rpcReq<{ agents?: Array<{ id?: string }> }>(ws, "agents.list", {});

755-

expect(agentsRes.ok).toBe(true);

756-

agentIds = (agentsRes.payload?.agents ?? [])

757-

.map((agent) => agent.id)

758-

.filter((id): id is string => typeof id === "string");

759-

if (agentIds.includes("main") && agentIds.includes("ops")) {

760-

break;

761-

}

762-

await yieldToEventLoop();

763-

}

773+

const agentIds =

774+

cronState

775+

.getRuntimeConfig()

776+

.agents?.list?.map((agent) => agent.id)

777+

.filter((id): id is string => typeof id === "string") ?? [];

764778

expect(agentIds).toContain("main");

765779

expect(agentIds).toContain("ops");

766780767-

const updateRes = await rpcReq(ws, "cron.update", {

781+

const updateRes = await directCronReq(cronState, "cron.update", {

768782

id: jobId,

769783

patch: {

770784

delivery: { mode: "announce", channel: "telegram", to: "19098680" },

@@ -776,7 +790,7 @@ describe("gateway server cron", () => {

776790

}

777791

expect(updateRes.ok).toBe(true);

778792

} finally {

779-

await cleanupCronTestRun({ ws, server, prevSkipCron });

793+

await cleanupCronTestRun({ cronState, prevSkipCron });

780794

}

781795

});

782796