NEC-272: P5 · Replay a note's disk edit against its exact base as CRDT operations #345
No reviewers
Labels
No labels
area:docs
area:identity
area:ops
area:plugin
area:server
channel:community
channel:direct
channel:owned
channel:press
channel:social
dependencies
e2ee-constrained
gate:at-ga
gate:pre-ga
marketing
parity
relay:absent
relay:planned
relay:requested
relay:supported
risk:additive
risk:contract
risk:none
security
usability
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Nectenda/nectenda!345
Loading…
Reference in a new issue
No description provided.
Delete branch "worktree-nec-272-replay-a-notes-disk-edit-against-its-exa"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task: NEC-272 — https://projectron.nerchure.com/tasks/283
A note's file change (another program, an edit made while sync was stopped, a save from an unbound editor) is now replayed as whole-line CRDT operations on a copy of the document rebuilt at the exact snapshot the file was built on, and merged into the live document as a collaborator's edit would be (SAFE-A54). That replaces line matching and its keep-both rules for every read-in with an exact base; where none is held, or the rebuilt copy does not read as the base, the old line merge runs and the diagnostic log says so. To rebuild the base, each note keeps the content of deleted text only while a ledger snapshot needs it, through a gcFilter history window released as the snapshots move on (SAFE-A55); let-go entries now carry their snapshot (SAFE-A35). The nearness rule proposed in the plan was removed after review: it deleted a collaborator's lines everywhere when the file repeated part of their edit, so a replay is always from the base. Two Markdown hardness seeds passed on the final code; mobile memory of the window is a manual-testing entry, not yet run.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EV8ztaiamSggtFCLfVKakB
Spec:
docs/changes/NEC-272-exact-base-replay/spec.mdChangelog
A note changed on disk while this vault was not syncing, or by another program, is now merged exactly as a collaborator's edit would be, instead of by matching lines and keeping both versions.