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

推荐订阅源

B
Blog
V
Vulnerabilities – Threatpost
Apple Machine Learning Research
Apple Machine Learning Research
V
V2EX
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
人人都是产品经理
人人都是产品经理
Latest news
Latest news
博客园 - 三生石上(FineUI控件)
美团技术团队
aimingoo的专栏
aimingoo的专栏
Google Online Security Blog
Google Online Security Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
T
Threatpost
Y
Y Combinator Blog
T
Tailwind CSS Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
A
Arctic Wolf
C
Cyber Attacks, Cyber Crime and Cyber Security
小众软件
小众软件
Recent Commits to openclaw:main
Recent Commits to openclaw:main
T
Tenable Blog
W
WeLiveSecurity
L
LINUX DO - 热门话题
D
Docker
Cyberwarzone
Cyberwarzone
量子位
A
About on SuperTechFans
The Last Watchdog
The Last Watchdog
雷峰网
雷峰网
C
CERT Recently Published Vulnerability Notes
P
Palo Alto Networks Blog
The Hacker News
The Hacker News
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
F
Full Disclosure
The Cloudflare Blog
T
The Blog of Author Tim Ferriss
T
The Exploit Database - CXSecurity.com
Engineering at Meta
Engineering at Meta
O
OpenAI News
Hacker News - Newest:
Hacker News - Newest: "LLM"
Scott Helme
Scott Helme
IT之家
IT之家
S
Secure Thoughts
MongoDB | Blog
MongoDB | Blog
L
Lohrmann on Cybersecurity
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News

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
fix: surface stalled telegram ingress backlog · openclaw/openclaw@25a8f5f
steipete · 2026-05-16 · via Recent Commits to openclaw:main

@@ -71,6 +71,12 @@ type DrainPendingDeliveriesCall = {

7171

now: number,

7272

) => { match: boolean; bypassBackoff: boolean };

7373

};

74+

type WorkerPollSuccessListener = (message: {

75+

type: "poll-success";

76+

offset: null;

77+

count: number;

78+

finishedAt: number;

79+

}) => void;

7480

type AsyncVoidFn = () => Promise<void>;

7581

type MockCallSource = { mock: { calls: Array<Array<unknown>> } };

7682

@@ -882,6 +888,309 @@ describe("TelegramPollingSession", () => {

882888

}

883889

});

884890891+

it("keeps active spooled lanes blocked across isolated ingress restarts", async () => {

892+

vi.useFakeTimers({ shouldAdvanceTime: true });

893+

const abort = new AbortController();

894+

const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-telegram-spool-"));

895+

let releaseRegularTurn: (() => void) | undefined;

896+

const regularTurnDone = new Promise<void>((resolve) => {

897+

releaseRegularTurn = resolve;

898+

});

899+

const handleUpdate = vi.fn(async () => {

900+

await regularTurnDone;

901+

});

902+

createTelegramBotMock.mockImplementation(() => ({

903+

api: {

904+

deleteWebhook: vi.fn(async () => true),

905+

config: { use: vi.fn() },

906+

},

907+

init: vi.fn(async () => undefined),

908+

handleUpdate,

909+

stop: vi.fn(async () => undefined),

910+

}));

911+

await writeTelegramSpooledUpdate({

912+

spoolDir: tempDir,

913+

update: {

914+

update_id: 42,

915+

message: { text: "summarize this", chat: { id: -100, type: "supergroup" } },

916+

},

917+

});

918+919+

let workerTaskCalls = 0;

920+

let stopWorker: (() => void) | undefined;

921+

const workerDone = new Promise<void>((resolve) => {

922+

stopWorker = resolve;

923+

});

924+

const createWorker = vi.fn(() => ({

925+

onMessage: vi.fn(() => () => undefined),

926+

stop: vi.fn(async () => {

927+

stopWorker?.();

928+

}),

929+

task: vi.fn(async () => {

930+

workerTaskCalls += 1;

931+

if (workerTaskCalls === 1) {

932+

return;

933+

}

934+

await workerDone;

935+

}),

936+

}));

937+938+

try {

939+

const session = createPollingSession({

940+

abortSignal: abort.signal,

941+

isolatedIngress: {

942+

enabled: true,

943+

spoolDir: tempDir,

944+

createWorker,

945+

drainIntervalMs: 100,

946+

},

947+

});

948+949+

const runPromise = session.runUntilAbort();

950+

await vi.waitFor(() => expect(handleUpdate).toHaveBeenCalledTimes(1));

951+

await vi.advanceTimersByTimeAsync(16_000);

952+

await vi.waitFor(() => expect(createWorker).toHaveBeenCalledTimes(2));

953+

expect(handleUpdate).toHaveBeenCalledTimes(1);

954+955+

releaseRegularTurn?.();

956+

await vi.advanceTimersByTimeAsync(1_000);

957+

await vi.waitFor(async () =>

958+

expect(

959+

(await listTelegramSpooledUpdates({ spoolDir: tempDir })).map(

960+

(update) => update.updateId,

961+

),

962+

).toEqual([]),

963+

);

964+

abort.abort();

965+

await vi.advanceTimersByTimeAsync(20_000);

966+

await runPromise;

967+

} finally {

968+

releaseRegularTurn?.();

969+

vi.useRealTimers();

970+

await fs.rm(tempDir, { recursive: true, force: true });

971+

}

972+

});

