Skip to content

feat(skill): add upgrade command (0.2.9)#43

Merged
Shadow-Azure merged 10 commits into
mainfrom
feat/skill-upgrade-command
Jun 20, 2026
Merged

feat(skill): add upgrade command (0.2.9)#43
Shadow-Azure merged 10 commits into
mainfrom
feat/skill-upgrade-command

Conversation

@Shadow-Azure

@Shadow-Azure Shadow-Azure commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Problem

Users have no way to upgrade cli-box without manually running npm commands and restarting services. npx cli-box-skill install overwrites SKILL.md, which may contain user customizations. Additionally, the upgrade flow had no CI coverage — regressions in publish/install/upgrade could ship undetected.

Solution

1. Add upgrade command

  • cli-box-skill upgrade [version] safely stops sandboxes/daemon/Electron before upgrading
  • upgrade preserves SKILL.md (unlike install)
  • Document upgrade method in SKILL.md and README.md

2. CI integration for upgrade flow

  • Inline publish-sim, skill-upgrade-flow, skill-unit-test into CI gate (ci.yml)
  • Gate now requires all 10 checks to pass (was 7)
  • test-upgrade.yml remains as standalone workflow for PR path-filtered + manual triggers

Key commits

  • 42b498e feat(skill): add upgrade helper functions to shared.mjs
  • 16ad931 feat(skill): add upgrade subcommand to cli-box-skill
  • 89d6d8f docs(skill): add upgrade instructions to SKILL.md
  • 9e6cd3f docs: add upgrade instructions to README.md
  • 050efcd ci: inline upgrade test jobs into CI gate
  • 322a2e6 ci: integrate test-upgrade into CI gate + add publish simulation

Test Plan

  • cli-box-skill upgrade with no daemon running
  • cli-box-skill upgrade with running sandboxes (Cancel flow)
  • cli-box-skill upgrade with running sandboxes (Close all flow)
  • SKILL.md preserved after upgrade
  • Binaries relinked after upgrade
  • All 18 existing tests pass
  • Publish simulation: tarball file list + package.json structure
  • CI gate passes with all 10 checks (including 3 new upgrade tests)
  • Test Upgrade standalone workflow passes (manual trigger)

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

🔒 门禁检查结果

检查项 状态
Rust 格式化 ✅ success
Rust Clippy ✅ success
Rust 测试 & 覆盖率 ✅ success
前端测试 & 覆盖率 ✅ success
Playwright E2E ✅ success
统一测试 (test.sh) ✅ success
安全检查 ✅ success
发布模拟验证 ✅ success
升级流程测试 ✅ success
cli-box-skill 单元测试 ✅ success

Rust 测试覆盖率

指标 覆盖率
行覆盖率 66.0%
分支覆盖率 0.0%
模块 行覆盖率
crates.cli-box-core.src.daemon ██████████░░░░░░░░░░ 50.7%
crates.cli-box-core.src.process ██████████░░░░░░░░░░ 54.7%
crates.cli-box-core.src.sandbox ███████████████████░ 98.8%
crates.cli-box-core.src.capture ████████████████████ 100.0%
crates.cli-box-core.src ███████████░░░░░░░░░ 55.3%
crates.cli-box-core.src.server █████████████████░░░ 87.7%
crates.cli-box-core.src.automation ███████████░░░░░░░░░ 58.3%
crates.cli-box-core.src.instance ███████████████████░ 99.1%

详细报告见 Rust 覆盖率 artifact

前端测试覆盖率

指标 覆盖率
行覆盖率 ███████████████░░░░░ 75.6%
分支覆盖率 65.7%
函数覆盖率 73.4%
语句覆盖率 75.0%
文件 行覆盖率
src/tests/mocks/websocket.ts ██████████████████░░ 88.0%
src/tests/mocks/xterm.ts ████████████████████ 100.0%
src/main/daemon-bridge.ts ████████░░░░░░░░░░░░ 40.0%
src/renderer/api.ts ██████████████░░░░░░ 68.2%
src/renderer/scrollback.ts ██████████████████░░ 88.9%
src/renderer/tabState.ts ████████████████████ 100.0%
src/renderer/terminalBuffer.ts ████████████████████ 100.0%

详细报告见前端覆盖率 artifact

✅ 所有检查通过,可以合入

点击 Squash and merge 合并此PR

ZN-Ice added 6 commits June 20, 2026 21:09
- Add workflow_call trigger to test-upgrade.yml for reusable workflow
- Add publish-sim job: validates tarball file list and package structure
- Wire test-upgrade as a required check in ci.yml gate-result
- Include upgrade test status in gate summary and PR comment
Reusable workflow via uses: doesn't expose jobs to needs context.
Inline publish-sim, skill-upgrade-flow, skill-unit-test directly
into ci.yml so gate-result can check their status.

Remove workflow_call from test-upgrade.yml (not needed for inline).
Keep test-upgrade.yml as standalone workflow for PR/manual triggers.
0.3.0 doesn't exist; use 0.2.9 (next release after current 0.2.8)
as the example version in upgrade command docs.
@Shadow-Azure Shadow-Azure merged commit 2e69a38 into main Jun 20, 2026
16 checks passed
@Shadow-Azure Shadow-Azure mentioned this pull request Jun 23, 2026
2 tasks
Shadow-Azure added a commit that referenced this pull request Jun 23, 2026
Bundles since v0.2.8: upgrade command (#43), AI-agent + OpenClaw + 飞书
workflow (#45), and the screenshot-subsystem fixes (#46 — bounded
burst-wait settle + awaitFrame rAF-throttle fallback).

Co-authored-by: ZN-Ice <zn-ice@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant