utopia-ia/elffuss-braid public
Changesets · Branches · Tags · Compare
| Changeset | 0f2ebd52224c2dbaf973012ad964521195a3bb4e2afd9c9db07af855f997178c |
|---|---|
| Author | KikoCis <KikoCis@users.noreply.github.com> · 2026-10-16 11:45 +02:00 |
| Committer | KikoCis <KikoCis@users.noreply.github.com> · 2026-10-16 11:45 +02:00 |
| Parents | 7789ef918c07 |
1 file changed
modified docs/design.md +24 −20
| @@ -383,28 +383,32 @@ | ||
| 383 | 383 | |
| 384 | 384 | ## Testing |
| 385 | 385 | |
| 386 | -- **Deterministic simulation.** The core runs over clock, randomness, disk and | |
| 387 | - network traits. Simulated agents, servers and git remotes run with injected | |
| 388 | - faults: lost acknowledgements, crashes between any two writes, partitions. | |
| 389 | - Every seed reproduces its run, and the invariants above are checked after | |
| 390 | - every step against a simple reference model. | |
| 391 | -- **Crash tests.** Failpoints and repeated `kill -9` of real processes, plus a | |
| 392 | - file system shim that drops unsynced writes. | |
| 386 | +- **Deterministic simulation** (`crates/sim`). Simulated agents commit and | |
| 387 | + land at once through a lander that does what the CLI does inside its op log | |
| 388 | + transaction, with injected faults: lost acknowledgements, duplicate and | |
| 389 | + late resubmissions, and lander crashes before the compare-and-swap. It runs | |
| 390 | + on memory and on the real store. Every seed reproduces its run, and the | |
| 391 | + landing invariants are checked after every step against an independent | |
| 392 | + reference model. | |
| 393 | +- **Crash tests.** Failpoints and repeated `kill -9` of real processes sharing | |
| 394 | + one store, and a power-loss model that drops whatever was not flushed before | |
| 395 | + each flush batch. | |
| 393 | 396 | - **Properties.** Encodings round-trip canonically; incremental tree updates |
| 394 | 397 | equal building from scratch; disjoint landings commute; a changeset's change |
| 395 | - list equals the diff of its trees; ancestry with derived data answers what | |
| 396 | - the walks answer on random histories; changed-path filters never miss a | |
| 397 | - path they hold; derived records do not depend on the order they are | |
| 398 | - computed in. | |
| 399 | -- **Fuzzing** of every decoder, the git importer, path validation and merges. | |
| 400 | -- **Differential tests with git as the oracle** on real histories: tree diffs, | |
| 401 | - path history (`git log --first-parent -- <path>`), merge bases (`git | |
| 402 | - merge-base --all`), blame (`git blame --first-parent`, with the two | |
| 403 | - differences above checked as such) and three-way merges, on fixtures, on | |
| 404 | - random histories and on this repository's own. Braid merging cleanly where | |
| 405 | - git reports a conflict is treated as a critical bug. | |
| 406 | -- **Round trips** of real public repositories through import and export, bit | |
| 407 | - for bit. | |
| 398 | + list equals the diff of its trees; three-way merges keep each side's changes | |
| 399 | + and are symmetric; ancestry with derived data answers what the walks answer | |
| 400 | + on random histories; changed-path filters never miss a path they hold; | |
| 401 | + derived records do not depend on the order they are computed in. | |
| 402 | +- **Fuzzing.** Five targets: tree and changeset decoding, name rules, the git | |
| 403 | + map record, and git commit, tag and tree parsing. Anything that decodes must | |
| 404 | + encode back to the same bytes. CI runs each for a minute. | |
| 405 | +- **Differential tests with git as the oracle** on fixtures, random histories | |
| 406 | + and this repository's own: path history (`git log --first-parent -- | |
| 407 | + <path>`), merge bases (`git merge-base --all`) and blame (`git blame | |
| 408 | + --first-parent`, with the two differences above checked as such). | |
| 409 | +- **Round trips** through import and export, bit for bit, of fixture | |
| 410 | + repositories full of unusual git objects and of this repository's history, | |
| 411 | + in CI; several public repositories were also round-tripped by hand. | |
| 408 | 412 | |
| 409 | 413 | ## Performance targets |
| 410 | 414 |