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

推荐订阅源

Martin Fowler
Martin Fowler
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
博客园_首页
宝玉的分享
宝玉的分享
S
SegmentFault 最新的问题
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
美团技术团队
IT之家
IT之家
罗磊的独立博客
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
月光博客
月光博客
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI
博客园 - 叶小钗
M
MIT News - Artificial intelligence
B
Blog RSS Feed
有赞技术团队
有赞技术团队
Y
Y Combinator 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
test: stabilize block reply abort timers · openclaw/openc...
steipete · 2026-05-30 · via Recent Commits to openclaw:main
1-

import { describe, expect, it } from "vitest";

1+

import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

22

import { setReplyPayloadMetadata } from "../reply-payload.js";

33

import {

44

createBlockReplyContentKey,

@@ -15,6 +15,14 @@ const waitForAbort = (signal: AbortSignal | undefined): Promise<void> =>

1515

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

1616

});

171718+

beforeEach(() => {

19+

vi.useRealTimers();

20+

});

21+22+

afterEach(() => {

23+

vi.useRealTimers();

24+

});

25+1826

describe("createBlockReplyPayloadKey", () => {

1927

it("produces different keys for payloads differing only by replyToId", () => {

2028

const a = createBlockReplyPayloadKey({ text: "hello world", replyToId: "post-1" });

@@ -284,6 +292,8 @@ describe("createBlockReplyPipeline dedup with threading", () => {

284292285293

describe("createBlockReplyPipeline content coverage dedup", () => {

286294

it("matches final assembled text to successfully streamed text chunks after abort", async () => {

295+

vi.useFakeTimers();

296+287297

let callCount = 0;

288298

const pipeline = createBlockReplyPipeline({

289299

onBlockReply: async (_payload, options) => {

@@ -298,14 +308,18 @@ describe("createBlockReplyPipeline content coverage dedup", () => {

298308

pipeline.enqueue({ text: "First paragraph." });

299309

pipeline.enqueue({ text: "Second paragraph." });

300310

pipeline.enqueue({ text: "Third paragraph." });

301-

await pipeline.flush({ force: true });

311+

const flushing = pipeline.flush({ force: true });

312+

await vi.advanceTimersByTimeAsync(1);

313+

await flushing;

302314303315

expect(pipeline.didStream()).toBe(true);

304316

expect(pipeline.isAborted()).toBe(true);

305317

expect(pipeline.hasSentPayload({ text: "First paragraph.\n\nSecond paragraph." })).toBe(true);

306318

});

307319308320

it("does not match final assembled text with content that was not streamed", async () => {

321+

vi.useFakeTimers();

322+309323

let callCount = 0;

310324

const pipeline = createBlockReplyPipeline({

311325

onBlockReply: async (_payload, options) => {

@@ -319,7 +333,9 @@ describe("createBlockReplyPipeline content coverage dedup", () => {

319333320334

pipeline.enqueue({ text: "First paragraph." });

321335

pipeline.enqueue({ text: "Second paragraph." });

322-

await pipeline.flush({ force: true });

336+

const flushing = pipeline.flush({ force: true });

337+

await vi.advanceTimersByTimeAsync(1);

338+

await flushing;

323339324340

expect(pipeline.didStream()).toBe(true);

325341

expect(pipeline.isAborted()).toBe(true);