summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-18 19:00:25 +0000
committeraur-build <aur-build@localhost>2026-11-18 19:00:25 +0000
commit8835a0a86c82d922a2d674f3543c331dc9adb9e5 (patch)
tree7ac728613b7d24b28dee4fd7ba30d2137e8f7554 /README.md
parent76a214ed4d82d8937a3ec38c27d4d59304b8fac3 (diff)
downloadaur-build-8835a0a86c82d922a2d674f3543c331dc9adb9e5.tar.gz
aur-build-8835a0a86c82d922a2d674f3543c331dc9adb9e5.zip
docs: the review's decisions, and the invariants that hold them
The structural findings are only durable if they are written down as rules with the test that enforces each one, so: `docs/INVARIANTS.md` gains a second table. The first one is the twelve numbered invariants from DESIGN.md §2 — claims about what the system does. The new one is about how the code is allowed to be shaped: SQL has one owner, a version is formatted in one place, the dependency arrows point one way, the state machines are the ones the transition table defines, the production binary carries no test scaffolding, the served index has one lock, `canonical_json` is canonical in fact, the session id is the credential, and a pinned clock pins everything derived from it. Each row names the test that fails if the shape regresses. `docs/DECISIONS.md` gains the decisions the review turned into code — the session id as the credential, `db/` as a boundary that does not hand out connections, a stale review and a broken database being different answers, shims compiled out of production, states as enums with compare-and-swap writes, unreadable rows failing the query, and only momentary I/O counting as transient. Two existing entries were amended rather than added to: the publisher lock (there is now one, and the second one that used to sit inside it is gone) and the test hooks (they are a gated submodule now, not fields on the production config). `README.md` says where the shims live and that none of them exist in a plain `cargo build`.
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/README.md b/README.md
index 41ea57e..f84ee4e 100644
--- a/README.md
+++ b/README.md
@@ -59,7 +59,7 @@ src/
pkginfo.rs .PKGINFO / .BUILDINFO parsing (no libalpm)
http/ tiny_http server: routes, render, auth, SSE log tail
ops.rs retention, metrics, VACUUM INTO backups
- shims/ the fake toolchain that makes the pipeline testable
+ shims/ the fake toolchain that makes the pipeline testable (test-support only)
testcorpus/ the fixture packages the tests build for real
templates/ askama templates, server-rendered
static/ app.css and one vendored htmx
@@ -90,6 +90,12 @@ process mid-step, and a separate test spawns the compiled binary and kills *it*,
then asserts a fresh process resumes from the step checkpoints with no duplicate
work and the old index still byte-identical.
+All of it is behind a `test-support` feature, which `cargo test` turns on through
+its dev-dependency on this crate and `cargo build` does not turn on at all: the
+shim binaries are not built, the `TestHooks` type has no fields, and the
+fault-injection branches in `publish` are not in the binary. `tests/production_surface.rs`
+fails if any of it leaks into the default build.
+
Some tests are gated on the host and skip themselves with a printed note rather
than failing: