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

推荐订阅源

博客园 - 司徒正美
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
罗磊的独立博客
The GitHub Blog
The GitHub Blog
L
LangChain Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
DataBreaches.Net
宝玉的分享
宝玉的分享
U
Unit 42
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
N
Netflix TechBlog - Medium
The Cloudflare Blog
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
美团技术团队
大猫的无限游戏
大猫的无限游戏
雷峰网
雷峰网
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog

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(agents): do not misclassify client-disconnect abort a...
openperf · 2026-06-15 · via Recent Commits to openclaw:main

File tree

    • embedded-agent-runner/run

Original file line numberDiff line numberDiff line change

@@ -152,7 +152,7 @@ import {

152152

} from "../../embedded-agent-helpers.js";

153153

import { countActiveToolExecutions } from "../../embedded-agent-subscribe.handlers.tools.js";

154154

import { subscribeEmbeddedAgentSession } from "../../embedded-agent-subscribe.js";

155-

import { isTimeoutError } from "../../failover-error.js";

155+

import { isSignalTimeoutReason } from "../../failover-error.js";

156156

import { runAgentEndSideEffects } from "../../harness/agent-end-side-effects.js";

157157

import { runAgentHarnessBeforeAgentFinalizeHook } from "../../harness/lifecycle-hook-helpers.js";

158158

import { resolveHeartbeatPromptForSystemPrompt } from "../../heartbeat-system-prompt.js";

@@ -1003,7 +1003,7 @@ export async function runEmbeddedAttempt(

10031003

}

10041004

externalAbort = true;

10051005

const reason = getAbortReason(signal);

1006-

const timeout = reason ? isTimeoutError(reason) : false;

1006+

const timeout = reason ? isSignalTimeoutReason(reason) : false;

10071007

if (

10081008

shouldFlagCompactionTimeout({

10091009

isTimeout: timeout,

@@ -3651,7 +3651,7 @@ export async function runEmbeddedAttempt(

36513651

const onAbort = () => {

36523652

externalAbort = true;

36533653

const reason = params.abortSignal ? getAbortReason(params.abortSignal) : undefined;

3654-

const timeout = reason ? isTimeoutError(reason) : false;

3654+

const timeout = reason ? isSignalTimeoutReason(reason) : false;

36553655

if (

36563656

shouldFlagCompactionTimeout({

36573657

isTimeout: timeout,

Original file line numberDiff line numberDiff line change

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

1111

describeFailoverError,

1212

FailoverError,

1313

isNonProviderRuntimeCoordinationError,

14+

isSignalTimeoutReason,

1415

isTimeoutError,

1516

resolveFailoverReasonFromError,

1617

resolveFailoverStatus,

@@ -1349,3 +1350,34 @@ describe("buildFailoverRemediationHint", () => {

13491350

expect(buildFailoverRemediationHint("just a string")).toBeUndefined();

13501351

});

13511352

});

1353+
1354+

describe("isSignalTimeoutReason", () => {

1355+

it("returns false for plain AbortController.abort() DOMException (client disconnect)", () => {

1356+

// watchClientDisconnect calls abort() with no args, producing AbortError.

1357+

// This must not be classified as a run timeout (#90764).

1358+

const err = new DOMException("This operation was aborted", "AbortError");

1359+

expect(isSignalTimeoutReason(err)).toBe(false);

1360+

});

1361+
1362+

it("returns false for AbortError whose message matches ABORT_TIMEOUT_RE", () => {

1363+

// Old isTimeoutError returned true here via ABORT_TIMEOUT_RE (/request.*aborted/i).

1364+

const err = Object.assign(new Error("request aborted"), { name: "AbortError" });

1365+

expect(isSignalTimeoutReason(err)).toBe(false);

1366+

});

1367+
1368+

it("returns true for AbortSignal.timeout() DOMException", () => {

1369+

const err = new DOMException("signal timed out", "TimeoutError");

1370+

expect(isSignalTimeoutReason(err)).toBe(true);

1371+

});

1372+
1373+

it("returns true for makeTimeoutAbortReason()-style Error", () => {

1374+

// makeTimeoutAbortReason() in attempt.ts: Error("request timed out", name="TimeoutError")

1375+

const err = Object.assign(new Error("request timed out"), { name: "TimeoutError" });

1376+

expect(isSignalTimeoutReason(err)).toBe(true);

1377+

});

1378+
1379+

it("returns false for null and undefined", () => {

1380+

expect(isSignalTimeoutReason(null)).toBe(false);

1381+

expect(isSignalTimeoutReason(undefined)).toBe(false);

1382+

});

1383+

});

Original file line numberDiff line numberDiff line change

@@ -398,6 +398,11 @@ export function isTimeoutError(err: unknown): boolean {

398398

return hasTimeoutHint(cause) || hasTimeoutHint(reason);

399399

}

400400
401+

/** Return true when an abort-signal reason is an intentional timeout; plain AbortError is a cancellation, not a timeout. */

402+

export function isSignalTimeoutReason(reason: unknown): boolean {

403+

return readErrorName(reason) === "TimeoutError";

404+

}

405+
401406

function failoverReasonFromClassification(

402407

classification: FailoverClassification | null,

403408

): FailoverReason | null {