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

推荐订阅源

S
SegmentFault 最新的问题
J
Java Code Geeks
V
V2EX
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Hugging Face - Blog
Hugging Face - Blog
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
B
Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
月光博客
月光博客
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
腾讯CDC
美团技术团队
大猫的无限游戏
大猫的无限游戏
爱范儿
爱范儿
N
Netflix TechBlog - Medium
C
Check Point Blog
Recent Announcements
Recent Announcements
博客园 - Franky
博客园 - 叶小钗
T
Tailwind CSS 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
fix(build): harden bundled plugin runtime staging · openc...
vincentkoc · 2026-04-25 · via Recent Commits to openclaw:main

@@ -384,6 +384,35 @@ describe("stageBundledPluginRuntime", () => {

384384

expect(fs.readFileSync(runtimePackagePath, "utf8")).toContain('"extensions": [');

385385

});

386386387+

it("copies bundled plugin skill trees into the runtime overlay", () => {

388+

const repoRoot = makeRepoRoot("openclaw-stage-bundled-runtime-skills-");

389+

createDistPluginDir(repoRoot, "feishu");

390+

setupRepoFiles(repoRoot, {

391+

[bundledDistPluginFile("feishu", "index.js")]: "export default {}\n",

392+

[bundledDistPluginFile("feishu", "skills/feishu-doc/SKILL.md")]:

393+

"---\nname: feishu-doc\n---\n",

394+

[bundledDistPluginFile("feishu", "skills/feishu-doc/fixture.txt")]: "# Feishu Doc\n",

395+

});

396+397+

stageBundledPluginRuntime({ repoRoot });

398+399+

const runtimeRoot = path.join(repoRoot, "dist-runtime");

400+

const runtimeSkillPath = path.join(

401+

runtimeRoot,

402+

"extensions",

403+

"feishu",

404+

"skills",

405+

"feishu-doc",

406+

"fixture.txt",

407+

);

408+409+

expect(fs.lstatSync(runtimeSkillPath).isSymbolicLink()).toBe(false);

410+

expect(fs.readFileSync(runtimeSkillPath, "utf8")).toBe("# Feishu Doc\n");

411+

expect(path.relative(fs.realpathSync(runtimeRoot), fs.realpathSync(runtimeSkillPath))).toBe(

412+

path.join("extensions", "feishu", "skills", "feishu-doc", "fixture.txt"),

413+

);

414+

});

415+387416

it("preserves package metadata needed for bundled plugin discovery from dist-runtime", () => {

388417

const repoRoot = makeRepoRoot("openclaw-stage-bundled-runtime-discovery-");

389418

const runtimeExtensionsDir = path.join(repoRoot, "dist-runtime", "extensions");

@@ -480,13 +509,13 @@ describe("stageBundledPluginRuntime", () => {

480509

createDistPluginDir(repoRoot, "feishu");

481510

setupRepoFiles(repoRoot, {

482511

[bundledDistPluginFile("feishu", "index.js")]: "export default {}\n",

483-

[bundledDistPluginFile("feishu", "skills/feishu-doc/fixture.txt")]: "# Feishu Doc\n",

512+

[bundledDistPluginFile("feishu", "assets/fixture.txt")]: "# Feishu Doc\n",

484513

});

485514486515

const realSymlinkSync = fs.symlinkSync.bind(fs);

487516

const symlinkSpy = vi.spyOn(fs, "symlinkSync").mockImplementation(((target, link, type) => {

488517

const linkPath = String(link);

489-

if (linkPath.endsWith(path.join("skills", "feishu-doc", "fixture.txt"))) {

518+

if (linkPath.endsWith(path.join("assets", "fixture.txt"))) {

490519

const err = Object.assign(new Error("file already exists"), { code: "EEXIST" });

491520

realSymlinkSync(String(target), linkPath, type);

492521

throw err;

@@ -496,18 +525,55 @@ describe("stageBundledPluginRuntime", () => {

496525497526

expect(() => stageBundledPluginRuntime({ repoRoot })).not.toThrow();

498527499-

const runtimeSkillPath = path.join(

528+

const runtimeAssetPath = path.join(

500529

repoRoot,

501530

"dist-runtime",

502531

"extensions",

503532

"feishu",

504-

"skills",

505-

"feishu-doc",

533+

"assets",

506534

"fixture.txt",

507535

);

508-

expect(fs.lstatSync(runtimeSkillPath).isSymbolicLink()).toBe(true);

509-

expect(fs.readFileSync(runtimeSkillPath, "utf8")).toBe("# Feishu Doc\n");

536+

expect(fs.lstatSync(runtimeAssetPath).isSymbolicLink()).toBe(true);

537+

expect(fs.readFileSync(runtimeAssetPath, "utf8")).toBe("# Feishu Doc\n");

510538511539

symlinkSpy.mockRestore();

512540

});

541+542+

it.each(["EACCES", "ENOSYS"] as const)(

543+

"falls back to copying runtime assets when Windows symlink creation fails with %s",

544+

(code) => {

545+

const repoRoot = makeRepoRoot("openclaw-stage-bundled-runtime-win-copy-");

546+

createDistPluginDir(repoRoot, "feishu");

547+

setupRepoFiles(repoRoot, {

548+

[bundledDistPluginFile("feishu", "index.js")]: "export default {}\n",

549+

[bundledDistPluginFile("feishu", "assets/fixture.txt")]: "# Feishu Doc\n",

550+

});

551+552+

const platformSpy = vi.spyOn(process, "platform", "get").mockReturnValue("win32");

553+

const realSymlinkSync = fs.symlinkSync.bind(fs);

554+

const symlinkSpy = vi.spyOn(fs, "symlinkSync").mockImplementation(((target, link, type) => {

555+

const linkPath = String(link);

556+

if (linkPath.endsWith(path.join("assets", "fixture.txt"))) {

557+

throw Object.assign(new Error("symlink failed"), { code });

558+

}

559+

return realSymlinkSync(String(target), linkPath, type);

560+

}) as typeof fs.symlinkSync);

561+562+

stageBundledPluginRuntime({ repoRoot });

563+564+

const runtimeAssetPath = path.join(

565+

repoRoot,

566+

"dist-runtime",

567+

"extensions",

568+

"feishu",

569+

"assets",

570+

"fixture.txt",

571+

);

572+

expect(fs.lstatSync(runtimeAssetPath).isSymbolicLink()).toBe(false);

573+

expect(fs.readFileSync(runtimeAssetPath, "utf8")).toBe("# Feishu Doc\n");

574+575+

symlinkSpy.mockRestore();

576+

platformSpy.mockRestore();

577+

},

578+

);

513579

});