Skip to content

feat(ckpt): make diff -t optional to compare snapshot against current workspace#848

Open
Ziqi002 wants to merge 1 commit into
alibaba:mainfrom
Ziqi002:fix/ckpt-issue-846
Open

feat(ckpt): make diff -t optional to compare snapshot against current workspace#848
Ziqi002 wants to merge 1 commit into
alibaba:mainfrom
Ziqi002:fix/ckpt-issue-846

Conversation

@Ziqi002

@Ziqi002 Ziqi002 commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Description

改动范围

从 CLI 到 daemon 到插件全栈适配:

协议层Request::Diff.toString 改为 Option<String>
StorageBackend::diff()to 参数从 &str 改为 Option<&str>

CLI:clap 的 -t 参数从 required 改为 optional。

daemonsnapshot_mgrdispatcher 适配 Option 传递。
两个 backend(btrfs_basebtrfs_loop)在 toNone
使用 data_root.join(ws_id) 作为 live subvolume 路径。

插件:hermes(Python)和 openclaw(TypeScript)的 tool schema
to 从 required 移除,命令构建改为有条件添加 --to

Related Issue

closes #846

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional change)
  • Performance improvement
  • CI/CD or build changes

Scope

  • cosh (copilot-shell)
  • sec-core (agent-sec-core)
  • skill (os-skills)
  • sight (agentsight)
  • tokenless (tokenless)
  • memory (agent-memory)
  • ckpt (ws-ckpt)
  • Multiple / Project-wide

Checklist

  • I have read the Contributing Guide
  • My code follows the project's code style
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the documentation accordingly
  • For cosh: Lint passes, type check passes, and tests pass
  • For sec-core (Rust): cargo clippy -- -D warnings and cargo fmt --check pass
  • For sec-core (Python): Ruff format and pytest pass
  • For skill: Skill directory structure is valid and shell scripts pass syntax check
  • For sight: cargo clippy -- -D warnings and cargo fmt --check pass
  • For tokenless: cargo clippy -- -D warnings and cargo fmt --check pass
  • For memory (Linux only): cargo clippy --all-targets -- -D warnings, cargo fmt --check, and cargo test pass
  • Lock files are up to date (package-lock.json / Cargo.lock)

Testing

Additional Notes

… workspace

- CLI: change -t from required to optional (alibaba#846)
- protocol: Request::Diff.to becomes Option<String>
- backend trait: diff() to parameter becomes Option<&str>
- daemon: when to is None, use live workspace subvolume as target
- hermes plugin: to removed from required params in tool schema
- openclaw plugin: diff command, handler, and tool registry updated
  to support optional to parameter

Signed-off-by: Ziqi Huang <ziqi02@alibaba-inc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ckpt] feat: diff -t 改为可选,支持快照与当前工作区比较

1 participant