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

推荐订阅源

Recent Announcements
Recent Announcements
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Martin Fowler
Martin Fowler
The Cloudflare Blog
The Register - Security
The Register - Security
WordPress大学
WordPress大学
量子位
Vercel News
Vercel News
C
Check Point Blog
V
Visual Studio Blog
Microsoft Azure Blog
Microsoft Azure Blog
J
Java Code Geeks
B
Blog RSS Feed
Stack Overflow Blog
Stack Overflow Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
Apple Machine Learning Research
Apple Machine Learning Research
PCI Perspectives
PCI Perspectives
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
Schneier on Security
Schneier on Security
O
OpenAI News
M
MIT News - Artificial intelligence
S
Secure Thoughts
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Security Affairs
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
小众软件
小众软件
MongoDB | Blog
MongoDB | Blog
云风的 BLOG
云风的 BLOG
N
News and Events Feed by Topic
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
Recorded Future
Recorded Future
S
Security @ Cisco Blogs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cyber Attacks, Cyber Crime and Cyber Security
GbyAI
GbyAI
L
LINUX DO - 最新话题
The Last Watchdog
The Last Watchdog
C
CERT Recently Published Vulnerability Notes
aimingoo的专栏
aimingoo的专栏
V
V2EX
博客园 - 【当耐特】
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
阮一峰的网络日志
阮一峰的网络日志

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
docs: document embedded runner compaction tests · openclaw/openclaw@315cdd4
steipete · 2026-06-05 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -1,10 +1,13 @@

1+

// Compatibility coverage for embedded runner barrel exports and runtime ids.

12

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

23

import { normalizeEmbeddedAgentRuntime } from "../agent-runtime-id.js";

34

import * as embeddedAgentRunner from "../embedded-agent-runner.js";

45

import * as embeddedAgent from "../embedded-agent.js";

56
67

