F23: the relay's Nix checks on the hub, version 0.1.0, deploy notes #26

Closed
mnovak wants to merge 0 commits from feature/nix-check into main
Owner

F23, the relay on the home server, made deployable.

  • .fabrica/artifex/nix-check.yaml: the package (with the crates' tests) and the VM test relay-keeps-no-address, on Fabrica's NixOS runner, by hand.
  • flake.nix: the licence is CPAL-1.0 (the repository's since PR #24; the flake still said AGPL/Apache/MIT); the package version is 0.1.0.
  • Workspace version 0.1.0, so /version answers what the tag says.
  • .agents/features/home-relay.md: the VM test has run; how to deploy from a tag, check it and roll it back.

Runs on the hub: r54ed0gn5tcqs at f1e1f6e (package 11 min, VM test 10 min, both exit 0) and rmc0pyqnh7cjy at 308e639 (ok). The self-review is posted below as a review.

F23, the relay on the home server, made deployable. - `.fabrica/artifex/nix-check.yaml`: the package (with the crates' tests) and the VM test `relay-keeps-no-address`, on Fabrica's NixOS runner, by hand. - `flake.nix`: the licence is CPAL-1.0 (the repository's since PR #24; the flake still said AGPL/Apache/MIT); the package version is 0.1.0. - Workspace version 0.1.0, so `/version` answers what the tag says. - `.agents/features/home-relay.md`: the VM test has run; how to deploy from a tag, check it and roll it back. Runs on the hub: r54ed0gn5tcqs at f1e1f6e (package 11 min, VM test 10 min, both exit 0) and rmc0pyqnh7cjy at 308e639 (ok). The self-review is posted below as a review.
mnovak added 2 commits 2026-12-02 23:39:14 +01:00
mnovak reviewed 2026-12-02 23:51:32 +01:00
mnovak left a comment
Author
Owner

Self-review of F23's deploy step (adversarial, as CLAUDE.md §3).

Evidence

  • Hub runs on Fabrica's NixOS runner (nixos-vm): r54ed0gn5tcqs at f1e1f6e, with package 681 s exit 0 and relay-keeps-no-address 580 s exit 0; then rmc0pyqnh7cjy at 308e639 (v0.1.0), ok. The package build runs the crates' own tests (doCheck = true). This is the first time the module and the VM test have been evaluated at all; until now they had only been written.
  • Planted bug: branch review/planted-caddy-log (8bb6904, on top of f1e1f6e) takes the relay host's logFormat output discard out of deploy/nixos/module.nix. Run rk2s549b1b8hk: the package passes, and the VM test fails with grep -rF '192.168.1.1' /var/log /var/lib/private/tabellarius unexpectedly succeeded. The test catches exactly the leak it exists for. 1/1 caught.
  • Privacy surface: nothing in the relay's code changes. The version route now says 0.1.0 instead of 0.0.0: that is public, and it is meant to be.

Findings

  1. The module always turns on services.caddy. A server whose port 443 belongs to another proxy (nginx) would conflict, and the module has no switch to leave the proxy out. The deploy notes say to proxy by hand, but the module still enables Caddy. Not fixed here: it depends on what .217 runs, which I've asked. If it isn't Caddy, the next PR adds services.tabellarius.proxy = "caddy" | "none".
  2. cleanSource ./. puts .agents/ and .fabrica/ into the package's source, so a commit that only changes docs gives a different store path. The relay's code is still the tagged code, but two tags with the same code don't build to the same hash, which weakens VERIFY.md's footprint story. Follow-up: a source filter that keeps only Cargo.* and crates/.
  3. HTTP-01 needs port 80 to reach Caddy. A server behind NAT, or one that uses a wildcard certificate obtained by DNS-01, needs a different tls line. Said in the notes for the operator.
  4. The planted branch stays on the remote as the review's evidence. This repository is public, so it's named review/.

Not verified: the relay on the real server (no deploy yet); Let's Encrypt (the VM uses Caddy's internal CA).

Self-review of F23's deploy step (adversarial, as CLAUDE.md §3). **Evidence** - Hub runs on Fabrica's NixOS runner (`nixos-vm`): r54ed0gn5tcqs at f1e1f6e, with package 681 s exit 0 and `relay-keeps-no-address` 580 s exit 0; then rmc0pyqnh7cjy at 308e639 (v0.1.0), ok. The package build runs the crates' own tests (`doCheck = true`). This is the first time the module and the VM test have been evaluated at all; until now they had only been written. - **Planted bug:** branch `review/planted-caddy-log` (8bb6904, on top of f1e1f6e) takes the relay host's `logFormat output discard` out of `deploy/nixos/module.nix`. Run rk2s549b1b8hk: the package passes, and the VM test **fails** with `grep -rF '192.168.1.1' /var/log /var/lib/private/tabellarius unexpectedly succeeded`. The test catches exactly the leak it exists for. 1/1 caught. - Privacy surface: nothing in the relay's code changes. The version route now says 0.1.0 instead of 0.0.0: that is public, and it is meant to be. **Findings** 1. The module always turns on `services.caddy`. A server whose port 443 belongs to another proxy (nginx) would conflict, and the module has no switch to leave the proxy out. The deploy notes say to proxy by hand, but the module still enables Caddy. Not fixed here: it depends on what .217 runs, which I've asked. If it isn't Caddy, the next PR adds `services.tabellarius.proxy = "caddy" | "none"`. 2. `cleanSource ./.` puts `.agents/` and `.fabrica/` into the package's source, so a commit that only changes docs gives a different store path. The relay's code is still the tagged code, but two tags with the same code don't build to the same hash, which weakens VERIFY.md's footprint story. Follow-up: a source filter that keeps only `Cargo.*` and `crates/`. 3. HTTP-01 needs port 80 to reach Caddy. A server behind NAT, or one that uses a wildcard certificate obtained by DNS-01, needs a different `tls` line. Said in the notes for the operator. 4. The planted branch stays on the remote as the review's evidence. This repository is public, so it's named `review/`. **Not verified:** the relay on the real server (no deploy yet); Let's Encrypt (the VM uses Caddy's internal CA).
@@ -66,0 +72,4 @@
and `imports = [ tabellarius.nixosModules.default ];`.
- **The service:** `services.tabellarius = { enable = true; domain = "<name>"; };` The caps keep their defaults
(1 GiB of waiting blobs, 100 000 mailboxes, 10 000 invites); `wake = true` (UnifiedPush wake-ups, F25b).
- **The proxy:** the module turns on `services.caddy` with one virtual host. On a server whose Caddy is already
Author
Owner

Finding 1: this tells an operator with another proxy to proxy by hand, but the module still enables Caddy, so a server with nginx on 443 would get two listeners. A proxy = "none" switch is the fix if .217 needs it.

Finding 1: this tells an operator with another proxy to proxy by hand, but the module still enables Caddy, so a server with nginx on 443 would get two listeners. A `proxy = "none"` switch is the fix if .217 needs it.
@@ -66,0 +75,4 @@
- **The proxy:** the module turns on `services.caddy` with one virtual host. On a server whose Caddy is already
the NixOS module, it is one more host in the same Caddy; a server with another proxy on 443 must proxy the
name to `127.0.0.1:8470` itself, with no access log and without `X-Forwarded-For`, `X-Real-IP` and `Forwarded`.
- **DNS and TLS:** one A/AAAA name for the relay. Caddy gets its certificate by HTTP-01, so port 80 must reach it.
Author
Owner

Finding 3: HTTP-01 only. Behind NAT, or with a DNS-01 wildcard certificate, the host needs its own tls line. The operator has been told; no code change.

Finding 3: HTTP-01 only. Behind NAT, or with a DNS-01 wildcard certificate, the host needs its own `tls` line. The operator has been told; no code change.
@@ -15,3 +15,3 @@
pname = "tabellarius";
version = "0.0.0";
version = "0.1.0";
src = pkgs.lib.cleanSource ./.;
Author
Owner

Finding 2: cleanSource ./. includes .agents/ and .fabrica/, so a docs-only commit changes the package hash. Filter the source down to Cargo.* and crates/ in a follow-up, so equal code builds to an equal footprint (VERIFY.md).

Finding 2: `cleanSource ./.` includes `.agents/` and `.fabrica/`, so a docs-only commit changes the package hash. Filter the source down to `Cargo.*` and `crates/` in a follow-up, so equal code builds to an equal footprint (VERIFY.md).
Author
Owner

Merged into main as 1e2eed8 (--no-ff; the remote hash was checked). Tagged v0.1.0 on the merge, the tag the home server deploys from.

Merged into main as 1e2eed8 (`--no-ff`; the remote hash was checked). Tagged **v0.1.0** on the merge, the tag the home server deploys from.
mnovak closed this pull request 2026-12-02 23:52:01 +01:00
Some checks are pending
ci / check (pull_request) Failing after 54s

Pull request closed

Sign in to join this conversation.