aboutsummaryrefslogtreecommitdiffstats
path: root/docs/federation.md
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-12 22:23:16 +0000
committertv <tv@krebsco.de>2026-11-12 22:23:16 +0000
commitff6a7acc6ef643ba9fb282369d41468eb8efd58d (patch)
tree1f03838375b5d3575f8db198d807d618e64fa163 /docs/federation.md
parent74fbd89aebcede8f38bff8d08e4642f9c71117e7 (diff)
federation: changes Automerge wouldn't write are refused today
Screening refuses them in every swarm, so the design builds on it and no stage adds it.
Diffstat (limited to 'docs/federation.md')
-rw-r--r--docs/federation.md25
1 files changed, 13 insertions, 12 deletions
diff --git a/docs/federation.md b/docs/federation.md
index fcf3d14..9241e8e 100644
--- a/docs/federation.md
+++ b/docs/federation.md
@@ -1092,11 +1092,12 @@ statement on its side.
### What every node judges
A change is first of all one that Automerge itself writes, or it is refused before
-Automerge sees it: its bytes are the ones Automerge encodes for it; every other actor
-it names has changes in its history; and its first operation is numbered one after
-the highest of its dependencies. Automerge 0.12 applies changes that are none of
-these, and then panics, or saves a document that doesn't load *(measured upstream)*.
-All three are read from the change and its history, as the rules are.
+Automerge sees it, in every swarm *(checked: `document::changes::Written`)*: its
+bytes are the ones Automerge encodes for it; its first operation is numbered one
+after the highest of its dependencies; and every operation it names was made before
+it. Automerge 0.12 applies changes that are none of these, and then panics, or saves
+a document that doesn't load *(measured upstream)*. All three are read from the
+change and its history, as the rules are.
A change is valid if, in the document at its dependencies:
@@ -1855,7 +1856,7 @@ Nodes and syncing:
| 102 | Writes its own member entry without end; fills the waiting changes; sends changes that say they saw little, each to be judged far back | Take them no faster than a budget per party: put off, never refused; a share of the waiting each | 6 | sim: `a_party_past_its_budget_waits` |
| 103 | Starts a writer with every change: each costs every node memory in proportion to the document's history | Refuse past `limits.writers` a user, as the change's history shows. Out of each other's sight they are valid, and held: the user's nodes have then shown more than the limit, under their signatures, and are refused as peers; the party's budget, which counts a new writer for more than a change, bounds how many came first. A remake leaves them out | 6; not bounded out of sight | unit: `limits_on_writers`; sim: `writers_out_of_sight` |
| 104 | Crafts a change Automerge won't take, or that writes in an object nowhere to be found | Refuse *(checked: the rules refuse the second today)*; only the message that brought it fails | 1 | unit: `a_change_writing_nowhere` |
-| 105 | Crafts a change Automerge takes and shouldn't: bytes it wouldn't encode itself, an actor named that nobody wrote as, operations numbered far ahead of its dependencies' or below them | Refuse before Automerge sees it: applied, such a change makes a node panic, or its document save to bytes that don't load | 1, 2 | unit: `only_what_automerge_writes` |
+| 105 | Crafts a change Automerge takes and shouldn't: bytes it wouldn't encode itself, an actor named that nobody wrote as, operations numbered far ahead of its dependencies' or below them | Refuse before Automerge sees it: applied, such a change makes a node panic, or its document save to bytes that don't load | 1, 2 | unit, exist: `bytes_automerge_wouldnt_encode_are_refused`, `operations_numbered_against_their_dependencies_are_refused`, `operations_naming_what_nobody_made_are_refused` |
Rules, and the swarm as it is:
@@ -1928,12 +1929,12 @@ their vectors. At every stage the existing tests pass untouched (112).
1. **A federated swarm's frame.** `--genesis-policy` (a file, written into the genesis
change with the roots, the voters and the users it starts with); a federated node
- is given its root, syncs under no policy it doesn't know, refuses a change that
- isn't what Automerge itself writes, takes no remake yet, takes tokens and logins by
- key as its operator says, keeps ended sessions to itself, stamps as the policy
- says, and writes a member entry of the policy's shape and size. What the genesis
- change sets for the swarm as a whole is read from the policy. Tests: 97 to 100,
- 105, 108, 112, and the policy's existing tests under a policy from the root.
+ is given its root, syncs under no policy it doesn't know, takes no remake yet,
+ takes tokens and logins by key as its operator says, keeps ended sessions to
+ itself, stamps as the policy says, and writes a member entry of the policy's shape
+ and size. What the genesis change sets for the swarm as a whole is read from the
+ policy. Tests: 97 to 100, 108, 112, and the policy's existing tests under a policy
+ from the root.
2. **Statements.** The users' registers (`create`, `key`, `node`, `vouch`, `release`);
the user ID, the epoch and what its signer saw in an envelope; nodes carrying for
users by their own word, and the rule for committers by it; nothing plain; the