43 KiB
Ianitor Domi — roadmap
Ianitor = the doorkeeper: it decides who comes through the door (routing, TLS) and checks credentials (certificates). Legend: [S] sourced · [J] judgment · [M] decided by Mark.
1. Decisions (do not reopen without Mark)
- Scope: internal Domi CA for home-server services and mTLS between Domi apps/devices. Public sites stay on Let's Encrypt. [M]
- Root key offline in Custos; intermediate on the server, renewed yearly through a Custos match-code approval. [M]
- Own proxy on Pingora (Rust, Apache 2.0; HTTP/1, HTTP/2, gRPC, websockets; a library, not a binary). [M] [S blog.cloudflare.com/pingora-open-source]
- Caddy is the fallback: one config model compiled to the Pingora runtime and to Caddy JSON, kept honest by differential tests on every build. [M]
- Web UI only, on the server behind Authelia. API tokens are saved by Mark in Custos; control stores only hashes. [M]
- Routes live in a git repo (private: ianitor-routes), one TOML file per host, schema-validated. Every change is a commit, applied live without nixos-rebuild. Rebuild only for service-level changes (ports, version). The engine is switched at runtime by control (§3, §4); decided 2026-11-07, replacing "engine" in the rebuild list. [M]
- Two processes: ianitor-edge (data plane) and ianitor-control (API + UI). Traffic keeps flowing if control crashes. [M]
- Own small CA in crates/core using rcgen. No internal ACME server in v1. [M]
- One public monorepo on Gitea, CPAL-1.0 (Mark, 2026-11-23; MPL-2.0 up to 0.2.0); read-only GitHub mirror for discovery. Mark's server deployment stays in his NixOS flake. [M]
- Branding: "Ianitor Domi", with "Built, tested and signed by Fabrica Domi" on the repo and release page. [M]
- Support: free source; "Adopt a red panda" — 80% developer, 20% Red Panda Network, remitted yearly with a published receipt. [M]
- Cut-over: only after all five test layers are green and two weeks beside Caddy on low-risk hosts. [M]
- Competitor to watch: Pangolin (tunnelled identity-aware reverse proxy). Our edge: Nix-native history, Domi PKI, friend nodes. [S github.com/fosrl/pangolin] [J]
2. Versions and gates
| Version | Contents | Gate question |
|---|---|---|
| v1 (phases 1–4) | engine, both compilers, control plane, web UI, PKI, NixOS module, five test layers, signed release | Does Ianitor serve two low-risk hosts beside Caddy for two weeks with zero incidents and the differential tests green? |
| v1.1 | all hosts on Ianitor; monthly rehearsed switch to Caddy and back | Are all hosts on Ianitor, with the Caddy switch rehearsed monthly? |
| v2 | identity gate (passkey/TOTP) replacing Authelia, tunnel via friend node/VPS, one-click Domi templates | Can a family member reach a home service from outside with no open port and no Authelia? |
3. Architecture
- Host file fields (v1): hostname, upstreams[], tls = letsencrypt | domi, auth = none | forward-auth, request/response header rules (set/remove; values may reference a named secret), websockets, health check path + interval, share links enabled, access log = off | truncated.
- Edge: TLS termination with SNI per host, Let's Encrypt via an ACME crate, upstream health checks, websockets, header rules, forward-auth compatible with Authelia (existing protected services must keep working), graceful reload without dropping connections.
- Secrets referenced by header rules load from $CREDENTIALS_DIRECTORY and never appear in logs or responses.
- Logging: error log always; access log only per host when enabled, IPv4 truncated to /24, IPv6 to /48, local file only.
- Apply: validate → compile → write edge config + Caddy JSON → reload edge → watch health checks 60 s → on failure git-revert, reload, report "reverted" with the reason; otherwise "kept". Concurrent applies are serialised. Undo = revert the last kept commit through the same path. Restore = apply an older tree as a new commit. Push to Gitea after a kept apply.
- Share links: HMAC token bound to host + path prefix + expiry (+ optional password, mixed into the MAC; no hash in the token, so it cannot be guessed offline; edge rate-limits tries), validated statelessly by edge; key from systemd credentials; revocation by key rotation, an epoch ("stop all") or a small deny list kept in a file outside git that control writes and edge re-reads at once, so a Stop never waits for an apply; neither the epoch nor the list ever goes backwards. [M 2026-11-07]
- API: REST + JSON on loopback, OpenAPI generated from code.
- CA: root created offline, ~10 years, pathLenConstraint ≥ 1, never on the server. Intermediate ~1 year, key encrypted on the server, password via systemd credentials. Leaf and device mTLS certs issued by control (lifetimes decided and justified in phase 3). Intermediate renewal: control makes a CSR; Custos signs with the root after a match-code approval.
- Engine switch: the NixOS module defines ianitor-edge and caddy-fallback (reads the generated Caddy JSON); only one runs; an engine-select unit starts the chosen one at boot from /var/lib/ianitor/engine; control may start/stop only these two units through a polkit rule scoped to exactly them.
- NixOS module: services.ianitor.*; everything on loopback except edge; LoadCredential for secrets, asserted not to be store paths.
4. UI (count clicks in every smoke test)
Main screen: host list with health dots, engine chip, intermediate-expiry banner, last-apply bar with Undo.
| Flow | Clicks |
|---|---|
| Add host: + Host → fill → Apply (auto-kept or auto-reverted) | 2 |
| Undo last change | 1 |
| Restore: History → pick → Restore | 3 |
| Share link: ⋯ → Share → Copy (default expiry 7 d) | 3 |
| Switch engine: engine chip → Switch to Caddy | 2 |
| Device cert: Certs → + Device → Issue (approve in Custos) | 3 |
| Renew intermediate: banner Renew (approve in Custos) | 1 |
| API token: ⚙ → API → New token | 3 |
Accepted exceptions [M 2026-11-07]: copying a new API token and installing a device certificate may take a 4th click
(deliberate secret-handling steps). A share link on a host with links off takes 4 clicks (⋯ → Share link → Turn on
share links → Copy, after the apply is kept; no turn_on API change). Signing the intermediate by hand on the offline
machine (openssl) is outside the 1-click Renew budget while Custos lacks the operation (§8.6). Share links are off
while Caddy serves (v1); a validator Caddy calls through forward_auth comes before v1.1's monthly switch rehearsal.
5. Test layers (all run in an Artifex pipeline by phase 4)
- Differential: the same request corpus against Ianitor and Caddy; status, selected headers and body compared.
- Protocol conformance: h2spec, testssl.sh.
- Fuzzing: cargo-fuzz on config parsing, header rules, share tokens; any crash fails the pipeline.
- NixOS VM tests: failed apply auto-reverts; switch to Caddy and back keeps a host reachable; intermediate renewal with a test root; control unreachable from outside loopback.
- Load and soak against Caddy, reproducible from a script; results committed as data, published honestly including where Caddy wins.
6. Phases
Phase 1 — Core and engine
Goal: Pingora proxy serving hosts from the validated model; same model compiled to Caddy JSON; differential harness proving parity. First: .gitignore and a pre-commit hook (rejects binaries, private keys, files > 5 MB). Placeholders only for control/web. Tests first: schema rejects unknown fields, missing/duplicate hostnames, bad upstream URLs, undefined secret references; both compilers deterministic (byte-identical output); an injected secret never appears in a response or log; a forward-auth denial never reaches the upstream; the diff harness (≥ 20 seed requests: plain, headers, websocket upgrade, upstream down, auth denied) catches a deliberately broken compiler once. Done: proxies two local test upstreams with Let's Encrypt staging and with a self-signed test cert; diff suite green.
Phase 2 — Control plane
Goal: ianitor-control edits route files in the git repo, applies with automatic rollback, manages share links and API tokens. Tests first: failed health check reverts the commit and restores the previous edge config; a control crash mid-apply leaves edge on the last good config; share token rejected when expired, wrong path, wrong host, tampered or missing password; requests without a valid token rejected and tokens never logged; concurrent applies serialised. Done: add host, undo, restore and share link work end to end via the API on loopback; curl examples in docs/api.md; diff suite green after every apply. Also includes the UI API contract (docs/ui-api.md: overview, error codes, idempotency, health classes, watch probes, history grouping, restore previews), accepted by Mark 2026-11-07.
Phase 3 — Web UI, PKI, NixOS
Goal: the UI from section 4, the CA flows, the NixOS module with VM tests; Ianitor runs beside Caddy on two low-risk hosts. Tests first: issued chains validate to the root; a leaf cannot sign; expired and wrong-name certs rejected; no root key file in the state dir; a Domi device cert is accepted for mTLS while a self-signed cert with the same subject is rejected; VM tests from section 5 layer 4. If Custos has no CSR-signing operation with match-code approval: stop that part, write the needed operation as a Custos ticket, and document a temporary manual offline signing step. Done: smoke test of every UI flow with clicks counted; VM tests green; Mark has run nixos-rebuild; deploy/test-access.sh passes.
Phase 4 — Hardening and release
Goal: all five test layers in an Artifex pipeline (strict Fabrica YAML); verifiable Nix build; artefacts signed via Custos, published as Gitea release assets, sha256-pinned; GitHub push mirror. Deliverables: README (what, why Pingora, honest benchmarks, the Caddy fallback, the Fabrica badge, support section); docs/support.md (the red panda model); launch post drafts in docs/launch/ only. Release notes live on the Gitea release. Done: pipeline green; signed v1.0.0 on Gitea; mirror visible on GitHub; the two-week run beside Caddy starts.
7. Out of scope for v1
Identity gate, tunnel, Domi templates, ACME server, HTTP/3, migrating public sites away from Caddy before the cut-over gate.
8. Open points (resolve at the start of the phase that needs them; record the answer here)
-
Pingora TLS backend: rustls vs BoringSSL/OpenSSL — maturity and NixOS packaging. (phase 1) Answer: rustls (ring), pingora 0.9.1 feature
rustls. Pure Rust, so no system TLS library, Perl, Go or clang in the Nix build.TlsSettings::set_cert_resolvergives SNI selection and lets ACME renewals swap certificates live; tested in crates/edge. Risk: the Pingora README labels it "rustls(experimental)", and the cert callback API is not available on rustls. Mitigation: the diff suite now, then testssl.sh/h2spec in phase 4. Fallback: theopensslfeature, a change local to crates/edge/src/lib.rs and tls.rs. [S github.com/cloudflare/pingora README; pingora-core 0.9.1 src/listeners/tls/rustls] [J] Phase 4 check (2026-11-18, bench/README.md): h2spec 144 of 145 passed, 0 failed (Caddy 2.11.7: 4 failed); testssl.sh 3.2.2 grade A+ for both, TLS 1.2 and 1.3 only. Cost seen: new TLS connections are about 1.5× slower than Caddy's on the same two cores. [S local runs] -
Rust ACME crate for Let's Encrypt — maintenance status; pick and justify. (phase 1) Answer: instant-acme 0.8.5 (djc/instant-acme; release 2026-02-24, ~1.5 M recent downloads). It is a plain RFC 8555 client with rustls/ring and rcgen, and edge keeps control of HTTP-01, storage and renewal. rustls-acme and tokio-rustls-acme (also maintained) own the TLS acceptor, which conflicts with Pingora's listener. acme2 (last release 2022) and acme-lib (2024) are stale. Verified end to end against Pebble 2.6 only, not against LE staging. [S crates.io API 2026-11-07] [J]
-
Does Pingora build on Windows? If not, develop in WSL2 and note it in CLAUDE.md. (phase 1) Answer: it compiles and the unit tests run on Windows (MSVC, Rust 1.99), but the README calls Windows support "preliminary by community's best effort only". Unix-only parts include graceful upgrade, the in-process runner and the integration tests. Caddy and Pebble are not on this Windows box. So the edge integration tests, the diff suite and the ACME test run in WSL2 Debian, as noted in CLAUDE.md. One gotcha: libz-ng-sys's CMake build fails under a very deep CARGO_TARGET_DIR (MSBuild path length). [S github.com/cloudflare/pingora README; local builds 2026-11-07]
-
Pingora graceful reload behaviour under load. (phase 2) Answer: no Pingora graceful upgrade for config changes; edge swaps its config in process. A reload builds a complete new runtime from the config file (secrets, certificates, share-link key) and installs it with one atomic pointer swap (
arc-swap); listeners, TLS sessions and keep-alive connections are untouched, each request keeps the runtime it started with, and the next request on the same connection uses the new one. A config that fails to build is refused and the old one keeps serving; listen addresses change only with a restart. Control triggers it through edge's admin Unix socket (mode 0660, never a TCP port) as a trial that edge reverts by itself unless control confirms it in time, so a control crash mid-apply cannot strand edge on an unverified config. Pingora's graceful upgrade (new process takes the listening sockets, old one drains for the grace period) stays for binary upgrades only: it needs a second process and fd passing, and idle keep-alive connections on the old process are closed after the drain, which clients see as a reset on their next request; it was not measured. [J] Measured (crates/edge/tests/reload.rs, debug build, WSL2 Debian, 16 cores, one local upstream; alternating two configs that differ in a response header,POST /v1/reloadevery 100 ms, each client one TLS keep-alive connection sending requests back to back):Clients Duration Reloads Requests Errors Connection resets Connections that saw both configs p50 / p99 / max latency 32 10 s 98 30,198 0 0 32/32 10.5 / 17.2 / 132 ms 64 30 s 294 95,229 0 0 64/64 20.0 / 31.9 / 190 ms 128 30 s 292 87,796 0 0 128/128 43.1 / 69.1 / 215 ms Reproduce:
IANITOR_RELOAD_CLIENTS=64 IANITOR_RELOAD_SECS=30 cargo test -p ianitor-edge --test reload -- --exact unix::reload_under_load_drops_nothing --nocapture. Not measured: a release build, HTTP/2 clients, long-lived websockets across reloads (they keep the runtime they started with until they close), and Pingora graceful upgrade for comparison. [S local runs 2026-11-07] -
Authelia forward-auth endpoint and headers to mirror exactly. (phase 1) Answer:
GET /api/authz/forward-auth(ForwardAuth implementation; legacy/api/verifynot used). Edge sends X-Forwarded-Method, -Proto, -Host, -URI (required) and X-Forwarded-For, and always sets them itself. It also forwards the client's headers (Cookie, Authorization) without hop-by-hop headers or body. A 2xx answer copies Remote-User, Remote-Groups, Remote-Email and Remote-Name onto the request (client copies removed). Any other answer (302 portal, 401 + WWW-Authenticate, 403) goes back to the client verbatim. An unreachable, silent (10 s deadline), oversized (>1 MiB), broken or101auth answer fails closed with 502; 1xx heads are skipped. Client-sent Remote-* headers are always stripped on forward-auth hosts, whatever copy_headers says. This mirrorscaddy adaptoutput for Authelia's documentedforward_authsnippet; tested against a mock, not a real Authelia. [S authelia.com/reference/guides/proxy-authorization, authelia.com/integration/proxies/caddy] -
Custos CSR-signing operation with match-code approval. (phase 3) Answer: Custos has none (desktop 0.8.0, CustosPublic v0.13.0). Its
signop signs only minisign, SHA256SUMS manifests, Authenticode digests and deploy approvals, refuses any request againstdomi-root(the RSA-3072 Authenticode root), and no path takes a CSR. Its server reach is the factor-service sign mailbox (POST /api/sign/requests, Bearer sign token, answers sealed to a one-time X25519 key, 5-minute match-code card on the PC with a push to the phone). So, per §6: the operation is written as a ticket, custos-ticket.md (a new keydomi-pki-root, ECDSA P-256; a sign kindx509_csrthrough the same mailbox that builds the intermediate from a fixed profile and takes only the CSR's key and CN; the match code computed from the CSR on both screens), not filed. Until then the intermediate is signed by hand on the offline machine with openssl (pki.md; Mark accepted it as a §4 exception, 2026-11-07) and device certificates are approved on the server withsudo -u ianitor-control ianitor-control pki approve <code>(Q5). API tokens: Custos stores them as "Local app credential" items with adomi-ref; the intended import is Provisio'soffer(the server seals the value to the PC's key and Mark accepts a match-code card), or copy and paste in the item editor. [S Custos docs/09_signing.md, 07_domi_identity.md, 10_provisio.md, apps/desktop/src-tauri/src/signing.rs] Configuration_Server findings (domains, Caddy, sops-nix secrets, the two trial hosts): deploy/beside-caddy.md. Mark, 2026-11-08: production runs Authelia, configured outside Configuration_Server, so forward-auth stays (the admin UI host must be behind it; control refuses the ui-proof header on any other host); the trial hosts flowers.stage and esp32.stage on the hyperv-infra mirror are confirmed; and changes keep working while Caddy serves (applies, Undo and Restore are loaded into Caddy through its admin socket, watched through Caddy and reverted by reloading the previous caddy.json; only share links are off). -
Red Panda Network donation route for a non-US individual and the receipt they issue. (phase 4, Mark) Proposed answer, pending Mark's confirmation (2026-11-10): once a year, a one-time gift in USD through RPN's online donation form, by card, as an individual; RPN's online gifts come with a receipt "for your records" by e-mail, naming RPN as a US 501(c)(3) (EIN 26-1103671). For a larger sum, RPN's 2024 sponsorship sheet also names bank transfer and check; the transfer details are not on the website and come from the US office (info@redpandanetwork.org, +1 503 662 8130; mail: 5 Centerpointe Drive, Suite 400, PMB16970706, Lake Oswego, OR 97035; an older address in Eugene, OR still appears on the planned-giving page). Nothing on the site addresses donors outside the US: no other currency, no non-US receipt. The receipt is a US tax document; for a Czech donor a gift to a charity seated outside the EU/EEA is, as far as found, not deductible under §15 of the Czech income tax act (not confirmed by a source that says so directly; ask the tax office if it matters). RPN's crypto route via Every.org could not be checked (Every.org answered 429), and one third-party listing says Every.org does not take gifts for RPN now. Publishing: the e-mailed receipt, personal data blacked out, under docs/support/receipts/ with a line in docs/support.md. Also found: RPN runs its own "Adopt a red panda" programme (from USD 60, certificate by e-mail, receipt issued); docs/support.md says the project's model is not that programme. Before the first remittance, Mark should e-mail info@redpandanetwork.org to confirm that a receipt is issued to a non-US individual and ask for transfer details. [S redpandanetwork.org/donate, /adopt, /contact-us, /sample-language-for-your-will-or-trust; RPN_Partnership-Sponsorship_Features_and_Benefits_2024 (redpandanetwork.org/files/galleries, as quoted by search; the PDF's text could not be extracted here); gofundme.com/charity/red-panda-network (501(c)(3), EIN); a 2017 RPN e-mail receipt via Classy (receipt number, amount, date, tax line); finance.cz and vskp.vse.cz on Czech gift deductions] [J]
9. Status
| Phase | State | Notes |
|---|---|---|
| 1 Core and engine | Done | Merged to main 2026-11-07. Tests run in WSL2; ACME checked only against Pebble. The Let's Encrypt staging check moved to phase 3 (Mark, 2026-11-07). |
| 2 Control plane | Done | Merged to main 2026-11-07 (PR 3): routes repo, journaled apply with trial/watch/revert, undo, restore, share links, API tokens, REST API + OpenAPI, --dev. Four QC rounds; every finding fixed or listed in Handover. Real Gitea, systemd credentials and Authelia not exercised. |
| 3 Web UI, PKI, NixOS | Built and merged; Done criteria pending Mark | Merged to main 2026-11-08 (PR 5): web UI (murex palette), Domi CA and device mTLS, UI sign-in behind Authelia, runtime engine switch with changes under Caddy, NixOS flake, module and VM tests. Click smoke test green. Not yet done: VM tests run on a KVM host, Mark's nixos-rebuild on the staging mirror, deploy/test-access.sh there, the LE staging check. |
| 4 Hardening and release | Built and merged; Done criteria pending Mark | Merged to main 2026-11-22 (PR 13): hardening backlog (header deadline, own resolver, pipelining, proxy socket for edge beside Caddy, control UI socket), all five test layers runnable (fuzz, h2spec/testssl, bench vs Caddy committed as data), Artifex layers and verify-nix pipelines, a release pin that cannot name other code, README, support.md, launch drafts; with the release kit and Fabrica onboarding (source archive, Aula page, Playwright e2e, 2026-11-19). Not yet done: the first Nix pin and the VM tests (need a machine with Nix and KVM), a pipeline run, signed v1.0.0, the GitHub mirror (later), the two-week run beside Caddy. |
10. Handover
(Rewritten at the end of every session: what changed, what was not verified, which build is deployed, the next step.)
2026-11-23: Ianitor is CPAL-1.0 (Mark's decision for every public Domi repo; F:\Akce\domi-licence).
- Changed: LICENSE is the kit's template with only
{ORIGINAL_CODE}= Ianitor. Every header (166 files) is anSPDX-License-Identifier: CPAL-1.0notice; Cargo.toml, the fuzz crate, the three package.json, the Nix package meta (lib.licenses.cpal10), the OpenAPI document, README, CLAUDE.md, decision 9 and the docs say CPAL-1.0. 0.2.0 and earlier stay MPL-2.0. The web UI shows the Exhibit B credit (Built on Domi · Copyright (c) 2026 Marek Novák · https://aula.marek-novak.cz) on every screen and in Settings, About (apps/web/src/lib/credit.ts); the e2e real-data check leaves out exactly that credit. - Tests: vitest 22; svelte-check clean; Playwright web 6/6, aula 5/5;
cargo check -p ianitor-control --testsand control's API tests 5/5 in WSL. The rest of the Rust suites were not rerun (headers only). - Deployed: nothing. Not verified: the phone layout of the credit by eye; the Nix build (
cpal10).
2026-11-23: the web UI on @domi/ui, the shared Domi design system (docs/domi-ui.md); PR 14, squash-merged.
- Changed:
@domi/uiv1.0.4 (then v1.1.0) vendored in packages/domi-ui (domi-design tools/vendor.mjs; CPAL-1.0, unedited) and used asworkspace:*;<DomiCredit />is the credit on every screen; its fonts, roles (data-domi-room="ianitor", the same hex) and controls replace Ianitor's copies. Buttons are its Button through Ianitor's adapter (desktop sizes kept); every text field is its TextField with a seal; checkboxes, the secret picker and segmented controls are its components. Ianitor's 22 role names are renamed to--domi-*; its own tokens and components stay in packages/ui. Disabled buttons are natively disabled now (their reasons are visible text). - Tests: vitest 23; svelte-check clean; Playwright web 6/6 (the Apply lookup is exact now), aula 5/5; 13 screens compared before and after (in the PR). No Rust change.
- Deployed: nothing.
- Nix:
fetchPnpmDeps's hash is the one the NixOS runner reported (no Gitea login needed any more). - Not verified: the full Nix build of .#ianitor; a phone (the 48 px touch sizes).
2026-11-22: Phase 4, hardening and release.
- Changed:
- Edge: a 60 s header deadline (slowloris), lookups on its own bounded resolver threads with one lookup per name, pipelining on both listeners, a proxy socket (
/run/ianitor-proxy/edge.sock, sticky 3770) on which edge trusts Caddy's X-Forwarded-For, andunix:upstreams with a strict charset. - Control: the UI API also on
/run/ianitor-control/ui.sock(G14 option b); the UI proof is honoured only there. A route may use a socket upstream only as the[ui]host on control's own socket; checked at every change and at start. - Test layers: tests/fuzz (5 cargo-fuzz targets, crashes replayed in cargo test), scripts/conformance.sh (h2spec, testssl.sh, slow-client probes), scripts/bench.sh with results in bench/;
ianitor-pairruns both engines side by side. - Fabrica:
layers.yaml(all five layers, NixOS runner with KVM),verify-nix.yaml, and a releasepinstep:nix-pin.shrecords the commit, its source tree and nixpkgs; the release refuses a pin whose source differs from the tag's, and verifiers build the tagged commit (docs/verify.md). - README, docs/support.md (Adopt a red panda; RPN route pending Mark, §8.7), docs/launch/ drafts, the GitHub mirror steps for later (docs/release.md). CLAUDE.md: WSL is Ubuntu now, and the disk rule (never C: or D:).
- Results (WSL2 Ubuntu, release build): h2spec Ianitor 144/145, 0 failed (Caddy 2.11.7: 4 failed); testssl.sh A+ both; HTTP/2 slow header block closed by edge after 2.5 s, still open on Caddy at 75 s; fuzz 5x60 s, no crash. Load (one noisy run): Caddy ahead on HTTP/1.1 under load (about 2x with all cores), new TLS connections and the redirect; Ianitor ahead on HTTP/2 at 1 and 64 connections and on memory.
- Tests: core 108, edge 71, control 78, diff 4, fuzz 4, testkit 2 (267); release-pin node test 7; vitest 21; svelte-check clean; hook self-test 55. Two QC rounds; every finding fixed.
- Edge: a 60 s header deadline (slowloris), lookups on its own bounded resolver threads with one lookup per name, pipelining on both listeners, a proxy socket (
- Deployed: nothing. The server is unchanged.
- Not verified:
- The first Nix pin (
scripts/nix-pin.sh, needs Nix; the Nix installer was refused in WSL). Until it exists, the release refuses every tag. - The VM tests, now five with
vm-sockets(no KVM); the module changes (edge.proxySocket,ui.socket, sticky directory,proxySocket.services) were never evaluated. - Caddy from nixpkgs (the suites ran against a
go installbuild of v2.11.7); NixOS's Caddy restarting when its groups change. - The Artifex pipelines (never run; the NixOS runner's host needs nested KVM).
- The domi-release key id in docs/verify.md, against Custos.
- The first Nix pin (
- Known gaps: a kept tree that a changed
[ui]config breaks is reported only in the log at start; X-Forwarded-Proto on the proxy socket is always https (HTTPS fronts only); the oldapply_sequenceflake did not recur in 18 runs, cause unknown. - Needs Mark: confirm §8.7 (RPN route; e-mail RPN about a receipt for a non-US donor before the first remittance); install Nix in WSL or run
scripts/nix-pin.shon a machine with Nix; a KVM machine fornix flake check; the Phase 3 staging deploy; approve the proposed app icon and decide on the PWA (design canvas "Ianitor Domi - All screens"); delete F:\fab-ro (a clean Fabrica clone left by the build). - Next step: Mark's staging deploy and the first Nix pin; then the
layerspipeline, then tag v1.0.0.
2026-11-19: Ianitor onboarded to Fabrica (docs/fabrica.md; Fabrica docs/36_app_onboarding.md).
- Changed:
.fabrica/app.yamlhasaula: trueandtagPrefix: v, with one server part.- The release pipeline publishes the source archive (
scripts/pack-source.mjs, the Aula download), the notes, fivefile:shots andaula-page.json. .fabrica/aula.yaml,.fabrica/aula/brief.md,AULA.md,.fabrica/notes/0.2.0.md..fabrica/tests.yaml(targetweb) and.fabrica/artifex/e2e.yaml(windows-e2e).- A Playwright suite in apps/web (
e2e/,playwright.config.ts): the six §4 flows with their clicks counted, each recorded as a video, and the five Aula shots. It runs on the built UI and the demo control plane, at a fixed instant, with every page checked for real-looking names. apps/web/scripts/shots.mjsis removed.- The demo keeps the hosts it is given and names device requests by what was asked.
- Version 0.2.0.
- Pensum:
#jd3x1h(the videos on Aula, when Fabrica'svideos:lands) and#j4yav1(the visual gate against v0.2.0).
- Decided:
- Canalis does not apply (docs/fabrica.md part 4).
- There is no android target: no Android build.
- The visual gate waits one release, because v0.1.0's shots were taken at a moving clock.
- Verified on this PC (Windows, Edge):
- Playwright: web 6/6 and aula 5/5, under heavy load (the slowest flow took 72 s).
- vitest 21 (smoke 15, demo 6); svelte-check: 0 errors.
fabrica artifex check: 0 problems (3 pipelines, app.yaml, aula.yaml, tests.yaml, brief).fabrica pensum check: 0 problems.fabrica preflight ianitor: 0 blockers.fabrica aula shots(5 × 1440×900),fabrica notes,fabrica aula page. Each PNG was looked at.- No Rust file changed.
- Not verified:
- The
e2epipeline on thewindows-e2erunner. - The Linux suites and the Nix build (as in the 2026-11-17 entry).
- The
- Merged: PR #11 as
7aa8b0e. Tagv0.2.0points at it. - Release: hub run
rydgfrtcygvhb(runner record20261119-020531-s018) atv0.2.0.- Every step up to
pagepassed on the Windows runner: e2e 6/6, pictures 5/5, source 551,770 bytes, notes, shots, page. - It is parked at the approval. It waits for Mark's Custos card (code 774 398), then the
domi-releasesignature ofSHA256SUMS. - Nothing is published until then.
- Every step up to
- Deployed: nothing. The deploy is separate: Apps → Ianitor → Deploy.
- Next step:
- Mark answers the card and signs.
- Check the Gitea release
v0.2.0: the files listed in docs/release.md, Handover step 5. - Configuration_Server adds the Aula entry (docs/fabrica.md, Handover).
2026-11-17: The Domi CA moved to the shared crate domi-pki (Fabrica docs/32_coherence.md, T3a).
- Changed:
crates/core/src/pki.rsis now Ianitor's view of domi-pki v1.0.0 (git tag in Cargo.toml): the same public API, the same error messages and the same encrypted-key format (which stays here: it is Ianitor's storage). Fabrica issues Legatus agent certificates from the same crate under a second intermediate.deploy/nixos/package.nixgetscargoLock.outputHashes."domi-pki-1.0.0"(the NAR hash of the tag's tree, computed with a script checked against a known flake.lock narHash). core no longer depends on rcgen, x509-parser and time directly. - Verified: Rust on Windows only (WSL2 Debian has no disk:
E:\WSL\Debian\ext4.vhdxis missing): core 103 (pki 15, unchanged tests), control 21, edge 31 and diff 2 (the Linux-only targets are skip stubs there), testkit 1: the same counts as before the move. - Not verified:
nix build .#ianitor,nix flake check, the Linux-only Rust suites. - Deployed: nothing.
- Next step: T4 (its own session) runs the Linux suites and the Nix build first.
2026-11-09: Release notes and screenshots for Fabrica.
- Changed:
.fabrica/artifex/release.yaml(on av*tag, Windows runner: version check, web check and tests,fabrica notes, the screenshots, Custos approval, publish to the tag's Gitea release withsums: domi-release);apps/web/scripts/shots.mjs(the built UI against the demo control planeapps/web/tests/demo.ts, invented data, headless Edge over DevTools:aula-hosts,-host,-engine,-history,-certificates.png andaula.json);apps/web/tests/demo.test.ts(each shot drawn from the demo alone, and nothing in it outside.testand the documentation address ranges);mockApi.tsexports its builders and routes for the demo;scripts/check-version.mjs;.fabrica/notes/0.1.0.md(the first release's highlights). docs/release.md says how. app.yaml is unchanged (noaula: true, so no landing page; no desktop part: Ianitor has no installer). - Verified:
fabrica artifex check0 problems;fabrica notes(whole history; PR 3 to 5 come out as bare "PR #n", hence the highlights); the shots script 9 runs (one browser start timed out, before the retry was added), each PNG looked at; vitest 21 (smoke 15, demo 6), svelte-check clean. Rust on Windows only (WSL2 Debian would not start: HCS_E_CONNECTION_TIMEOUT): core 103, control 21, edge 31 and diff 2 (the Linux-only targets are skip stubs there), testkit 1; no Rust file changed. - Deployed: nothing; no tag, no run.
- Next step: Mark tags
v0.1.0, startsreleaseat it, then Deploy as before.
2026-11-08: Ianitor declared to Fabrica.
- Changed:
.fabrica/app.yaml(a server part, flake inputianitor) and.fabrica/artifex/deploy.yaml(approve, thendeploy: ianitor), so Fabrica's Apps screen shows an Ianitor card with Deploy.fabrica artifex check: 0 problems. - Deployed: nothing; no deploy was started.
- For Mark, before the card's Deploy can work: the server flake needs the
ianitorinput (the patch in docs/deploy/configuration-server.patch; withrev=pinned,nix flake update ianitorcannot move it, so drop therev=once the first lock is reviewed), andianitorinservices.fabrica-artifex.deploy.inputs(Fabrica docs/04_deploy.md) with its health URL.
2026-11-08: Phase 3, web UI, PKI, NixOS.
- Changed:
- apps/web and packages/ui: Svelte 5 UI from the designer's hand-off (docs/ui-handoff.md, decisions in docs/ui-decisions.md), murex palette, self-hosted fonts, no outside requests (CSP). vitest click smoke test for every §4 flow, with the accepted 4th clicks.
- Domi CA in core and control (docs/pki.md): ECDSA P-256; root made offline by
ianitor-control ca init; intermediate key encrypted at rest; server certificates 90 days, device certificates 1 year and never past the intermediate; control refuses to start with a private key it does not expect in its state dir. Device mTLS in edge and Caddy (device_certshosts, allow list, 421 on SNI/Host mismatch). - §8.6 answered: Custos has no CSR signing; ticket written (docs/custos-ticket.md, not filed); interim manual openssl signing and
pki approveon the server. - UI sign-in (G14): a per-boot
ui-proofsecret that only the admin host behind Authelia sends; control trusts Remote-User only with it. - Engine switch at runtime through polkit (start/stop of exactly two units). Changes keep working under Caddy: trials loaded through its admin socket, watched by probing upstreams with edge's rules, reverted by control, a deadline guard unit, or ExecStopPost after a crash. Share links are off under Caddy.
- Test hooks moved behind the default
test-hooksfeature; the Nix release build is checked to contain none. - flake.nix (
.#ianitor,.#ianitor-web,nixosModules.ianitor), deploy/nixos with four VM tests, deploy/test-access.sh; docs/deploy/configuration-server.patch and beside-caddy.md (flowers.stage and esp32.stage on the staging mirror, the LE staging check). - Tests: core 103, edge 57, control 75, diff 4, testkit 1 (240); vitest 15; svelte-check clean; hook self-test 55. Four QC rounds and two design reviews; every finding fixed or listed below.
- Deployed: nothing. The server is unchanged. The prepared change is docs/deploy/configuration-server.patch; Mark runs it (beside-caddy.md).
- Not verified:
- The four NixOS VM tests: written and their drivers build, but never run (no /dev/kvm in WSL2).
- Real systemd, polkit, LoadCredential, Authelia, Gitea push and Caddy under systemd; the module against hyperv-infra's nixpkgs 24.11.
- The caddy guard retrying a failed load (code reading only).
- PKCS#12 (AES-256) install on older iOS and macOS; a screen reader; a real clipboard copy in Chrome, Firefox and iOS Safari.
- https upstreams: Caddy-path probes use the system CA bundle; not compared with Pingora's roots.
- Known gaps for later phases:
- Edge beside Caddy listens on loopback TCP, so any local process could forge X-Forwarded-For;
trustedProxiesstays off there. A Unix-socket listener is the fix. (phase 4) - Control on a Unix socket only edge can reach (G14 option b). (phase 4)
- Share links under Caddy need a validator Caddy calls via forward_auth. (before v1.1)
- "All hosts answered" after a switch is not claimed: control does not check every host.
- A revocation during an engine switch reaches the engine at the end of the switch (or by the 2 s retry), not at once.
- The open
apply_sequenceflake from phase 2 has not recurred, but its cause is still unknown.
- Edge beside Caddy listens on loopback TCP, so any local process could forge X-Forwarded-For;
- Decided by Mark (2026-11-07/08): the share link on a host with links off keeps 4 clicks; UI sign-in by a secret header from edge; the switch to Caddy is allowed with differences shown; share links off under Caddy for v1; device approval falls back to
pki approve; manual intermediate signing is a §4 exception; device certificates last 1 year; confirmations on Stop all and Revoke; hidden tabs stop polling after 15 minutes; token lifetime choice; "Open to anyone" chip; production runs Authelia outside Configuration_Server; trial hosts flowers.stage and esp32.stage; changes keep working under Caddy. - Still open:
- Mark: add hyperv-infra/ianitor/domi-root.crt (made offline), apply the patch with the merged commit hash, deploy to the staging mirror, run deploy/test-access.sh, then the LE staging check (it needs a new public name on production).
- Run the VM tests on a machine with KVM (
nix flake check). - (e) Delete F:\pwt and the merged remote branches.
- Next step: Mark's staging deploy and the VM tests close Phase 3; then Phase 4.
2026-11-07: Phase 2, control plane (kept for its open items).
- Changed:
- Phase 2 on branch control/phase-2: crates/control (routes repo through the
gitbinary, journaled apply with edge trial reloads, 60 s watch and revert, undo/redo, restore, push with retry, share links, API tokens, REST API with OpenAPI,--dev), edge in-process reload over an admin Unix socket, share-link checks and visitor pages in edge, share tokens and the exacthosts/<hostname>.tomlloader in core. - docs/api.md (curl examples, run end to end against
--dev) and docs/ui-api.md (the designer's contract for phase 3, with the deviations listed at its end). - §8.4 answered with load numbers. Tests: core 86, edge 43, control 42, diff 3 (diff after each of six applies: 0 new differences), testkit 1; hook self-test 55.
- Four QC rounds. Fixed along the way: password-throttle flush, CLI revoke lost to a server write, a pause lost on a full disk (three variants), revocation epoch rollback, Unicode and encoded
..escapes in share paths, credentials echoed in errors, a port race in the test harness.
- Phase 2 on branch control/phase-2: crates/control (routes repo through the
- Deployed: nothing. The server is unchanged and no nixos-rebuild is needed.
- Not verified:
- Push to the real Gitea over HTTPS (askpass) — a local bare repo stood in.
- systemd LoadCredential (a credentials-dir override stood in); a real Authelia (mock only).
- A release build, HTTP/2 clients and websockets across reloads; Pingora graceful upgrade (kept for binary upgrades only, not measured).
- A lost confirm answer from edge is tested only indirectly (edge stopped during the watch, not a late answer).
- Everything from the phase 1 list below that is still open.
- Known gaps for later phases:
- Share links work only on Pingora; under the Caddy fallback a visitor gets the normal sign-in (G7, phase 3).
- The "site not reachable" visitor page is not built: it needs a matching Caddy
handle_errorsto keep the diff suite equal. - The crash and write-failure test hooks (
IANITOR_TEST_CRASH_AT,IANITOR_TEST_FAIL_WRITE) are in the release binary, gated only by environment; move them behind a default feature that the Nix release build turns off. (phase 3) - Control trusts only API tokens; forwarded
Remote-Userheaders get 401 until the UI sign-in is designed (G14, phase 3). - Edge config is version 2; a phase-1 edge refuses it.
- Workspace
rust-versionis now 1.89 (File::lock). - One open flake: in one full run
apply_sequencetimed out waiting for Caddy on the chunked-body case (Ianitor answered 200). The diff suite alone passed 5/5 afterwards; cause not found.
- Decided by Mark (2026-11-07):
- (a) Let's Encrypt staging moves to phase 3, run on the first low-risk host beside Caddy.
- (b) The engine is switched at runtime by control (§3, §4); §1.6 corrected.
- (c) The 4th click for copying an API token and for installing a device certificate is accepted (§4).
- (d) The murex palette is approved; CLAUDE.md now says "dark Domi theme, murex palette".
- (f) The share-link deny list stays a separate file outside git (§3 updated).
- (g) §3 now describes the password as mixed into the MAC, with no hash in the token.
- (h) Phase 2's growth to the UI API contract is accepted (§6 Phase 2 note).
- Still open:
- The phase 1 click note also listed "share link on a host with links off" as needing a 4th click; not yet decided.
- (e) Delete the stray build folder F:\pwt, and the merged remote branches docs/bootstrap, core/phase-1 and control/phase-2.
- Next step: Phase 3, starting with §8.6 (Custos CSR signing) and the Let's Encrypt staging check.
2026-11-07: Phase 1, design draft (kept for its open items).
- Changed:
- Phase 1 on branch core/phase-1: workspace,
.githooks/pre-commit, crates/core (schema and both compilers), crates/edge (Pingora with rustls), tests/diff (60 cases against Caddy 2.11.7), tests/support. - Reviewed by a separate QC pass, two rounds; every finding fixed or listed below.
- §8 answers 1, 2, 3 and 5 recorded.
- Phase 1 on branch core/phase-1: workspace,
- Deployed: nothing. The server is unchanged and no nixos-rebuild is needed.
- Not verified:
- Let's Encrypt staging; ACME renewal; Caddy's ACME config.
- A real Authelia (mock only).
- HTTPS upstreams against the system roots.
- HTTP/2 client paths; a DNS change while edge runs.
- The hook on bash 3.2 (it refuses to run there).
- Known gaps for later phases:
- Slowloris: the header read has no overall deadline; Caddy closes the connection at 60 s, edge keeps it past 90 s. (phase 4)
- Timed-out DNS lookups keep a blocking-pool thread busy until glibc gives up. (phase 4)
- Divergences KD-4 to KD-10 compare status only.
- The plain-HTTP listener answers only the first of pipelined requests.
- The
<hostname>.tomlcheck looks at the base name only. (phase 2 loader) - On Windows the Linux-only test targets show "1 passed" (a skip test).
- CLAUDE.md lists packages/ui, tests/fuzz, deploy/nixos, the flake and deploy/test-access.sh, which do not exist yet. (phase 3/4)
- Needs Mark:
- (a) Let's Encrypt staging: defer or give a domain.
- (b) §1.6 says an engine change needs a rebuild, but §3 and §4 let control switch engines at runtime. Which one holds?
- (c) §4 click counts: share link with links off, device-cert install and saving an API token each need a 4th click.
- (d) Approve the "murex" palette, and whether CLAUDE.md's "dark Domi theme" wording should change.
- (e) Delete the stray build folder F:\pwt.
- Next step: Phase 2, control plane. Resolve §8.4 (graceful reload under load) first.