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

推荐订阅源

博客园 - Franky
J
Java Code Geeks
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
博客园 - 司徒正美
Stack Overflow Blog
Stack Overflow Blog
美团技术团队
L
LangChain Blog
WordPress大学
WordPress大学
A
About on SuperTechFans
Martin Fowler
Martin Fowler
月光博客
月光博客
Y
Y Combinator Blog
U
Unit 42
D
Docker
Recent Announcements
Recent Announcements
Hugging Face - Blog
Hugging Face - Blog
B
Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
G
Google Developers Blog
Last Week in AI
Last Week in AI
T
The Blog of Author Tim Ferriss
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

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(release): keep bun smoke tarballs local · openclaw/op...
vincentkoc · 2026-06-17 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -29,6 +29,29 @@ run_with_timeout() {

2929

node scripts/e2e/lib/bun-global-install/assertions.mjs run-with-timeout "$timeout_ms" "$@"

3030

}

3131
32+

resolve_pack_tarball_path() {

33+

local pack_json_file="$1"

34+

local pack_dir="$2"

35+

node -e '

36+

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

37+

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

38+

const raw = fs.readFileSync(process.argv[1], "utf8") || "[]";

39+

const parsed = JSON.parse(raw);

40+

const last = Array.isArray(parsed) ? parsed.at(-1) : null;

41+

const filename = typeof last?.filename === "string" ? last.filename.trim() : "";

42+

if (

43+

!filename.endsWith(".tgz") ||

44+

filename.includes("\0") ||

45+

filename !== path.basename(filename) ||

46+

filename !== path.win32.basename(filename)

47+

) {

48+

console.error(`ERROR: npm pack reported unsafe tarball filename ${JSON.stringify(filename)}`);

49+

process.exit(1);

50+

}

51+

process.stdout.write(path.resolve(process.argv[2], filename));

52+

' "$pack_json_file" "$pack_dir"

53+

}

54+
3255

restore_dist_from_image() {

3356

local image="$1"

3457

local backup_dir=""

@@ -122,17 +145,7 @@ resolve_package_tgz() {

122145
123146

echo "==> Pack OpenClaw tarball"

124147

npm pack --ignore-scripts --json --pack-destination "$PACK_DIR" >"$pack_json_file"

125-

PACKAGE_TGZ="$(

126-

node -e '

127-

const raw = require("node:fs").readFileSync(process.argv[1], "utf8") || "[]";

128-

const parsed = JSON.parse(raw);

129-

const last = Array.isArray(parsed) ? parsed.at(-1) : null;

130-

if (!last || typeof last.filename !== "string" || last.filename.length === 0) {

131-

process.exit(1);

132-

}

133-

process.stdout.write(require("node:path").resolve(process.argv[2], last.filename));

134-

' "$pack_json_file" "$PACK_DIR"

135-

)"

148+

PACKAGE_TGZ="$(resolve_pack_tarball_path "$pack_json_file" "$PACK_DIR")"

136149

if [ -z "$PACKAGE_TGZ" ] || [ ! -f "$PACKAGE_TGZ" ]; then

137150

echo "missing packed OpenClaw tarball" >&2

138151

exit 1

Original file line numberDiff line numberDiff line change

@@ -126,6 +126,40 @@ read_pack_tarball_filename "$pack_json_file"`,

126126

);

127127

}

128128
129+

function extractResolvePackTarballPath(): string {

130+

const script = readFileSync(BUN_GLOBAL_SMOKE_PATH, "utf8");

131+

const match = script.match(/(resolve_pack_tarball_path\(\) \{[\s\S]*?\n\})\n\nrestore_dist/u);

132+

if (!match) {

133+

throw new Error("resolve_pack_tarball_path helper was not found");

134+

}

135+

return match[1];

136+

}

137+
138+

function runResolvePackTarballPath(filename: string) {

139+

return spawnSync(

140+

"bash",

141+

[

142+

"--noprofile",

143+

"--norc",

144+

"-c",

145+

`${extractResolvePackTarballPath()}

146+

pack_dir="$(mktemp -d)"

147+

pack_json_file="$pack_dir/pack.json"

148+

trap 'rm -rf "$pack_dir"' EXIT

149+

printf '%s' "$PACK_JSON" >"$pack_json_file"

150+

resolve_pack_tarball_path "$pack_json_file" "$pack_dir"`,

151+

],

152+

{

153+

encoding: "utf8",

154+

env: {

155+

HOME: "/tmp",

156+

PACK_JSON: JSON.stringify([{ filename }]),

157+

PATH: process.env.PATH ?? "",

158+

},

159+

},

160+

);

161+

}

162+
129163

describe("test-install-sh-docker", () => {

130164

it("defaults ARM hosts to native arm64 while keeping x64 CI on amd64", () => {

131165

expect(runDefaultSmokePlatform({ CI: "true" }, "aarch64")).toBe("linux/arm64");

@@ -542,6 +576,41 @@ describe("bun global install smoke", () => {

542576

expect(script).not.toContain('\n rm -rf "$ROOT_DIR/dist"\n');

543577

});

544578
579+

it("keeps npm pack tarball paths inside the Bun smoke pack directory", () => {

580+

const script = readFileSync(BUN_GLOBAL_SMOKE_PATH, "utf8");

581+
582+

expect(script).toContain("resolve_pack_tarball_path()");

583+

expect(script).toContain(

584+

'PACKAGE_TGZ="$(resolve_pack_tarball_path "$pack_json_file" "$PACK_DIR")"',

585+

);

586+

expect(script).toContain("filename !== path.basename(filename)");

587+

expect(script).toContain("filename !== path.win32.basename(filename)");

588+

expect(script).toContain("npm pack reported unsafe tarball filename");

589+

});

590+
591+

it("rejects path-like npm pack tarball filenames in Bun smoke metadata", () => {

592+

const safeResult = runResolvePackTarballPath("openclaw-2026.6.17.tgz");

593+
594+

expect(safeResult.status).toBe(0);

595+

expect(safeResult.stdout).toMatch(/\/openclaw-2026\.6\.17\.tgz$/u);

596+
597+

const unsafeFilenames = [

598+

"../openclaw.tgz",

599+

"nested/openclaw.tgz",

600+

"nested\\openclaw.tgz",

601+

"/tmp/openclaw.tgz",

602+

"C:\\temp\\openclaw.tgz",

603+

"openclaw.tar.gz",

604+

];

605+
606+

for (const filename of unsafeFilenames) {

607+

const result = runResolvePackTarballPath(filename);

608+
609+

expect(result.status, filename).not.toBe(0);

610+

expect(result.stderr, filename).toContain("npm pack reported unsafe tarball filename");

611+

}

612+

});

613+
545614

it("gates workflow Bun install smoke to scheduled and release-check runs", () => {

546615

const workflow = readFileSync(INSTALL_SMOKE_WORKFLOW_PATH, "utf8");

547616

const releaseChecks = readFileSync(RELEASE_CHECKS_WORKFLOW_PATH, "utf8");