[repo] AtriumAdoption: Merge Rosea's answers to Atrium contract v0.3 §9, prepared, nothing built (PR #7)

This commit is contained in:
2026-11-23 00:25:42 +01:00
+28
View File
@@ -226,3 +226,31 @@ So B is a decision for the author, made in this repository's own session, as wit
module in the shell (`src-tauri/src/atrium.rs`): the hello off the UI thread, and the `NotInstalled` and module in the shell (`src-tauri/src/atrium.rs`): the hello off the UI thread, and the `NotInstalled` and
`NoCustos` paths saying nothing. The fallback would be a quiet line, never a wait before the garden. `NoCustos` paths saying nothing. The fallback would be a quiet line, never a wait before the garden.
## 9. What each later Day will ask (APP_CONTRACT v0.3 §9, Atrium main c778678)
The prepared answers, from the inventory in §2. Nothing here is built: **Rosea stays manifest-only** (Mark), so any
step that needs the door is answered "not while she has no door", and each Day asks again when it lands. Rosea is
`free = true`, named *Rosea Domi*, label *Rose*, accent `#e8899b`, as in contract §2.4.
| Day | What it asks | Rosea's answer |
|:--|:--|:--|
| 2 Audit | every network destination: host, reason, how often, session or requests, bytes | **None.** Rosea's code makes no request (§2.3). The CSP is `connect-src 'self'`, and the Android app has no `INTERNET` permission. The WebView2 runtime's own calls are switched off by `additionalBrowserArgs` and **not yet measured on Windows**; measuring them is the test plan (below). With no request, there is nothing to record. The audit test would be the reverse: any request outside the origin fails, as the e2e suite already does for the PWA |
| 2 Updates | where the updater lives, how it stands down | **There is none in the apps.** A new desktop version comes only as a new installer from Fabrica, so there is nothing to stand down. The PWA's service worker and *Refresh* belong to the web build only; the shell has no worker (CLAUDE.md §8) |
| 2 Close | where it can save and close on request | **At any moment.** Every act of care is appended to IndexedDB when it is given, and nothing is kept unsaved. The only thing in flight is a pour still being held, and closing drops just that pour: nothing is written until the finger lifts, and nothing written is lost. Serving `rosea.ui.close` needs the door |
| 3 Data map | data, cache, sync state, sizes, keys | **Data:** the IndexedDB database `rosea` (§2.2): `events`, the append-only care log (a few hundred bytes per act); `profile` (her name, the gardener, the chosen town or none, past keys); `keys`. **Cache:** none of Rosea's own; WebView2's caches in the same profile folder are the webview's. **Sync state:** none (friends arrive in Phase 3). **Keys:** the identity keypair. Its private half is a **non-extractable** WebCrypto key, bound to this webview by design. It protects no data; it names who gave the care. So there is nothing to move into `app_secret`, and a player has no Custos. A restore on a new PC is *Keep her safe*'s: her care comes back under a new key, additively (keep-her-safe.md K2, K3) |
| 3 Snapshot | `rosea.backup.snapshot { folder }`, consistent, without caches or sync state | Plan R2: the snapshot is the `rosea-rose` file (`exportRose`): public keys and the whole care log, never the private key, never the town. It is taken by the game, because LevelDB under a running webview cannot be copied consistently. **Needs the door and a page↔shell channel (R4), both outside Mark's ruling for now** |
| 4 Commands | every `invoke`/`listen`, payloads, native dialogs; where the UI keeps state | **No `invoke`, no `listen`, no Tauri JavaScript API** (§2.1). Two native dialogs, both the webview's own: the file picker of *Bring her back* (`<input type=file>`, one JSON file, about 1 KB per day of care) and the save of *Save her to a file*. On Windows that save is a WebView2 download; on Android it is `roseaFile.save` and the system's save screen. **State:** IndexedDB under WebView2's profile, `%LOCALAPPDATA%\cz.mareknovak.domi.rosea\EBWebView\`, origin `https://tauri.localhost`; no `localStorage`. Contract row 3 (a hosted room uses the app's own profile) answers R1: **no migration** |
| 5 Household | react when a device is removed | Nothing: no Tabellarius, no sync |
| 6 Today, search, badge | ≤ 5 cards, search results, a badge | **Today: at most one card,** and only if Mark wants it: tonight's real sunset time in the chosen town (*points beyond the screen*). Never her water or her needs: a card about her waiting is guilt (R5). **Search:** nothing to find. **Badge:** never: a count about her waiting is exactly what Rosea refuses (CLAUDE.md §8). **Notifications:** Phase 6's sunset invitation, which never mentions neglect |
| 8 Export | an open format per kind of record | `rose.json`, the `rosea-rose` file (JSON: format, version, public keys, care events). `profile.json` (JSON: her name, the gardener's look, the chosen town if any: the player's own data, so the town *is* in their own export, unlike the shareable rose file). A README line for each. The day's sentences are references into the public-domain library, not the player's data |
| 8 Android | the package, `domi-rosea://open` | Package `cz.mareknovak.domi.rosea`. Android has **no** `domi-rosea://` intent filter yet; only the Windows installer registers the scheme (fabrica-release.md). Adding one is a change to `MainActivity`'s manifest patch, for Day 8 |
**Test plans, for when a Day lands:**
- **Day 2:** run the built `.exe` under a request capture and expect nothing outside `tauri.localhost`. This also
closes CLAUDE.md §8's "Windows unmeasured" line.
- **Day 3:** a snapshot taken mid-watering restores with no act lost or doubled. K3's additive property test is
reused.
- **Day 4:** the hosted room shows the same days of care as the standalone app.
- **Day 8:** the export's `rose.json` passes `asRoseFile`, and `profile.json` round-trips.