fix: 同步与导出的数据安全与执行层正确性 - #4
Merged
Merged
Conversation
Merged
ceynri
added this pull request to stack #6
October 2, 2026 09:01
ceynri
force-pushed
the
fix/sync-correctness
branch
from
October 2, 2026 09:01
3260989 to
6a00e93
Compare
同名笔记加 id 后缀避免互相覆盖;首次 sync 认领已有 export 文件; 删除只进回收站;部分失败写入 data.errors 并以退出码 2 结束; 本地子目录映射云端文件夹,标题取文件名;过期计划跳过不覆盖; export 增量缓存;附件下载失败不再毁掉正文。
ceynri
force-pushed
the
fix/sync-correctness
branch
from
October 2, 2026 09:04
6a00e93 to
d8968c8
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.
情境
同步执行层以前几乎没有单测,若干路径会丢数据或给出假成功:同名笔记写到同一个文件、首次 sync 把 export 产物再上传一份、删除直接 purge、JSON 模式吞掉单条失败、子目录新文件建到云端根目录。
这次改什么
_<id>后缀;旧状态文件下次 sync 自动修复data.errors,进程退出码 2d看差异export增量缓存放在全局缓存目录,不往笔记目录写状态../assets/本 PR 带同步执行层单测(内存假客户端)。
怎么 merge
叠放 PR 第 4 个,也是最后一组。合完 #1–#3 后把 base 改成 main 再合。