Compare commits

20 Commits

Author SHA1 Message Date
mnovak 4c157b3347 [repo] Merge: release/1.0.0 (version 1.0.0, its first Nix pin, the shared runner's layers green; PR #18) 2026-12-02 21:32:46 +01:00
mnovak 4e762f8261 [repo] Release: the 1.0.0 Nix pin for the notes and bench data (outputs as rp6e1grjvjrkc built them) 2026-12-02 21:24:34 +01:00
mnovak 774bd8c7c3 [repo] Bench: the NixOS runner's layer 5 results (layers run raty64ymvsmbe), and the 1.0.0 notes say what they show 2026-12-02 21:24:33 +01:00
mnovak 11901c1c14 [repo] Release: the 1.0.0 Nix pin for the bench fix (outputs as rp6e1grjvjrkc built them; flake.nix's CI shell and scripts/ are outside the package) 2026-12-02 19:58:07 +01:00
mnovak 42127ed919 [repo] Bench: ss in the CI shell and in bench.sh's tool check; no pid found no longer ends the run silently 2026-12-02 19:57:50 +01:00
mnovak 35852030bf [repo] Release: the 1.0.0 Nix pin for the VM test fix (outputs as rp6e1grjvjrkc built them; deploy/ is outside the package's source) 2026-12-02 18:48:50 +01:00
mnovak 7473b897dc [deploy] VM tests: git in the test server, which vm-apply-reverts runs to read the routes repository 2026-12-02 18:48:24 +01:00
mnovak 5575659a59 [repo] Release: the 1.0.0 Nix pin, from verify-nix run rp6e1grjvjrkc (both outputs rebuilt identical) 2026-12-02 17:14:20 +01:00
mnovak f9e8ac801c [control] Tests: a 15 s trial margin and waits on state, not fixed sleeps, for a loaded runner 2026-12-02 16:47:58 +01:00
mnovak c626db8f25 [repo] Release: the 1.0.0 Nix pin, from verify-nix run r16gdgvh9zasv (both outputs rebuilt identical) 2026-12-02 15:26:20 +01:00
mnovak 2d45087145 [control] Tests: a 5 s trial margin, room for a loaded runner between a watch's end and the confirmation 2026-12-02 15:04:46 +01:00
mnovak af545597c3 [repo] Release: the 1.0.0 Nix pin (outputs as verify-nix rt0ms4r58zt5r built them; source tree of the layers change) 2026-12-02 14:19:43 +01:00
mnovak d0c1ac2548 [repo] Layers: control's integration tests four at a time on the shared runner 2026-12-02 14:19:42 +01:00
mnovak be7a805ef2 [repo] CI shell: openssl for control's pki tests; the pin is made again for this tree 2026-12-02 13:48:28 +01:00
mnovak 85a61e531d [repo] Release: the 1.0.0 Nix pin, from verify-nix run r4wbq2y1e82m4 (both outputs rebuilt identical) 2026-12-02 13:19:30 +01:00
mnovak 54e186f332 [repo] Release: version 1.0.0, its notes, About shows the running version; nix-pin --check prints the pin it would write 2026-12-02 13:00:45 +01:00
mnovak 3bf4a4f4d2 [repo] Merge: feature/domi-pki-1.0.1 (domi-pki v1.0.1, CPAL-1.0, PR #17) 2026-11-23 01:23:44 +01:00
mnovak 5ea0bc1581 [core] domi-pki: the v1.0.1 NAR hash the NixOS runner reported 2026-11-23 01:05:33 +01:00
mnovak d6d1f8d36d [core] domi-pki: pin v1.0.1 (CPAL-1.0; the same code as v1.0.0), NAR hash to come from the NixOS runner 2026-11-23 01:02:45 +01:00
mnovak 97e5db3c08 [repo] Merge: feature/domi-ui-1.1 (@domi/ui v1.1.0, PR #16) 2026-11-23 01:01:20 +01:00
20 changed files with 158 additions and 28 deletions
+6
View File
@@ -13,6 +13,12 @@ runner: nixos
env: env:
CARGO_TERM_COLOR: "never" CARGO_TERM_COLOR: "never"
CARGO_BUILD_JOBS: "8" CARGO_BUILD_JOBS: "8"
# Each of control's integration tests starts its own edge, Caddy and upstreams. With the tests' old 2 s margin for
# control's confirmation (production: 30 s), a status call on the loaded shared runner took longer and edge
# reverted the trial by itself, as designed (runs rc344zj96yjz1, rqzephjsp7983, rzqmqbvx970f8, rja3pbbd14fk1;
# 2026-12-02). The margin is 15 s now (crates/control/tests/common/mod.rs), and four tests at a time keep the
# runner's load down.
RUST_TEST_THREADS: "4"
steps: steps:
- id: workspace-tests - id: workspace-tests
run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c cargo test --workspace --no-fail-fast run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c cargo test --workspace --no-fail-fast
+19
View File
@@ -0,0 +1,19 @@
{
"commit": "774bd8c7c3b82a64c25d47010cdbdc06c60fc9e7",
"nixpkgs": "c56a87d8e41ce69bd2af57eb35dcc117a9dfca33",
"outputs": {
"ianitor": {
"narHash": "sha256-hlX5oiJQPTieETbjojaZnPUGcSgPrKqO2vPsr2o2Xok=",
"narSize": 24455232,
"storePath": "/nix/store/mrq37ldbyn0zg04iwwj22pp05hlpx5y8-ianitor-1.0.0"
},
"ianitor-web": {
"narHash": "sha256-cR8Lq5LNQoQ7xWa40jpjmRybUC8tS9XuXAtojDmCg2c=",
"narSize": 598000,
"storePath": "/nix/store/vsrm3326zm440gwp17nqg3g3bixb3cmm-ianitor-web-1.0.0"
}
},
"sourceTree": "352c508b4c89be0fb8dea44dbe0d850dce4e935095ab0b3f370802e07aff6fa2",
"system": "x86_64-linux",
"version": "1.0.0"
}
+19
View File
@@ -0,0 +1,19 @@
Ianitor 1.0.0 is the first version meant to run beside Caddy on a real server.
- **Hardened edge.** A 60-second deadline for request headers (slow clients cannot hold a connection open), DNS
lookups on their own bounded threads, pipelined requests on both listeners, and a Unix socket for running beside
Caddy, on which edge trusts only Caddy's forwarded address.
- **The control plane on its own socket.** The web UI reaches control through a socket that only edge can use; the
sign-in proof is honoured only there.
- **Five test layers.** The same requests against Ianitor and Caddy with the answers compared, h2spec and testssl.sh,
fuzzing of the config, header rules and share tokens, NixOS VM tests, and load and soak runs against Caddy, with
the results kept as data (bench/results). On the NixOS runner Ianitor was ahead in every row; on WSL2 (2026-11-18)
Caddy was faster on plain HTTP/1.1 under heavy load and on new TLS connections.
- **A verifiable build.** The release publishes the Nix build's hashes. Anyone can rebuild the tag and compare.
- **The shared Domi design system.** The web UI's buttons, text fields, checkboxes and choices come from @domi/ui;
Settings, About shows the running version.
- **A new licence.** From this version Ianitor is under CPAL-1.0 and shows the Built on Domi credit. 0.2.0 and
earlier stay MPL-2.0.
Updates stay a deploy. Fabrica's Deploy moves the server to the new commit and switches back if the health check
does not answer.
Generated
+8 -8
View File
@@ -861,8 +861,8 @@ dependencies = [
[[package]] [[package]]
name = "domi-pki" name = "domi-pki"
version = "1.0.0" version = "1.0.1"
source = "git+https://gitea.marek-novak.cz/mnovak/domi-pki?tag=v1.0.0#b1ec5b3196fc22355270f381e5a7748c50e3380d" source = "git+https://gitea.marek-novak.cz/mnovak/domi-pki?tag=v1.0.1#801dfbdc75cff8ea545422b9ada2fa4a3b6693f8"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"rcgen", "rcgen",
@@ -1304,7 +1304,7 @@ dependencies = [
[[package]] [[package]]
name = "ianitor-control" name = "ianitor-control"
version = "0.2.0" version = "1.0.0"
dependencies = [ dependencies = [
"axum", "axum",
"base64 0.22.1", "base64 0.22.1",
@@ -1331,7 +1331,7 @@ dependencies = [
[[package]] [[package]]
name = "ianitor-core" name = "ianitor-core"
version = "0.2.0" version = "1.0.0"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"domi-pki", "domi-pki",
@@ -1348,7 +1348,7 @@ dependencies = [
[[package]] [[package]]
name = "ianitor-diff" name = "ianitor-diff"
version = "0.2.0" version = "1.0.0"
dependencies = [ dependencies = [
"bytes", "bytes",
"http-body-util", "http-body-util",
@@ -1366,7 +1366,7 @@ dependencies = [
[[package]] [[package]]
name = "ianitor-edge" name = "ianitor-edge"
version = "0.2.0" version = "1.0.0"
dependencies = [ dependencies = [
"arc-swap", "arc-swap",
"async-trait", "async-trait",
@@ -1394,7 +1394,7 @@ dependencies = [
[[package]] [[package]]
name = "ianitor-fuzz" name = "ianitor-fuzz"
version = "0.2.0" version = "1.0.0"
dependencies = [ dependencies = [
"ianitor-core", "ianitor-core",
"ianitor-edge", "ianitor-edge",
@@ -1403,7 +1403,7 @@ dependencies = [
[[package]] [[package]]
name = "ianitor-testkit" name = "ianitor-testkit"
version = "0.2.0" version = "1.0.0"
dependencies = [ dependencies = [
"bytes", "bytes",
"futures-util", "futures-util",
+2 -2
View File
@@ -12,7 +12,7 @@ members = [
exclude = ["tests/fuzz/fuzz"] exclude = ["tests/fuzz/fuzz"]
[workspace.package] [workspace.package]
version = "0.2.0" version = "1.0.0"
edition = "2024" edition = "2024"
rust-version = "1.89" rust-version = "1.89"
license = "CPAL-1.0" license = "CPAL-1.0"
@@ -23,7 +23,7 @@ ianitor-core = { path = "crates/core" }
ianitor-edge = { path = "crates/edge" } ianitor-edge = { path = "crates/edge" }
ianitor-testkit = { path = "tests/support" } ianitor-testkit = { path = "tests/support" }
# The Domi CA, shared with Fabrica (docs/32_coherence.md T3a); pinned by tag. # The Domi CA, shared with Fabrica (docs/32_coherence.md T3a); pinned by tag.
domi-pki = { git = "https://gitea.marek-novak.cz/mnovak/domi-pki", tag = "v1.0.0" } domi-pki = { git = "https://gitea.marek-novak.cz/mnovak/domi-pki", tag = "v1.0.1" }
serde = { version = "1.0.228", features = ["derive"] } serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.145" serde_json = "1.0.145"
toml = "1.2.1" toml = "1.2.1"
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "web", "name": "web",
"version": "0.2.0", "version": "1.0.0",
"private": true, "private": true,
"license": "CPAL-1.0", "license": "CPAL-1.0",
"description": "Ianitor Domi web UI (Svelte 5, runes, TypeScript strict). A pure client of the control API.", "description": "Ianitor Domi web UI (Svelte 5, runes, TypeScript strict). A pure client of the control API.",
+6
View File
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution
// License 1.0: see LICENSE (its Exhibit A is this file's notice).
/** Ianitor's version, from apps/web/package.json at build time (vite.config.ts `define`). */
declare const __IANITOR_VERSION__: string;
+2 -1
View File
@@ -13,6 +13,7 @@
import type { CreatedToken, ShareLink, TokenRow } from "../lib/types"; import type { CreatedToken, ShareLink, TokenRow } from "../lib/types";
let { tab }: { tab: string } = $props(); let { tab }: { tab: string } = $props();
const version = __IANITOR_VERSION__;
const TABS = [ const TABS = [
{ id: "general", label: "General" }, { id: "general", label: "General" },
{ id: "api", label: "API" }, { id: "api", label: "API" },
@@ -241,7 +242,7 @@
{/if} {/if}
{/if} {/if}
{:else} {:else}
<p>Ianitor Domi 0.1.0</p> <p>Ianitor Domi {version}</p>
<p>CPAL-1.0 (Common Public Attribution License 1.0). Ianitor 0.2.0 and earlier stay MPL-2.0.</p> <p>CPAL-1.0 (Common Public Attribution License 1.0). Ianitor 0.2.0 and earlier stay MPL-2.0.</p>
<div class="about-credit"><DomiCredit /></div> <div class="about-credit"><DomiCredit /></div>
<p>Built, tested and signed by Fabrica Domi</p> <p>Built, tested and signed by Fabrica Domi</p>
+4
View File
@@ -2,6 +2,7 @@
// Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution // Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution
// License 1.0: see LICENSE (its Exhibit A is this file's notice). // License 1.0: see LICENSE (its Exhibit A is this file's notice).
import { readFileSync } from "node:fs";
import { svelte } from "@sveltejs/vite-plugin-svelte"; import { svelte } from "@sveltejs/vite-plugin-svelte";
import { defineConfig } from "vitest/config"; import { defineConfig } from "vitest/config";
@@ -11,9 +12,12 @@ import { defineConfig } from "vitest/config";
// $IANITOR_DEV_TOKEN, which `ianitor-control --dev` prints. // $IANITOR_DEV_TOKEN, which `ianitor-control --dev` prints.
const control = process.env.IANITOR_CONTROL ?? "http://127.0.0.1:7878"; const control = process.env.IANITOR_CONTROL ?? "http://127.0.0.1:7878";
const token = process.env.IANITOR_DEV_TOKEN; const token = process.env.IANITOR_DEV_TOKEN;
// The version Settings, About shows: package.json's, which scripts/check-version.mjs keeps equal to Cargo.toml's.
const version: string = JSON.parse(readFileSync(new URL("./package.json", import.meta.url), "utf8")).version;
export default defineConfig({ export default defineConfig({
plugins: [svelte()], plugins: [svelte()],
define: { __IANITOR_VERSION__: JSON.stringify(version) },
server: { server: {
host: "127.0.0.1", host: "127.0.0.1",
port: 5173, port: 5173,
@@ -0,0 +1,33 @@
engine,scenario,connections,duration_s,requests,rps,p50_ms,p90_ms,p99_ms,max_ms,success_rate,non_2xx,rss_kb_after
ianitor,https-h1-keepalive,1,20,55592,2779,0.23,0.52,2.51,59.45,1.0,0,12160
ianitor,https-h2,1,20,37767,1888,0.38,0.93,3.16,30.57,1.0,0,12544
ianitor,https-h1-keepalive,16,20.03,138828,6933,1.68,4.48,10.77,140.32,1.0,0,14828
ianitor,https-h2,16,20.03,155983,7787,1.51,3.86,9.77,38.23,1.0,0,16204
ianitor,https-h1-keepalive,64,20.03,187302,9354,5.97,11.59,19.44,240.08,1.0,0,20388
ianitor,https-h2,64,20.03,202558,10115,5.56,10.59,17.44,43.53,1.0,0,23908
ianitor,https-h1-keepalive,256,20.04,189950,9489,25.48,40.59,58.64,243.89,1.0,0,40552
ianitor,https-h2,256,20.04,199098,9950,24.33,37.98,53.97,98.61,1.0,0,52900
ianitor,https-h1-new-conn,16,20.02,41396,2069,7.11,12.11,19.72,56.94,1.0,0,52900
ianitor,http-redirect,64,20.04,627650,31318,1.31,4.76,10.27,38.26,1.0,627650,57108
caddy,https-h1-keepalive,1,20,44963,2248,0.3,0.61,2.76,47.11,1.0,0,52472
caddy,https-h2,1,20,33450,1672,0.42,0.96,3.37,48.65,1.0,0,52896
caddy,https-h1-keepalive,16,20.04,97182,4849,1.81,6.3,27.14,230.73,1.0,0,60304
caddy,https-h2,16,20.05,108679,5420,2.14,5.69,12.88,54.44,1.0,0,60620
caddy,https-h1-keepalive,64,20.04,151724,7574,5.96,17.62,38.71,118.41,1.0,0,69540
caddy,https-h2,64,20.05,137555,6864,7.56,17.87,31.92,76.7,1.0,0,69328
caddy,https-h1-keepalive,256,20.06,167986,8385,23.95,59.98,113.77,391.74,1.0,0,121336
caddy,https-h2,256,20.09,135177,6739,31.92,69.7,115.94,305.99,1.0,0,116952
caddy,https-h1-new-conn,16,20.03,32184,1607,8.43,17.66,30.92,116.75,1.0,0,82032
caddy,http-redirect,64,20.04,558189,27850,0.55,6.83,19.02,76.63,1.0,558189,88228
caddy_gomaxprocs2,https-h1-keepalive,1,20,50083,2504,0.28,0.54,2.29,43.96,1.0,0,50432
caddy_gomaxprocs2,https-h2,1,20,38506,1925,0.39,0.7,2.72,16.93,1.0,0,50944
caddy_gomaxprocs2,https-h1-keepalive,16,20.05,135842,6776,1.78,4.64,10.16,57.71,1.0,0,53920
caddy_gomaxprocs2,https-h2,16,20.01,94448,4721,2.65,6.44,13.21,41.73,1.0,0,54692
caddy_gomaxprocs2,https-h1-keepalive,64,20.06,127693,6369,8.48,18.72,32.77,116.52,1.0,0,63180
caddy_gomaxprocs2,https-h2,64,20.02,89264,4463,13.09,24.34,37.8,80.83,1.0,0,62156
caddy_gomaxprocs2,https-h1-keepalive,256,20.04,98029,4904,49.05,82,121.88,274,1.0,0,95088
caddy_gomaxprocs2,https-h2,256,20.07,52318,2620,77.85,187.61,372.51,669.97,1.0,0,88524
caddy_gomaxprocs2,https-h1-new-conn,16,20.03,27091,1354,10.3,19.96,34.57,95.53,1.0,0,67256
caddy_gomaxprocs2,http-redirect,64,20.03,409412,20439,1.88,7.58,16.64,54.15,1.0,409412,68240
ianitor,soak-https-h1,32,300.04,2384538,7947,3.28,7.36,15,164.02,1.0,0,56784
caddy,soak-https-h1,32,300.05,2361094,7869,2.85,8.3,20.11,190.58,1.0,0,67676
1 engine scenario connections duration_s requests rps p50_ms p90_ms p99_ms max_ms success_rate non_2xx rss_kb_after
2 ianitor https-h1-keepalive 1 20 55592 2779 0.23 0.52 2.51 59.45 1.0 0 12160
3 ianitor https-h2 1 20 37767 1888 0.38 0.93 3.16 30.57 1.0 0 12544
4 ianitor https-h1-keepalive 16 20.03 138828 6933 1.68 4.48 10.77 140.32 1.0 0 14828
5 ianitor https-h2 16 20.03 155983 7787 1.51 3.86 9.77 38.23 1.0 0 16204
6 ianitor https-h1-keepalive 64 20.03 187302 9354 5.97 11.59 19.44 240.08 1.0 0 20388
7 ianitor https-h2 64 20.03 202558 10115 5.56 10.59 17.44 43.53 1.0 0 23908
8 ianitor https-h1-keepalive 256 20.04 189950 9489 25.48 40.59 58.64 243.89 1.0 0 40552
9 ianitor https-h2 256 20.04 199098 9950 24.33 37.98 53.97 98.61 1.0 0 52900
10 ianitor https-h1-new-conn 16 20.02 41396 2069 7.11 12.11 19.72 56.94 1.0 0 52900
11 ianitor http-redirect 64 20.04 627650 31318 1.31 4.76 10.27 38.26 1.0 627650 57108
12 caddy https-h1-keepalive 1 20 44963 2248 0.3 0.61 2.76 47.11 1.0 0 52472
13 caddy https-h2 1 20 33450 1672 0.42 0.96 3.37 48.65 1.0 0 52896
14 caddy https-h1-keepalive 16 20.04 97182 4849 1.81 6.3 27.14 230.73 1.0 0 60304
15 caddy https-h2 16 20.05 108679 5420 2.14 5.69 12.88 54.44 1.0 0 60620
16 caddy https-h1-keepalive 64 20.04 151724 7574 5.96 17.62 38.71 118.41 1.0 0 69540
17 caddy https-h2 64 20.05 137555 6864 7.56 17.87 31.92 76.7 1.0 0 69328
18 caddy https-h1-keepalive 256 20.06 167986 8385 23.95 59.98 113.77 391.74 1.0 0 121336
19 caddy https-h2 256 20.09 135177 6739 31.92 69.7 115.94 305.99 1.0 0 116952
20 caddy https-h1-new-conn 16 20.03 32184 1607 8.43 17.66 30.92 116.75 1.0 0 82032
21 caddy http-redirect 64 20.04 558189 27850 0.55 6.83 19.02 76.63 1.0 558189 88228
22 caddy_gomaxprocs2 https-h1-keepalive 1 20 50083 2504 0.28 0.54 2.29 43.96 1.0 0 50432
23 caddy_gomaxprocs2 https-h2 1 20 38506 1925 0.39 0.7 2.72 16.93 1.0 0 50944
24 caddy_gomaxprocs2 https-h1-keepalive 16 20.05 135842 6776 1.78 4.64 10.16 57.71 1.0 0 53920
25 caddy_gomaxprocs2 https-h2 16 20.01 94448 4721 2.65 6.44 13.21 41.73 1.0 0 54692
26 caddy_gomaxprocs2 https-h1-keepalive 64 20.06 127693 6369 8.48 18.72 32.77 116.52 1.0 0 63180
27 caddy_gomaxprocs2 https-h2 64 20.02 89264 4463 13.09 24.34 37.8 80.83 1.0 0 62156
28 caddy_gomaxprocs2 https-h1-keepalive 256 20.04 98029 4904 49.05 82 121.88 274 1.0 0 95088
29 caddy_gomaxprocs2 https-h2 256 20.07 52318 2620 77.85 187.61 372.51 669.97 1.0 0 88524
30 caddy_gomaxprocs2 https-h1-new-conn 16 20.03 27091 1354 10.3 19.96 34.57 95.53 1.0 0 67256
31 caddy_gomaxprocs2 http-redirect 64 20.03 409412 20439 1.88 7.58 16.64 54.15 1.0 409412 68240
32 ianitor soak-https-h1 32 300.04 2384538 7947 3.28 7.36 15 164.02 1.0 0 56784
33 caddy soak-https-h1 32 300.05 2361094 7869 2.85 8.3 20.11 190.58 1.0 0 67676
+26 -3
View File
@@ -237,9 +237,16 @@ mod unix {
"{stage}: edge.json untouched" "{stage}: edge.json untouched"
); );
} }
// A trial edge was serving reverts by itself at its deadline (watch 2 s + margin 2 s). // A trial edge was serving reverts by itself at its deadline (watch 2 s + margin 15 s,
tokio::time::sleep(Duration::from_secs(5)).await; // common/mod.rs: room for a loaded runner between the trial's load and the confirmation).
let deadline = std::time::Instant::now() + Duration::from_secs(30);
let st = loop {
let st = env.edge_status().await; let st = env.edge_status().await;
if st["trial"].is_null() || std::time::Instant::now() > deadline {
break st;
}
tokio::time::sleep(Duration::from_millis(250)).await;
};
assert!(st["trial"].is_null(), "{stage}: trial still running: {st}"); assert!(st["trial"].is_null(), "{stage}: trial still running: {st}");
if !confirmed { if !confirmed {
assert_eq!( assert_eq!(
@@ -788,7 +795,23 @@ mod unix {
) )
.await; .await;
let id = r.json["apply"]["id"].as_str().unwrap().to_owned(); let id = r.json["apply"]["id"].as_str().unwrap().to_owned();
tokio::time::sleep(Duration::from_millis(1500)).await; // Edge goes once the trial is loaded and watched (a fixed 1.5 s was before the reload on
// a loaded runner, layers run rja3pbbd14fk1).
let deadline = std::time::Instant::now() + Duration::from_secs(20);
loop {
let s = env
.call("GET", &format!("/api/v1/applies/{id}"), None)
.await;
if s.json["state"] == "watching" {
break;
}
assert!(
std::time::Instant::now() < deadline,
"never watched: {}",
s.text
);
tokio::time::sleep(Duration::from_millis(50)).await;
}
env.stop_edge(); env.stop_edge();
let rec = env.wait_apply(&id).await; let rec = env.wait_apply(&id).await;
assert_eq!(rec["state"], "needs_attention", "{rec}"); assert_eq!(rec["state"], "needs_attention", "{rec}");
+4 -1
View File
@@ -174,7 +174,10 @@ state_dir = "{state}"
credentials_dir = "{creds}" credentials_dir = "{creds}"
watch_secs = {watch} watch_secs = {watch}
watch_every_secs = 1 watch_every_secs = 1
trial_margin_secs = 2 # Production: 30 s. Control starts its watch after the trial's journal is written, which took
# over 5 s on the loaded shared runner (layers run rja3pbbd14fk1); edge's deadline counts from
# the trial's load. The tests that wait out a deadline use this value (apply.rs, engine_switch.rs).
trial_margin_secs = 15
health_poll_secs = 1 health_poll_secs = 1
[routes] [routes]
+3 -3
View File
@@ -575,10 +575,10 @@ esac
let st = ce.env.wait_control_exit(Duration::from_secs(30)); let st = ce.env.wait_control_exit(Duration::from_secs(30));
eprintln!("QC control exit: {st:?}"); eprintln!("QC control exit: {st:?}");
assert!(st.is_some()); assert!(st.is_some());
// Longer than edge's trial deadline would allow. // Past the Caddy guard's deadline: watch 2 s + margin 15 s (common/mod.rs) + 5 s.
tokio::time::sleep(Duration::from_secs(15)).await; tokio::time::sleep(Duration::from_secs(27)).await;
let during = visit(&ce.env, ce.https, "b.test").await; let during = visit(&ce.env, ce.https, "b.test").await;
eprintln!("QC b.test through Caddy 15 s after the crash, control down: {during}"); eprintln!("QC b.test through Caddy 27 s after the crash, control down: {during}");
ce.env.start_control(None); ce.env.start_control(None);
tokio::time::sleep(Duration::from_secs(3)).await; tokio::time::sleep(Duration::from_secs(3)).await;
let after = visit(&ce.env, ce.https, "b.test").await; let after = visit(&ce.env, ce.https, "b.test").await;
+2 -2
View File
@@ -27,8 +27,8 @@ rustPlatform.buildRustPackage {
cargoLock = { cargoLock = {
lockFile = ../../Cargo.lock; lockFile = ../../Cargo.lock;
# domi-pki, the shared Domi CA (Cargo.toml pins tag v1.0.0): the NAR hash of its tree at that tag. # domi-pki, the shared Domi CA (Cargo.toml pins tag v1.0.1, CPAL-1.0): the NAR hash of its tree at that tag.
outputHashes."domi-pki-1.0.0" = "sha256-JdknFJ5cxsI1/MtWmvsItoE6f7znJjUr4C/rwUEz9i4="; outputHashes."domi-pki-1.0.1" = "sha256-C3l3Iqo1pFn/k977Y6TMGdh4aRDU76+W4/kyxv+1mXw=";
}; };
# libz-ng-sys (Pingora's compression) builds zlib-ng with CMake. # libz-ng-sys (Pingora's compression) builds zlib-ng with CMake.
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
+2 -1
View File
@@ -51,7 +51,8 @@ let
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${pkgs.python3}/bin/python3 -m http.server 8000 --bind 127.0.0.1 --directory /etc"; serviceConfig.ExecStart = "${pkgs.python3}/bin/python3 -m http.server 8000 --bind 127.0.0.1 --directory /etc";
}; };
environment.systemPackages = [ pkgs.curl pkgs.jq pkgs.openssl ]; # git: the tests read control's routes repository (vm-apply-reverts).
environment.systemPackages = [ pkgs.curl pkgs.jq pkgs.openssl pkgs.git ];
}; };
# Python helpers shared by the test scripts. # Python helpers shared by the test scripts.
+4
View File
@@ -137,6 +137,10 @@ discovery (ROADMAP §1.9). When it is time:
X.Y.Z` must pass. Write `.fabrica/notes/X.Y.Z.md`. Commit. X.Y.Z` must pass. Write `.fabrica/notes/X.Y.Z.md`. Commit.
1a. Pin: run `scripts/nix-pin.sh` on Linux with Nix at that clean commit and commit `.fabrica/nix/pin.json` 1a. Pin: run `scripts/nix-pin.sh` on Linux with Nix at that clean commit and commit `.fabrica/nix/pin.json`
([verify.md](verify.md)). The `pin` step refuses a missing pin and one made from other code than the tag's. ([verify.md](verify.md)). The `pin` step refuses a missing pin and one made from other code than the tag's.
Without Nix here: start `verify-nix` on the hub at that commit (`POST /api/runs`, pipeline `verify-nix`, the
branch as ref). Its `pin` step fails for want of a pin and logs the pin it would write as one
`pin.json: {…}` line; save that JSON, formatted by `jq -S .`, as `.fabrica/nix/pin.json` and commit only it.
Then run `verify-nix` again: `pin` must say `matches .fabrica/nix/pin.json`.
2. Tag and push: `git tag vX.Y.Z && git push origin vX.Y.Z`. 2. Tag and push: `git tag vX.Y.Z && git push origin vX.Y.Z`.
3. Start the `release` pipeline at `vX.Y.Z` from Fabrica. No Gitea webhook reaches the hub yet, so use the hub's 3. Start the `release` pipeline at `vX.Y.Z` from Fabrica. No Gitea webhook reaches the hub yet, so use the hub's
`POST /api/runs` with ref `vX.Y.Z`. `POST /api/runs` with ref `vX.Y.Z`.
+4
View File
@@ -42,11 +42,15 @@
pkg-config pkg-config
git git
jq jq
# control's pki tests sign an intermediate the way Mark does by hand (docs/pki.md)
openssl
caddy caddy
pebble pebble
h2spec h2spec
testssl testssl
oha oha
# scripts/bench.sh finds each proxy's pid with ss (a NixOS service's PATH has no iproute2)
iproute2
nodejs_22 nodejs_22
pnpm_11 pnpm_11
# the slow-client probes (tests/support/probes) # the slow-client probes (tests/support/probes)
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@ianitor/ui", "name": "@ianitor/ui",
"version": "0.2.0", "version": "1.0.0",
"private": true, "private": true,
"license": "CPAL-1.0", "license": "CPAL-1.0",
"description": "Ianitor's own components on top of @domi/ui (the shared Domi design system): banners, dialogs, status, and adapters for Button and Segmented.", "description": "Ianitor's own components on top of @domi/ui (the shared Domi design system): banners, dialogs, status, and adapters for Button and Segmented.",
+4 -3
View File
@@ -8,7 +8,7 @@
# (tests/diff/src/bin/pair.rs) to the same upstream; oha drives each in turn. Results are # (tests/diff/src/bin/pair.rs) to the same upstream; oha drives each in turn. Results are
# committed as data: bench/results/<date>-<label>.csv and the raw oha JSON beside it. # committed as data: bench/results/<date>-<label>.csv and the raw oha JSON beside it.
# #
# scripts/bench.sh [label] # needs caddy, oha, jq on PATH # scripts/bench.sh [label] # needs caddy, oha, jq, ss on PATH
# nix shell nixpkgs#caddy nixpkgs#oha nixpkgs#jq -c scripts/bench.sh wsl2-ryzen # nix shell nixpkgs#caddy nixpkgs#oha nixpkgs#jq -c scripts/bench.sh wsl2-ryzen
# #
# Environment: DURATION (each load run, default 20s), SOAK (the soak run, default 300s; 0 skips # Environment: DURATION (each load run, default 20s), SOAK (the soak run, default 300s; 0 skips
@@ -23,7 +23,7 @@ duration=${DURATION:-20s}
soak=${SOAK:-300} soak=${SOAK:-300}
conns=${CONNS:-"1 16 64 256"} conns=${CONNS:-"1 16 64 256"}
profile=${BUILD:-release} profile=${BUILD:-release}
for tool in caddy oha jq; do for tool in caddy oha jq ss; do
command -v "$tool" >/dev/null || { echo "missing: $tool" >&2; exit 2; } command -v "$tool" >/dev/null || { echo "missing: $tool" >&2; exit 2; }
done done
@@ -66,7 +66,8 @@ done
# The process to sample for memory: edge runs inside ianitor-pair; each Caddy is a child of it. # The process to sample for memory: edge runs inside ianitor-pair; each Caddy is a child of it.
pid_of() { pid_of() {
local port=$1 local port=$1
ss -Hltnp "sport = :$port" 2>/dev/null | grep -Eo 'pid=[0-9]+' | head -1 | cut -d= -f2 # No pid found is not an error (the row says 0); set -e and pipefail would end the run here, silently.
ss -Hltnp "sport = :$port" 2>/dev/null | grep -Eo 'pid=[0-9]+' | head -1 | cut -d= -f2 || true
} }
rss_kb() { awk '/VmRSS/ {print $2}' "/proc/$1/status" 2>/dev/null || echo 0; } rss_kb() { awk '/VmRSS/ {print $2}' "/proc/$1/status" 2>/dev/null || echo 0; }
+7 -1
View File
@@ -59,7 +59,13 @@ new=$(printf '%s\n' "${entries[@]}" | jq -s --arg v "$version" --arg sys "$syste
'{version: $v, system: $sys, commit: $c, sourceTree: $t, nixpkgs: $n, outputs: add}') '{version: $v, system: $sys, commit: $c, sourceTree: $t, nixpkgs: $n, outputs: add}')
if [ "$mode" = --check ]; then if [ "$mode" = --check ]; then
[ -f "$pin" ] || { echo "no $pin to check" >&2; exit 1; } # With no pin yet, print the one this build would write: the NixOS runner has no commit rights, so its
# log is how the first pin of a release reaches the repo (docs/release.md, Handover 1a).
if [ ! -f "$pin" ]; then
echo "no $pin to check; this build's pin would be:" >&2
jq -S -c . <<<"$new" | sed 's/^/pin.json: /' >&2
exit 1
fi
# At a tag the commit is the pin's child (only pin.json differs), so the commit itself is not # At a tag the commit is the pin's child (only pin.json differs), so the commit itself is not
# compared; the source tree, nixpkgs and every hash are. # compared; the source tree, nixpkgs and every hash are.
if [ "$(jq -S 'del(.commit)' "$pin")" != "$(jq -S 'del(.commit)' <<<"$new")" ]; then if [ "$(jq -S 'del(.commit)' "$pin")" != "$(jq -S 'del(.commit)' <<<"$new")" ]; then