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

推荐订阅源

博客园 - 司徒正美
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
test: dedupe compaction safeguard mock reads · openclaw/o...
steipete · 2026-05-13 · via Recent Commits to openclaw:main

@@ -213,6 +213,13 @@ function mockCallArg(

213213

return call[argIndex];

214214

}

215215216+

function latestMockCallArg(

217+

mock: { mock: { calls: ReadonlyArray<ReadonlyArray<unknown>> } },

218+

argIndex = 0,

219+

): unknown {

220+

return mockCallArg(mock, mock.mock.calls.length - 1, argIndex);

221+

}

222+216223

function requireRecord(value: unknown): Record<string, unknown> {

217224

if (!value || typeof value !== "object") {

218225

throw new Error("expected record");

@@ -1416,13 +1423,15 @@ describe("compaction-safeguard recent-turn preservation", () => {

14161423

const result = (await compactionHandler(event, mockContext)) as { cancel?: boolean };

1417142414181425

expect(result.cancel).not.toBe(true);

1419-

const summaryCall = mockSummarizeInStages.mock.calls.at(-1)?.[0];

1420-

expect(summaryCall?.headers?.["Copilot-Integration-Id"]).toBe("vscode-chat");

1421-

expect(summaryCall?.headers?.["Editor-Plugin-Version"]).toBe("copilot-chat/0.35.0");

1422-

expect(summaryCall?.headers?.["Openai-Organization"]).toBe("github-copilot");

1423-

expect(summaryCall?.headers?.["User-Agent"]).toBe("GitHubCopilotChat/0.26.7");

1424-

expect(summaryCall?.headers?.["X-Test"]).toBe("1");

1425-

expect(summaryCall?.headers?.["x-initiator"]).toBe("user");

1426+

const summaryCall = latestMockCallArg(mockSummarizeInStages) as {

1427+

headers?: Record<string, string>;

1428+

};

1429+

expect(summaryCall.headers?.["Copilot-Integration-Id"]).toBe("vscode-chat");

1430+

expect(summaryCall.headers?.["Editor-Plugin-Version"]).toBe("copilot-chat/0.35.0");

1431+

expect(summaryCall.headers?.["Openai-Organization"]).toBe("github-copilot");

1432+

expect(summaryCall.headers?.["User-Agent"]).toBe("GitHubCopilotChat/0.26.7");

1433+

expect(summaryCall.headers?.["X-Test"]).toBe("1");

1434+

expect(summaryCall.headers?.["x-initiator"]).toBe("user");

14261435

});

1427143614281437

it("does not retry summaries unless quality guard is explicitly enabled", async () => {

@@ -1565,9 +1574,11 @@ describe("compaction-safeguard recent-turn preservation", () => {

1565157415661575

expect(result.cancel).not.toBe(true);

15671576

expect(mockSummarizeInStages).toHaveBeenCalledTimes(2);

1568-

const secondCall = mockSummarizeInStages.mock.calls.at(1)?.[0];

1569-

expect(secondCall?.customInstructions).toContain("Quality check feedback");

1570-

expect(secondCall?.customInstructions).toContain("missing_section:## Decisions");

1577+

const secondCall = mockCallArg(mockSummarizeInStages, 1) as {

1578+

customInstructions?: string;

1579+

};

1580+

expect(secondCall.customInstructions).toContain("Quality check feedback");

1581+

expect(secondCall.customInstructions).toContain("missing_section:## Decisions");

15711582

});

1572158315731584

it("does not treat preserved latest asks as satisfying overlap checks", async () => {

@@ -1652,8 +1663,10 @@ describe("compaction-safeguard recent-turn preservation", () => {

1652166316531664

expect(result.cancel).not.toBe(true);

16541665

expect(mockSummarizeInStages).toHaveBeenCalledTimes(2);

1655-

const secondCall = mockSummarizeInStages.mock.calls.at(1)?.[0];

1656-

expect(secondCall?.customInstructions).toContain("latest_user_ask_not_reflected");

1666+

const secondCall = mockCallArg(mockSummarizeInStages, 1) as {

1667+

customInstructions?: string;

1668+

};

1669+

expect(secondCall.customInstructions).toContain("latest_user_ask_not_reflected");

16571670

});

1658167116591672

it("preserves split-turn and recent-turn suffixes when retry fallback is capped", async () => {