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

推荐订阅源

博客园 - 【当耐特】
云风的 BLOG
云风的 BLOG
罗磊的独立博客
C
Check Point Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Blog — PlanetScale
Blog — PlanetScale
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
宝玉的分享
宝玉的分享
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
I
InfoQ
Hugging Face - Blog
Hugging Face - Blog
T
Tailwind CSS Blog
B
Blog RSS Feed

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(cron): start isolated timeout after execution begins ...
steipete · 2026-04-27 · via Recent Commits to openclaw:main

@@ -615,6 +615,74 @@ describe("cron service timer regressions", () => {

615615

}

616616

});

617617618+

it("does not spend isolated execution timeout while waiting for the runner lane (#41783)", async () => {

619+

vi.useFakeTimers();

620+

try {

621+

const store = timerRegressionFixtures.makeStorePath();

622+

const scheduledAt = Date.parse("2026-02-15T13:00:00.000Z");

623+

const cronJob = createIsolatedRegressionJob({

624+

id: "timeout-after-lane-start",

625+

name: "timeout after lane start",

626+

scheduledAt,

627+

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

628+

payload: { kind: "agentTurn", message: "work", timeoutSeconds: FAST_TIMEOUT_SECONDS },

629+

state: { nextRunAtMs: scheduledAt },

630+

});

631+

await writeCronJobs(store.storePath, [cronJob]);

632+633+

let now = scheduledAt;

634+

const runnerEntered = createDeferred<void>();

635+

const laneAcquired = createDeferred<void>();

636+

let observedAbortSignal: AbortSignal | undefined;

637+

const state = createCronServiceState({

638+

cronEnabled: true,

639+

storePath: store.storePath,

640+

log: noopLogger,

641+

nowMs: () => now,

642+

enqueueSystemEvent: vi.fn(),

643+

requestHeartbeatNow: vi.fn(),

644+

runIsolatedAgentJob: vi.fn(async ({ abortSignal, onExecutionStarted }) => {

645+

observedAbortSignal = abortSignal;

646+

runnerEntered.resolve();

647+

await laneAcquired.promise;

648+

onExecutionStarted?.();

649+

await new Promise<void>((resolve) => {

650+

if (!abortSignal) {

651+

resolve();

652+

return;

653+

}

654+

if (abortSignal.aborted) {

655+

resolve();

656+

return;

657+

}

658+

abortSignal.addEventListener("abort", () => resolve(), { once: true });

659+

});

660+

now += 5;

661+

return { status: "ok" as const, summary: "late" };

662+

}),

663+

});

664+665+

const timerPromise = onTimer(state);

666+

await runnerEntered.promise;

667+

await vi.advanceTimersByTimeAsync(Math.ceil(FAST_TIMEOUT_SECONDS * 1_000) + 10);

668+

expect(observedAbortSignal?.aborted).toBe(false);

669+670+

laneAcquired.resolve();

671+

await Promise.resolve();

672+

expect(observedAbortSignal?.aborted).toBe(false);

673+674+

await vi.advanceTimersByTimeAsync(Math.ceil(FAST_TIMEOUT_SECONDS * 1_000) + 10);

675+

await timerPromise;

676+677+

expect(observedAbortSignal?.aborted).toBe(true);

678+

const job = state.store?.jobs.find((entry) => entry.id === "timeout-after-lane-start");

679+

expect(job?.state.lastStatus).toBe("error");

680+

expect(job?.state.lastError).toContain("timed out");

681+

} finally {

682+

vi.useRealTimers();

683+

}

684+

});

685+618686

it("suppresses isolated follow-up side effects after timeout", async () => {

619687

vi.useFakeTimers();

620688

try {

@@ -981,30 +1049,39 @@ describe("cron service timer regressions", () => {

9811049

nowMs: () => now,

9821050

enqueueSystemEvent: vi.fn(),

9831051

requestHeartbeatNow: vi.fn(),

984-

runIsolatedAgentJob: vi.fn(async ({ abortSignal }: { abortSignal?: AbortSignal }) => {

985-

started.resolve();

986-

await new Promise<void>((resolve) => {

987-

if (!abortSignal) {

988-

resolve();

989-

return;

990-

}

991-

if (abortSignal.aborted) {

992-

abortWallMs = Date.now();

993-

resolve();

994-

return;

995-

}

996-

abortSignal.addEventListener(

997-

"abort",

998-

() => {

1052+

runIsolatedAgentJob: vi.fn(

1053+

async ({

1054+

abortSignal,

1055+

onExecutionStarted,

1056+

}: {

1057+

abortSignal?: AbortSignal;

1058+

onExecutionStarted?: () => void;

1059+

}) => {

1060+

onExecutionStarted?.();

1061+

started.resolve();

1062+

await new Promise<void>((resolve) => {

1063+

if (!abortSignal) {

1064+

resolve();

1065+

return;

1066+

}

1067+

if (abortSignal.aborted) {

9991068

abortWallMs = Date.now();

10001069

resolve();

1001-

},

1002-

{ once: true },

1003-

);

1004-

});

1005-

now += 5;

1006-

return { status: "ok" as const, summary: "done" };

1007-

}),

1070+

return;

1071+

}

1072+

abortSignal.addEventListener(

1073+

"abort",

1074+

() => {

1075+

abortWallMs = Date.now();

1076+

resolve();

1077+

},

1078+

{ once: true },

1079+

);

1080+

});

1081+

now += 5;

1082+

return { status: "ok" as const, summary: "done" };

1083+

},

1084+

),

10081085

});

1009108610101087

const timerPromise = onTimer(state);