diff options
| author | tv <tv@krebsco.de> | 2026-11-19 04:02:52 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-19 05:13:51 +0100 |
| commit | 2c9d42ed955705a0207b047918f58ef258dcfa4f (patch) | |
| tree | b8d50ee2fdce459a4b61fff4e8bddff6d308da8e /docs/federation-tests.md | |
| parent | 0d2467e15ec0c9c035b1074a2dd4eece6b24c599 (diff) | |
federation: a corpus per revision, judged alike by every later continuum
Nothing checked that judging under a revision stays what it was: a change to the fold
that alters what an earlier revision takes, refuses or reads parts nodes running it from
nodes that don't, and the tests regenerate their expectations with the code.
For each revision this continuum knows, a file in `src/federation/corpus/` holds
histories generated at that revision, of every kind the properties generate, each event's
bytes with what became of it, by kind and never by a refusal's words, and what the store
reads after; its first line names the revision by its ID. It is written once, as the
revision is made (`write_the_corpus`, an ignored test run by hand), and never edited
after; every later continuum judges it alike (`every_revision_judges_as_its_corpus_says`),
which fails where a revision has no corpus yet, saying how to write it.
The test plan describes it.
Diffstat (limited to 'docs/federation-tests.md')
| -rw-r--r-- | docs/federation-tests.md | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/docs/federation-tests.md b/docs/federation-tests.md index 3aa1996..a39e749 100644 --- a/docs/federation-tests.md +++ b/docs/federation-tests.md @@ -120,10 +120,23 @@ UTF-16 units otherwise than by their bytes (one from U+E000 to U+FFFF beside one U+FFFF); events at federation 1's sizes and just past them; a signature, a version and its hash, a checkpoint and its ID, the genesis change of a federation's root and of a fork's, a snapshot after a checkpoint, and a version naming an ECDSA key, with a write -and a key set `ssh-keygen` signed with it. A vector that changes is a change of the -federation, which takes its next number ([`federation.md`](federation.md), +and a key set `ssh-keygen` signed with it. A vector that changes is a change to what +every node must agree on ([`federation.md`](federation.md), [Changing the federation](federation.md#changing-the-federation)). +## The corpus + +What each revision takes, refuses and reads, as fixed bytes: for each revision this +continuum knows, a file in `src/federation/corpus/` of histories generated at that +revision (of every kind the properties generate, a few seeds each), each event's bytes +with what became of it, by kind (taken, refused and why, by kind, waiting, held back, gone +with a move), and what the store reads after. A revision's file is written once, as the +revision is made (`write_the_corpus`, run by hand), and never edited after: every later +continuum judges it alike (`every_revision_judges_as_its_corpus_says`), so that a change +to judging that alters an earlier revision's comes as a later revision. Its first line +names the revision by its ID: a feature renamed fails as a judgment changed does. It holds +only what its histories exercise. + ## Fuzzing and mutants * **Fuzzing**, with `cargo fuzz` (a nightly compiler), outside `cargo quick`: the event @@ -137,7 +150,7 @@ federation, which takes its next number ([`federation.md`](federation.md), * `cargo quick`: the rules and attacks by example, the properties at small sizes and a few hundred seeds, the store on Automerge by crafted changes and seeded runs, the - vectors, and the check that every row has its test. + vectors, the corpus, and the check that every row has its test. * `cargo sim`: the simulations. * Longer runs, by hand or on a schedule: the properties and the store on Automerge with many more seeds (a count from the environment), fuzzing, mutants. |
