From 21d3cd1119a5a42e8b0413898b33f7175a4336bd Mon Sep 17 00:00:00 2001 From: mnovak Date: Thu, 19 Nov 2026 03:44:36 +0100 Subject: [PATCH] [repo] FabricaRelease: Review with every gate's counts, the numbers picture centred, handover and a lesson --- .agents/lessons/process.md | 11 ++ .agents/reviews/feature-fabrica-release.md | 162 +++++++++++++++++++++ HANDOVER.md | 18 ++- e2e/aula.spec.ts | 2 +- 4 files changed, 191 insertions(+), 2 deletions(-) create mode 100644 .agents/reviews/feature-fabrica-release.md diff --git a/.agents/lessons/process.md b/.agents/lessons/process.md index c127cf5..3f84ba0 100644 --- a/.agents/lessons/process.md +++ b/.agents/lessons/process.md @@ -70,3 +70,14 @@ it to a file first (the scratchpad), then run the file. **How to apply it.** Prefix hand-typed adb commands with `MSYS_NO_PATHCONV=1`, or pass arguments from Node (`spawnSync`), which the shell does not touch. + +## A bug drill restored with `git checkout` loses the work beside it + +**What happened.** On 2026-11-19 (`feature/fabrica-release`) a drill edited `scripts/lint-copy.ts` +and restored it with `git checkout --`. That brought back the *committed* file and silently dropped an +uncommitted change in it (the release notes' entry). The diff showed it at once; it was re-applied. + +**Why it bit.** `git checkout -- ` restores the index, not the file as it was a minute ago. + +**How to apply it.** Commit before drilling, or copy the file aside and copy it back. Check +`git diff --stat` after every drill. diff --git a/.agents/reviews/feature-fabrica-release.md b/.agents/reviews/feature-fabrica-release.md new file mode 100644 index 0000000..77702c8 --- /dev/null +++ b/.agents/reviews/feature-fabrica-release.md @@ -0,0 +1,162 @@ +# Review — `feature/fabrica-release` + +Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/fabrica-release.md`](../features/fabrica-release.md). +PR: https://gitea.marek-novak.cz/mnovak/Rosea/pulls/1 (the first PR on this repository). +Reviewed 2026-11-19 on Windows 10, Node 22.23.4, Fabrica CLI 0.14.0 (installed in `F:\Apps\Fabrica`), +while about twenty other sessions shared the machine: the CPU sat at 100 % for hours, so every run +below waited for the CPU guard (§5.7); none bypassed it. + +## What changed for the player + +Nothing in the game. The changes are around it: + +- **The Windows installer** now also registers `domi-rosea://` for the user, and its uninstaller + removes it. Opening such an address opens the garden. +- **A release** can be made from a tag on Fabrica's runner, signed in Custos, with an Aula page. None + has been made: the first one waits for the author (G-F1, finding 1). + +## Gates + +Run on the branch head, 2026-11-19, each behind `pnpm guard:cpu` (it refused 6 times; each run waited): + +| Gate | Result | +|:--|:--| +| `pnpm lint`, `pnpm typecheck` | 0 problems (svelte-check 0 errors, 0 warnings; 18 of 18 turbo tasks; root and `tools/release` tsc clean) | +| `pnpm lint:copy` | 29 files, 0 problems (now with `AULA.md`, the brief and the notes) | +| `pnpm validate:library` | 13 of 13 fixtures rejected; 78 candidates | +| `pnpm test` | **608 passed**: identity 5, cpu-guard 13, content 88, schema 19, **release 8** (new), art-prep 80, storage 70, ui 88, engine 179, **tauri 58** (+11). A first run under 100 % load timed out one engine test (10.5 s against 5 s; code untouched here) and stopped turbo; the rerun passed. | +| `pnpm test:e2e` | 26 passed. A first run under load timed out the two-profile *keep her safe* test (30 s); the rerun passed. | +| `pnpm test:offline` | 1 passed | +| `pnpm aula:shots` | 2 passed; 8 PNGs (1280 × 800 and 720 × 1600), looked at one by one | +| `fabrica artifex check` | 2 pipelines, app.yaml, aula.yaml, tests.yaml, brief: 0 problems | +| `fabrica aula brief` / `aula shots` / `aula page` / `notes` | the line, 2 paragraphs, 8 captions, 0 problems; 8 shots and `aula.json`; `aula-page.json` and `.html`; 28 changes, 0 copy problems | +| `fabrica tests list` | `web` 26 tests, `phone` 1 test | +| `fabrica preflight rosea --dir .` | 0 blockers, 2 warnings (Custos not checked: finding 2; pnpm's version unread) | +| `pnpm tauri:build` (target on D:) | `Rosea Domi_0.1.0_x64-setup.exe`, 1.31 MiB; the generated `installer.nsi` includes `hooks.nsh` and calls both hooks | + +**The bundle** (CLAUDE.md §5.4): the game's code is unchanged, so the PWA bundle is the same; the +installer differs by the NSIS hook. Nothing was deployed or distributed. + +## Bug drills + +Each test was run with its bug put back, then the file restored by copy (never `git checkout`, see +finding 9): + +| Put back | Result | +|:--|:--| +| The hook's command without `"%1"` | CAUGHT (`config.test.ts`) | +| The uninstaller keeps the `domi-rosea` key | CAUGHT (`config.test.ts`) | +| `check-version` forgets `apps/rosea/package.json` (the file the installer and APK read) | CAUGHT (2 tests) | +| `lint:copy` forgets the generated release notes | CAUGHT (`copy.test.ts`) | +| The APK's scope says `mnovak/rosea` | CAUGHT (`sign-apk.test.ts`) | +| `CUSTOS_PIPE` accepted (another Custos signs) | CAUGHT (`sign-apk.test.ts`) | + +6 of 6. + +## Findings + +1. **Publishing is a public release, and G6.1 forbids one (blocker for the release, not the merge).** + The repository on Gitea is public (`private: false`, read anonymously), so a Fabrica `publish` and + the Aula page are public. CLAUDE.md §8 and G6.1: *a legal check of the look comes before any public + release*. **Deferred to the author:** asked through the session that started this one, with three + choices (publish now; make the repository private first; wait). Until then no tag is made. G-F1. +2. **Custos's side was not checked.** `fabrica preflight rosea --dir .` says 0 blockers, 2 warnings, but + the CLI has no `fabrica/` grant yet, so the keys and scopes were *not* checked. Expected blockers + before the first release, each Mark's step in Custos: `domi-code-signing` and `domi-release` must + name `mnovak/Rosea` in their scope; `rosea-android` does not exist (Custos makes it on the first + signature). Running preflight raised a Custos card to certify the Fabrica CLI (match code + 836209): it was not retried. **Deferred:** Mark's Custos. +3. **The release's `pnpm test` refuses on a busy PC.** The runner is Mark's desktop, so the CPU guard + runs inside the release; at today's load it would wait three minutes and fail the step after the + install. **Kept:** §5.7 says a dedicated machine may set `ROSEA_CPU_MAX`, a busy desktop may not. A + refused release is re-run when the PC is calm (Fabrica: *Re-run*). +4. **The installed Fabrica CLI does not know `reset` or `maxMinutes`** (docs/35, on Fabrica `main`). + **Fixed:** left out of `tests.yaml`, which now passes `fabrica artifex check`; the reason is in the + file. With the queue's default `clear`, a release build on the phone would block the debug one; the + file says so. +5. **Generated release notes were not copy-checked.** `fabrica notes` writes commit subjects to a page + strangers read; a subject could carry a forbidden word. **Fixed:** `lint:copy` reads + `target/notes/release-notes.md` when it exists, and the release's `notes-copy` step runs before + `page`. Today's notes (28 changes): 0 problems. +6. **Two Custos cards per release.** Fabrica's approval and Authenticode share the run's card; the APK + is signed by `custos-sign` with its own run id (`rosea-v`), so it is a second card (and on + the first release a *first signature* card). **Kept:** the pipeline gives a `run` step no run id to + pass; Postea does the same. +7. **`domi-rosea://` and a running Rosea.** Without a single-instance plugin a second window opens on + the same data. Two windows behave as two tabs (two-tabs.md), so nothing is lost or doubled; a + second window is still a surprise. **Kept**, by §2 (no plugin); written in F5. +8. **Shared Fabrica files.** `F:\Apps\Fabrica\data\workspace.yaml` and `deploy.json` were edited while + other sessions edit them too: Rosea was appended by a read-modify-write within one second, after + another session had added Amicitia and Liber. Both files were read back: every earlier entry is + still there. **Kept:** there is no lock to take. +9. **A drill restored a file with `git checkout` and lost an uncommitted change** (the notes entry in + `lint-copy.ts`). Found at once by the diff, re-applied and committed. **Fixed** the method: drills + now copy the file aside and back. +10. **Gates ran after the first commits, not before** (§5.5 asks for green before any commit). The + machine's load held every full run back for hours. **Fixed in order, not in time:** nothing is + merged before the gates above are green. + +11. **The pictures are not the same on every run.** A fresh profile makes a fresh key, and her + weeds and fallen petals follow it, so the garden in two runs differs (weeds in one, none in the + other; water 40 % or 39 % with the hold's real timing). Each picture is still honest. **Kept**, + and Fabrica's `visual` step (docs/28) is not in the release: it would stop every release on a + difference nobody made. A fixed demo key would need a seam in `@rosea/identity`; not worth it now. +12. **Build output on F:.** F: was nearly full (18 GB free, about twenty sessions building). **Fixed + for this session:** Cargo's target and temporary files went to `D:\build\rosea`. The pipeline itself + builds in the runner's folder (`E:\fabrica-runner`). Gradle's home on the runner is its default, + on C:; not changed here (no Android build ran here). + +## Soul + +*Can this make a lonely person feel worse?* The words a stranger reads (`AULA.md`, the brief, the +notes) were read for guilt, comparison and promises: they say *nothing is lost by being away*, +*no streak resets, no reminders, no counting of anyone*, and call the version early and the pictures +stand-ins. No sentence names the reader's state or promises comfort. `lint:copy` passes on them. The +pictures show one invented rose tended for two weeks, with no number about anyone else. Looked; found +nothing beyond finding 1. + +## Privacy + +Every path by which a byte could leave the device: **none was added to the game.** No updater, no +plugin, no permission; `latest.json` is not published, so no future build can be pointed at one by +accident. The bytes this feature sends leave Mark's PC, not a player's: the pipeline's release to +Gitea, `fabrica preflight` to the hub and Custos. The pictures are taken on loopback in throwaway +profiles; both tests assert that no request left the test server's origin. The demo rose's file +carries no town (asserted). + +## Reachability + +`domi-rosea://` lets a local program or a web page (after the browser asks) open the garden. It +cannot pass anything in: the game reads no argument. No Canalis capability is served, so no other app +can reach into her (F6). Nobody becomes reachable. + +## Offline + +Unchanged: the game makes no request. The release pipeline runs `pnpm test:offline` before anything +is built for a player. + +## Test honesty + +The new tests fail with their bug put back (6 of 6, above). The `phone` target's spec has never run +(see *Not verified*), so it may be wrong in ways only a phone shows. + +## Scope + +In: the six onboarding items as they apply (F1–F11). Out: the release itself (finding 1), Canalis +Part B (F6), videos (F8, Pensum `kkpy69`), a `server` part (F2), iOS (G-T1). + +## Not verified + +- **No release and no signature**: no tag (finding 1). So no Custos card was answered, no + `SHA256SUMS` exists, the Aula page is not live, and `publish`, `sign`, `apk` and `minisign` have never + run. The hub run (`fabrica deploy rosea --part desktop`) has never run. +- **The Android release build** (`pnpm tauri:android-release`) was not run here: its Gradle home is on + C:, which this session may not use. Its only difference from the debug build that works is `--debug` + and the verified path; the first release run is its first build. +- **`domi-rosea://` on a real install**: the installer was built, not run (it writes the real registry). +- **The `phone` target**: never run. It must go through Fabrica's phone queue; the spec may need fixes + that only a phone shows (G-F5). +- **The `e2e` pipeline on the e2e runner**: not started (manual; it would compete with the release + sessions on this PC). +- **Fabrica's *Update all* over a Rosea install**: needs a signed release first. +- **WebView2's own traffic** (G-T6): still unmeasured for Rosea. diff --git a/HANDOVER.md b/HANDOVER.md index 849e1ff..6d7db01 100644 --- a/HANDOVER.md +++ b/HANDOVER.md @@ -2,7 +2,23 @@ Rewritten at the end of each session (CLAUDE.md §5.1). -## Last session — 2026-10-31 to 2026-11-17 +## Latest — 2026-11-19: released through Fabrica (built, not published) + +- **Rosea is a Fabrica app** (`feature/fabrica-release`, PR mnovak/Rosea#1): `.fabrica/` (app, the + `release` and `e2e` pipelines, `tests.yaml` with `web` and `phone`, `aula.yaml`), `AULA.md`, the brief + and the 0.1.0 notes, `scripts/check-version.mjs`, the APK signed in Custos (`sign:apk`, + `rosea-android`), `domi-rosea://` from the installer, the pictures on demo data (`pnpm aula:shots`). + Analysis: [`.agents/features/fabrica-release.md`](.agents/features/fabrica-release.md). Review: + [`.agents/reviews/feature-fabrica-release.md`](.agents/reviews/feature-fabrica-release.md). + Rosea is in Fabrica's workspace and `deploy.json` on this PC. +- **No release was made.** The Gitea repository is public, so a release is public, and G6.1 comes + first. The author's choice is open (G-F1): publish anyway, make the repository private first, or wait. +- **Before the first release, in Custos (Mark):** `domi-code-signing` and `domi-release` scoped to + `mnovak/Rosea`; `rosea-android` is made by Custos on the first APK signature; back the vault up. +- **Not run:** the `phone` target (only through Fabrica's phone queue); no installer was run, so + `domi-rosea://` is tested as text only (G-F4). + +## Earlier — 2026-10-31 to 2026-11-17 **Done.** diff --git a/e2e/aula.spec.ts b/e2e/aula.spec.ts index a15386e..f0ed881 100644 --- a/e2e/aula.spec.ts +++ b/e2e/aula.spec.ts @@ -110,7 +110,7 @@ test('two weeks in an invented garden, photographed on a desktop', async ({ brow await page.getByRole('button', { name: en.rose.numbers }).click(); await expect(page.locator('#rose-numbers')).toContainText(en.rose.daysOfCare); - await page.locator('#rose-numbers').scrollIntoViewIfNeeded(); + await page.locator('#rose-numbers').evaluate((el) => el.scrollIntoView({ block: 'center' })); await shot(page, 'numbers'); await page.getByRole('button', { name: en.rose.safe.title }).click();