NEC-269: P2 · An explicit per-file lifecycle state machine for sync #308
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!308
Loading…
Reference in a new issue
No description provided.
Delete branch "worktree-nec-269-an-explicit-per-file-lifecycle-state-mac"
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-269 — https://projectron.nerchure.com/tasks/280
Give every synced file, note or structured, one explicit lifecycle state (SAFE-A45). Each lifecycle event is legal only in certain states, and every change of state is logged. A refused event is logged and leaves the file on the disk path, where copies are kept: nothing is written over it, and no view is bound. A structured file's connect whose first write gives up (the file never appears, or the write throws) now enters a visible stalled state, retried on a back-off from 30 s to 5 min, instead of staying off the live path until some other write. NEC-310 rides along: a write whose backup copy could not be kept no longer writes over the file. It leaves the file alone and retries. NEC-317 rides along: a canvas hardness harness fix. Hardness runs, an hour each on mixed versions, on the branch: Markdown 346 rounds, Excalidraw 289, canvas 255. Every other failure on the way was reproduced on main or was the harness bug, and each is filed: NEC-312 to NEC-316, NEC-318, FLAKE-20. Full record in docs/changes/NEC-269-file-lifecycle/spec.md. Tested by hand in the user's vaults.
Spec:
docs/changes/NEC-269-file-lifecycle/spec.mdAlso fixes NEC-310: A failed backup is ignored and the file written over with no copy
Also fixes NEC-317: The canvas hardness run expects a revived card to keep its file's old path after a rename
Changelog
A canvas or drawing whose first save after connecting failed now goes live again once that save is retried, instead of staying on the slower disk path until something else changed.