# Releases: the source, the notes and the Aula page on the Gitea release Ianitor is server-only. What runs is built by Nix on the server and switched in by the `deploy` pipeline (`.fabrica/artifex/deploy.yaml`, `fabrica-deploy@ianitor`). A release adds what a deploy does not leave behind: a Gitea release for the `vX.Y.Z` tag with these files, all under a `SHA256SUMS` signed by `domi-release`: - the source archive of the tag; - the release notes; - the screenshots of the web UI; - the Aula landing page. The release ships no binary, and the deploy stays the deploy. docs/fabrica.md says how the six Fabrica items (Aula, updates, Canalis, showcase, tests) fit Ianitor. The release kit is Fabrica's (Fabrica `docs/12_release_kit.md`, `docs/19_web_shots.md`; core `docs/FORMATS.md`, "Fabrica: release notes" and "Fabrica: the Aula page"). The screenshots are `file:` shots, PNGs taken by the web UI's own Playwright suite. `fabrica aula shots` checks them and writes `aula.json`. ## The pipeline: `.fabrica/artifex/release.yaml` `on: tag "v*"` and `manual: true`, on the Windows runner. That is the Fabrica app on Mark's PC: `fabrica`, node and pnpm are on every step's PATH. | Step | Does | Produces | | :-- | :-- | :-- | | `version` | `node scripts/check-version.mjs `: the tag's version must be the workspace `Cargo.toml`'s and both `package.json`s' | | | `install` | `pnpm install --frozen-lockfile` | | | `check`, `test` | `svelte-check` and vitest (the click smoke test and the demo data test) | | | `e2e` | `pnpm --filter web test:e2e`: the main flows in Edge on the built UI and the demo control plane, each recorded (docs/fabrica.md part 5) | `target/e2e/videos/*.webm` (not published yet) | | `pictures` | `pnpm --filter web aula:shots`: the five screens from the same suite | `target/e2e/aula/.png` | | `source` | `node scripts/pack-source.mjs `: `git archive` of the tag | `target/release/ianitor--src.tar.gz` | | `notes` | `fabrica notes`: the range since the previous `v*` tag | `target/notes/release-notes.md`, `release-notes.json` | | `shots` | `fabrica aula shots`: checks the five PNGs (`.fabrica/aula.yaml`) and copies them | `target/aula/aula-.png`, `aula.json` | | `page` | `fabrica aula page`: the brief (`.fabrica/aula/brief.md`), the shots and the notes | `target/aula/aula-page.json` | | `pin` | `node scripts/release-pin.mjs `: the Nix pin committed before the tag (`.fabrica/nix/pin.json`, by `scripts/nix-pin.sh` on Linux); refuses a missing pin, a pin of another version, one made from other code than the tag's, and one naming a present commit of other code; publishes the tagged commit as the build reference | `target/nix/ianitor-nix.json` | | `approve` | the run's Custos approval, before anything is published | | | `publish` | the Gitea release of the tag with the files above, `ianitor-nix.json` included. `sums: domi-release` adds `SHA256SUMS` and `SHA256SUMS.minisig`. `release-notes.md` becomes the release's text. | | **The Nix build is pinned, not shipped.** The Windows runner has no Nix and Fabrica's `SHA256SUMS` covers only the files of one `publish` step, so the release cannot carry a build made by the NixOS runner. It carries the build's NAR hashes instead (`ianitor-nix.json`, under the signed `SHA256SUMS`): anyone rebuilds the tagged commit and compares ([verify.md](verify.md)), and the `verify-nix` pipeline does that on every `v*` tag on the NixOS runner. The `pin` step refuses a pin made from other code than the tag's (its source tree must match), which is the gate: Fabrica pipelines cannot depend on one another, so `publish` cannot wait for `verify-nix`. What "reproducible" covers so far: the output derivations are rebuilt once and compared; their dependencies come from the binary cache. Nothing of it has run yet (no machine with Nix in phase 4); the first pin needs one. The Rust tests are not in it. The edge, diff and ACME tests are Linux-only (ROADMAP §8.3), and the release builds nothing. They run in WSL2 and in the Nix build. **The download.** Aula offers a project's release only when it has a file to download, and kit files (the shots, the notes, the page) never count. Ianitor's download is its source archive. The archive is every tracked file at the tag, under `ianitor-/`. `git archive` of one tree gives the same bytes every time. **app.yaml** has `aula: true` and one `server` part. There is no desktop part: a desktop part's Deploy bumps the version and pushes a tag for an installer release, and Ianitor has no installer. The release is started by its tag. ## Release notes `fabrica notes` writes them from: - the first-parent commit subjects; - the Pensum tickets done; - `.fabrica/notes/.md`, the highlights a person writes. The highlights go first. ## Screenshots `apps/web/e2e/specs/aula.spec.ts`, project `aula` of `apps/web/playwright.config.ts` (docs/fabrica.md part 5). For each shot of `apps/web/tests/demo.ts` SHOTS, it: 1. loads the page at 1440 × 900, scale 1, at the suite's fixed instant; 2. clicks the shot's selectors; 3. waits for its selector, for no `aria-busy` element, for the fonts, two frames and 400 ms; 4. saves `target/e2e/aula/.png`. The suite's global setup builds the UI and serves it on `127.0.0.1` with `/api/v1` answered by the demo control plane. | Name | Page | Shows | | :-- | :-- | :-- | | `hosts` | `/` | the host list: health, chips, where each sends traffic, the last change | | `host` | `/hosts/wiki.home.test/edit` | editing a host: upstreams, certificate, sign-in, health check | | `engine` | `/`, then the engine chip | Pingora serving and the Caddy fallback ready, with its differences | | `history` | `/history/` | the history with a version picked and what restoring it changes | | `certificates` | `/certificates` | the Domi intermediate and the device certificates | **The demo control plane** (`apps/web/tests/demo.ts`) answers like control (docs/api.md), built on the click smoke test's stand-in (`apps/web/tests/mockApi.ts`: the same host and apply shapes and every call the demo does not replace). Its data is invented: hostnames under `.test`, upstream addresses in the documentation ranges (192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24), people *ada* and *felix*, made-up commits, match codes and fingerprints. A vitest test (`apps/web/tests/demo.test.ts`) asks every page's calls and fails on any other hostname or address, and the e2e suite checks every page it visits the same way (`realLooking`), so a real name cannot slip in through a later fixture. ## Risks | Risk | Answer | | :-- | :-- | | A screenshot or video shows Mark's network | The UI talks only to the demo control plane. The demo data test and the e2e suite's `realLooking` check refuse names outside `.test` and addresses outside the documentation ranges. The PNGs are looked at in the review. | | The browser reaches out | It loads only `127.0.0.1`, and the UI's own CSP allows no outside requests. Playwright's profile is temporary. | | A secret reaches the browser | The demo serves no token, key or certificate. | | A forged screenshot, note or archive | They are release assets under `SHA256SUMS`, signed by `domi-release` through Custos. The Gitea text is not signed; the asset is. | | The source archive is not the tag | It is `git archive` of the run's HEAD, the tag's commit in the run's clean worktree. Anyone can repeat it and compare the SHA-256. | | A shot of a half-drawn screen | Each `wait` selector exists only once the screen's data is there. The page has no `aria-busy` element, and the fonts and two frames are awaited. | ## Gaps - Tested on Windows with Edge only. The suite is plain Playwright and should work in Chromium on Linux, but that is untested. - One size (desktop). There is no phone layout shot. - The release does not run the Rust tests (see above); the `layers` pipeline does, on the NixOS runner. - No `[repo] Release:` step: the version in `Cargo.toml`, `Cargo.lock` and the `package.json`s is changed by hand before tagging. - The flows' videos are not published yet (docs/fabrica.md part 5). ## GitHub mirror (later) Decided by Mark: later. The repository on Gitea stays the source; GitHub gets a read-only push mirror for discovery (ROADMAP §1.9). When it is time: 1. On GitHub, create an empty public repository `Ianitor` (no README, licence or .gitignore, so the first push is a plain mirror), description "Ianitor Domi: a reverse proxy on Pingora with a small Domi CA" and the Gitea URL as its website. 2. Create a **fine-grained personal access token** limited to that one repository, permission *Contents: Read and write* (nothing else), with an expiry; keep it in Custos. 3. In Gitea, the repository's *Settings → Repository → Mirror settings → Add push mirror*: URL `https://github.com//Ianitor.git`, user name the GitHub owner, password the token, *Sync when commits are pushed* on, an interval (e.g. 8h) as a backstop. *Synchronize now*, then check that branches and `v*` tags arrived. 4. On GitHub: issues, wiki and projects off (or a pinned note pointing to Gitea), so nothing is filed where nobody looks; releases stay on Gitea, where the signed `SHA256SUMS` is. 5. When the token expires, Gitea's mirror shows the error; renew it in Custos and in the mirror settings. ## Handover: releasing a version 1. On main, set the version in `Cargo.toml`, `Cargo.lock` and both `package.json`s. `node scripts/check-version.mjs 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` ([verify.md](verify.md)). The `pin` step refuses a missing pin and one made from other code than the tag's. 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 `POST /api/runs` with ref `vX.Y.Z`. 4. Approve on the Custos card, then sign `SHA256SUMS` on Custos (`domi-release`). 5. Check the Gitea release `vX.Y.Z`. Its text is the notes. Its files are `ianitor-X.Y.Z-src.tar.gz`, `release-notes.md`, `release-notes.json`, five `aula-*.png`, `aula.json`, `aula-page.json`, `ianitor-nix.json`, `SHA256SUMS` and `SHA256SUMS.minisig`. 6. Deploy as before: Fabrica's *Apps* → Ianitor → *Deploy*, then run deploy/test-access.sh from a LAN machine.