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

推荐订阅源

V
V2EX
博客园 - 叶小钗
Last Week in AI
Last Week in AI
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
P
Proofpoint News Feed
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
aimingoo的专栏
aimingoo的专栏
月光博客
月光博客
量子位
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
博客园 - Franky
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
D
DataBreaches.Net
博客园_首页
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow 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
refactor(test): share bundled channel Docker harness help...
steipete · 2026-04-29 · via Recent Commits to openclaw:main

@@ -4,20 +4,20 @@

44

# Sourced by scripts/e2e/bundled-channel-runtime-deps-docker.sh.

5566

run_load_failure_scenario() {

7-

local run_log

87

local state_script_b64

9-

run_log="$(docker_e2e_run_log bundled-channel-load-failure)"

108

state_script_b64="$(docker_e2e_test_state_shell_b64 bundled-channel-load-failure empty)"

1191210

echo "Running bundled channel load-failure isolation Docker E2E..."

13-

if ! timeout "$DOCKER_RUN_TIMEOUT" docker run --rm \

11+

run_logged_print bundled-channel-load-failure timeout "$DOCKER_RUN_TIMEOUT" docker run --rm \

1412

-e COREPACK_ENABLE_DOWNLOAD_PROMPT=0 \

1513

-e "OPENCLAW_TEST_STATE_SCRIPT_B64=$state_script_b64" \

1614

"${DOCKER_E2E_PACKAGE_ARGS[@]}" \

17-

-i "$IMAGE_NAME" bash -s >"$run_log" 2>&1 <<'EOF'

15+

"${DOCKER_E2E_HARNESS_ARGS[@]}" \

16+

-i "$IMAGE_NAME" bash -s <<'EOF'

1817

set -euo pipefail

191820-

eval "$(printf "%s" "${OPENCLAW_TEST_STATE_SCRIPT_B64:?missing OPENCLAW_TEST_STATE_SCRIPT_B64}" | base64 -d)"

19+

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

20+

openclaw_e2e_eval_test_state_from_b64 "${OPENCLAW_TEST_STATE_SCRIPT_B64:?missing OPENCLAW_TEST_STATE_SCRIPT_B64}"

2121

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

2222

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

2323

export OPENCLAW_NO_ONBOARD=1

@@ -106,16 +106,28 @@ if (!bundledPath) {

106106

throw new Error("missing packaged bundled channel loader artifact");

107107

}

108108

const bundled = await import(pathToFileURL(bundledPath));

109-

const oneArgExports = Object.entries(bundled).filter(

110-

([, value]) => typeof value === "function" && value.length === 1,

109+

const loaderNames = [

110+

"getBundledChannelPlugin",

111+

"getBundledChannelSetupPlugin",

112+

"getBundledChannelSecrets",

113+

"getBundledChannelSetupSecrets",

114+

];

115+

const exportedLoaders = new Map(

116+

Object.values(bundled)

117+

.filter((value) => typeof value === "function")

118+

.map((fn) => [fn.name, fn]),

111119

);

112-

if (oneArgExports.length === 0) {

113-

throw new Error(`missing one-argument bundled loader exports; exports=${Object.keys(bundled).join(",")}`);

114-

}

120+

const loaders = loaderNames.map((name) => {

121+

const fn = exportedLoaders.get(name);

122+

if (typeof fn !== "function") {

123+

throw new Error(`missing packaged bundled loader export ${name}; exports=${Object.keys(bundled).join(",")}`);

124+

}

125+

return [name, fn];

126+

});

115127116128

const id = "load-failure-alpha";

117-

for (let i = 0; i < 2; i += 1) {

118-

for (const [name, fn] of oneArgExports) {

129+

function exerciseLoaders() {

130+

for (const [name, fn] of loaders) {

119131

try {

120132

fn(id);

121133

} catch (error) {

@@ -127,36 +139,35 @@ for (let i = 0; i < 2; i += 1) {

127139

}

128140

}

129141130-

const counts = {

131-

plugin: globalThis.__loadFailurePlugin,

132-

setup: globalThis.__loadFailureSetup,

133-

secrets: globalThis.__loadFailureSecrets,

134-

setupSecrets: globalThis.__loadFailureSetupSecrets,

135-

};

136-

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

137-

plugin: counts.plugin,

138-

setup: counts.setup,

139-

setupSecrets: counts.setupSecrets,

140-

})) {

141-

if (value !== 1) {

142-

throw new Error(`expected ${key} failure to be cached after one load, got ${value}`);

142+

function loadCounts() {

143+

return {

144+

plugin: globalThis.__loadFailurePlugin,

145+

setup: globalThis.__loadFailureSetup,

146+

secrets: globalThis.__loadFailureSecrets,

147+

setupSecrets: globalThis.__loadFailureSetupSecrets,

148+

};

149+

}

150+151+

exerciseLoaders();

152+

const firstCounts = loadCounts();

153+

exerciseLoaders();

154+

const secondCounts = loadCounts();

155+

for (const key of ["plugin", "setup", "setupSecrets"]) {

156+

const first = firstCounts[key];

157+

if (!Number.isInteger(first) || first < 1) {

158+

throw new Error(`expected ${key} failure to be exercised at least once, got ${first}`);

159+

}

160+

if (secondCounts[key] !== first) {

161+

throw new Error(`expected ${key} failure to be cached after first pass, got ${first} then ${secondCounts[key]}`);

143162

}

144163

}

145-

if (counts.secrets !== undefined && counts.secrets !== 1) {

146-

throw new Error(`expected secrets failure to be cached after one load when exercised, got ${counts.secrets}`);

164+

if (firstCounts.secrets !== undefined && secondCounts.secrets !== firstCounts.secrets) {

165+

throw new Error(`expected secrets failure to be cached after first pass, got ${firstCounts.secrets} then ${secondCounts.secrets}`);

147166

}

148167

console.log("synthetic bundled channel load failures were isolated and cached");

149168

NODE

150169

)

151170152171

echo "bundled channel load-failure isolation Docker E2E passed"

153172

EOF

154-

then

155-

docker_e2e_print_log "$run_log"

156-

rm -f "$run_log"

157-

exit 1

158-

fi

159-160-

docker_e2e_print_log "$run_log"

161-

rm -f "$run_log"

162173

}