aboutsummaryrefslogtreecommitdiffstats
path: root/src/document/testing.rs
Commit message (Collapse)AuthorAgeFilesLines
* screen: refuse changes Automerge wouldn't have writtentv5 days1-0/+64
| | | | | | | | | | | | | | | | | | | | | Automerge 0.12.0 applies a change that lists an actor none of its operations names, or whose first operation is numbered below its dependencies' or near 2^32. It then gives back another change than the one it was given and saves a document that doesn't load, or panics at the next write. A member sending one stops the nodes that take it. Every change from elsewhere is looked at before Automerge sees it (`document::changes::Written`, from `access::screen::apply`, with or without a policy), and refused like one breaking a rule unless: * encoded again, it has the hash it came with; * its first operation is numbered one after the highest of its dependencies, 1 without any, as a transaction at the document's heads numbers it; * every operation it names (an object, a list's element, an operation replaced) is its own, or was made before it, in the document or by a change of the batch looked at before.
* refuse misplaced authorstv10 days1-0/+45
|
* use Automerge as Document instead of AutoCommittv2026-10-311-8/+10
| | | | This allows a lot of operations to drop mut.
* tests write through document::testing helperstv2026-10-311-0/+29