fix(ckpt): drop --copy-unsafe-links from init rsync#873
Open
Ziqi002 wants to merge 1 commit into
Open
Conversation
Absolute internal symlinks break after rename moves the workspace to a backup dir. rsync --copy-unsafe-links tries to dereference them and fails with exit 23 (issue alibaba#798). Plain -a preserves symlinks as-is; once init creates the original-path -> subvolume symlink, they resolve correctly via chain resolution. Signed-off-by: Ziqi Huang <ziqi02@alibaba-inc.com>
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
问题
未初始化的 workspace 里有指向自身的绝对路径 symlink 时,init 把目录
rename 到 backup 后,这些 symlink 的目标路径断裂。rsync --copy-unsafe-links
把它们当"指向源树外"的 symlink 尝试解引用,目标不存在报 exit 23。
修法
去掉 --copy-unsafe-links,只保留 -a。symlink 原样保留,init 完成后
original-path -> subvolume 的 symlink 让绝对内部 symlink 通过链式解析
正确工作,和 InPlace 场景的 cp -a 行为一致。
Related Issue
closes #798
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
测试脚本
Additional Notes