aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-12 22:23:15 +0000
committertv <tv@krebsco.de>2026-11-12 22:23:15 +0000
commite519ade32a87811f287bb851e3e1dfcde6b064c9 (patch)
tree9fff94327105957f3a958d55a668cc3a5cf6bf9a /docs
parentbfe93eea9b707b29b78e1f9a7a425e6f891701a0 (diff)
screen: refuse changes Automerge wouldn't have written
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.
Diffstat (limited to 'docs')
-rw-r--r--docs/access.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/access.md b/docs/access.md
index 5a1e04b..1b40ed2 100644
--- a/docs/access.md
+++ b/docs/access.md
@@ -309,6 +309,12 @@ its change and the node's changes it builds on, no others: a change made under a
node's actor is forged, refused, and logged as its sender's (`A peer brought changes
forged`). A member can then no longer write as another member; the user a change names is still its node's word.
+Whatever the policy, and without one, a change is refused that Automerge itself
+wouldn't have written: bytes that aren't Automerge's encoding of the change, a first
+operation not numbered one after the highest of its dependencies, an operation that
+names one nobody made before it (an object written into, a value replaced). Automerge
+applies some of those, and then panics or saves a document that doesn't load.
+
In a swarm without a registry, whatever a user would need, any member may. A refused
change stays out, and so does whatever builds on it; the node logs it (`Refused a
change`) and lists the last thousand (`GET /admin/refused`). Offered again, as its