# Conflicts: # .fabrica/artifex/release.yaml # docs/ROADMAP.md # docs/release.md
This commit is contained in:
+44
-2
@@ -165,7 +165,7 @@ Identity gate, tunnel, Domi templates, ACME server, HTTP/3, migrating public sit
|
||||
| 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 10): 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. 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. |
|
||||
| 4 Hardening and release | Built and merged; Done criteria pending Mark | Merged to main 2026-11-22 (PR 10): 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.)
|
||||
@@ -187,9 +187,51 @@ Identity gate, tunnel, Domi templates, ACME server, HTTP/3, migrating public sit
|
||||
- The Artifex pipelines (never run; the NixOS runner's host needs nested KVM).
|
||||
- The domi-release key id in docs/verify.md, against Custos.
|
||||
- **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 old `apply_sequence` flake 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.sh` on a machine with Nix; a KVM machine for `nix 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:ab-ro (a clean Fabrica clone left by the build).
|
||||
- **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.sh` on a machine with Nix; a KVM machine for `nix 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 `layers` pipeline, then tag v1.0.0.
|
||||
|
||||
**2026-11-19: Ianitor onboarded to Fabrica (docs/fabrica.md; Fabrica docs/36_app_onboarding.md).**
|
||||
- **Changed:**
|
||||
- `.fabrica/app.yaml` has `aula: true` and `tagPrefix: v`, with one server part.
|
||||
- The release pipeline publishes the source archive (`scripts/pack-source.mjs`, the Aula download), the notes,
|
||||
five `file:` shots and `aula-page.json`.
|
||||
- `.fabrica/aula.yaml`, `.fabrica/aula/brief.md`, `AULA.md`, `.fabrica/notes/0.2.0.md`.
|
||||
- `.fabrica/tests.yaml` (target `web`) 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.mjs` is 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's `videos:` 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 `e2e` pipeline on the `windows-e2e` runner.
|
||||
- The Linux suites and the Nix build (as in the 2026-11-17 entry).
|
||||
- **Merged:** PR #11 as 7aa8b0e. Tag `v0.2.0` points at it.
|
||||
- **Release:** hub run `rydgfrtcygvhb` (runner record `20261119-020531-s018`) at `v0.2.0`.
|
||||
- Every step up to `page` passed 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-release`
|
||||
signature of `SHA256SUMS`.
|
||||
- Nothing is published until then.
|
||||
- **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.rs` is now Ianitor's view of [domi-pki](https://gitea.marek-novak.cz/mnovak/domi-pki)
|
||||
v1.0.0 (git tag in Cargo.toml): the same public API, the same error messages and the same encrypted-key format
|
||||
|
||||
+231
@@ -0,0 +1,231 @@
|
||||
# Ianitor in Fabrica: release, Aula page, updates, showcase, tests
|
||||
|
||||
Mark, 2026-11-19: every Domi app is released and updated through Fabrica. Each app gets its own Aula Domi page,
|
||||
updates in its own way, gets Canalis, gets showcase screenshots and videos from its e2e tests with demo data, and is
|
||||
tested on Fabrica's Playwright runner.
|
||||
|
||||
This page says what each of those means for Ianitor. The checklist is Fabrica `docs/36_app_onboarding.md`. The
|
||||
formats are in Fabrica core `docs/FORMATS.md`, and Calenda's `.fabrica/` is the reference app.
|
||||
|
||||
docs/release.md describes the release pipeline step by step.
|
||||
|
||||
## Why
|
||||
|
||||
Ianitor is a server app. What runs is built by Nix on the server and switched in by the `deploy` pipeline. Its only
|
||||
screens are the web UI, served by control on loopback behind edge and Authelia.
|
||||
|
||||
Three of the six items fit an app like that. Three do not:
|
||||
- Ianitor has no installer and no updater.
|
||||
- It has no Canalis, because Canalis is for apps on one device.
|
||||
- It has no phone build.
|
||||
|
||||
Each item below says which case it is and why.
|
||||
|
||||
## The six items
|
||||
|
||||
| # | Item | Ianitor | Where |
|
||||
| :-- | :-- | :-- | :-- |
|
||||
| 1 | Fabrica app | `app.yaml` with `aula: true`. One `server` part (pipeline `deploy`, flake input `ianitor`). A `release` pipeline started by a `v*` tag. | `.fabrica/app.yaml`, `.fabrica/artifex/{release,deploy}.yaml` |
|
||||
| 2 | Aula page | `AULA.md`, the brief, the shots, the release's highlights. The release publishes the source archive (the page's download), `aula-*.png`, `aula.json`, `aula-page.json` and the notes under a `SHA256SUMS` signed by `domi-release`. | `AULA.md`, `.fabrica/aula/brief.md`, `.fabrica/aula.yaml`, `.fabrica/notes/<version>.md` |
|
||||
| 3 | Auto-update | `fabrica-deploy@ianitor` on the server (part 3). | `.fabrica/artifex/deploy.yaml` |
|
||||
| 4 | Canalis | Not applicable (part 4). | this page |
|
||||
| 5 | Showcase | A Playwright suite on the built UI and the demo control plane, at a fixed instant. It takes the Aula screenshots and records a video of each main flow. The videos wait for Fabrica's `videos:` (part 5). | `apps/web/e2e/`, `apps/web/playwright.config.ts` |
|
||||
| 6 | Test targets | `tests.yaml` with the `web` target, and the `e2e` pipeline on Fabrica's `windows-e2e` runner. No `android` target, because Ianitor has no Android build. | `.fabrica/tests.yaml`, `.fabrica/artifex/e2e.yaml` |
|
||||
|
||||
## 1. The Fabrica app
|
||||
|
||||
`.fabrica/app.yaml` has:
|
||||
- `name`, `icon` and `color` (the murex accent);
|
||||
- `aula: true` and `tagPrefix: v`;
|
||||
- one part, `server: {pipeline: deploy, input: ianitor}`.
|
||||
|
||||
**No `desktop` part.** A desktop part's Deploy bumps the version, tags and pushes, and that tag starts an installer
|
||||
release. Ianitor has no installer. Fabrica allows `aula: true` on an app with a server part only (FORMATS, *Fabrica:
|
||||
the app*).
|
||||
|
||||
**The release comes from a tag.** The version is changed by hand (`[repo] Release: X.Y.Z`, checked by
|
||||
`scripts/check-version.mjs`). Then the `vX.Y.Z` tag is pushed and the hub is asked for a run of `release` at that
|
||||
tag (`POST /api/runs`, `ref: vX.Y.Z`). No Gitea webhook reaches the hub yet.
|
||||
|
||||
`fabrica artifex check` checks every file of this page except `AULA.md`. `fabrica preflight ianitor` checks the
|
||||
server part's pipeline: the hub and the NixOS runner. The release pipeline runs on the Windows runner, which runs
|
||||
its own preflight before each run (Fabrica `docs/23_preflight.md`).
|
||||
|
||||
## 2. The Aula page
|
||||
|
||||
- **`AULA.md`**: the project's text, as Calenda's: what Ianitor is, for whom, what it does, how it is installed (the
|
||||
NixOS module, not a download), and what the release's files are.
|
||||
- **`.fabrica/aula/brief.md`**: the card's line, a short about, and one caption per shot. `fabrica aula page` turns it
|
||||
into `aula-page.json`.
|
||||
- **`.fabrica/aula.yaml`**: five `file:` shots, the PNGs the e2e suite took (part 5). `fabrica aula shots` checks each
|
||||
one (a PNG, at most 2560 × 1600 and 3 MB) and writes `target/aula/aula-<name>.png` and `aula.json`. It starts no
|
||||
browser for them.
|
||||
- **`.fabrica/notes/<version>.md`**: the highlights a person writes. `fabrica notes` adds the merges since the
|
||||
previous tag.
|
||||
|
||||
**What Aula shows.** Aula's server config lists each project with:
|
||||
- its download globs;
|
||||
- whether it must be signed.
|
||||
|
||||
That config is `modules/aula.nix` on the server, owned by the Configuration_Server session. Aula publishes a release
|
||||
only when a file matches the download globs. So Ianitor's download is the source archive of the tag
|
||||
(`ianitor-<version>-src.tar.gz`, `scripts/pack-source.mjs`). Ianitor's entry is in the Handover below.
|
||||
|
||||
v0.1.0 is already a signed release with the shots and the notes. It has no `aula-page.json`, because `aula: true`
|
||||
came later. Aula keeps a file only when it is in the verified `SHA256SUMS`.
|
||||
|
||||
## 3. Updates: `fabrica-deploy`
|
||||
|
||||
Ianitor updates the way a server part does (Fabrica docs/36 part 3, "a server only: `deploy.yaml`"):
|
||||
1. Fabrica's Apps → Ianitor → Deploy, or `fabrica deploy ianitor`, starts the `deploy` pipeline on the NixOS runner.
|
||||
2. Mark approves it on his Custos card.
|
||||
3. `fabrica-deploy@ianitor` fast-forwards the server's clone, updates the flake input `ianitor`, switches the system,
|
||||
and asks the health check.
|
||||
4. If the health check does not answer, it rolls the switch back.
|
||||
|
||||
That is the right way for Ianitor because:
|
||||
- The code that runs is whatever the server's flake builds. A downloaded binary would be a second, unsigned path
|
||||
around the Nix build.
|
||||
- The web UI is part of the same Nix package (`.#ianitor-web`), served by control. A deploy replaces it with the
|
||||
binaries, so there is nothing for a browser-side updater to do.
|
||||
- A service worker would cache an admin UI that sits behind Authelia and must never be served stale. The UI has
|
||||
none, on purpose.
|
||||
|
||||
A release does not deploy, and a deploy does not need a release. The deploy takes the server's chosen commit; the
|
||||
release is the signed record of a version, with its pictures and notes. After a deploy, `deploy/test-access.sh` is
|
||||
run from a LAN machine (CLAUDE.md).
|
||||
|
||||
## 4. Canalis: not applicable
|
||||
|
||||
Canalis is Fundamentum's layer for app-to-app calls **on one device** (Fundamentum `docs/CANALIS.md`):
|
||||
- A caller and a target are both local processes. They are authenticated by Tessera subkeys and signed manifests,
|
||||
and connected over a Noise channel.
|
||||
- Part A registers `domi-<app-id>://open` with the operating system, under the user's own classes.
|
||||
- Part B serves capabilities behind the app's own consent prompt, in the app's window.
|
||||
- The template is for a Tauri 2 + Rust desktop app (a .NET one for Tabula).
|
||||
|
||||
Ianitor has none of the pieces this needs:
|
||||
- No process on Mark's PC or phone.
|
||||
- No window to show a consent prompt in.
|
||||
- No scheme to register.
|
||||
- No Tessera identity.
|
||||
|
||||
Its UI is a page served by a server, reached through the browser behind Authelia. Its control API listens on the
|
||||
server's loopback only and never serves public traffic (CLAUDE.md), so no app on a device can reach it.
|
||||
|
||||
A capability another app could want ("give this new service a host") would be a call from a device to a server.
|
||||
That is a remote API with its own authentication (control's API tokens, docs/api.md), not Canalis.
|
||||
|
||||
So Ianitor stops before Part A. If a Domi app ever needs to ask Ianitor for something, the answer is a scoped API
|
||||
token and a documented call, written in its own design doc.
|
||||
|
||||
## 5. Showcase: the e2e suite, screenshots and videos
|
||||
|
||||
`apps/web/playwright.config.ts`, `apps/web/e2e/`:
|
||||
|
||||
**The server.** The suite's global setup (`e2e/serve.ts`):
|
||||
- builds the UI (Vite, production) into a fresh temporary folder;
|
||||
- serves it on `127.0.0.1` at a free port, with `/api/v1` answered by the demo control plane (`tests/demo.ts`: hosts
|
||||
under `.test`, addresses in the documentation ranges, people *ada* and *felix*);
|
||||
- sends any other path to `index.html`, as production does.
|
||||
|
||||
`POST /__demo/reset` starts the demo over. Every test starts from the same invented server.
|
||||
|
||||
**The clock.** The instant is `2026-11-16T09:30:00+01:00`, a Monday in `Europe/Prague`, with locale `en-GB`. Two
|
||||
things read it:
|
||||
- the demo's answers (`tests/mockApi.ts` `clock`);
|
||||
- the page's `Date` (`page.clock.setFixedTime`).
|
||||
|
||||
So "2 h ago", "today 07:30" and every expiry date read the same in every take. This is what Fabrica's visual
|
||||
comparison needs (docs/28).
|
||||
|
||||
**The checks on every page.** After each test, every text, field and link the page shows is checked with
|
||||
`realLooking` (tests/demo.ts), which the vitest demo test already uses. A name outside `.test`, an address outside the
|
||||
documentation ranges, or a forbidden word fails the test.
|
||||
|
||||
**The browser.** On Windows it is the installed Edge (`PW_CHANNEL` names another), so nothing is downloaded.
|
||||
Elsewhere it is Playwright's own Chromium. Video recording needs Playwright's ffmpeg in `PLAYWRIGHT_BROWSERS_PATH`,
|
||||
which is on F: on Mark's PC and never on C:.
|
||||
|
||||
**The projects.**
|
||||
|
||||
| Project | Command | What it does | Writes |
|
||||
| :-- | :-- | :-- | :-- |
|
||||
| `web` | `pnpm --filter web test:e2e` | The main flows of ROADMAP §4, with the clicks counted as in the smoke test: Add a host (2), Undo (1), Restore (3), Share link (3), Switch engine (2), Device certificate (3). Each is recorded at 1440 × 900. | `target/e2e/videos/<flow>.webm` |
|
||||
| `aula` | `pnpm --filter web aula:shots` | The five screenshots of `tests/demo.ts` SHOTS at 1440 × 900, scale 1, once nothing is busy and the fonts and two frames are in. | `target/e2e/aula/<name>.png` |
|
||||
|
||||
**Videos.** The flows' recordings are WebM, a few seconds each. Fabrica's `videos:` in `aula.yaml` is planned (its
|
||||
docs/36, docs/37) but not on Fabrica `main`, where the key still fails as unknown. Until it lands:
|
||||
- the release publishes the screenshots only;
|
||||
- the videos are artifacts of the e2e run;
|
||||
- Pensum ticket "Publish the showcase videos on Aula" holds the change. That change is a `videos:` list in
|
||||
`aula.yaml` naming `target/e2e/videos/*.webm`, and the release's file globs.
|
||||
|
||||
**The visual gate waits one release.** Fabrica's `visual` step compares the shots with the last signed release's.
|
||||
v0.1.0's shots were taken by the old DevTools script at a moving clock, so every shot would differ, and the first
|
||||
release would stop for an approval of a change that is only the clock. So:
|
||||
- this release (v0.2.0) publishes the fixed-clock shots;
|
||||
- the `visual` step comes with the next release, against v0.2.0;
|
||||
- Pensum ticket "Turn on the visual gate against v0.2.0" holds it.
|
||||
|
||||
`apps/web/scripts/shots.mjs` is removed: the suite takes the same five pictures, and `fabrica aula shots` writes
|
||||
`aula.json`.
|
||||
|
||||
## 6. Test targets
|
||||
|
||||
- **`.fabrica/tests.yaml`**: `dir: apps/web`, one target `web` (kind `web`, project `web`), which is also the merge
|
||||
gate. `fabrica tests run --target web` runs it off-screen, and the record, traces and videos go under
|
||||
`.fabrica/runs/tests/`. The Playwright config passes `FABRICA_TESTS_DEVTOOLS` to the browser for the Tests page's
|
||||
live view.
|
||||
- **`.fabrica/artifex/e2e.yaml`**: Fabrica's own e2e pipeline with `fabrica` for `cargo run`. It is manual, on
|
||||
`windows-e2e`, and runs `pnpm install --frozen-lockfile` then `fabrica tests run --target web`, with
|
||||
`.fabrica/runs/tests/**` as the artifacts.
|
||||
- **No `android` target.** Ianitor has no Android build. Its UI on a phone is the same page in the phone's browser,
|
||||
which a `web` target with a phone viewport would test. That is a gap (below), not a phone queue item.
|
||||
- **The Rust suites** (core, edge, control, diff) are not Playwright. They run in WSL2 and in the Nix build
|
||||
(ROADMAP §8.3). Edge, diff and ACME are Linux-only and need caddy and pebble, which the Windows e2e runner does
|
||||
not have.
|
||||
|
||||
## Risks
|
||||
|
||||
| Risk | Answer |
|
||||
| :-- | :-- |
|
||||
| A picture or video shows Mark's network | The UI talks only to the demo control plane. `realLooking` checks every page every test visits. The PNGs are looked at in the review. |
|
||||
| The demo server is reachable from the LAN | It listens on `127.0.0.1` only, at a free port, for the length of the run. |
|
||||
| A secret reaches the browser | The demo serves no token, key or certificate. The demo API token answer is the stand-in's invented `ian_tk1_…`, which no flow shows. |
|
||||
| Two takes of a screen differ | A fixed instant and zone, the demo reset before each test, fonts and two frames awaited, animations disabled in the screenshot. |
|
||||
| A video grows too large | Each flow is under 15 s at 1440 × 900. docs/37's limits (8 MiB, 60 s, 6 videos) are checked when `videos:` lands. |
|
||||
| The release is held by the visual gate on the clock change | The gate comes one release later (part 5). |
|
||||
|
||||
## Gaps
|
||||
|
||||
- The videos are not on Aula until Fabrica's `videos:` is on `main` (Pensum ticket).
|
||||
- There is no visual gate in v0.2.0 (Pensum ticket).
|
||||
- There are no phone-width shots or tests, and no tests in WebKit or Firefox.
|
||||
- The `e2e` pipeline has not run on the `windows-e2e` runner from this repo. The suite was run here, with Playwright
|
||||
directly and with `fabrica tests run`.
|
||||
- There is no Canalis (part 4).
|
||||
|
||||
## Handover
|
||||
|
||||
**Aula entry** for the server's `modules/aula.nix` (the Configuration_Server session adds it). `files` lists the
|
||||
downloads only. Aula reads the kit (`aula-*.png`, `aula.json`, `aula-page.json`, `release-notes.md`) by itself and
|
||||
never offers it as a download.
|
||||
|
||||
Aula publishes no release that has no file matching `files` (Aula `src/aula_sync.py`). That is why v0.1.0, with the
|
||||
default `*-setup.exe`, shows nothing. v0.2.0 is the first release with a download.
|
||||
|
||||
```nix
|
||||
{
|
||||
name = "Ianitor";
|
||||
repo = "mnovak/ianitor";
|
||||
files = [ "ianitor-*-src.tar.gz" ];
|
||||
signed = true;
|
||||
}
|
||||
```
|
||||
|
||||
**Releasing 0.2.0** (docs/release.md, "Handover"):
|
||||
1. `[repo] Release: 0.2.0` on main.
|
||||
2. Tag `v0.2.0` and push it.
|
||||
3. Start `release` at `v0.2.0` on the hub.
|
||||
4. Mark approves on the Custos card, then signs `SHA256SUMS` with `domi-release`.
|
||||
+73
-65
@@ -1,30 +1,41 @@
|
||||
# Releases: notes and screenshots on the Gitea release
|
||||
# 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 the release notes and screenshots of the web UI, under a `SHA256SUMS`
|
||||
signed by `domi-release`. It ships no binary; the deploy stays the deploy.
|
||||
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`).
|
||||
|
||||
The release kit is Fabrica's (Fabrica `docs/12_release_kit.md`, core `docs/FORMATS.md`, "Fabrica: release notes"
|
||||
and "Fabrica: the Aula page"). Ianitor uses it as it is, with one difference: Fabrica's `fabrica aula shots`
|
||||
drives a built Windows WebView2 exe, which Ianitor does not have, so a repo script takes the same files from the
|
||||
web UI in a headless browser.
|
||||
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 (the Fabrica app on Mark's PC: `fabrica`, node and pnpm
|
||||
are on every step's PATH).
|
||||
`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 <version>`: 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 the vitest click smoke test of the web UI the shots show | |
|
||||
| `notes` | `fabrica notes` (the range since the previous `v*` tag; the first release covers the whole history) | `target/notes/release-notes.md`, `release-notes.json` |
|
||||
| `shots` | `node apps/web/scripts/shots.mjs` (below) | `target/aula/aula-<name>.png`, `aula.json` |
|
||||
| `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/<name>.png` |
|
||||
| `source` | `node scripts/pack-source.mjs <version>`: `git archive` of the tag | `target/release/ianitor-<version>-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-<name>.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 <version> <tag> <commit>`: 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: the notes, the shots, `aula.json` and `ianitor-nix.json`; `sums: domi-release` adds `SHA256SUMS` and `SHA256SUMS.minisig`; `release-notes.md` becomes the release's text | |
|
||||
| `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
|
||||
@@ -35,45 +46,35 @@ Fabrica pipelines cannot depend on one another, so `publish` cannot wait for `ve
|
||||
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
|
||||
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.
|
||||
|
||||
**No landing page.** `fabrica aula page` and `aula-page.json` are left out while `.fabrica/app.yaml` has no
|
||||
`aula: true`. Turning Aula on later is two lines: `aula: true` in `app.yaml` and a `page` step (`fabrica aula
|
||||
page`, after `notes` and `shots`) whose `aula-page.json` is published; a brief (`.fabrica/aula/brief.md`) is
|
||||
optional, its caption names are the shot names below.
|
||||
**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-<version>/`. `git archive` of one tree gives the same bytes every time.
|
||||
|
||||
**app.yaml stays as it is.** Its parts are `desktop` (a release pipeline started by the tag the card's Deploy
|
||||
bumps and pushes, with installers) and `server` (a deploy pipeline). Ianitor has no installer and no version bump to
|
||||
make, so it keeps its one `server` part; the release is started by its tag.
|
||||
**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 (Ianitor has none) and
|
||||
`.fabrica/notes/<version>.md`, the highlights a person writes. The merges of PR 3 to 5 predate the
|
||||
`[repo] Merge: <branch> (<title>, PR #n)` form and come out as bare "PR #n" lines; history is not rewritten, so
|
||||
`.fabrica/notes/0.1.0.md` says in a few sentences what 0.1.0 is, and goes first.
|
||||
`fabrica notes` writes them from:
|
||||
- the first-parent commit subjects;
|
||||
- the Pensum tickets done;
|
||||
- `.fabrica/notes/<version>.md`, the highlights a person writes.
|
||||
|
||||
## Screenshots: `apps/web/scripts/shots.mjs`
|
||||
The highlights go first.
|
||||
|
||||
`node apps/web/scripts/shots.mjs [--out <dir>]` (default `target/aula` at the repo root):
|
||||
## Screenshots
|
||||
|
||||
1. empties the output folder of `aula-*.png` and `aula.json`;
|
||||
2. builds the web UI (Vite, production) into a fresh temporary folder;
|
||||
3. serves it on `127.0.0.1` (a free port), with `/api/v1` answered by the demo control plane
|
||||
(`apps/web/tests/demo.ts`), and every other path falling back to `index.html` as in production;
|
||||
4. starts headless Microsoft Edge (or Chrome; `IANITOR_SHOTS_BROWSER` names another) with a fresh profile in the
|
||||
temporary folder, its DevTools port on loopback only, and a cleared environment (the system variables and the
|
||||
temporary folder, nothing of the runner's: no `GITEA_TOKEN`, no hub token); a browser whose DevTools do not
|
||||
answer within 20 s is stopped and started again, at most three times;
|
||||
5. for each shot: sets the viewport (1440 × 900, scale 1), loads its page, clicks its selectors, waits for its
|
||||
selector, the fonts, two frames and 400 ms, and saves `aula-<name>.png`; a wait that runs out (20 s) saves
|
||||
`aula-<name>-failed.png` and fails;
|
||||
6. writes `aula.json` in the format of core `docs/FORMATS.md` ("Fabrica: the Aula page"): `{"v":1,"shots":[…]}`,
|
||||
each shot's `name`, `title`, `file`, `width` and `height` read from the PNG, and `sha256`;
|
||||
7. on every way out kills the browser's process tree and, on Windows, any process left with a profile in the
|
||||
temporary folder (Edge can start its browser again as a new process, outside the tree), stops the server, and
|
||||
removes the temporary folder.
|
||||
`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/<name>.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 |
|
||||
| :-- | :-- | :-- |
|
||||
@@ -88,26 +89,29 @@ test's stand-in (`apps/web/tests/mockApi.ts`: the same host and apply shapes and
|
||||
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, so a real name cannot slip in through a later fixture.
|
||||
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 shows Mark's network | The UI talks only to the demo control plane; the demo data test refuses 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`; the UI's own CSP allows no outside requests; background networking, sync and component updates are off; its profile is thrown away. |
|
||||
| A secret reaches the browser | Its environment is cleared to the system variables. The demo serves no token, key or certificate. |
|
||||
| A forged screenshot or note | They are release assets under `SHA256SUMS`, signed by `domi-release` through Custos; the Gitea text is not signed, the asset is. |
|
||||
| The browser outlives the run | Its process tree is killed on every way out (`taskkill /T` on Windows). |
|
||||
| A shot of a half-drawn screen | Each `wait` selector exists only once the screen's data is there; fonts and two frames are awaited. |
|
||||
| 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
|
||||
|
||||
- Windows and Edge or Chrome only as tested; the script is plain Node and DevTools, so Linux with Chromium should
|
||||
work, untested.
|
||||
- One size (desktop); no phone layout shot.
|
||||
- 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:` bump: the version in `Cargo.toml` and the `package.json`s is changed by hand before tagging.
|
||||
- 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)
|
||||
|
||||
@@ -127,13 +131,17 @@ discovery (ROADMAP §1.9). When it is time:
|
||||
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 0.1.0
|
||||
## Handover: releasing a version
|
||||
|
||||
0. Once phase 4 is merged (the `pin` step exists), before every tag: run `scripts/nix-pin.sh` on Linux at the commit to tag and commit `.fabrica/nix/pin.json`
|
||||
([verify.md](verify.md)); the `pin` step refuses a missing or stale pin.
|
||||
1. On main: `git tag v0.1.0 && git push origin v0.1.0`.
|
||||
2. Start the `release` pipeline at `v0.1.0` from Fabrica (no Gitea webhook to the hub yet: the hub's
|
||||
`POST /api/runs`, ref `v0.1.0`). Approve on the Custos card, then sign `SHA256SUMS` on Custos (`domi-release`).
|
||||
3. The Gitea release `v0.1.0` has the notes as its text and `release-notes.md`, `release-notes.json`, five
|
||||
`aula-*.png`, `aula.json`, `SHA256SUMS` and `SHA256SUMS.minisig`.
|
||||
4. Deploy as before: Fabrica's *Apps* → Ianitor → *Deploy*, then deploy/test-access.sh from a LAN machine.
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user