[repo] Phase 4: hardening, the five test layers, the release pin #13

Manually merged
mnovak merged 0 commits from phase-4 into main 2026-11-22 19:44:23 +01:00
Owner

Phase 4 of docs/ROADMAP.md: hardening and the test layers, merged with main's release kit and Fabrica onboarding (PRs 11 and 12).

What is in it

  • Edge hardening:
    • a 60 s header deadline (slowloris);
    • DNS lookups on its own bounded threads, one lookup per name, with a drop guard;
    • pipelining on both listeners;
    • a proxy socket for running beside Caddy (/run/ianitor-proxy/edge.sock, sticky 3770, X-Forwarded-For trusted only there);
    • unix: upstreams with a strict charset.
  • Control: the UI API also listens on /run/ianitor-control/ui.sock (G14 option b), and the UI proof is honoured only there. A socket upstream is allowed 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, with crashes replayed in cargo test;
    • scripts/conformance.sh: h2spec, testssl.sh and slow-client probes;
    • scripts/bench.sh, with its results committed in bench/;
    • ianitor-pair, which runs both engines side by side.
  • Fabrica: the layers and verify-nix pipelines, and a pin step in the release.
    • nix-pin.sh records the commit, its source tree and the nixpkgs revision.
    • The release refuses a pin made from other code than the tag's.
    • Verifiers build the tagged commit (docs/verify.md).
  • Docs: README, docs/support.md, docs/launch/ drafts, and the GitHub mirror steps for later. CLAUDE.md now describes WSL Ubuntu.
  • ROADMAP: §8.1 note, §8.7 proposal (pending Mark), Status and Handover.

Verification (head of this branch, after merging main)

  • Rust (WSL2 Ubuntu): cargo test --workspace 267 passed, 0 failed, 0 ignored. fmt, clippy -D warnings and the hook self-test (55/55) are clean.

    Crate Tests
    core 108
    edge 71
    control 78
    diff 4
    fuzz 4
    testkit 2
  • Windows:

    • vitest 21/21;
    • svelte-check 0 errors and 0 warnings;
    • the release-pin node test 7/7;
    • check-version 0.2.0 passes.
  • Results (WSL2 Ubuntu, release build), committed in bench/:

    • h2spec: Ianitor 144/145 with 0 failed; Caddy 2.11.7 failed 4.
    • testssl.sh: A+ for both.
    • A slow HTTP/2 header block: edge closes it after 2.5 s; Caddy was still holding it open at 75 s.
    • Fuzz: 5 targets × 60 s, no crash.
    • Load, from one noisy run: Caddy is ahead on HTTP/1.1 under load, on new TLS connections and on the redirect; Ianitor is ahead on HTTP/2 at 1 and 64 connections, and on memory.

Adversarial self-review

