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

推荐订阅源

D
Docker
Apple Machine Learning Research
Apple Machine Learning Research
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
M
MIT News - Artificial intelligence
腾讯CDC
B
Blog RSS Feed
H
Help Net Security
J
Java Code Geeks
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
博客园_首页
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
博客园 - Franky
B
Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 叶小钗
Martin Fowler
Martin Fowler

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(test): share bundled channel Docker helpers · op...
steipete · 2026-04-29 · via Recent Commits to openclaw:main

@@ -21,6 +21,7 @@ run_channel_scenario() {

2121

set -euo pipefail

22222323

source scripts/lib/openclaw-e2e-instance.sh

24+

source scripts/e2e/lib/bundled-channel/common.sh

2425

openclaw_e2e_eval_test_state_from_b64 "${OPENCLAW_TEST_STATE_SCRIPT_B64:?missing OPENCLAW_TEST_STATE_SCRIPT_B64}"

2526

export NPM_CONFIG_PREFIX="$HOME/.npm-global"

2627

export PATH="$NPM_CONFIG_PREFIX/bin:$PATH"

@@ -79,154 +80,12 @@ test -d "$package_root/dist/extensions/slack"

7980

test -d "$package_root/dist/extensions/feishu"

8081

test -d "$package_root/dist/extensions/memory-lancedb"

818282-

stage_root() {

83-

printf "%s/.openclaw/plugin-runtime-deps" "$HOME"

84-

}

85-86-

find_external_dep_package() {

87-

local dep_path="$1"

88-

find "$(stage_root)" -maxdepth 12 -path "*/node_modules/$dep_path/package.json" -type f -print -quit 2>/dev/null || true

89-

}

90-91-

assert_package_dep_absent() {

92-

local channel="$1"

93-

local dep_path="$2"

94-

for candidate in \

95-

"$package_root/dist/extensions/$channel/node_modules/$dep_path/package.json" \

96-

"$package_root/dist/extensions/node_modules/$dep_path/package.json" \

97-

"$package_root/node_modules/$dep_path/package.json"; do

98-

if [ -f "$candidate" ]; then

99-

echo "packaged install should not mutate package tree for $channel: $candidate" >&2

100-

exit 1

101-

fi

102-

done

103-

}

104-10583

if [ -d "$package_root/dist/extensions/$CHANNEL/node_modules" ]; then

10684

echo "$CHANNEL runtime deps should not be preinstalled in package" >&2

10785

find "$package_root/dist/extensions/$CHANNEL/node_modules" -maxdepth 2 -type f | head -20 >&2 || true

10886

exit 1

10987

fi

11088111-

write_config() {

112-

local mode="$1"

113-

node - <<'NODE' "$mode" "$TOKEN" "$PORT"

114-

const fs = require("node:fs");

115-

const path = require("node:path");

116-117-

const mode = process.argv[2];

118-

const token = process.argv[3];

119-

const port = Number(process.argv[4]);

120-

const configPath = path.join(process.env.HOME, ".openclaw", "openclaw.json");

121-

const config = fs.existsSync(configPath)

122-

? JSON.parse(fs.readFileSync(configPath, "utf8"))

123-

: {};

124-125-

config.gateway = {

126-

...(config.gateway || {}),

127-

port,

128-

auth: { mode: "token", token },

129-

controlUi: { enabled: false },

130-

};

131-

config.agents = {

132-

...(config.agents || {}),

133-

defaults: {

134-

...(config.agents?.defaults || {}),

135-

model: { primary: "openai/gpt-4.1-mini" },

136-

},

137-

};

138-

config.models = {

139-

...(config.models || {}),

140-

providers: {

141-

...(config.models?.providers || {}),

142-

openai: {

143-

...(config.models?.providers?.openai || {}),

144-

apiKey: process.env.OPENAI_API_KEY,

145-

baseUrl: "https://api.openai.com/v1",

146-

models: [],

147-

},

148-

},

149-

};

150-

config.plugins = {

151-

...(config.plugins || {}),

152-

enabled: true,

153-

};

154-155-

if (mode === "telegram") {

156-

config.channels = {

157-

...(config.channels || {}),

158-

telegram: {

159-

...(config.channels?.telegram || {}),

160-

enabled: true,

161-

dmPolicy: "disabled",

162-

groupPolicy: "disabled",

163-

},

164-

};

165-

}

166-

if (mode === "discord") {

167-

config.channels = {

168-

...(config.channels || {}),

169-

discord: {

170-

...(config.channels?.discord || {}),

171-

enabled: true,

172-

dmPolicy: "disabled",

173-

groupPolicy: "disabled",

174-

},

175-

};

176-

}

177-

if (mode === "slack") {

178-

config.channels = {

179-

...(config.channels || {}),

180-

slack: {

181-

...(config.channels?.slack || {}),

182-

enabled: true,

183-

},

184-

};

185-

}

186-

if (mode === "feishu") {

187-

config.channels = {

188-

...(config.channels || {}),

189-

feishu: {

190-

...(config.channels?.feishu || {}),

191-

enabled: true,

192-

},

193-

};

194-

}

195-

if (mode === "memory-lancedb") {

196-

config.plugins = {

197-

...(config.plugins || {}),

198-

enabled: true,

199-

allow: [...new Set([...(config.plugins?.allow || []), "memory-lancedb"])],

200-

slots: {

201-

...(config.plugins?.slots || {}),

202-

memory: "memory-lancedb",

203-

},

204-

entries: {

205-

...(config.plugins?.entries || {}),

206-

"memory-lancedb": {

207-

...(config.plugins?.entries?.["memory-lancedb"] || {}),

208-

enabled: true,

209-

config: {

210-

...(config.plugins?.entries?.["memory-lancedb"]?.config || {}),

211-

embedding: {

212-

...(config.plugins?.entries?.["memory-lancedb"]?.config?.embedding || {}),

213-

apiKey: process.env.OPENAI_API_KEY,

214-

model: "text-embedding-3-small",

215-

},

216-

dbPath: "~/.openclaw/memory/lancedb-e2e",

217-

autoCapture: false,

218-

autoRecall: false,

219-

},

220-

},

221-

},

222-

};

223-

}

224-225-

fs.mkdirSync(path.dirname(configPath), { recursive: true });

226-

fs.writeFileSync(configPath, `${JSON.stringify(config, null, 2)}\n`, "utf8");

227-

NODE

228-

}

229-23089

start_gateway() {

23190

local log_file="$1"

23291

local skip_sidecars="${2:-0}"

@@ -347,12 +206,12 @@ assert_installed_once() {

347206

if [ "$count" -eq 1 ]; then

348207

return 0

349208

fi

350-

if [ "$count" -eq 0 ] && [ -n "$(find_external_dep_package "$dep_path")" ]; then

209+

if [ "$count" -eq 0 ] && [ -n "$(bundled_channel_find_external_dep_package "$dep_path")" ]; then

351210

return 0

352211

fi

353212

echo "expected one runtime deps install log or staged dependency sentinel for $channel, got $count log lines" >&2

354213

cat "$log_file" >&2

355-

find "$(stage_root)" -maxdepth 12 -type f | sort | head -120 >&2 || true

214+

find "$(bundled_channel_stage_root)" -maxdepth 12 -type f | sort | head -120 >&2 || true

356215

exit 1

357216

}

358217

@@ -369,24 +228,13 @@ assert_not_installed() {

369228

assert_dep_sentinel() {

370229

local channel="$1"

371230

local dep_path="$2"

372-

local sentinel

373-

sentinel="$(find_external_dep_package "$dep_path")"

374-

if [ -z "$sentinel" ]; then

375-

echo "missing external dependency sentinel for $channel: $dep_path" >&2

376-

find "$(stage_root)" -maxdepth 12 -type f | sort | head -120 >&2 || true

377-

exit 1

378-

fi

379-

assert_package_dep_absent "$channel" "$dep_path"

231+

bundled_channel_assert_dep_available "$channel" "$dep_path" "$package_root"

380232

}

381233382234

assert_no_dep_sentinel() {

383235

local channel="$1"

384236

local dep_path="$2"

385-

assert_package_dep_absent "$channel" "$dep_path"

386-

if [ -n "$(find_external_dep_package "$dep_path")" ]; then

387-

echo "external dependency sentinel should be absent before activation for $channel: $dep_path" >&2

388-

exit 1

389-

fi

237+

bundled_channel_assert_no_dep_available "$channel" "$dep_path" "$package_root"

390238

}

391239392240

assert_no_install_stage() {

@@ -400,14 +248,14 @@ assert_no_install_stage() {

400248

}

401249402250

echo "Starting baseline gateway with OpenAI configured..."

403-

write_config baseline

251+

bundled_channel_write_config baseline

404252

start_gateway "/tmp/openclaw-$CHANNEL-baseline.log" 1

405253

wait_for_gateway_health "/tmp/openclaw-$CHANNEL-baseline.log"

406254

stop_gateway

407255

assert_no_dep_sentinel "$CHANNEL" "$DEP_SENTINEL"

408256409257

echo "Enabling $CHANNEL by config edit, then restarting gateway..."

410-

write_config "$CHANNEL"

258+

bundled_channel_write_config "$CHANNEL"

411259

start_gateway "/tmp/openclaw-$CHANNEL-first.log"

412260

wait_for_gateway_health "/tmp/openclaw-$CHANNEL-first.log"

413261

assert_installed_once "/tmp/openclaw-$CHANNEL-first.log" "$CHANNEL" "$DEP_SENTINEL"