197 lines
17 KiB
Markdown
197 lines
17 KiB
Markdown
# Released through Fabrica: the release kit, the Aula page, updates, `domi-rosea://`, the showcase, the test targets
|
|
|
|
*Platform track.* Mark asked on 2026-11-19 that every Domi app be released and updated through Fabrica
|
|
(Fabrica `docs/36_app_onboarding.md`, the checklist this doc follows). This repository's CLAUDE.md wins
|
|
where the two disagree, and this doc says where they do.
|
|
|
|
## 1. Why and what, in the player's terms
|
|
|
|
Today a Rosea app reaches nobody: the Windows installer and the Android APK are build output on one
|
|
machine (G-T7, G0.22), and nothing tells an installed copy that a newer garden exists. After this
|
|
feature:
|
|
|
|
- **One release, built the same way every time.** A `vX.Y.Z` tag makes Fabrica's Windows runner run
|
|
every gate of §5.5 on a clean checkout, build the Windows installer and the Android APK, take the
|
|
pictures, and stop at Mark's Custos card. Only then is anything signed or published.
|
|
- **A page that shows her honestly.** The release carries what Aula needs for Rosea's page: a few
|
|
sentences, pictures of the built game on invented demo data (a rose tended for two weeks in an
|
|
invented garden), and the release notes. Nothing of Mark's own rose is ever in a picture.
|
|
- **Her next version arrives without a network feature in the game.** The apps still make no network
|
|
call of their own (§2, §8). The installed copy on Mark's PC moves to each release through Fabrica's
|
|
*Update all*; a player installs the next installer or APK over the old one, and her rose stays.
|
|
- **Other Domi apps can open the garden.** `domi-rosea://open` opens Rosea on Windows (Canalis
|
|
Part A). Nothing can reach into her: no other app can write into her care, read it, or send words.
|
|
|
|
**What this is not.** Not a public launch. Rosea's repository on Gitea is public, so a published
|
|
release and an Aula page are public too, and CLAUDE.md §8 and G6.1 say a legal check of the look
|
|
comes before any public release. This feature builds the release and the page; **publishing them is
|
|
Mark's decision** (F1).
|
|
|
|
## 2. Technical architecture
|
|
|
|
```mermaid
|
|
flowchart LR
|
|
tag["tag vX.Y.Z<br/>(Fabrica Deploy)"] --> hub["Fabrica hub"]
|
|
hub --> runner["Windows runner<br/>(Mark's PC)"]
|
|
subgraph repo["this repository at the tag"]
|
|
gates["pnpm lint · typecheck · test<br/>validate:library · lint:copy"]
|
|
build["turbo build: schema → engine/content/ui → @rosea/app"]
|
|
e2e["e2e + offline<br/>(built app, /Rosea/)"]
|
|
shots["pnpm aula:shots<br/>e2e/aula.spec.ts → e2e/aula/*.png"]
|
|
desktop["@rosea/tauri build:desktop<br/>NSIS installer + domi-rosea hook"]
|
|
android["@rosea/tauri build:android-release<br/>unsigned release APK, aapt2 verify"]
|
|
end
|
|
runner --> gates --> build --> e2e --> shots
|
|
build --> desktop
|
|
build --> android
|
|
shots --> kit["fabrica notes · aula shots · aula page"]
|
|
desktop --> approve{"Custos card<br/>(Mark)"}
|
|
android --> approve
|
|
kit --> approve
|
|
approve --> sign["Authenticode (domi-code-signing)<br/>APK (rosea-android, custos-sign)<br/>minisign (domi-release)"]
|
|
sign --> publish["Gitea release + signed SHA256SUMS"]
|
|
publish -. "only once Mark decides (F1)" .-> aula["Aula page /rosea/"]
|
|
publish --> update["Fabrica Update all<br/>(Mark's PC)"]
|
|
```
|
|
|
|
Packages and files:
|
|
|
|
| Piece | Where | Reads |
|
|
| :-- | :-- | :-- |
|
|
| The Fabrica app | `.fabrica/app.yaml` | — |
|
|
| The release pipeline | `.fabrica/artifex/release.yaml` | the repo at the tag |
|
|
| The e2e pipeline | `.fabrica/artifex/e2e.yaml` (`runner: windows-e2e`) | `.fabrica/tests.yaml` |
|
|
| The test targets | `.fabrica/tests.yaml`, `e2e/playwright.fabrica.config.ts`, `e2e/android/` | the built bundle; the debug APK |
|
|
| The pictures | `e2e/aula.spec.ts`, `e2e/playwright.aula.config.ts`, `.fabrica/aula.yaml` | the built bundle (PWA, `/Rosea/`) |
|
|
| The page's words | `AULA.md`, `.fabrica/aula/brief.md`, `.fabrica/notes/<version>.md` | — (checked by `lint:copy`) |
|
|
| The version check | `scripts/check-version.mjs` | the four version files |
|
|
| The scheme (Part A) | `apps/rosea-tauri/src-tauri/windows/hooks.nsh`, `tauri.windows.conf.json` | the installer only |
|
|
| The release APK | `apps/rosea-tauri/package.json` `build:android-release`, `scripts/android.ts` | the generated project |
|
|
|
|
The dependency direction of §2 is unchanged: no package gains an import, the game gains no code, the
|
|
shell gains no Rust, no crate and no plugin. Fabrica reads this repository; this repository imports
|
|
nothing of Fabrica's.
|
|
|
|
### Decisions
|
|
|
|
- **F1 — Built and signed, published only when Mark says.** The pipeline is complete: on the hub it
|
|
builds, signs after the card and publishes. Because the repository is public, the first `publish`
|
|
is a public release (G6.1). The tag is therefore made only after Mark answers. Until then the run is
|
|
made locally (`fabrica run release --step page`, which signs as a dry run). The Aula entry for the
|
|
server's `modules/aula.nix` is written down in the handover, not added.
|
|
- **F2 — One part, `desktop`; no `server` part.** The release pipeline makes both apps (Windows and
|
|
Android). The PWA's host is still the author's open question (G0.13: GitHub Pages under `/Rosea/`),
|
|
and a server part would be a NixOS module on the server, which is not this repository's to change.
|
|
When the PWA gets a host, a `server` part (or a Pages job) is added then.
|
|
- **F3 — Updates, the app's own way, with no network in the game.**
|
|
|
|
| Version | How an installed copy reaches the next release | Why not the other way |
|
|
| :-- | :-- | :-- |
|
|
| Windows | Fabrica *Update all* on Mark's PC (Fabrica docs/16): the signed `SHA256SUMS` checked against `domi-release`, the installer run with `/S /UPDATE` in place. A player runs the next installer over the old one (`installMode: currentUser`, same identifier): the WebView2 data folder, and so her rose, stays. | `tauri-plugin-updater` is a network feature and a plugin in the shell; §2 allows neither until one is reviewed for what it sends. An update check would tell a server, daily, that this person plays. No `latest.json` is published, so nothing waits for an updater that does not exist. |
|
|
| Android | The next APK, signed with the same `rosea-android` key and a higher `versionCode` (Tauri derives it from the version), installs over the old one and keeps her. A player gets it from the Aula page; the test phone gets each debug build from its `android` target. | An in-app check needs the `INTERNET` permission, which the APK must not ask for while Rosea has no network feature (§2; `android.ts verify` refuses any permission). |
|
|
| PWA | The service worker: a new bundle is a new worker, offered with *A new version of the garden is ready.* and *Refresh* (calm-refresh.md, G0.10). | Nothing to add here until it has a host (F2). |
|
|
| iOS | Not built (G-T1: needs a Mac). | — |
|
|
|
|
- **F4 — Signing through Custos only.** Authenticode with `domi-code-signing` for the installer;
|
|
the APK with `rosea-android` through `custos-sign apk` (Custos makes the key on the first release,
|
|
Mark's first-signature card; a `run` step that names it in `keys:` so preflight checks it);
|
|
`domi-release` signs each file's minisign signature and `SHA256SUMS`. No key, password or token is
|
|
in the repository, a pipeline file or a log (G-T3). Each key's scope must name `mnovak/Rosea` exactly:
|
|
Mark's step in Custos, which `fabrica preflight rosea` names when it is missing.
|
|
- **F5 — `domi-rosea://open` from the installer (Canalis Part A).** The NSIS installer writes
|
|
`HKCU\Software\Classes\domi-rosea` (`URL Protocol`, `shell\open\command` = `"<exe>" "%1"`) after
|
|
install, and the uninstaller removes the key. **The installer, not every start**, because the shell is
|
|
a window and nothing else (§2): registering at start needs Rust code (a registry crate) in it. An
|
|
*Update all* or a reinstall runs the installer again in the install folder, so the command follows
|
|
the exe. The game ignores the URL: an open of `domi-rosea://…` opens the garden. If Rosea is already
|
|
open, a second window opens on the same data (no single-instance plugin, §2); two-tabs.md keeps both
|
|
windows true to the log. The app id is `rosea`, the identifier `cz.mareknovak.domi.rosea` is unchanged.
|
|
- **F6 — Canalis Part B is not done, and no capability is served.** Three reasons, each enough alone:
|
|
(1) a capability lets another program act on the player's garden, and §1 says *contributions only
|
|
add* and the care log holds only the player's own acts: a `rosea.care.*` capability would make a
|
|
number on screen that the player did not earn; (2) Canalis keys come from Custos (`custos_local`),
|
|
which a Rosea player does not have and must never need: Rosea's identity is its own anonymous
|
|
keypair (§1); (3) it would add Fundamentum crates, a server thread and IPC to a shell that has none.
|
|
So there is nothing to pin: Rosea has no Fundamentum crate, and `canalis-v1.1.0` does not apply.
|
|
Reopen with a capability that only *reads nothing and adds nothing* to her, if one is ever found.
|
|
- **F7 — The pictures come from the app's own Playwright run, on demo data the app itself made.**
|
|
`pnpm aula:shots` serves the built PWA, fixes the clock (Europe/Prague, 08:00 on fourteen
|
|
invented days in March 2026), answers the first open with the gardener's first look and the town
|
|
*Prague* (a public place, chosen from the bundled list; never a real player's town), waters her once
|
|
a day by the button as a player does, and photographs: the garden, the ring of care, her numbers,
|
|
the in-game sunset, *Keep her safe*, the first open, and the same garden on a phone's screen.
|
|
`.fabrica/aula.yaml` lists them as `file:` shots; `fabrica aula shots` checks and publishes them.
|
|
The PWA is built under `/Rosea/`, so Fabrica's own `web:` server (which serves at `/`) is not used.
|
|
**No iPhone pictures:** there is no iOS app yet (G-T1), and the PWA has no host to add to a Home
|
|
Screen (G0.13); a picture of an iPhone would show a version nobody can install.
|
|
- **F8 — Videos wait for Fabrica docs/37.** Until a `videos:` key is on Fabrica `main`, it fails
|
|
`fabrica aula shots`; the Pensum ticket `kkpy69` (*Showcase videos of the main flows for the Aula page*) holds the work.
|
|
- **F9 — Two test targets.** `.fabrica/tests.yaml`: `web` (the built PWA in a headless Chromium, the
|
|
`web` project of `e2e/playwright.fabrica.config.ts`, the same specs as `pnpm test:e2e`) and `phone`
|
|
(`kind: android`, `device: Wave 10`, the debug APK; the queue clears the app's data first, its default
|
|
`reset: clear`). `reset: uninstall` would let a debug build replace a release build, but the installed
|
|
Fabrica CLI (0.14.0) does not know `reset` or `maxMinutes` yet, so neither is written. The `android` project reaches the app's WebView with Playwright's
|
|
`_android` and waters her by the button. It runs **only through Fabrica's phone queue**
|
|
(`fabrica tests run --target phone`); `pnpm test:android` drives Chrome on a USB tablet and stays the
|
|
developer's own check of the PWA. `.fabrica/artifex/e2e.yaml` runs the `web` target on the e2e runner.
|
|
- **F10 — The version is in four files.** `package.json`, `apps/rosea/package.json` (which
|
|
`tauri.conf.json` reads), `apps/rosea-tauri/package.json` and `apps/rosea-tauri/src-tauri/Cargo.toml`.
|
|
`scripts/check-version.mjs <version>` prints each that differs in Fabrica's contract
|
|
(`<file> says <old>, the tag says <new>`), so *Deploy* bumps exactly those. The first release is
|
|
`v0.1.0`, the version every file has today.
|
|
- **F11 — The page's words are copy.** `AULA.md`, `.fabrica/aula/brief.md` and `.fabrica/notes/*.md`
|
|
are what a stranger reads about Rosea, like a store listing (§8). `lint:copy` scans them, so the
|
|
page never says *lonely*, never names the book, and makes no claim to heal anything. The release
|
|
notes `fabrica notes` writes from commit subjects are copy too: the release's `notes-copy` step runs
|
|
`lint:copy` over `target/notes/release-notes.md` before the page is made.
|
|
|
|
## 3. Risk analysis
|
|
|
|
Here risk means *a lonely person feeling worse*, *someone's location*, or *someone being reachable who
|
|
did not ask to be* (§5.1).
|
|
|
|
| Risk | Where | Answer |
|
|
| :-- | :-- | :-- |
|
|
| The page names the person it is for: *for lonely people* | `AULA.md`, the brief, the notes | They speak of the rose, the fox and the time we give to people, never of the reader's state. `lint:copy` scans all three (F11); a test of the script proves they are in its list. |
|
|
| The page promises comfort, or a cure | the same | No outcome is promised; the medical words are refused by `lint:copy`. |
|
|
| The book's look on a public page | the pictures (gardener, round planet, rose) | G6.1: not published until Mark decides (F1). The pictures are the code stand-ins, said plainly in the brief. |
|
|
| A real person's rose or town in a picture | `e2e/aula.spec.ts` | The demo rose is made by the test in a fresh browser profile; the town is a capital from the bundled list; the clock is invented. No file, no IndexedDB of a real profile is read. |
|
|
| An update check that tells a server who plays | the apps | None exists (F3). The apps still ask for no `INTERNET` permission and the shell links no plugin; `android.ts verify` and the shell's tests keep it so. |
|
|
| Auto Backup or a release build that carries debug flags | the release APK | `android.ts verify` runs on the release APK too (no permission, no backup); `custos-sign` refuses a debuggable APK. |
|
|
| Another program reaches into her | `domi-rosea://` | The URL only opens the window; its text is not read (F5). No capability is served (F6). |
|
|
| A web page opens Rosea | `domi-rosea://` | The browser asks first, as for any app link; the garden opens and does nothing else. |
|
|
| A signing key in the repository | the pipelines | Keys are Custos ids only; `custos-sign` holds no key material either (F4). |
|
|
| A release over a player's rose loses her | Windows, Android | Same identifier, same origin (`useHttpsScheme`, pinned by the shell's test), install over, never uninstall. On Android the same key; a debug and a release build cannot replace each other, so the test phone keeps debug builds only. |
|
|
| The phone is used outside the queue | the `phone` target | Only `fabrica tests run --target phone` runs the `android` project. The `android` project skips, saying why, without `FABRICA_TESTS_PACKAGE` and `ANDROID_SERIAL` (set by Fabrica). |
|
|
|
|
## 4. Gap analysis and the designed solution
|
|
|
|
| Gap | Before | After |
|
|
| :-- | :-- | :-- |
|
|
| G-T7 / G0.22: no CI for the apps | built by hand on this machine | built by Fabrica's runner from the tag; still on Mark's PC, but from a clean checkout and the same steps every time |
|
|
| G-T3: release signing keys | none | Custos only (F4) |
|
|
| No release, no page | — | the pipeline, the kit and the words; publishing is F1 |
|
|
| Installed copies never learn of a new version | — | F3 |
|
|
| No `domi-rosea://` | — | F5, Windows only |
|
|
| Nothing to show a stranger | — | F7, eight pictures |
|
|
| G0.23 (source maps) | maps in the PWA build | unchanged and still open: the installer embeds `dist-tauri/`, maps included; the source is public on Gitea already, so nothing new is exposed |
|
|
|
|
Not closed here: G6.1 (Mark's legal check), G0.13 (the PWA's host), G-T1 (iOS), Canalis Part B (F6),
|
|
the videos (F8).
|
|
|
|
## 5. Verification matrix
|
|
|
|
| Case | Unit | Integration | E2E / device | Manual |
|
|
| :-- | :-- | :-- | :-- | :-- |
|
|
| `check-version` passes with all four files equal, names each file that differs in the contract's words | `scripts/check-version.test.ts` | — | — | `node scripts/check-version.mjs 0.1.0` |
|
|
| `lint:copy` reads `AULA.md`, the brief and the notes; a forbidden word in any of them fails | `scripts/lint-copy.test.ts` | `pnpm lint:copy` | — | — |
|
|
| The pipelines and `tests.yaml` are valid | — | `fabrica artifex check` | — | `fabrica preflight rosea` |
|
|
| The NSIS hook registers and removes exactly `HKCU\Software\Classes\domi-rosea` with `"%1"` | `apps/rosea-tauri/test` (the hook's text and the config that names it) | `pnpm tauri:build` makes the installer | — | not run: installing writes Mark's real registry |
|
|
| The release APK has no permission and no backup | `android-privacy` tests (unchanged) | `build:android-release` ends with `android.ts verify` on it | — | — |
|
|
| The pictures: eight PNGs within Aula's limits, on demo data, the same on every run | — | `pnpm aula:shots`, then `fabrica aula shots` | `e2e/aula.spec.ts` | open them and look |
|
|
| The page | — | `fabrica aula brief`, `fabrica aula page` | — | read `aula-page.html` |
|
|
| The `web` target | — | `fabrica tests run --target web` | the e2e specs | — |
|
|
| The `phone` target: the WebView found, watered by the button, still watered after a restart | — | — | `e2e/android/garden.android.ts`, only through the phone queue | — |
|
|
| Bad weather: no `FABRICA_TESTS_PACKAGE` | — | — | the `android` project skips, saying why, before touching adb | — |
|
|
| A full release | — | `fabrica run release --step page` locally (signing dry-run) | — | the hub run, after F1 |
|