fix(ckpt): refuse recover when regular directory occupies workspace path#860
Open
Ziqi002 wants to merge 1 commit into
Open
fix(ckpt): refuse recover when regular directory occupies workspace path#860Ziqi002 wants to merge 1 commit into
Ziqi002 wants to merge 1 commit into
Conversation
- init: append hint when symlink replaced by regular directory (alibaba#694) - recover: bail if original_path is not a symlink to prevent data loss - update and add tests for both paths Signed-off-by: Ziqi Huang <ziqi02@alibaba-inc.com>
bac08cd to
18b47ed
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
init 错误提示增强
issue #694 的 symlink 健康检查发现路径不是 symlink 时,现在会追加
note: path is currently a regular directory — move or rename it before running recover to avoid data loss,分行显示避免信息堆叠。recover 拒绝覆盖普通目录
btrfs_base 和 btrfs_loop 两个后端的
recover_workspace第 1 步,如果
original_path存在且不是 symlink,直接 bail 而不是跳过删除后让
rsync --delete静默覆盖用户数据。Related Issue
closes #694
Type of Change
Scope
cosh(copilot-shell)sec-core(agent-sec-core)skill(os-skills)sight(agentsight)tokenless(tokenless)memory(agent-memory)ckpt(ws-ckpt)Checklist
cosh: Lint passes, type check passes, and tests passsec-core(Rust):cargo clippy -- -D warningsandcargo fmt --checkpasssec-core(Python): Ruff format and pytest passskill: Skill directory structure is valid and shell scripts pass syntax checksight:cargo clippy -- -D warningsandcargo fmt --checkpasstokenless:cargo clippy -- -D warningsandcargo fmt --checkpassmemory(Linux only):cargo clippy --all-targets -- -D warnings,cargo fmt --check, andcargo testpasspackage-lock.json/Cargo.lock)Testing
cargo test -p ws-ckpt-daemon -- workspace_mgr全部 27 个测试通过,包括新增的
init_registered_but_regular_dir_returns_error_with_hint。测试脚本:
Additional Notes