Repository navigation
fix(路径): 系统别名两种写法下的身份比较保持一致 - #77
Merged
Merged
Conversation
macOS 上 /tmp、/var 是指向 /private/tmp、/private/var 的系统别名。部分路径用 absolute() 保留原写法,另一些被解析,还有直接按字符串比较,同一目录换一种写法就被当成两个身份:集成清单 mirror 与旧版整目录清单 target 误判、分身记录比较失准、同进程状态锁按两种写法重入时自锁、加入蓝图与全局主目录路径与已解析的工作区根不一致。 新增 read_limits.canonical_entry_path,只把受信任的顶层 /tmp、/var 别名改写为 /private 写法,不跟随其他符号链接。清单、分身与旧版清单的比较两侧都做规范化,0.7.17 写出的旧写法仍被识别;状态锁的进程内键、全局主目录与蓝图加入根使用规范写法。加入根不做完整 resolve,最终分量是用户符号链接时仍被拒绝。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
# Conflicts: # CHANGELOG.md
Merged
This branch had an error being deployed
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.
问题
macOS 上
/tmp、/var是指向/private/tmp、/private/var的系统别名。部分代码用absolute()保留原写法,另一些解析路径,还有按字符串比较,同一目录换一种写法即被当成两个身份(条件性风险:需用户切换DYRO_HOME、工作区或临时目录的写法才触发):mirror、旧版整目录清单target按字符串比较 → 误报STALE_MANIFEST、迁移/卸载旧版分身静默失效;drifted/legacy_copy判错;state.exclusive_lock进程内重入键用absolute()→ 同进程两种写法重入自锁;修复
read_limits.canonical_entry_path:只改写受信任的顶层/tmp、/var别名,不跟随其他符号链接;_checked_absolute复用它。registry_home()、_absolute_path、蓝图加入根使用规范写法。resolve():最终分量是用户符号链接时,preflight_join_plan仍拒绝(新增测试)。验证
tests.test_integrations tests.test_state tests.test_hub tests.test_blueprint:174 项通过。ruff check src tests experiments:通过。resolve()绕过符号链接拒绝;旧版清单target比较)已修复并补测试;导入环、锁、0.7.17 mirror 清单兼容经审查确认无问题。已知边界
/private/...写法;降级回 0.7.17 的字符串比较会把这类清单看作过期(降级场景)。/tmp、/var以外的用户自建中间符号链接不做归一,与改动前一致。