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

推荐订阅源

月光博客
月光博客
小众软件
小众软件
爱范儿
爱范儿
Y
Y Combinator Blog
博客园 - Franky
美团技术团队
博客园 - 【当耐特】
The Cloudflare Blog
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
IT之家
IT之家
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
WordPress大学
WordPress大学
V
Visual Studio Blog
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
有赞技术团队
有赞技术团队

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(gateway): avoid duplicate v4 deltas · openclaw/opencl...
steipete · 2026-05-13 · via Recent Commits to openclaw:main

@@ -773,6 +773,40 @@ describe("agent event handler", () => {

773773

nowSpy.mockRestore();

774774

});

775775776+

it("does not emit a delta when a repeated assistant snapshot is unchanged", () => {

777+

let now = 11_250;

778+

const nowSpy = vi.spyOn(Date, "now").mockImplementation(() => now);

779+

const { broadcast, nodeSendToSession, chatRunState, handler } = createHarness();

780+

chatRunState.registry.add("run-unchanged-snapshot", {

781+

sessionKey: "session-unchanged-snapshot",

782+

clientRunId: "client-unchanged-snapshot",

783+

});

784+785+

handler({

786+

runId: "run-unchanged-snapshot",

787+

seq: 1,

788+

stream: "assistant",

789+

ts: Date.now(),

790+

data: { text: "Hello world" },

791+

});

792+793+

now = 11_450;

794+

handler({

795+

runId: "run-unchanged-snapshot",

796+

seq: 2,

797+

stream: "assistant",

798+

ts: Date.now(),

799+

data: { text: "Hello world" },

800+

});

801+802+

const chatCalls = chatBroadcastCalls(broadcast);

803+

expect(chatCalls).toHaveLength(1);

804+

const payload = chatCalls[0]?.[1] as { deltaText?: string };

805+

expect(payload.deltaText).toBe("Hello world");

806+

expect(sessionChatCalls(nodeSendToSession)).toHaveLength(1);

807+

nowSpy.mockRestore();

808+

});

809+776810

it("marks non-prefix replacement deltas explicitly", () => {

777811

let now = 11_300;

778812

const nowSpy = vi.spyOn(Date, "now").mockImplementation(() => now);

@@ -815,6 +849,51 @@ describe("agent event handler", () => {

815849

nowSpy.mockRestore();

816850

});

817851852+

it("flushes throttled shorter replacement deltas before final", () => {

853+

let now = 11_700;

854+

const nowSpy = vi.spyOn(Date, "now").mockImplementation(() => now);

855+

const { broadcast, nodeSendToSession, chatRunState, handler } = createHarness();

856+

chatRunState.registry.add("run-short-replacement-flush", {

857+

sessionKey: "session-short-replacement-flush",

858+

clientRunId: "client-short-replacement-flush",

859+

});

860+861+

handler({

862+

runId: "run-short-replacement-flush",

863+

seq: 1,

864+

stream: "assistant",

865+

ts: Date.now(),

866+

data: { text: "Hello world" },

867+

});

868+869+

now = 11_760;

870+

handler({

871+

runId: "run-short-replacement-flush",

872+

seq: 2,

873+

stream: "assistant",

874+

ts: Date.now(),

875+

data: { text: "Hi" },

876+

});

877+878+

emitLifecycleEnd(handler, "run-short-replacement-flush", 3);

879+880+

const chatCalls = chatBroadcastCalls(broadcast);

881+

expect(chatCalls).toHaveLength(3);

882+

const replacementPayload = chatCalls[1]?.[1] as {

883+

state?: string;

884+

deltaText?: string;

885+

replace?: boolean;

886+

message?: { content?: Array<{ text?: string }> };

887+

};

888+

expect(replacementPayload.state).toBe("delta");

889+

expect(replacementPayload.deltaText).toBe("Hi");

890+

expect(replacementPayload.replace).toBe(true);

891+

expect(replacementPayload.message?.content?.[0]?.text).toBe("Hi");

892+

expect((chatCalls[2]?.[1] as { state?: string }).state).toBe("final");

893+

expect(sessionChatCalls(nodeSendToSession)).toHaveLength(3);

894+

nowSpy.mockRestore();

895+

});

896+818897

it("cleans up agent run sequence tracking when lifecycle completes", () => {

819898

const { agentRunSeq, chatRunState, handler, nowSpy } = createHarness({ now: 2_500 });

820899

chatRunState.registry.add("run-cleanup", {