aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* store: what is above some heads names nothing before themtv27 hours1-0/+9
| | | | | | | | | An event above some heads has each of its dependencies among them or above them, not only them all in its history. The store holds after its checkpoint only events whose dependencies are its heads and the events after them, and so it holds every event above them: one naming an event before them as well is refused by a node that moved, and never taken by one starting from the checkpoint, which never held what it names. Tests show it for an event offered after the move and one taken before it.
* store: forks and mergestv27 hours1-0/+87
| | | | | | | | The fold makes a fork's root from the states at heads of one store, or of several, which merges them, and what makes the fork; the store gives it the states, and the events the root keeps, from the stores holding them. A node holding those heads checks a root by building it. A fork and the stores it came from take nothing of each other: what each writes after builds on what the other doesn't hold.
* store: moving to a checkpoint, and starting from a pinned onetv27 hours2-8/+235
| | | | | | | | | | | | | Once the fold names heads of a later checkpoint (events after the store's, none in another's history), the store builds the checkpoint at them, keeps what the fold keeps, forgets what came before them, and refuses every event not above them, with what waits on such an event. What it forgot is held as accounted for: brought again, it is held, and an event built on it isn't above the heads. A store starts from a checkpoint its operator pins, its events building on the heads the checkpoint was built at. A node starting from a checkpoint must judge the event that named it as every node does; the fold for the tests counts the heads of the checkpoint a state starts from as after the checkpoint current at them, so that it does.
* store: a node's own refusals, and its operator's dropstv27 hours1-0/+126
| | | | | | | | | | Where its history takes an event but the fold has the node refuse it by what it took before (the federation's second version changing one), the store refuses it as its own. An operator may have the node drop events taken after its checkpoint, with everything built on them, and refuse them from then on; what the checkpoint keeps, or holds by ID, isn't dropped, as every event after it builds on that. The operator takes either back by allowing it, and what was refused for being built on it, to be offered again. The fold for the tests shows both with its eras.
* store: a store held in memory, and a fold for its teststv27 hours3-0/+803
| | | | | | | | | | | | | | | A store starts from its root, with the events the root keeps, and holds the events taken after it. An event offered is taken once the store holds its dependencies, where it is above the store's heads (built on an event after them, or on all of them) and the fold takes it at its history: the state its history reads as, folded from the checkpoint. An event waits for what it builds on, and is taken when that comes; one built on a refused event, or whose bytes are none of the fold's, is refused, with what waits for it. The fold made for the tests judges by history (a put refused where its key is locked), reads by what counts (a key's latest put, then the lowest ID), refuses by what a node took before (two eras of one number), and moves to checkpoints (cuts), as the federation does, so that the later stages' tests have something to exercise.
* federation: the feature, and the store's foldtv27 hours3-0/+131
| | | | | | | | | | | | `federation`, a feature of its own, builds what `docs/federation.md` and `docs/store.md` design, stage by stage; without it continuum builds and behaves as it does. The aliases build with it, and `docs/development.md` says so. Its first part is the store's: an event's ID, the SHA-256 of its bytes written as 64 lower-case hex digits and read back only so, and the `Fold` trait as `docs/store.md` gives it. The trait reads a checkpoint's parts too, the heads it was built at and the events it keeps, which a node taking a pinned checkpoint needs; the design names it. Nothing uses either yet, but a test.
* screen: `Screening::of`'s doc on `of`tv32 hours1-1/+1
| | | | | `of`'s doc line sat above `policed`'s, as its first line, and `of` had none.
* screen: a test's actor named through `document`tv32 hours1-1/+1
| | | | | | The test of a value hiding the policy's place made its actor through `automerge::` outside `src/document`, which the test that Automerge stays behind `document` refuses. It names `document::ActorId`.
* screen: what is at the policy's place found in every map on the waytv33 hours2-5/+87
| | | | | | | | | | | | | | | | A node judges what it receives once anything is at the policy's place (`Screening::policed`), as a read shows it. But a read shows the newest of the values written at once at a key, merging maps only where that one is a map: a string written at `_continuum/access` beside the map holding the policy, and newer, hides it. So the policy's place read as empty, a change putting `"signed"` into the hidden policy went unjudged where it came alone, and deleting the string left a strict policy no change was refused for. Whether anything is at the policy's place is asked of every map of each key on the way to it, read or not (`store::held_anywhere`), as `store::by_seq` walks them. A swarm with nothing there is screened as before.
* screen: what reads as no policy has what is received judgedtv40 hours1-5/+47
| | | | | | | | | | | | | | | | | A node judges what it receives only once the document holds a policy, or a batch writes at a key named `policy` (`Screening::policed`); and an envelope holding `null` at the policy's place reads as none. So a change putting `"signed"` at `values` in a map beside such an envelope, writing at no key named `policy`, went unjudged where it came alone, and a later change deleting the envelope left a strict policy that no change was refused for. Nodes that took the second in one batch with others refused it, and the rest dropped it once told: apart until then, by how changes were batched. A node judges what it receives once anything is at the policy's place, whatever it reads as. A swarm with nothing there is screened as before; one whose policy's place holds what reads as none is judged by none but the rule that refuses turning strict, as a swarm without a policy is.
* state: a strict policy written where none judges, refused before it leavestv41 hours2-5/+26
| | | | | | | | | | | | | Every node refuses a change writing a strict policy where the policy isn't strict (`rules::turns_strict`), whatever the policy before. But a node judges its own changes before they leave (`judged_here`) only under a policy judging every change: in a swarm without one, a strict policy written through its API was taken there and refused by every other node, with everything the node built on it. A change that leaves a policy where there was none to judge it is judged as every node will judge it, too. A change in a swarm that has no policy after it is judged by none, as before.
* remakes: a map made on the way names no group's usertv42 hours1-10/+79
| | | | | | | | | | | | | | | Under a strict policy a group of other writes goes as, and is named for, the last change by history that touched its path, at it, below it or above it. A change writing its first entry makes the maps above it on the way, and touches them: where two users wrote their first entries below one map at once, each making it, the later change touched the other's path, and the other's write was replayed as its user's, refused by every node, quarantined. The change a group goes as is the last that wrote at its path or below it, or replaced what was at a path above it (`last_written`): one that made a map above it, finding nothing there at its history, didn't. Swarms that aren't strict don't ask.
* policy: strict only where its values is a stringtv42 hours1-31/+32
| | | | | | | | | | | | | | | The policy was read in typed JSON, so that an Automerge text spelling "signed" at its `values`, which no operation `rules::turns_strict` asks of writes, turns no swarm strict. But that read every policy anew: a setting that wasn't a string, or a text at `signatures`, made a policy no node knows in swarms that aren't strict, which read it as before. The policy is read in plain JSON again, as it was, and only its strictness asks more (`policy::of`): it reads strict only where its `values` is a string in typed JSON, an envelope read as its payload. A policy that would read strict only through a text, at `values` or holding the policy, is one no node knows. Every policy that doesn't read strict reads as it did.
* remakes: a group named for the change it goes astv44 hours1-12/+3
| | | | | | | | Under a strict policy a group of other writes goes as the last change by history that touched its path, above or below it, but was named for the last that wrote at it or below: where the last replaced a map above the path, the group went as one change and was judged as another's user's. It is named for the change it goes as now.
* config: a strict bootstrap policy found as the document reads ittv44 hours2-8/+14
| | | | | | | | A strict `--bootstrap-policy` is refused with `--remake`, but whether it was strict went by its JSON as given, where the node reads the policy as written into the document: a strict policy given as an envelope passed, and its genesis change was refused only once the node had started. Both now read it as written (`policy::as_written`).
* store: the policy's reading unmarked however it endstv44 hours1-3/+9
| | | | | | | `signs_values` marks, for its thread, that the policy is being read, so that the reading doesn't ask itself again; a panic within it left the mark, and that thread read every strict place by Automerge's order from then on. The mark is now taken off when the reading returns or unwinds.
* policy: read only as continuum writes ittv44 hours2-11/+64
| | | | | | | | | | | | | | | | | | | A swarm turns strict only at its start or through a strict remake, and a change writing a strict policy where the policy isn't strict is refused, found by its operations: `"signed"` put at the policy's `values`, or an envelope asking for it put at its place. But the policy was read in plain JSON, where an Automerge text reads as a string, and writing a text is no such operation: `{"$text": "signed"}` at `values`, through the typed API, turned a swarm strict that nothing refused, with a time before it nothing closes. The policy is read in typed JSON now (`store::read_plain_as`): what continuum writes there reads as it is, plain JSON or an envelope, and a text, a counter or bytes as itself, tagged; a setting that isn't a string makes a policy no node knows (`policy::read`), as a version it doesn't know does. So no text turns a swarm strict, and the operations `rules::turns_strict` asks of are the only ways to. A policy holding none of these reads as before.
* remakes: of one change, its other writes replayed before its linkstv46 hours1-4/+21
| | | | | | | | | | | | Under a strict policy, links and other writes go by where their change is among those replayed, and of one change the links went first. Both were judged at that change's history, without the other; a link can only take away there what the other writes relied on (a capability revoked), never give what they needed, so they go first now. A group of other writes was placed by its last change by history but named the user of its newest by clock; it names the user of the last by history now, as it goes.
* rules: a swarm turns strict only at its start or through a strict remaketv46 hours4-255/+81
| | | | | | | | | | | | | | | | | | | | | | A strict policy written into a running swarm left a time before it: changes written there, beside the turn, were refused by the nodes that took the turn first and taken by the others where they came first (a signed policy that isn't strict, among them, unseated the turn there); and a remake whose base preceded the turn had every switching node replay the turn as one of its own, each refusing the others'. A change writing a strict policy where the policy at its history isn't strict (`"signed"` at its `values`, or an envelope there asking for signed values) is now refused, in every swarm. A swarm turns strict at its start (`--bootstrap-policy`) or through a strict remake, each its epoch's first change: no change of a strict epoch is from before its policy, and the rule for the time before goes, with the walk that found the changes that turned a swarm strict and what kept them (`before_strict`, `turned_strict`, `Reads::strict_now`, `Reads::turned_now`, `store::writers`, `store::made`, `changes::in_history`). The strict swarm's simulation starts strict. access.md says so, and that a strict swarm can't move to a policy its nodes don't know by writing it.
* config: a strict swarm starts emptytv46 hours1-4/+12
| | | | | | | | | | | | `--genesis --remake` writes the content as a change of its own before the one recording the first users and `--bootstrap-policy`. With a strict policy, that content change was a time before the policy, on which any member could build a change judged by none. A strict `--bootstrap-policy` with `--remake` is now refused: a swarm strict from its start starts empty, and one started from content turns strict through a strict remake, which keeps only what an operator looked over. A policy that isn't strict starts from content as before.
* store: one reading of the policy's placetv47 hours1-48/+75
| | | | | | | | | | | | | | | | Whether values are ordered by `seq` (`signs_values`) read the policy's place itself, the first value alone and a map by Automerge's choice of each field, while the policy as judged (`policy::of`) read it through the store, which orders by `seq` only where `signs_values` says so, and merges every map there. They parted: a signed policy that isn't strict beside a newer plain one that is read as not strict for the one and strict for the other, and two maps, the newer without the field asking for signed values, the other way round. `signs_values` now asks `policy::of`, and the store orders the policy's own place by `seq` wherever any value there asks for signed values, and what is within the policy as written, so the two are one reading. Asked from within that reading, it answers false rather than ask again.
* remakes: other writes replayed with the links by historytv47 hours1-23/+111
| | | | | | | | | | | | | | | Under a strict policy, the links of the chains to signed values went in the order their changes were made, but the other writes were grouped by time, and a link went before a group only where its time wasn't later. A write built on what a link grants (a capability in an entry its manager signed, a ban lifted, a declaration) went first wherever its clock was behind the link's, was judged where it wasn't granted yet, and was quarantined, though every node had taken it. Under a strict policy the other writes now go by where the last change that wrote them is among those replayed (`between`), with the links, and keep their times for later replays. Without a strict policy there are no links, and the groups go by time as before.
* rules: the changes that turned a swarm strict found once for its headstv47 hours2-20/+58
| | | | | | | | | | | | Every change judged under a policy that isn't strict, in a strict document, walked back to the changes that turned it strict, each step reading every change the document holds. Only changes from the time before reach it in an honest swarm, but a member can send crafted ones at an old history, each costing every node a walk. The changes are now read once per walk (`store::made`), and what the walk finds is kept for the document's heads (`Reads::turned_now`), as whether its policy is strict is.
* rules: a strict swarm stays stricttv47 hours1-1/+31
| | | | | | | | | | | | | | | | | A strict policy could be written over with one that isn't, or deleted, by a user who may manage the policy. While the swarm was relaxed so, nothing was asked of the time before it turned strict: a change written beside that turn was taken, and once the swarm turned strict again, built on, a node judging that change while strict from the first turn (one back from away, a joiner) refused it, and every node it told dropped it with the second turn and everything after. Under a strict policy, the policy is now written again only as strict: an envelope there whose value isn't a strict policy, a signed `null` among them, is refused. So a strict swarm has one change that turned it, and the time before it stays closed; to leave it, start a new swarm from its content. A swarm that isn't strict writes its policy as it did.
* rules: the document's own policy read once for its headstv2 days1-4/+19
| | | | | | | | | Every change judged under a policy that isn't strict, in every swarm, read the document's own policy to ask whether the time before a strict policy applies: in a swarm without a policy, where a change was judged for nearly nothing, a read of the policy for each. It is now read once for the document's heads and kept while the batch is judged at others (`Reads::strict_now`), read again once the document takes more.
* store: values ordered by seq as the policy a read shows saystv2 days2-25/+86
| | | | | | | | | | | | | | | Whether values are read by `seq` went by whether any value at the policy's place asks for signed values, not by what the policy reads as. Where the place holds two, they part: a signed policy that isn't strict read before a plain one that is, or two maps, the newer not strict. Such a swarm judged as not strict and read by `seq`. Now the policy's own place is read by `seq` where any value there asks for signed values, so an older policy put back beside a strict one can't undo it; every other place is read by `seq` only where the policy that read shows is strict (`policy::read`, which `policy::of` reads with). A swarm whose policy doesn't read as strict reads every place as Automerge has it.
* remakes: a signed place already held is kept like any write that losestv2 days1-1/+9
| | | | | | | Where the new epoch holds as high a `seq` at a signed place as the old one reads, the chain isn't replayed: it was counted as superseded and left out even with `--superseded-writes quarantine`, unlike every other write a newer one superseded. Now it goes to the quarantine then too.
* remakes: links replayed in the order their changes were madetv2 days1-31/+143
| | | | | | | | | | | | | | | | | Under a strict policy, the links of the chains to signed values were ordered across places by their changes' timestamps. How a link is judged in the new epoch depends on what was replayed before it: a key added to a user's entry, a capability granted. A write signed with a key added a moment before, through a node whose clock is behind, went first, was refused and quarantined, though every node had taken it. The changes replayed (`between`) now come each after those it builds on, clocks deciding only between changes neither of which saw the other, then the lower hash; the links follow that order, and an envelope takes its time from the first change that wrote it there. remakes.md says so, and what becomes of a place where a link is refused. Without a strict policy there are no links, and nothing changes.
* remakes: a chain replayed to what its part of the replay ends attv2 days1-4/+51
| | | | | | | | | | | | | A rejoin replays in two parts: what was written before it began, then what was written during it. A chain to a signed value was read to what the old document reads now, from the envelopes written within the part: a value written again during the rejoin made the first part's chain lead to an envelope that part doesn't hold, and the second part's start from one it doesn't either. Both were quarantined, and the new epoch kept the base's value. Each part's chain now leads to what the old document reads where that part ends.
* rules: the time before strict is the change that turned it, written again or nottv2 days3-37/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | A change written under a policy that isn't strict was refused, in a strict document, unless it was in the history of the change that wrote the policy value the document read now. So the policy written again by a node that held a change from before, taken beside the strict policy, put that change in the new writer's history: that node kept it, every other node refused it, and the new policy with it, and the node was cut off. Now the reference is the change that turned the swarm strict: one that wrote a strict policy where the policy at its history wasn't, found by following back the writes of what the policy holds (`store::writers`). A change written under a policy that isn't strict is refused where such a change is beside it, neither in its history nor built on it. A policy written again, strict over strict, names the same change. One turning the swarm strict beside it is refused like any other. Of two at once neither is preferred: any rule choosing one, the lower hash say, would let a change made later to look as old take the place of the one every node took, and every node would drop it with all that was built on it. So two members turning a swarm strict at once split the nodes that took one from those that took the other; access.md says to turn it from one.
* store: a signed value chosen by seq is named sotv2 days1-5/+13
| | | | | | | | Where the policy asks for signed values, a place's value is chosen by `seq`, but conflict reports still called the choice `newestWins`, and the code and the architecture still said "newest" of what a read shows. A report names it `highestSeq`; the rest says "the one a read shows".
* rules: nothing added to the time before a swarm turned stricttv2 days2-0/+99
| | | | | | | | | | | | | | | | | | | A swarm turned strict by writing the policy into it kept the time before open: a change whose history lacks the policy's change is judged by the policy then, none or one that isn't strict, needs no signature there, and is taken whenever it comes, from any member. With values read by `seq`, an envelope planted at that time with the highest `seq` there is can never be followed: a ban, a user, a declaration, for good. Once a document's policy is strict, a change written under one that isn't is refused, received or held, unless it is in the history of the change that wrote the policy the document reads (`store::written_by`). A node that holds one beside that change, taken before it came, is told so by any peer that refused it (REFUSALS), judges it again, now refuses it too, and drops it with what builds on it, as for any change it took unjudged. A swarm strict from its genesis change has no such time; one whose policy isn't strict judges as before.
* swarm: a new swarm's policy recorded in its genesis changetv2 days7-1/+87
| | | | | | | | | | | | | | | | A swarm strict from its start had its policy written by its first user in a later change. A change is judged by the policy at its history, so any member could always add a change whose history is from before the policy: judged by none, needing no signature, taken whenever it comes. Since signed values are read by `seq`, an envelope planted there with the highest `seq` there is can never be followed: a ban, a user, a declaration, for good. `--bootstrap-policy JSON`, with `--genesis`, records the policy in the genesis change, with the first users: then no change of the swarm is from before it. It must be a policy this node knows, and a strict one needs `--bootstrap-keys`, or nobody could sign what decides who may do what.
* remakes: values signed by their users replayed as chainstv2 days1-3/+399
| | | | | | | | | | | | | | | | | | | | | | | | | Under a strict policy, a replay wrote at each path the old document's merged view: at a place of a value its user signed, the last envelope alone, whose `prev` names one the new epoch doesn't hold if the value was written twice since the base. Every node refused it, it went to the quarantine, and the new epoch kept the base's value: a remake rolled back every signed value changed twice since its base, and a rejoining node lost its own the same way. And the replay found what changed by Automerge's diff, which says nothing of a value that changed beside Automerge's own choice: where a place held two values at the base, a write replacing the one read by `seq` wasn't replayed at all. Now, under a strict policy, the places of signed values are found from the changes' operations as well as from the diff, and each is replayed as the chain that leads to the envelope the old document reads: every envelope from the one the new document holds there, following `prev` through the changes since the base, each in a change of its own by its signer at the time it was made, judged as every node will judge it. A place is replayed only where the new document holds a lower `seq` there; where no chain leads from what it holds, it goes to the quarantine. A path above such places is split into its keys. Without a strict policy nothing changes.
* store: counters and the API's placement go by what a read showstv2 days2-6/+52
| | | | | | | | | | Where the policy asks for signed values, a place's value is chosen by `seq`, but two readers still took Automerge's own choice: an increment found the counter beside an envelope a read showed (answering the counter), and `inspect::placed`, which the API's checks go by, walked through whatever Automerge chose. Both now take the value a read shows (`store::shown`). A list's items keep Automerge's choice, as before: no signed value is one, and reading a list whole goes by it.
* store: values ordered by seq only where the policy asks for signed valuestv2 days1-13/+92
| | | | | | | | | | | | | | The order by `seq` sat in `store::candidates`, which every swarm reads through: in a swarm that isn't strict, a string shaped like an envelope, written at the same time as a plain value or a map, was read first. What a swarm without a strict policy reads must not change for signed values. The order now applies only where the policy asks for signed values (`"values": "signed"`), as any value at the policy's place says, read as written (`signs_values`), so the policy's own reading doesn't go round. Elsewhere `candidates` is newest first, as always. It is looked at only where a place holds several values and one is an envelope.
* api: a signed write after the last seq there is a conflict, not a panictv2 days1-1/+1
| | | | | | | `put_signed` added one to the `seq` of the envelope there unchecked: at `u64::MAX` it panicked where overflow is checked and wrapped where it isn't. It adds as `envelope::check` does, and nothing follows `u64::MAX`: `409`, as for any write not numbered after what is there.
* signed values: one reading of an envelope, everywheretv2 days8-139/+208
| | | | | | | | | | | | | | | | Three parts read an envelope three ways: the store's order took any string with the prefix whose meta held a `seq`, its reads any whose value decoded, the checks only one with four parts and a meta of exactly its fields. A string that the first two took and the checks refused was read first, read as the registry's or the policy's value, and treated as nothing by the check of the next write there. `document::signed` reads an envelope the one way: four parts, the value JSON, the meta exactly its six fields (one more, or one twice, and it isn't one), no newline in either, the signature decoding. The store's order, its plain reads, the checks, the API and the users API all go by it. What isn't one in every respect is a plain string, wherever it is read.
* signed values: value and meta apart, numbered; the highest seq is readtv2 days9-76/+321
| | | | | | | | | | | | | | | | | | | | | | | | | A member could put a user's older signed value back beside a newer one: a change made with dependencies from before both is judged where the place was empty, so the older envelope (`prev` empty) is taken; and of values written at once, the one read was the one with the highest operation, which whoever writes the change steers. A revoked capability, a lifted ban or an earlier policy came back that way, signed by whoever signed it then. An envelope is now `cv2.<value>.<meta>.<signature>`: the value as its user wrote it, and apart from it what continuum adds (swarm, path, user, at, seq, prev), the signature over the value's line and the meta's. `seq` is one more than that of the envelope it replaces, 0 where it replaces none; every node checks it with `prev`. Of the values a place holds, written at once, signed ones are read before any other, the highest `seq` first, of equal ones the lower digest (`store::candidates`): reads, snapshots and writes all go by it. An older envelope beside a newer one changes nothing. `application/continuum-signed` is the value's line, the meta's, then the signature; `scripts/continuum-signed` writes and checks it so. The wire version goes up: nodes must agree on what a place's value is.
* simtest: hyparview's views settle within a reaffirm roundtv4 days1-1/+11
| | | | | | | | `active_views_settle_and_heal` waited 60 s for the views to settle, on lossy links. A DISCONNECT lost leaves a link at one end until the next reaffirm round (`REAFFIRM_EVERY`, 60 s): the wait timed out with one member holding another that no longer held it. It waits twice that, as the heal after it does.
* relay: a STATUS's heads wait at least 50 ms before they are pulledtv4 days1-6/+10
| | | | | | | | | | | | | | A neighbour pulls heads a STATUS listed only if it still lacks them after a round trip to the sender, as they are usually on their way along a writer's tree. With no round trip known, or one measured long ago (busy pairs send no keepalives), it pulled at once; with a short one, a STATUS sent right after a change can overtake it by more than that round trip, delays varying per message. Either way the change came twice (`trees_hold_through_continuous_writes`: c pulled once while every write reached it along x's tree). The wait is the round trip, but 50 ms at least (and 1 s at most, as before).
* changes: type next to a mark within the texttv4 days1-1/+1
| | | | | `no_mark` typed at 0 to 4 into a text of three characters: splicing at 4 is past its end. It types at 0 to 3.
* changes: an insert may follow a mark the document holdstv4 days1-5/+35
| | | | | | | | | | | Screening asked of every operation naming an element that the element was inserted as a value or an object, inserting or not. In a document that took a mark before marks were refused, a transaction typing right after it inserts after the mark's begin or end, and was refused: every node refused the change of the node that typed, and all it wrote after. An element is written at only where a value or an object was put; an insert may follow any element of that list, as transactions insert.
* changes: a test that generates changes and asks what passes to stay soundtv4 days1-0/+234
| | | | | | | | | | | | | | Twice, crafting changes by hand missed some that pass screening's checks and break Automerge; a program generating them found three more kinds. This test does the same: on documents three honest writers wrote at once (maps, a list, a text, a counter), changes of one to four operations of every kind, at random places, naming as replaced nothing, what is there, or any operation. Each that passes the checks is applied, given back by its hash, saved and loaded, taken by a peer that lacks it, written after by an honest node, and saved and loaded again; nothing of that may fail or panic. The run is seeded, the seed named where it fails, and CHANGES_GENERATED sets how many documents (60 by default) for a longer run.
* changes: no marktv4 days1-230/+81
| | | | | | | | | | | | | Screening took marks in a text, checking that a mark's end comes at its begin or after it, by walking the elements each is inserted after back to the text's head: up to 22 s for one change of 9 KB. And it took a value put at a mark's begin or end, replacing it: sound until an honest node edits that text, then the node panics at its next sync or append, and its save doesn't load. Continuum's store writes no marks. A change with a mark's begin or end is now refused, and the walk is gone. An element written at is one a value or an object was inserted as.
* changes: no tabletv4 days1-2/+61
| | | | | | | | | | Screening took a table for a map. A table made is sound, but Automerge panics applying a change that puts a value into one, made by that change or a later one, and applying isn't caught where it panics. Transactions make a table and can't write into it; continuum's store makes none. A change making a table is refused, and so is one writing into a table the document holds.
* changes: what an operation replaces put a value or made an objecttv4 days1-3/+99
| | | | | | | | | | | | | | Screening took as replaced any operation made at that object and key without inserting: a deletion, an increment, a mark. A transaction names only what holds a value there: a counter incremented and put over names its put alone, a key put again after its deletion names nothing. Automerge takes a value put again naming its deletion, at a map's key or a list's element, and then gives back another change under its hash: a save that doesn't load, a sync that fails. A deletion naming a deletion panics as it is given back. An increment naming a deletion does the same as a put. What an operation names as replaced now put a value or made an object.
* libp2p tests log as RUST_LOG saystv4 days1-0/+10
| | | | | | | Nothing installs a subscriber in the transport's tests: RUST_LOG gave no output there, where a transient failure needs it. The first node a test run makes installs one, writing into the test's output, which is shown where a test fails.
* screen: take only the operations transactions writetv5 days1-85/+344
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Screening asked what an operation isn't: a deletion replacing nothing, a value put at a list's head without inserting, a mark ended but right after its begin. Others pass that Automerge's transactions never write, and Automerge takes them and breaks: an element written over naming as replaced the element inserted after it (an inserted element's key is the element it follows, its place is itself), an insert replacing something, a deletion or an increment inserted, an increment at a list's head, a mark ended ahead of its begin or at the head, a mark in a list. Giving such a change back panics or gives another change under its hash, and the save doesn't load. Each operation is now asked to be one transactions write (`document::changes::unwritten`): inserted, a value, an object or a mark's begin or end into a list or a text, replacing nothing; at a list's element, never its head, without inserting, replacing what is at that element; at a map's key, never inserted, a deletion or an increment replacing something; a mark's begin with its end as the next operation, both inserted. A value replaced at a list's element is the element itself or written at it, not an element inserted after it. Marks are only in a text, and a mark's end is at its begin or at an element after the begin's: their places follow from the elements each is inserted after, back to the text's head, as the change's history holds them. The document the tests write now has counters in a list and a map, an element written over, and marks over a span, the whole text, none of it, and across what was deleted and inserted since; and each case above is a test.
* changes: test what transactions never write against a document ready for ittv5 days1-8/+13
| | | | | | | | | `what_transactions_never_write_is_refused` checked changes built on the insert against a document without the deletion the insert builds on. Such a change isn't ready, and nothing is asked of it: the honest insert passed for that reason, and the two crafted from it weren't refused. Each is checked now against a document that holds what it builds on.