973+974+

it("keeps active spooled lanes blocked across account restarts", async () => {

975+

vi.useFakeTimers({ shouldAdvanceTime: true });

976+

const firstAbort = new AbortController();

977+

const secondAbort = new AbortController();

978+

const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-telegram-spool-"));

979+

let releaseRegularTurn: (() => void) | undefined;

980+

const regularTurnDone = new Promise<void>((resolve) => {

981+

releaseRegularTurn = resolve;

982+

});

983+

const handleUpdate = vi.fn(async () => {

984+

await regularTurnDone;

985+

});

986+

createTelegramBotMock.mockImplementation(() => ({

987+

api: {

988+

deleteWebhook: vi.fn(async () => true),

989+

config: { use: vi.fn() },

990+

},

991+

init: vi.fn(async () => undefined),

992+

handleUpdate,

993+

stop: vi.fn(async () => undefined),

994+

}));

995+

await writeTelegramSpooledUpdate({

996+

spoolDir: tempDir,

997+

update: {

998+

update_id: 42,

999+

message: { text: "summarize this", chat: { id: -100, type: "supergroup" } },

1000+

},

1001+

});

1002+1003+

const createWorker = vi.fn(() => {

1004+

let stopWorker: (() => void) | undefined;

1005+

const workerDone = new Promise<void>((resolve) => {

1006+

stopWorker = resolve;

1007+

});

1008+

return {

1009+

onMessage: vi.fn(() => () => undefined),

1010+

stop: vi.fn(async () => {

1011+

stopWorker?.();

1012+

}),

1013+

task: vi.fn(async () => {

1014+

await workerDone;

1015+

}),

1016+

};

1017+

});

1018+1019+

try {

1020+

const firstSession = createPollingSession({

1021+

abortSignal: firstAbort.signal,

1022+

isolatedIngress: {

1023+

enabled: true,

1024+

spoolDir: tempDir,

1025+

createWorker,

1026+

drainIntervalMs: 100,

1027+

},

1028+

});

1029+1030+

const firstRunPromise = firstSession.runUntilAbort();

1031+

await vi.waitFor(() => expect(handleUpdate).toHaveBeenCalledTimes(1));

1032+

firstAbort.abort();

1033+

await vi.advanceTimersByTimeAsync(16_000);

1034+

await firstRunPromise;

1035+1036+

const secondSession = createPollingSession({

1037+

abortSignal: secondAbort.signal,

1038+

isolatedIngress: {

1039+

enabled: true,

1040+

spoolDir: tempDir,

1041+

createWorker,

1042+

drainIntervalMs: 100,

1043+

},

1044+

});

1045+

const secondRunPromise = secondSession.runUntilAbort();

1046+

await vi.waitFor(() => expect(createWorker).toHaveBeenCalledTimes(2));

1047+

await vi.advanceTimersByTimeAsync(1_000);

1048+

expect(handleUpdate).toHaveBeenCalledTimes(1);

1049+1050+

releaseRegularTurn?.();

1051+

await vi.advanceTimersByTimeAsync(1_000);

1052+

await vi.waitFor(async () =>

1053+

expect(

1054+

(await listTelegramSpooledUpdates({ spoolDir: tempDir })).map(

1055+

(update) => update.updateId,

1056+

),

1057+

).toEqual([]),

1058+

);

1059+

secondAbort.abort();

1060+

await vi.advanceTimersByTimeAsync(20_000);

1061+

await secondRunPromise;

1062+

} finally {

1063+

releaseRegularTurn?.();

1064+

vi.useRealTimers();

1065+

await fs.rm(tempDir, { recursive: true, force: true });

1066+

}

1067+

});

1068+1069+

