summaryrefslogtreecommitdiffstats
path: root/src/db/model.rs
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 /src/db/model.rs
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 'src/db/model.rs')
0 files changed, 0 insertions, 0 deletions