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

推荐订阅源

N
Netflix TechBlog - Medium
Spread Privacy
Spread Privacy
Cloudbric
Cloudbric
V
Vulnerabilities – Threatpost
博客园 - 叶小钗
I
Intezer
S
Secure Thoughts
Jina AI
Jina AI
T
Tenable Blog
博客园 - 【当耐特】
WordPress大学
WordPress大学
W
WeLiveSecurity
宝玉的分享
宝玉的分享
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Google DeepMind News
Google DeepMind News
Schneier on Security
Schneier on Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog RSS Feed
Martin Fowler
Martin Fowler
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Schneier on Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
IT之家
IT之家
小众软件
小众软件
P
Privacy & Cybersecurity Law Blog
V
Visual Studio Blog
S
Securelist
M
MIT News - Artificial intelligence
H
Help Net Security
Scott Helme
Scott Helme
N
News and Events Feed by Topic
SecWiki News
SecWiki News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园_首页
Microsoft Azure Blog
Microsoft Azure Blog
P
Proofpoint News Feed
博客园 - 司徒正美
Hugging Face - Blog
Hugging Face - Blog
The Cloudflare Blog
T
Tailwind CSS Blog
A
About on SuperTechFans
The Last Watchdog
The Last Watchdog
S
Security @ Cisco Blogs
大猫的无限游戏
大猫的无限游戏
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Apple Machine Learning Research
Apple Machine Learning Research
H
Heimdal Security Blog
T
The Blog of Author Tim Ferriss
Blog — PlanetScale
Blog — PlanetScale

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
test: clear gateway session utils broad matchers · openclaw/openclaw@ad79e0c
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -113,6 +113,38 @@ function buildBasicSessionTranscript(

113113

];

114114

}

115115116+

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

117+

expect(value, label).toBeTypeOf("object");

118+

expect(value, label).not.toBeNull();

119+

return value as Record<string, unknown>;

120+

}

121+122+

function expectMessageFields(

123+

message: unknown,

124+

fields: { role?: string; content?: unknown; openclaw?: Record<string, unknown> },

125+

) {

126+

const record = requireRecord(message, "message");

127+

if ("role" in fields) {

128+

expect(record.role).toBe(fields.role);

129+

}

130+

if ("content" in fields) {

131+

expect(record.content).toEqual(fields.content);

132+

}

133+

if (fields.openclaw) {

134+

const metadata = requireRecord(record.__openclaw, "message metadata");

135+

for (const [key, value] of Object.entries(fields.openclaw)) {

136+

expect(metadata[key]).toEqual(value);

137+

}

138+

}

139+

}

140+141+

function expectUsageFields(usage: unknown, fields: Record<string, unknown>) {

142+

const record = requireRecord(usage, "usage");

143+

for (const [key, value] of Object.entries(fields)) {

144+

expect(record[key]).toEqual(value);

145+

}

146+

}

147+116148

describe("readFirstUserMessageFromTranscript", () => {

117149

let tmpDir: string;

118150

let storePath: string;

@@ -598,18 +630,9 @@ describe("readSessionMessages", () => {

598630

maxBytes: 1024,

599631

});

600632601-

expect(out).toEqual([

602-

expect.objectContaining({

603-

role: "user",

604-

content: "recent",

605-

__openclaw: expect.objectContaining({ seq: 3 }),

606-

}),

607-

expect.objectContaining({

608-

role: "assistant",

609-

content: "latest",

610-

__openclaw: expect.objectContaining({ seq: 4 }),

611-

}),

612-

]);

633+

expect(out).toHaveLength(2);

634+

expectMessageFields(out[0], { role: "user", content: "recent", openclaw: { seq: 3 } });

635+

expectMessageFields(out[1], { role: "assistant", content: "latest", openclaw: { seq: 4 } });

613636

});

614637615638

test("bounds recent-message reads for large append-only transcripts", () => {

@@ -636,7 +659,7 @@ describe("readSessionMessages", () => {

636659

maxBytes: 64 * 1024,

637660

});

638661

expect(out).toHaveLength(1);

639-

expect(out[0]).toMatchObject({ role: "assistant", content: "tail" });

662+

expectMessageFields(out[0], { role: "assistant", content: "tail" });

640663

expect(readFileSpy).not.toHaveBeenCalled();

641664

} finally {

642665

readFileSpy.mockRestore();

@@ -659,16 +682,9 @@ describe("readSessionMessages", () => {

659682

});

660683661684

expect(result.totalMessages).toBe(4);

662-

expect(result.messages).toEqual([

663-

expect.objectContaining({

664-

content: "recent",

665-

__openclaw: expect.objectContaining({ seq: 3 }),

666-

}),

667-

expect.objectContaining({

668-

content: "latest",

669-

__openclaw: expect.objectContaining({ seq: 4 }),

670-

}),

671-

]);

685+

expect(result.messages).toHaveLength(2);

686+

expectMessageFields(result.messages[0], { content: "recent", openclaw: { seq: 3 } });

687+

expectMessageFields(result.messages[1], { content: "latest", openclaw: { seq: 4 } });

672688

});