it("marks isolated ingress unhealthy when a spooled backlog wedges while polling stays live", async () => {

1070+

vi.useFakeTimers({ shouldAdvanceTime: true });

1071+

const abort = new AbortController();

1072+

const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-telegram-spool-"));

1073+

const log = vi.fn();

1074+

const setStatus = vi.fn();

1075+

let releaseRegularTurn: (() => void) | undefined;

1076+

const regularTurnDone = new Promise<void>((resolve) => {

1077+

releaseRegularTurn = resolve;

1078+

});

1079+

const handleUpdate = vi.fn(async () => {

1080+

await regularTurnDone;

1081+

});

1082+

createTelegramBotMock.mockImplementation(() => ({

1083+

api: {

1084+

deleteWebhook: vi.fn(async () => true),

1085+

config: { use: vi.fn() },

1086+

},

1087+

init: vi.fn(async () => undefined),

1088+

handleUpdate,

1089+

stop: vi.fn(async () => undefined),

1090+

}));

1091+

for (const updateId of [42, 43]) {

1092+

await writeTelegramSpooledUpdate({

1093+

spoolDir: tempDir,

1094+

update: {

1095+

update_id: updateId,

1096+

message: { text: `dm ${updateId}`, chat: { id: 123, type: "private" } },

1097+

},

1098+

});

1099+

}

1100+1101+

const workerListeners: WorkerPollSuccessListener[] = [];

1102+

const createWorker = vi.fn(() => {

1103+

let stopWorker: (() => void) | undefined;

1104+

const workerDone = new Promise<void>((resolve) => {

1105+

stopWorker = resolve;

1106+

});

1107+

return {

1108+

onMessage: vi.fn((listener: WorkerPollSuccessListener) => {

1109+

workerListeners.push(listener);

1110+

return () => undefined;

1111+

}),

1112+

stop: vi.fn(async () => {

1113+

stopWorker?.();

1114+

}),

1115+

task: vi.fn(async () => {

1116+

await workerDone;

1117+

}),

1118+

};

1119+

});

1120+1121+

try {

1122+

const session = createPollingSession({

1123+

abortSignal: abort.signal,

1124+

log,

1125+

setStatus,

1126+

isolatedIngress: {

1127+

enabled: true,

1128+

spoolDir: tempDir,

1129+

createWorker,

1130+

drainIntervalMs: 100,

1131+

},

1132+

});

1133+1134+

const runPromise = session.runUntilAbort();

1135+

await vi.waitFor(() => expect(handleUpdate).toHaveBeenCalledTimes(1));

1136+

workerListeners[0]?.({

1137+

type: "poll-success",

1138+

offset: null,

1139+

count: 0,

1140+

finishedAt: Date.now(),

1141+

});

1142+

expect(statusPatches(setStatus).some((patch) => patch.connected === true)).toBe(true);

1143+1144+

await vi.advanceTimersByTimeAsync(25 * 60_000 + 100);

1145+1146+

await vi.waitFor(() =>

1147+

expect(log).toHaveBeenCalledWith(

1148+

expect.stringContaining("isolated polling spool backlog stalled"),

1149+

),

1150+

);

1151+

expect(

1152+

statusPatches(setStatus).some(

1153+

(patch) =>

1154+

patch.connected === false &&

1155+

String(patch.lastError).includes("isolated polling spool backlog stalled"),

1156+

),

1157+

).toBe(true);

1158+

workerListeners[0]?.({

1159+

type: "poll-success",

1160+

offset: null,

1161+

count: 0,

1162+

finishedAt: Date.now(),

1163+

});

1164+

expect(statusPatches(setStatus).at(-1)?.connected).toBe(false);

1165+1166+

releaseRegularTurn?.();

1167+

await vi.advanceTimersByTimeAsync(1_000);

1168+

await vi.waitFor(async () =>

1169+

expect(

1170+

(await listTelegramSpooledUpdates({ spoolDir: tempDir })).map(

1171+

(update) => update.updateId,

1172+

),

1173+

).toEqual([]),

1174+

);

1175+

workerListeners[0]?.({

1176+

type: "poll-success",

1177+

offset: null,

1178+

count: 0,

1179+

finishedAt: Date.now(),

1180+

});

1181+

await vi.waitFor(() => expect(statusPatches(setStatus).at(-1)?.connected).toBe(true));

1182+

expect(createWorker).toHaveBeenCalledTimes(1);

1183+1184+

abort.abort();

1185+

await vi.advanceTimersByTimeAsync(20_000);

1186+

await runPromise;

1187+

} finally {

1188+

releaseRegularTurn?.();

1189+

vi.useRealTimers();

1190+

await fs.rm(tempDir, { recursive: true, force: true });

1191+

}

1192+

});

1193+8851194

it("forces a restart when polling stalls without getUpdates activity", async () => {

8861195

const abort = new AbortController();

8871196

const botStop = vi.fn(async () => undefined);