Frontmatter as a Y.Map #49
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Nectenda/nectenda#49
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Part of #37.
What Relay does
Frontmatter synced as a Yjs Map with visual-property-editor support since 0.7.0.
Worth knowing they hit real trouble here: their issues #116 (a frontmatter append
loop, a
Y.Text↔Y.Mapdeadlock) and open PR #127 (gating frontmatter Mapwrites on provider sync) are both in this exact area.
What we do today
Frontmatter is part of the markdown
Y.Text, so concurrent property edits mergecharacter-wise. Usually fine; occasionally produces YAML that is syntactically
wrong in the way
blob-policy.tsalready warns about for JSON.What changes
A second root on the file's document holding frontmatter as a
Y.Map, withthe body staying in
Y.Text. This is where Relay's deadlock came from, so theordering between the two roots needs to be designed rather than discovered —
CLAUDE.mdnames async ordering as a recurring hazard here, with at least fourbugs already attributed to it.
Risk
risk:additive. A new root on an existing document; older clients replicate itwithout acting on it, exactly as with
Y.Map('blobs')from Phase 8. Gate withMIN_PLUGIN_VERSIONif the transition proves awkward.Verification
Concurrent property edits from two vaults; the file always parses. Invert the
ordering rule and confirm the test fails.
Moved to the Vikunja board as NEC-26: https://projectron.nerchure.com/tasks/26