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

推荐订阅源

云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
The GitHub Blog
The GitHub Blog
月光博客
月光博客
T
Tailwind CSS Blog
小众软件
小众软件
Y
Y Combinator Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Proofpoint News Feed
B
Blog RSS Feed
博客园 - 司徒正美
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 聂微东
Microsoft Security Blog
Microsoft Security Blog
Recent Announcements
Recent Announcements
博客园 - Franky
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Azure Blog
Microsoft Azure Blog
T
The Blog of Author Tim Ferriss
GbyAI
GbyAI
Apple Machine Learning Research
Apple Machine Learning Research

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
fix(plugins): skip unchanged npm updates · openclaw/openc...
steipete · 2026-04-23 · via Recent Commits to openclaw:main

@@ -0,0 +1,151 @@

1+

#!/usr/bin/env bash

2+

set -euo pipefail

3+4+

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"

5+

source "$ROOT_DIR/scripts/lib/docker-e2e-logs.sh"

6+7+

IMAGE_NAME="${OPENCLAW_PLUGIN_UPDATE_E2E_IMAGE:-openclaw-plugin-update-e2e}"

8+

SKIP_BUILD="${OPENCLAW_PLUGIN_UPDATE_E2E_SKIP_BUILD:-0}"

9+10+

if [ "$SKIP_BUILD" = "1" ]; then

11+

echo "Reusing Docker image: $IMAGE_NAME"

12+

else

13+

echo "Building Docker image..."

14+

run_logged plugin-update-build docker build -t "$IMAGE_NAME" -f "$ROOT_DIR/scripts/e2e/Dockerfile" "$ROOT_DIR"

15+

fi

16+17+

echo "Running unchanged plugin update smoke..."

18+

docker run --rm \

19+

-e COREPACK_ENABLE_DOWNLOAD_PROMPT=0 \

20+

-e OPENCLAW_SKIP_CHANNELS=1 \

21+

-e OPENCLAW_SKIP_PROVIDERS=1 \

22+

"$IMAGE_NAME" \

23+

bash -lc "set -euo pipefail

24+

entry=dist/index.mjs

25+

[ -f \"\$entry\" ] || entry=dist/index.js

26+

export NPM_CONFIG_REGISTRY=http://127.0.0.1:4873

27+28+

mkdir -p \"\$HOME/.openclaw/extensions/lossless-claw\"

29+

cat > \"\$HOME/.openclaw/extensions/lossless-claw/package.json\" <<'JSON'

30+

{

31+

\"name\": \"@example/lossless-claw\",

32+

\"version\": \"0.9.0\"

33+

}

34+

JSON

35+

cat > \"\$HOME/.openclaw/openclaw.json\" <<'JSON'

36+

{

37+

\"plugins\": {

38+

\"installs\": {

39+

\"lossless-claw\": {

40+

\"source\": \"npm\",

41+

\"spec\": \"@example/lossless-claw@0.9.0\",

42+

\"installPath\": \"~/.openclaw/extensions/lossless-claw\",

43+

\"resolvedName\": \"@example/lossless-claw\",

44+

\"resolvedVersion\": \"0.9.0\",

45+

\"resolvedSpec\": \"@example/lossless-claw@0.9.0\",

46+

\"integrity\": \"sha512-same\",

47+

\"shasum\": \"same\"

48+

}

49+

}

50+

}

51+

}

52+

JSON

53+54+

cat > /tmp/openclaw-e2e-registry.mjs <<'NODE'

55+

import http from 'node:http';

56+57+

const metadata = {

58+

name: '@example/lossless-claw',

59+

'dist-tags': { latest: '0.9.0' },

60+

versions: {

61+

'0.9.0': {

62+

name: '@example/lossless-claw',

63+

version: '0.9.0',

64+

dist: {

65+

integrity: 'sha512-same',

66+

shasum: 'same',

67+

tarball: 'http://127.0.0.1:4873/@example/lossless-claw/-/lossless-claw-0.9.0.tgz'

68+

}

69+

}

70+

}

71+

};

72+73+

const server = http.createServer((req, res) => {

74+

if (req.url === '/@example%2flossless-claw' || req.url === '/@example%2Flossless-claw') {

75+

res.writeHead(200, { 'content-type': 'application/json' });

76+

res.end(JSON.stringify(metadata));

77+

return;

78+

}

79+

res.writeHead(404, { 'content-type': 'text/plain' });

80+

res.end('not found: ' + req.url);

81+

});

82+83+

server.listen(4873, '127.0.0.1');

84+

NODE

85+

node /tmp/openclaw-e2e-registry.mjs >/tmp/openclaw-e2e-registry.log 2>&1 &

86+

registry_pid=\$!

87+

trap 'kill \"\$registry_pid\" >/dev/null 2>&1 || true' EXIT

88+89+

registry_ready=0

90+

for _ in \$(seq 1 50); do

91+

if node --input-type=module -e '

92+

import http from \"node:http\";

93+

const req = http.get(\"http://127.0.0.1:4873/@example%2flossless-claw\", (res) => {

94+

process.exit(res.statusCode === 200 ? 0 : 1);

95+

});

96+

req.on(\"error\", () => process.exit(1));

97+

req.setTimeout(200, () => {

98+

req.destroy();

99+

process.exit(1);

100+

});

101+

'; then

102+

registry_ready=1

103+

break

104+

fi

105+

sleep 0.1

106+

done

107+

if [ \"\$registry_ready\" -ne 1 ]; then

108+

echo \"Local npm metadata registry failed to start\"

109+

cat /tmp/openclaw-e2e-registry.log || true

110+

exit 1

111+

fi

112+113+

before_hash=\$(node --input-type=module -e '

114+

import crypto from \"node:crypto\";

115+

import fs from \"node:fs\";

116+

import os from \"node:os\";

117+

import path from \"node:path\";

118+

const file = path.join(os.homedir(), \".openclaw\", \"openclaw.json\");

119+

process.stdout.write(crypto.createHash(\"sha256\").update(fs.readFileSync(file)).digest(\"hex\"));

120+

')

121+122+

node \"\$entry\" plugins update @example/lossless-claw > /tmp/plugin-update-output.log 2>&1

123+124+

after_hash=\$(node --input-type=module -e '

125+

import crypto from \"node:crypto\";

126+

import fs from \"node:fs\";

127+

import os from \"node:os\";

128+

import path from \"node:path\";

129+

const file = path.join(os.homedir(), \".openclaw\", \"openclaw.json\");

130+

process.stdout.write(crypto.createHash(\"sha256\").update(fs.readFileSync(file)).digest(\"hex\"));

131+

')

132+133+

if [ \"\$before_hash\" != \"\$after_hash\" ]; then

134+

echo \"Config changed unexpectedly\"

135+

cat /tmp/plugin-update-output.log

136+

exit 1

137+

fi

138+

if grep -q 'Downloading @example/lossless-claw' /tmp/plugin-update-output.log; then

139+

echo \"Unexpected npm download/reinstall path\"

140+

cat /tmp/plugin-update-output.log

141+

exit 1

142+

fi

143+

if ! grep -q 'lossless-claw is up to date (0.9.0).' /tmp/plugin-update-output.log; then

144+

echo \"Expected up-to-date output missing\"

145+

cat /tmp/plugin-update-output.log

146+

exit 1

147+

fi

148+

cat /tmp/plugin-update-output.log

149+

"

150+151+

echo "Plugin update unchanged Docker E2E passed."