Two QC rounds.

  • Round 1:
    • Held: request smuggling and desync with pipelining on (11 cases), slowloris before TLS and on HTTP/2, the socket-peer checks, unix: upstreams on every API path, and the honesty of the published numbers.
    • Found (Major): a release could publish a signed pin made from other code. Now fixed.
    • Also found: reproducibility was overclaimed in the docs; NixOS's Caddy keeps its old groups after a reload; the socket directory had no sticky bit.
  • Round 2: a PASS, plus one Minor (the pin's own commit was unchecked), now fixed.

Where I still distrust it:

  • No Nix pin yet: scripts/nix-pin.sh has never run (no Nix in WSL), so no pin exists. Once this is merged, the release refuses every tag until a pin is committed. v0.2.0 is unaffected: it is already tagged, and its run uses the tag's own pipeline file.
  • Never run: the five VM tests (vm-sockets among them) and the module changes have never been run or evaluated, because there is no KVM and no Nix here.
  • Caddy build: the suites ran against a go install build of Caddy v2.11.7, not nixpkgs' Caddy.
  • Pipelines: the Artifex pipelines have never been run.
  • Benchmarks: one run on a busy desktop; the README says so.
  • Web e2e: the Playwright suite from PR 11 was not rerun here, because pnpm install wanted to rebuild node_modules without a TTY. No web files changed on this branch.

Deployed

Nothing. The server is unchanged.

Phase 4 of docs/ROADMAP.md: hardening and the test layers, merged with main's release kit and Fabrica onboarding (PRs 11 and 12). ## What is in it - **Edge hardening:** - a 60 s header deadline (slowloris); - DNS lookups on its own bounded threads, one lookup per name, with a drop guard; - pipelining on both listeners; - a proxy socket for running beside Caddy (`/run/ianitor-proxy/edge.sock`, sticky 3770, X-Forwarded-For trusted only there); - `unix:` upstreams with a strict charset. - **Control:** the UI API also listens on `/run/ianitor-control/ui.sock` (G14 option b), and the UI proof is honoured only there. A socket upstream is allowed 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, with crashes replayed in `cargo test`; - scripts/conformance.sh: h2spec, testssl.sh and slow-client probes; - scripts/bench.sh, with its results committed in bench/; - `ianitor-pair`, which runs both engines side by side. - **Fabrica:** the `layers` and `verify-nix` pipelines, and a `pin` step in the release. - `nix-pin.sh` records the commit, its source tree and the nixpkgs revision. - The release refuses a pin made from other code than the tag's. - Verifiers build the tagged commit (docs/verify.md). - **Docs:** README, docs/support.md, docs/launch/ drafts, and the GitHub mirror steps for later. CLAUDE.md now describes WSL Ubuntu. - **ROADMAP:** §8.1 note, §8.7 proposal (pending Mark), Status and Handover. ## Verification (head of this branch, after merging main) - **Rust (WSL2 Ubuntu):** `cargo test --workspace` 267 passed, 0 failed, 0 ignored. fmt, clippy `-D warnings` and the hook self-test (55/55) are clean. | Crate | Tests | | :-- | --: | | core | 108 | | edge | 71 | | control | 78 | | diff | 4 | | fuzz | 4 | | testkit | 2 | - **Windows:** - vitest 21/21; - svelte-check 0 errors and 0 warnings; - the release-pin node test 7/7; - `check-version 0.2.0` passes. - **Results** (WSL2 Ubuntu, release build), committed in bench/: - h2spec: Ianitor 144/145 with 0 failed; Caddy 2.11.7 failed 4. - testssl.sh: A+ for both. - A slow HTTP/2 header block: edge closes it after 2.5 s; Caddy was still holding it open at 75 s. - Fuzz: 5 targets × 60 s, no crash. - Load, from one noisy run: Caddy is ahead on HTTP/1.1 under load, on new TLS connections and on the redirect; Ianitor is ahead on HTTP/2 at 1 and 64 connections, and on memory. ## Adversarial self-review Two QC rounds. - **Round 1:** - **Held:** request smuggling and desync with pipelining on (11 cases), slowloris before TLS and on HTTP/2, the socket-peer checks, `unix:` upstreams on every API path, and the honesty of the published numbers. - **Found (Major):** a release could publish a signed pin made from other code. Now fixed. - **Also found:** reproducibility was overclaimed in the docs; NixOS's Caddy keeps its old groups after a reload; the socket directory had no sticky bit. - **Round 2:** a PASS, plus one Minor (the pin's own commit was unchecked), now fixed. Where I still distrust it: - **No Nix pin yet:** `scripts/nix-pin.sh` has never run (no Nix in WSL), so no pin exists. Once this is merged, the release refuses every tag until a pin is committed. `v0.2.0` is unaffected: it is already tagged, and its run uses the tag's own pipeline file. - **Never run:** the five VM tests (`vm-sockets` among them) and the module changes have never been run or evaluated, because there is no KVM and no Nix here. - **Caddy build:** the suites ran against a `go install` build of Caddy v2.11.7, not nixpkgs' Caddy. - **Pipelines:** the Artifex pipelines have never been run. - **Benchmarks:** one run on a busy desktop; the README says so. - **Web e2e:** the Playwright suite from PR 11 was not rerun here, because `pnpm install` wanted to rebuild node_modules without a TTY. No web files changed on this branch. ## Deployed Nothing. The server is unchanged.
mnovak added 47 commits 2026-11-22 19:43:58 +01:00
# Conflicts:
#	.fabrica/artifex/release.yaml
#	docs/ROADMAP.md
#	docs/release.md
mnovak manually merged commit 8b4570ca1a into main 2026-11-22 19:44:23 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mnovak/ianitor#13