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

推荐订阅源

J
Java Code Geeks
Stack Overflow Blog
Stack Overflow Blog
B
Blog RSS Feed
C
Check Point Blog
D
Docker
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
博客园_首页
Apple Machine Learning Research
Apple Machine Learning Research
量子位
有赞技术团队
有赞技术团队
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
M
MIT News - Artificial intelligence
B
Blog
阮一峰的网络日志
阮一峰的网络日志
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
腾讯CDC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
月光博客
月光博客

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
chore(deadcode): remove stale runtime query helpers · ope...
vincentkoc · 2026-06-20 · via Recent Commits to openclaw:main

@@ -13,8 +13,9 @@ import { resolveGroupRequireMention } from "./reply/groups.js";

1313

import { finalizeInboundContext } from "./reply/inbound-context.js";

1414

import {

1515

buildInboundDedupeKey,

16+

claimInboundDedupe,

17+

commitInboundDedupe,

1618

resetInboundDedupe,

17-

shouldSkipDuplicateInbound,

1819

} from "./reply/inbound-dedupe.js";

1920

import { normalizeInboundTextNewlines, sanitizeInboundSystemTags } from "./reply/inbound-text.js";

2021

import {

@@ -34,6 +35,16 @@ type TestChannelGroupContext = {

3435

accountId?: string | null;

3536

};

363738+

function commitInboundForTest(ctx: MsgContext): string {

39+

const claim = claimInboundDedupe(ctx);

40+

expect(claim.status).toBe("claimed");

41+

if (claim.status !== "claimed") {

42+

throw new Error(`expected inbound dedupe claim, got ${claim.status}`);

43+

}

44+

commitInboundDedupe(claim.key);

45+

return claim.key;

46+

}

47+3748

function normalizeTestSlug(raw?: string | null): string {

3849

return raw?.trim().replace(/^#/, "").toLowerCase() ?? "";

3950

}

@@ -426,8 +437,8 @@ describe("inbound dedupe", () => {

426437

OriginatingTo: "whatsapp:+1555",

427438

MessageSid: "msg-1",

428439

};

429-

expect(shouldSkipDuplicateInbound(ctx, { now: 100 })).toBe(false);

430-

expect(shouldSkipDuplicateInbound(ctx, { now: 200 })).toBe(true);

440+

const key = commitInboundForTest(ctx);

441+

expect(claimInboundDedupe(ctx)).toEqual({ status: "duplicate", key });

431442

});

432443433444

it("does not dedupe when the peer changes", () => {

@@ -437,12 +448,8 @@ describe("inbound dedupe", () => {

437448

OriginatingChannel: "whatsapp",

438449

MessageSid: "msg-1",

439450

};

440-

expect(

441-

shouldSkipDuplicateInbound({ ...base, OriginatingTo: "whatsapp:+1000" }, { now: 100 }),

442-

).toBe(false);

443-

expect(

444-

shouldSkipDuplicateInbound({ ...base, OriginatingTo: "whatsapp:+2000" }, { now: 200 }),

445-

).toBe(false);

451+

commitInboundForTest({ ...base, OriginatingTo: "whatsapp:+1000" });

452+

expect(claimInboundDedupe({ ...base, OriginatingTo: "whatsapp:+2000" }).status).toBe("claimed");

446453

});

447454448455

it("does not dedupe across agent ids", () => {

@@ -453,20 +460,14 @@ describe("inbound dedupe", () => {

453460

OriginatingTo: "whatsapp:+1555",

454461

MessageSid: "msg-1",

455462

};

463+

const alphaKey = commitInboundForTest({ ...base, SessionKey: "agent:alpha:main" });

456464

expect(

457-

shouldSkipDuplicateInbound({ ...base, SessionKey: "agent:alpha:main" }, { now: 100 }),

458-

).toBe(false);

459-

expect(

460-

shouldSkipDuplicateInbound(

461-

{ ...base, SessionKey: "agent:bravo:whatsapp:direct:+1555" },

462-

{

463-

now: 200,

464-

},

465-

),

466-

).toBe(false);

467-

expect(

468-

shouldSkipDuplicateInbound({ ...base, SessionKey: "agent:alpha:main" }, { now: 300 }),

469-

).toBe(true);

465+

claimInboundDedupe({ ...base, SessionKey: "agent:bravo:whatsapp:direct:+1555" }).status,

466+

).toBe("claimed");

467+

expect(claimInboundDedupe({ ...base, SessionKey: "agent:alpha:main" })).toEqual({

468+

status: "duplicate",

469+

key: alphaKey,

470+

});

470471

});

471472472473

it("dedupes when the same agent sees the same inbound message under different session keys", () => {

@@ -477,15 +478,10 @@ describe("inbound dedupe", () => {

477478

OriginatingTo: "telegram:7463849194",

478479

MessageSid: "msg-1",

479480

};

481+

const key = commitInboundForTest({ ...base, SessionKey: "agent:main:main" });

480482

expect(

481-

shouldSkipDuplicateInbound({ ...base, SessionKey: "agent:main:main" }, { now: 100 }),

482-

).toBe(false);

483-

expect(

484-

shouldSkipDuplicateInbound(

485-

{ ...base, SessionKey: "agent:main:telegram:direct:7463849194" },

486-

{ now: 200 },

487-

),

488-

).toBe(true);

483+

claimInboundDedupe({ ...base, SessionKey: "agent:main:telegram:direct:7463849194" }),

484+

).toEqual({ status: "duplicate", key });

489485

});

490486

});

491487