From 10f4e55b1c7d88eef1454ea02488de239489789b Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 29 Nov 2026 03:04:13 +0000 Subject: document: screening what is received is the document's, the rules access control's access::screen becomes document::screen: reading received bytes as changes, putting them in order, keeping those that wait or are refused, vouching by signatures and applying is all Automerge's shape, and has each change judged by the rules (access::rules) before it applies it. --- docs/document.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'docs/document.md') diff --git a/docs/document.md b/docs/document.md index 553d8f5..f0abb1f 100644 --- a/docs/document.md +++ b/docs/document.md @@ -76,8 +76,13 @@ Asked by [`swarm/sync.rs`](../src/swarm/sync.rs), `relay`, `blob`, the dissemina ### Judging -Asked by [`access/screen.rs`](../src/access/screen.rs), `rules`, `holding`, and by -`state` for the node's own writes. +What is received is read, put in order and applied by +[`document/screen.rs`](../src/document/screen.rs), which has each change judged before +it applies it; `state` has the node's own writes judged alike. The rules +([`access/rules.rs`](../src/access/rules.rs), `holding`) judge a unit, who made it, for +whom, and what it writes where, reading the document as its writer saw it +(`rules::judge_seen`), and know of no change; what is Automerge's of judging one is +beside them (`rules::judge`). The unit judged is one change. Judging it takes: @@ -93,7 +98,7 @@ The unit judged is one change. Judging it takes: A change refused is kept out with all that builds on it, its hash remembered; one taken and found wrong later is dropped with what builds on it, by a walk of the history and a -document made anew without them (`AppState::drop_taken`). +document made anew without them (`document::dropping`, for `AppState::drop_taken`). ### Whole documents @@ -113,9 +118,8 @@ document made anew without them (`AppState::drop_taken`). A remake moves a swarm to a new document ([`remakes.md`](remakes.md)). It asks the most: a document built byte for byte alike on every node, the document at given heads, the changes after them in their order with their times, writers and what they touched, a -commit taken back, a change fetched by its hash. And it holds what isn't its own: the -writers this node has written under (`RemakeState::own_actors`), and the writes kept -aside when a change is dropped (`remake::quarantine_taken`). +commit taken back, a change fetched by its hash. And it holds what isn't a remake's: the +writes kept aside when a change is dropped (`remake::quarantine_taken`). Of its reasons, these come of the history: compacting, leaving writers behind, keeping what a rejoining node fetches small, and ending writes made at a history from before. -- cgit v1.3.1