NEC-276: NEC-268 stage A: a provenance ledger per file, and content-sync onto it #306
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
e2ee-constrained
gate:at-ga
gate:pre-ga
marketing
parity
relay:absent
relay:planned
relay:requested
relay:supported
risk:additive
risk:contract
risk:none
usability
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Nectenda/nectenda!306
Loading…
Reference in a new issue
No description provided.
Delete branch "worktree-nec-276-nec-268-stage-a-a-provenance-ledger-per"
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-276 — https://projectron.nerchure.com/tasks/287
Stage A of NEC-268: content-sync moves onto one provenance ledger per note (provenance-ledger.ts, with a synchronous MurmurHash3 x86_128 text hash), replacing the record, the session's contained texts, the bound editor's in-memory saves and the own-write flag. writeToDisk reads the file once; its re-reads after awaits are generation checks, which also catch A-B-A. Bound saves persist across a quit, and the editor's let-go text is one of them, so its late save after our write no longer removes a remote change. Migration from the v1 record with a tombstone, downgrade detection, rename carry, and the structured takeover reading the note ledger. Decisions 14-18 in the spec came from the extended property test and a fresh-context review. Rides along: NEC-307 (a stale second reader taking a file in twice) and NEC-308 (an unknown file written over with no copy after a first write that did not land). Local gate green; Markdown hardness 63 min over two seeds (one failure reproduced identically on main, filed as NEC-309).
Spec:
docs/changes/NEC-276-provenance-ledger-stage-a/spec.mdAlso fixes NEC-307: Two content-sync readers merge after an await without checking the file was not taken in meanwhile
Also fixes NEC-308: A note with nothing recorded is written over with no copy after a first write that did not land
Changelog
Notes keep track of what an open editor saved, across a restart too, so a save that lands late no longer brings back deleted text or removes a collaborator's change.