From 79f17df285e376892c691b7a27f90a89cf8a32ea Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 13 Nov 2026 03:25:50 +0000 Subject: screen: a change refused after its checks stands in for nothing Screening checks that a change is one Automerge writes (`changes::Written`) before it looks for forks and judges the rules, and the checks recorded what a change made as soon as it passed them. A fork of a change the document holds has its actor and counters: if it was checked first in a batch, and refused as forged after, its record stood in for that change's operations, outside the history of the next. An honest change writing into what the real one made was then refused, for good. Anyone could make such a fork, its hash ground to sort first. What a change made is recorded once screening takes it (`Written::taken`), and an operation named is looked for in the batch and in the document, whichever the change's history holds. --- src/access/screen.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/access') diff --git a/src/access/screen.rs b/src/access/screen.rs index cb088d5..b616238 100644 --- a/src/access/screen.rs +++ b/src/access/screen.rs @@ -544,6 +544,7 @@ pub(crate) fn apply( }; match judged { Ok(()) => { + written.taken(&change, &decoded[index]); accepted.push(change); if let Some(committer) = committer { screened.taken_from.insert(committer.to_owned()); -- cgit v1.3.1