fix(engine): 防止同步复活旧 backfill notes - #202
Merged
Merged
Conversation
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.
Mainline Intent
Intent:
int_94a2bcc0Status:
proposedTitle: 防止同步复活历史改写前的 backfill notes
What changed
当 intent 已是 merged 且存在 MergedMainCommit 时,Pin 不再按不可变 seal 事件中的旧 BackfillCommits 写 note,而是进入现有的 merged 主线证据路径;新增回归测试覆盖旧提交被改写、新提交已有 merge note 后再次 Pin 的行为。
Why
notes migrate 已把证据迁到改写后的主线 commit,但旧 BackfillCommits 仍保留在 seal 事件中。此前每次 sync 都会据此把 note 重新写回旧 commit,使 notes rewrite drift 无法稳定恢复。
Decisions
Subsystems: engine, notes, sync