aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/stats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-13 04:49:38 +0000
committertv <tv@krebsco.de>2026-11-13 04:49:38 +0000
commit369cfb6a110ed384f18792ccd13a50f7cf27559a (patch)
tree3b792e3cbd40967cdf2ed011196d44ee6d16af05 /src/api/stats
parent519e0a1019b9f74ce8a12773a47d613a05aecdf8 (diff)
screen: take only the operations transactions write
Screening asked what an operation isn't: a deletion replacing nothing, a value put at a list's head without inserting, a mark ended but right after its begin. Others pass that Automerge's transactions never write, and Automerge takes them and breaks: an element written over naming as replaced the element inserted after it (an inserted element's key is the element it follows, its place is itself), an insert replacing something, a deletion or an increment inserted, an increment at a list's head, a mark ended ahead of its begin or at the head, a mark in a list. Giving such a change back panics or gives another change under its hash, and the save doesn't load. Each operation is now asked to be one transactions write (`document::changes::unwritten`): inserted, a value, an object or a mark's begin or end into a list or a text, replacing nothing; at a list's element, never its head, without inserting, replacing what is at that element; at a map's key, never inserted, a deletion or an increment replacing something; a mark's begin with its end as the next operation, both inserted. A value replaced at a list's element is the element itself or written at it, not an element inserted after it. Marks are only in a text, and a mark's end is at its begin or at an element after the begin's: their places follow from the elements each is inserted after, back to the text's head, as the change's history holds them. The document the tests write now has counters in a list and a map, an element written over, and marks over a span, the whole text, none of it, and across what was deleted and inserted since; and each case above is a test.
Diffstat (limited to 'src/api/stats')
0 files changed, 0 insertions, 0 deletions