describe("embedded runner compatibility aliases", () => {

78

it("keeps the embedded-agent barrel bound to the runner implementation", () => {

9+

// Shipped imports still reach the runner through the embedded-agent barrel;

10+

// keep these aliases exact so consumers do not fork stateful implementations.

811

expect(embeddedAgent.runEmbeddedAgent).toBe(embeddedAgentRunner.runEmbeddedAgent);

912

expect(embeddedAgent.compactEmbeddedAgentSession).toBe(

1013

embeddedAgentRunner.compactEmbeddedAgentSession,

@@ -13,6 +16,8 @@ describe("embedded runner compatibility aliases", () => {

1316

});

1417
1518

it("normalizes shipped runtime aliases", () => {

19+

// These aliases appear in persisted/runtime-facing config and must resolve

20+

// before model/provider dispatch observes the runtime id.

1621

expect(normalizeEmbeddedAgentRuntime("pi")).toBe("openclaw");

1722

expect(normalizeEmbeddedAgentRuntime("codex-app-server")).toBe("codex");

1823

});

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Cache-TTL eligibility coverage for native and provider-routed model families.

12

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

23
34

vi.mock("../../plugins/provider-runtime.js", async () => {

@@ -9,6 +10,8 @@ vi.mock("../../plugins/provider-runtime.js", async () => {

910

resolveProviderCacheTtlEligibility: (params: {

1011

context: { provider: string; modelId: string; modelApi?: string };

1112

}) => {

13+

// Provider runtime owns model-family-specific eligibility; tests mirror

14+

// plugin decisions without loading actual provider plugins.

1215

if (params.context.provider === "anthropic") {

1316

return true;

1417

}

@@ -89,6 +92,8 @@ describe("isCacheTtlEligibleProvider", () => {

8992
9093

describe("readLastCacheTtlTimestamp", () => {

9194

it("returns the latest matching timestamp for the active provider/model", () => {

95+

// Replay only reuses cache TTL entries scoped to the current model target;

96+

// stale entries for other providers must not reset pruning clocks.

9297

const sessionManager = {

9398

getEntries: () => [

9499

{

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Classification coverage for compaction failure and skip reason telemetry.

12

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

23

import {

34

classifyCompactionReason,

@@ -7,6 +8,8 @@ import {

78
89

describe("resolveCompactionFailureReason", () => {

910

it("replaces generic compaction cancellation with the safeguard reason", () => {

11+

// Safeguard cancellation is the actionable root cause; preserving only the

12+

// generic cancellation text would hide the provider/auth failure.

1013

expect(

1114

resolveCompactionFailureReason({

1215

reason: "Compaction cancelled",

@@ -65,6 +68,8 @@ describe("formatUnknownCompactionReasonDetail", () => {

6568

});

6669
6770

it("strips terminal escapes and log separators from unknown reasons", () => {

71+

// Unknown reason detail is embedded in metric tags, so strip control

72+

// characters and separators before exporting it.

6873

expect(

6974

formatUnknownCompactionReasonDetail("\u001b[31mNo API\u001b[0m provider = ollama\nnext"),

7075

).toBe("No_API_provider_ollama_next");

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Hook integration coverage for direct and queued embedded compaction.

12

import type { AgentMessage } from "openclaw/plugin-sdk/agent-core";

23

import { beforeAll, beforeEach, describe, expect, it, vi, type Mock } from "vitest";

34

import {

@@ -63,6 +64,8 @@ type Deferred<T> = {

6364

};

6465
6566

function createDeferred<T>(): Deferred<T> {

67+

// Tests use manual deferreds to prove queued compaction waits at the exact

68+

// lifecycle boundary instead of racing transcript updates.

6669

let resolve: ((value: T) => void) | undefined;

6770

const promise = new Promise<T>((promiseResolve) => {

6871

resolve = promiseResolve;

@@ -141,6 +144,8 @@ const sessionHook = (action: string): SessionHookEvent | undefined =>

141144

})?.[0] as SessionHookEvent | undefined;

142145
143146

async function runCompactionHooks(params: { sessionKey?: string; messageProvider?: string }) {

147+

// Build metrics through the production helper so hook payload assertions stay

148+

// aligned with compaction token accounting.

144149

const originalMessages = sessionMessages.slice(1) as AgentMessage[];

145150

const currentMessages = sessionMessages.slice(1) as AgentMessage[];

146151

const beforeMetrics = compactTesting.buildBeforeCompactionHookMetrics({

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Regression coverage for pruning duplicate user turns before compaction.

12

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

23

import {

34

collectDuplicateUserMessageEntryIdsForCompaction,

@@ -6,6 +7,8 @@ import {

67
78

describe("compaction duplicate user message pruning", () => {

89

it("drops identical long user messages inside the duplicate window", () => {

10+

// Whitespace-normalized duplicates inside the short window are transport

11+

// artifacts; keeping both wastes compaction budget and distorts summaries.

912

const first = {

1013

role: "user",

1114

content: "please run the deployment status check for production",

@@ -29,6 +32,8 @@ describe("compaction duplicate user message pruning", () => {

2932

});

3033
3134

it("keeps short repeated acknowledgements and distant repeats", () => {

35+

// Short repeats and distant repeats are plausible user intent, so only

36+

// high-confidence duplicated long prompts are removed.

3237

const short = { role: "user", content: "next", timestamp: 1_000 } as const;

3338

const shortAgain = { role: "user", content: "next", timestamp: 2_000 } as const;

3439

const long = {

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Coverage for building compaction runtime context from active runner state.

12

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

23

import type { OpenClawConfig } from "../../config/config.js";

34

import { addSession, resetProcessRegistryForTests } from "../bash-process-registry.js";

@@ -94,7 +95,8 @@ describe("buildEmbeddedCompactionRuntimeContext", () => {

9495

});

9596

expect(result.provider).toBe("anthropic");

9697

expect(result.model).toBe("claude-opus-4-6");

97-

// Auth profile dropped because provider changed

98+

// Auth profile must be dropped when provider changes; otherwise compaction

99+

// could send a stale credential to the override provider.

98100

expect(result.authProfileId).toBeUndefined();

99101

});

100102

@@ -130,6 +132,8 @@ describe("buildEmbeddedCompactionRuntimeContext", () => {

130132

});

131133
132134

it("preserves scoped active process session references for compaction", () => {

135+

// Only sessions tied to the same scope are summarized; cross-session process

136+

// state would leak unrelated task context into the compaction prompt.

133137

vi.useFakeTimers();

134138

vi.setSystemTime(new Date("2026-01-02T03:04:05.000Z"));

135139

const active = createProcessSessionFixture({

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Persistence coverage for transcript rotation after successful compaction.

12

import fs from "node:fs/promises";

23

import os from "node:os";

34

import path from "node:path";

@@ -82,6 +83,8 @@ function createCompactedSession(sessionDir: string): {

8283

firstKeptId: string;

8384

oldUserId: string;

8485

} {

86+

// Fixture includes pre-compaction history, preserved branch metadata, and

87+

// post-compaction turns so rotation can prove exactly which entries survive.

8588

const manager = SessionManager.create(sessionDir, sessionDir);

8689

manager.appendModelChange("openai", "gpt-5.2");

8790

manager.appendThinkingLevelChange("medium");

@@ -108,6 +111,8 @@ describe("rotateTranscriptAfterCompaction", () => {

108111

const dir = await createTmpDir();

109112

const { sessionFile } = createCompactedSession(dir);

110113
114+

// File-only rotation is used after the active manager has moved on; opening

115+

// a new manager here would hide bugs in the direct persistence path.

111116

const openSpy = vi.spyOn(SessionManager, "open").mockImplementation(() => {

112117

throw new Error("SessionManager.open should not be used for file rotation");

113118

});

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Coverage for deferred context-engine maintenance and transcript rewrite hooks.

12

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

23

import type { ContextEngineRuntimeContext } from "../../context-engine/types.js";

34

import { peekSystemEvents, resetSystemEventsForTest } from "../../infra/system-events.js";

@@ -36,6 +37,8 @@ let createDeferredTurnMaintenanceAbortSignal: typeof import("./context-engine-ma

3637

let resetDeferredTurnMaintenanceStateForTest: typeof import("./context-engine-maintenance.js").resetDeferredTurnMaintenanceStateForTest;

3738
3839

function createQueuedTaskRun(params: Parameters<typeof createQueuedTaskRunOrNull>[0]): TaskRecord {

40+

// Task creation can legally return null for invalid inputs; tests here always

41+

// need a concrete queued task record.

3942

const task = createQueuedTaskRunOrNull(params);

4043

if (!task) {

4144

throw new Error("expected queued task creation to succeed");

@@ -58,6 +61,8 @@ async function waitForAssertion(

5861

timeoutMs = 2_000,

5962

stepMs = 5,

6063

): Promise<void> {

64+

// Timed polling lets fake-timer tasks advance through queue and delivery

65+

// microtasks without binding assertions to a specific internal await count.

6166

const startedAt = Date.now();

6267

for (;;) {

6368

try {

@@ -106,6 +111,8 @@ vi.mock("./transcript-rewrite.js", () => ({

106111

}));

107112
108113

async function loadFreshContextEngineMaintenanceModuleForTest() {

114+

// The module owns singleton deferred-maintenance state, so reload between

115+

// cases before asserting abort or queue behavior.

109116

({

110117

buildContextEngineMaintenanceRuntimeContext,

111118

createDeferredTurnMaintenanceAbortSignal,

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Coverage for final bundled-tool policy filtering in embedded runs.

12

import fs from "node:fs";

23

import os from "node:os";

34

import path from "node:path";

@@ -7,6 +8,8 @@ import type { AnyAgentTool } from "../tools/common.js";

78

import { applyFinalEffectiveToolPolicy } from "./effective-tool-policy.js";

89
910

function makeTool(name: string): AnyAgentTool {

11+

// Minimal tool shape keeps policy tests independent from executor/runtime

12+

// implementations while still exercising plugin metadata.

1013

return {

1114

name,

1215

label: name,

@@ -28,6 +31,8 @@ describe("applyFinalEffectiveToolPolicy", () => {

2831

});

2932
3033

it("filters bundled tools through inherited subagent allowlists", () => {

34+

// Inherited allowlists are persisted by session key; use a real temp store

35+

// so parsing and lookup match production policy application.

3136

const agentId = `bundled-inherited-allow-${Date.now()}-${Math.random().toString(16).slice(2)}`;

3237

const sessionKey = `agent:${agentId}:subagent:limited`;

3338

const storePath = path.join(os.tmpdir(), `openclaw-bundled-inherited-allow-${agentId}.json`);

@@ -113,6 +118,8 @@ describe("applyFinalEffectiveToolPolicy", () => {

113118

});

114119
115120

it("applies channel-normalized per-sender policy to bundled tools", () => {

121+

// Teams normalizes to msteams in policy keys, which must happen before

122+

// sender-specific deny rules are applied.

116123

const filtered = applyFinalEffectiveToolPolicy({

117124

bundledTools: [makeTool("mcp__bundle__exec"), makeTool("mcp__bundle__read")],

118125

config: {

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Coverage for embedded extension factory selection and runtime wiring.

12

import type { SessionManager } from "openclaw/plugin-sdk/agent-sessions";

23

import type { Model } from "openclaw/plugin-sdk/llm";

34

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

@@ -8,6 +9,8 @@ import contextPruningExtension from "../agent-hooks/context-pruning.js";

89

import { buildEmbeddedExtensionFactories } from "./extensions.js";

910
1011

vi.mock("../../plugins/provider-runtime.js", () => ({

12+

// Plugin-owned cache-TTL decisions are mocked out here; extension selection

13+

// tests assert the core default wiring only.

1114

resolveProviderCacheTtlEligibility: () => undefined,

1215

resolveProviderRuntimePlugin: () => undefined,

1316

}));

@@ -17,6 +20,8 @@ vi.mock("../../plugins/provider-hook-runtime.js", () => ({

1720

}));

1821
1922

function buildSafeguardFactories(cfg: OpenClawConfig, workspaceDir?: string) {

23+

// The safeguard runtime attaches to the session manager, so tests keep the

24+

// same manager instance around for both factory construction and inspection.

2025

const sessionManager = {} as SessionManager;

2126

const model = {

2227

id: "claude-sonnet-4-20250514",