2.3 KiB
2.3 KiB
F00 — Scaffold: workspace, reproducible build, licences
1. Why and what
Every later claim in docs/VERIFY.md rests on a build anyone can reproduce. So the repository
starts with the guard rails and no protocol or relay code: that waits for the protocol review
(issue #1). At the end, a stranger can clone the repository, build it with Nix twice and get the same
hash, and read exactly which licence covers which crate.
2. Architecture
flowchart LR
client[crates/client — Apache-2.0 OR MIT] --> protocol[crates/protocol — Apache-2.0 OR MIT]
relay[crates/relay — AGPL-3.0-only] --> protocol
flake[flake.nix] -. builds .-> relay & client & protocol
- Three empty crates.
protocoldepends on nothing in this repository;relaynever depends onclient— enforced byscripts/check-deps.shin CI. tabellarius-relayis a placeholder binary that prints its version and exits. It opens no socket. It exists so the reproducible build has an artefact to hash.flake.nixpins nixpkgs throughflake.lock;nix buildproduces the relay binary;nix build --rebuildrebuilds it and fails if the output differs.- Pre-commit hook (POSIX sh, no Node): rejects files over 5 MB and build output.
3. Risks
- Public hygiene: no hostnames, tokens, personal names or paths in any file or commit.
- Licence ambiguity: the docs say "AGPL-3.0"; the SPDX id chosen here is
AGPL-3.0-only(proposal — confirm in review). - Reproducibility is only as good as the pin: a floating nixpkgs would make two builds differ.
flake.lockis committed.
4. Gaps
| Gap | Solution |
|---|---|
| CI runners are Windows-only; Nix needs Linux | Reproducibility checked manually (WSL Nix) and recorded in the review until a Linux runner exists |
| No public GitHub mirror yet | Needs the maintainer's GitHub account; Gitea push mirror |
5. Verification
| Case | Kind | Expectation |
|---|---|---|
cargo test --workspace, cargo clippy -D warnings |
CI | pass |
relay depends on client, or protocol on any workspace crate |
CI (check-deps.sh) |
fails |
6 MB file / file under target/ staged |
hook test | rejected |
nix build then nix build --rebuild |
manual (Linux) | same output hash |
| Grep for hostnames, tokens, personal paths | manual | none |