# Conflicts: # .fabrica/artifex/release.yaml # docs/ROADMAP.md # docs/release.md
This commit is contained in:
+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