Skip to content

fix(engine): 防止同步复活旧 backfill notes - #202

Merged
catoncat merged 1 commit into
mainfrom
agent/fix-notes-backfill-rewrite-20260721
Jul 21, 2026
Merged

fix(engine): 防止同步复活旧 backfill notes#202
catoncat merged 1 commit into
mainfrom
agent/fix-notes-backfill-rewrite-20260721

Conversation

@catoncat

Copy link
Copy Markdown
Collaborator

Mainline Intent

Intent: int_94a2bcc0
Status: proposed
Title: 防止同步复活历史改写前的 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

  • 何时仍应使用显式 BackfillCommits: 保留 proposed 与尚无 MergedMainCommit 的既有 backfill 行为;仅对已有权威 merged 主线证据的 intent 跳过旧 backfill commits (以最小条件消除历史改写后的证据复活,同时不改变正常补录和未完成 pin 的行为)
    • Rejected: 修改 immutable seal 事件中的 BackfillCommits
    • Rejected: 在 sync 后再次批量删除旧 notes

Subsystems: engine, notes, sync

@catoncat
catoncat merged commit c7e0306 into main Jul 21, 2026
8 checks passed
@catoncat
catoncat deleted the agent/fix-notes-backfill-rewrite-20260721 branch July 21, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant