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

推荐订阅源

美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Martin Fowler
Martin Fowler
雷峰网
雷峰网
IT之家
IT之家
小众软件
小众软件
M
MIT News - Artificial intelligence
博客园 - 聂微东
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
G
Google Developers Blog
Engineering at Meta
Engineering at Meta
Recent Announcements
Recent Announcements
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
C
Check Point Blog
云风的 BLOG
云风的 BLOG
腾讯CDC
H
Help Net Security
Y
Y Combinator Blog
I
InfoQ

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
refactor: relocate channel contract helpers · openclaw/op...
steipete · 2026-04-28 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -15,6 +15,7 @@ Docs: https://docs.openclaw.ai

1515

- Channels/QQBot: add full group chat support (history tracking, @-mention gating, activation modes, per-group config, FIFO message queue with deliver debounce), C2C `stream_messages` streaming with a `StreamingController` lifecycle manager, unified `sendMedia` with chunked upload for large files, and refactor the engine into pipeline stages, focused outbound submodules, builtin slash-command modules, and explicit DI ports via `createEngineAdapters()`. (#70624) Thanks @cxyhhhhh.

1616

- Gateway/runtime: reuse the current plugin metadata snapshot for provider discovery so repeated model-provider discovery avoids rebuilding plugin manifest metadata. Thanks @shakkernerd.

1717

- Gateway/startup: pass the plugin metadata snapshot from config validation into plugin bootstrap so startup reuses one manifest product instead of rebuilding plugin metadata. Thanks @shakkernerd.

18+

- Plugin SDK/testing: move core-only channel contract fixtures under the channel contract test tree and retire the old `test/helpers/channels` bridge directory so plugin tests stay on focused SDK surfaces. Thanks @vincentkoc.

1819

- Plugin SDK/testing: promote bundled plugin/provider/channel contract helpers to focused SDK test subpaths and retire the repo-only `test/helpers/plugins` TypeScript bridge. Thanks @vincentkoc.

1920

- Plugin SDK/testing: expose generic channel action, setup, status, and directory contract helpers through `plugin-sdk/channel-test-helpers` so bundled extension tests no longer import repo-only channel helper bridges. Thanks @vincentkoc.

2021

- Plugin SDK/testing: add `plugin-sdk/channel-target-testing` for shared channel target-resolution cases, document channel reaction helpers on `plugin-sdk/channel-feedback`, and keep the old `plugin-sdk/test-utils` alias as compatibility-only. Thanks @vincentkoc.

Original file line numberDiff line numberDiff line change

@@ -19,8 +19,6 @@ plugins.

1919
2020

## Test utilities

2121
22-

**Compatibility import:** `openclaw/plugin-sdk/testing`

23-
2422

**Plugin API mock import:** `openclaw/plugin-sdk/plugin-test-api`

2523
2624

**Channel contract import:** `openclaw/plugin-sdk/channel-contract-testing`

@@ -40,8 +38,7 @@ plugins.

4038

**Generic fixture import:** `openclaw/plugin-sdk/test-fixtures`

4139
4240

Prefer the focused subpaths below for new plugin tests. The broad

43-

`openclaw/plugin-sdk/testing` barrel remains for compatibility with older tests

44-

and helpers that have not moved to a narrower documented surface yet.

41+

`openclaw/plugin-sdk/testing` barrel is legacy compatibility only.

4542
4643

```typescript

4744

import {

@@ -121,17 +118,15 @@ broad `plugin-sdk/testing` compatibility barrel, repo `src/**` files, or repo

121118
122119

### Types

123120
124-

The testing subpath also re-exports types useful in test files:

121+

Focused testing subpaths also re-export types useful in test files:

125122
126123

```typescript

127124

import type {

128125

ChannelAccountSnapshot,

129126

ChannelGatewayContext,

130-

OpenClawConfig,

131-

PluginRuntime,

132-

RuntimeEnv,

133-

MockFn,

134-

} from "openclaw/plugin-sdk/testing";

127+

} from "openclaw/plugin-sdk/channel-contract";

128+

import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";

129+

import type { MockFn, PluginRuntime, RuntimeEnv } from "openclaw/plugin-sdk/plugin-test-runtime";

135130

```

136131
137132

## Testing target resolution

Original file line numberDiff line numberDiff line change

@@ -18,7 +18,7 @@ title: "Tests"

1818

- Test wrapper runs end with a short `[test] passed|failed|skipped ... in ...` summary. Vitest's own duration line stays the per-shard detail.

1919

- Full, extension, and include-pattern shard runs update local timing data in `.artifacts/vitest-shard-timings.json`; later whole-config runs use those timings to balance slow and fast shards. Include-pattern CI shards append the shard name to the timing key, which keeps filtered shard timings visible without replacing whole-config timing data. Set `OPENCLAW_TEST_PROJECTS_TIMINGS=0` to ignore the local timing artifact.

2020

- Selected `plugin-sdk` and `commands` test files now route through dedicated light lanes that keep only `test/setup.ts`, leaving runtime-heavy cases on their existing lanes.

21-

- Source files with sibling tests map to that sibling before falling back to wider directory globs. Helper edits under `test/helpers/channels`, `src/plugin-sdk/test-helpers`, and `src/plugins/contracts` use a local import graph to run importing tests instead of broad-running every shard when the dependency path is precise.

21+

- Source files with sibling tests map to that sibling before falling back to wider directory globs. Helper edits under `src/channels/plugins/contracts/test-helpers`, `src/plugin-sdk/test-helpers`, and `src/plugins/contracts` use a local import graph to run importing tests instead of broad-running every shard when the dependency path is precise.

2222

- `auto-reply` now also splits into three dedicated configs (`core`, `top-level`, `reply`) so the reply harness does not dominate the lighter top-level status/token/helper tests.

2323

- Base Vitest config now defaults to `pool: "threads"` and `isolate: false`, with the shared non-isolated runner enabled across the repo configs.

2424

- `pnpm test:channels` runs `vitest.channels.config.ts`.

Original file line numberDiff line numberDiff line change

@@ -33,6 +33,10 @@ const FORBIDDEN_PATTERNS: Array<{ pattern: RegExp; hint: string }> = [

3333

pattern: /["'](?:\.\.\/)+(?:test\/helpers\/channels\/)[^"']+["']/,

3434

hint: "Use openclaw/plugin-sdk/channel-test-helpers or another focused SDK test subpath instead of repo-only channel helper bridges.",

3535

},

36+

{

37+

pattern: /["'](?:\.\.\/)+(?:src\/channels\/plugins\/contracts\/test-helpers\/)[^"']+["']/,

38+

hint: "Use openclaw/plugin-sdk/channel-test-helpers or another focused SDK test subpath instead of core-only channel contract helpers.",

39+

},

3640

{

3741

pattern: /["'](?:\.\.\/)+(?:src\/test-utils\/)[^"']+["']/,

3842

hint: "Use a documented openclaw/plugin-sdk test subpath for public surfaces.",

@@ -178,10 +182,21 @@ function collectRelativeCoreImportOffenders(

178182

function main() {

179183

const extensionsDir = path.join(process.cwd(), "extensions");

180184

const pluginHelpersDir = path.join(process.cwd(), "test/helpers/plugins");

185+

const retiredChannelHelpersDir = path.join(process.cwd(), "test/helpers/channels");

181186

const files = collectExtensionTestFiles(extensionsDir);

182187

const pluginHelperFiles = collectPluginHelperFiles(pluginHelpersDir);

188+

const retiredChannelHelperFiles = fs.existsSync(retiredChannelHelpersDir)

189+

? collectFilesSync(retiredChannelHelpersDir, { includeFile: isCodeFile })

190+

: [];

183191

const offenders: Offender[] = [];

184192
193+

for (const file of retiredChannelHelperFiles) {

194+

offenders.push({

195+

file,

196+

hint: "Keep core channel contract helpers under src/channels/plugins/contracts/test-helpers and public plugin helpers under focused openclaw/plugin-sdk test subpaths.",

197+

});

198+

}

199+
185200

for (const file of RETIRED_EXTENSION_TEST_HELPER_BRIDGE_FILES) {

186201

const filePath = path.join(process.cwd(), file);

187202

if (!fs.existsSync(filePath)) {

Original file line numberDiff line numberDiff line change

@@ -2,7 +2,7 @@ import {

22

describeBundledMetadataOnlyChannelCatalogContract,

33

describeChannelCatalogEntryContract,

44

describeOfficialFallbackChannelCatalogContract,

5-

} from "../../../../test/helpers/channels/channel-catalog-contract.js";

5+

} from "./test-helpers/channel-catalog-contract.js";

66
77

describeChannelCatalogEntryContract({

88

channelId: "msteams",

Original file line numberDiff line numberDiff line change

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

1-

import { installDirectoryContractRegistryShard } from "../../../../test/helpers/channels/registry-backed-contract-shards.js";

1+

import { installDirectoryContractRegistryShard } from "./test-helpers/registry-backed-contract-shards.js";

22
33

installDirectoryContractRegistryShard({ shardIndex: 0, shardCount: 8 });

Original file line numberDiff line numberDiff line change

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

1-

import { installDirectoryContractRegistryShard } from "../../../../test/helpers/channels/registry-backed-contract-shards.js";

1+

import { installDirectoryContractRegistryShard } from "./test-helpers/registry-backed-contract-shards.js";

22
33

installDirectoryContractRegistryShard({ shardIndex: 1, shardCount: 8 });

Original file line numberDiff line numberDiff line change

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

1-

import { installDirectoryContractRegistryShard } from "../../../../test/helpers/channels/registry-backed-contract-shards.js";

1+

import { installDirectoryContractRegistryShard } from "./test-helpers/registry-backed-contract-shards.js";

22
33

installDirectoryContractRegistryShard({ shardIndex: 2, shardCount: 8 });

Original file line numberDiff line numberDiff line change

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

1-

import { installDirectoryContractRegistryShard } from "../../../../test/helpers/channels/registry-backed-contract-shards.js";

1+

import { installDirectoryContractRegistryShard } from "./test-helpers/registry-backed-contract-shards.js";

22
33

installDirectoryContractRegistryShard({ shardIndex: 3, shardCount: 8 });

Original file line numberDiff line numberDiff line change

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

1-

import { installDirectoryContractRegistryShard } from "../../../../test/helpers/channels/registry-backed-contract-shards.js";

1+

import { installDirectoryContractRegistryShard } from "./test-helpers/registry-backed-contract-shards.js";

22
33

installDirectoryContractRegistryShard({ shardIndex: 4, shardCount: 8 });