673689674690

test("preserves real sequence metadata for async bounded recent-message reads", async () => {

@@ -694,16 +710,9 @@ describe("readSessionMessages", () => {

694710

);

695711696712

expect(result.totalMessages).toBe(4);

697-

expect(result.messages).toEqual([

698-

expect.objectContaining({

699-

content: "recent",

700-

__openclaw: expect.objectContaining({ seq: 3 }),

701-

}),

702-

expect.objectContaining({

703-

content: "latest",

704-

__openclaw: expect.objectContaining({ seq: 4 }),

705-

}),

706-

]);

713+

expect(result.messages).toHaveLength(2);

714+

expectMessageFields(result.messages[0], { content: "recent", openclaw: { seq: 3 } });

715+

expectMessageFields(result.messages[1], { content: "latest", openclaw: { seq: 4 } });

707716

expect(readFileSpy).not.toHaveBeenCalled();

708717

} finally {

709718

readFileSpy.mockRestore();

@@ -729,7 +738,8 @@ describe("readSessionMessages", () => {

729738

maxBytes: 2048,

730739

});

731740732-

expect(out).toEqual([expect.objectContaining({ role: "assistant", content: "tail" })]);

741+

expect(out).toHaveLength(1);

742+

expectMessageFields(out[0], { role: "assistant", content: "tail" });

733743

expect(JSON.stringify(out)).not.toContain("huge");

734744

expect(readFileSpy).not.toHaveBeenCalled();

735745

} finally {

@@ -772,7 +782,8 @@ describe("readSessionMessages", () => {

772782

maxBytes: 2048,

773783

});

774784775-

expect(out).toEqual([expect.objectContaining({ role: "assistant", content: "tail" })]);

785+

expect(out).toHaveLength(1);

786+

expectMessageFields(out[0], { role: "assistant", content: "tail" });

776787

expect(JSON.stringify(out)).not.toContain("huge");

777788

expect(readFileSpy).not.toHaveBeenCalled();

778789

expect(sessionManagerOpenSpy).not.toHaveBeenCalled();

@@ -865,9 +876,7 @@ describe("readSessionMessages", () => {

865876

"active branch",

866877

"latest active",

867878

]);

868-

expect(messages[2]).toMatchObject({

869-

__openclaw: expect.objectContaining({ id: "user-2", seq: 3 }),

870-

});

879+

expectMessageFields(messages[2], { openclaw: { id: "user-2", seq: 3 } });

871880

expect(sessionManagerOpenSpy).not.toHaveBeenCalled();

872881

expect(readFileSpy).not.toHaveBeenCalled();

873882

} finally {

@@ -935,7 +944,7 @@ describe("readSessionMessages", () => {

935944

maxBytes: 2048,

936945

});

937946

expect(messages).toHaveLength(1);

938-

expect(messages[0]).toMatchObject({ role: "user", content: "latest" });

947+

expectMessageFields(messages[0], { role: "user", content: "latest" });

939948

expect(JSON.stringify(messages)).not.toContain("older");

940949

expect(openSpy).toHaveBeenCalledTimes(1);

941950

} finally {

@@ -960,7 +969,7 @@ describe("readSessionMessages", () => {

960969

2048,

961970

);

962971963-

expect(usage).toMatchObject({

972+

expectUsageFields(usage, {

964973

inputTokens: 42,

965974

outputTokens: 7,

966975

});

@@ -989,8 +998,8 @@ describe("readSessionMessages", () => {

989998

2048,

990999

);

9911000992-

expect(aggregate).toMatchObject({ inputTokens: 120, outputTokens: 14 });

993-

expect(latest).toMatchObject({ inputTokens: 70, outputTokens: 9 });

1001+

expectUsageFields(aggregate, { inputTokens: 120, outputTokens: 14 });

1002+

expectUsageFields(latest, { inputTokens: 70, outputTokens: 9 });

9941003

});

99510049961005

test("tails transcript lines for manual compaction without loading the whole file", () => {

@@ -1078,18 +1087,13 @@ describe("readSessionMessages", () => {

10781087

try {

10791088

const out = readSessionMessages(sessionId, storePath, sessionFile);

10801089

expect(out).toHaveLength(2);

1081-

expect(out).toEqual([

1082-

expect.objectContaining({

1083-

role: "user",

1084-

content: "clean prompt",

1085-

__openclaw: expect.objectContaining({ seq: 1 }),

1086-

}),

1087-

expect.objectContaining({

1088-

role: "assistant",

1089-

content: [{ type: "text", text: "clean answer" }],

1090-

__openclaw: expect.objectContaining({ seq: 2 }),

1091-

}),

1092-

]);

1090+

expect(out).toHaveLength(2);

1091+

expectMessageFields(out[0], { role: "user", content: "clean prompt", openclaw: { seq: 1 } });

1092+

expectMessageFields(out[1], {

1093+

role: "assistant",

1094+

content: [{ type: "text", text: "clean answer" }],

1095+

openclaw: { seq: 2 },

1096+

});

10931097

expect(JSON.stringify(out)).not.toContain("original wrapped prompt");

10941098

expect(sessionManagerOpenSpy).not.toHaveBeenCalled();

10951099

} finally {

@@ -1150,7 +1154,7 @@ describe("readSessionMessages", () => {

1150115411511155

const out = readSessionMessages(sessionId, wrongStorePath, sessionFile);

11521156

expect(out).toHaveLength(1);

1153-

expect(out[0]).toMatchObject(message);

1157+

expectMessageFields(out[0], message);

11541158

expect((out[0] as { __openclaw?: { seq?: number } }).__openclaw?.seq).toBe(1);

11551159

},

11561160

);

@@ -1590,7 +1594,7 @@ describe("readLatestSessionUsageFromTranscript", () => {

15901594

]);

1591159515921596

const snapshot = readLatestSessionUsageFromTranscript(sessionId, storePath);

1593-

expect(snapshot).toMatchObject({

1597+

expectUsageFields(snapshot, {

15941598

modelProvider: "anthropic",

15951599

model: "claude-sonnet-4-6",

15961600

inputTokens: 4200,

@@ -1635,7 +1639,7 @@ describe("readLatestSessionUsageFromTranscript", () => {

1635163916361640

try {

16371641

const snapshot = await readLatestSessionUsageFromTranscriptAsync(sessionId, storePath);

1638-

expect(snapshot).toMatchObject({

1642+

expectUsageFields(snapshot, {

16391643

modelProvider: "anthropic",

16401644

model: "claude-sonnet-4-6",

16411645

inputTokens: 4200,

@@ -1686,7 +1690,7 @@ describe("readLatestSessionUsageFromTranscript", () => {

16861690

]);

1687169116881692

const snapshot = readLatestSessionUsageFromTranscript(sessionId, storePath);

1689-

expect(snapshot).toMatchObject({

1693+

expectUsageFields(snapshot, {

16901694

modelProvider: "openai",

16911695

model: "gpt-5.4",

16921696

inputTokens: 1500,

@@ -1725,15 +1729,16 @@ describe("readLatestSessionUsageFromTranscript", () => {

17251729

const readFileSpy = vi.spyOn(fs, "readFileSync");

1726173017271731

try {

1728-

expect(

1732+

expectUsageFields(

17291733

readRecentSessionUsageFromTranscript(sessionId, storePath, undefined, undefined, 64 * 1024),

1730-

).toMatchObject({

1731-

modelProvider: "openai",

1732-

model: "gpt-5.4",

1733-

inputTokens: 900,

1734-

outputTokens: 100,

1735-

totalTokens: 900,

1736-

});

1734+

{

1735+

modelProvider: "openai",

1736+

model: "gpt-5.4",

1737+

inputTokens: 900,

1738+

outputTokens: 100,

1739+

totalTokens: 900,

1740+

},

1741+

);

17371742

expect(readFileSpy).not.toHaveBeenCalled();

17381743

} finally {

17391744

readFileSpy.mockRestore();

@@ -1806,7 +1811,7 @@ describe("resolveSessionTranscriptCandidates safety", () => {

18061811

const normalizedCandidates = candidates.map((value) => path.resolve(value));

18071812

const expectedFallback = path.resolve(path.dirname(storePath), "sess-safe.jsonl");

180818131809-

expect(candidates).not.toEqual(expect.arrayContaining([expect.stringContaining("etc/passwd")]));

1814+

expect(candidates.every((candidate) => !candidate.includes("etc/passwd"))).toBe(true);

18101815

expect(normalizedCandidates).toContain(expectedFallback);

18111816

});

18121817

@@ -2056,7 +2061,7 @@ describe("oversized transcript line guards", () => {

20562061

512 * 1024,

20572062

);

205820632059-

expect(usage).toMatchObject({ modelProvider: "test-provider" });

2064+

expectUsageFields(usage, { modelProvider: "test-provider" });

20602065

});

2061206620622067

test("readSessionTitleFieldsFromTranscriptAsync delegates to bounded sync reader", async () => {