3.6 KiB
3.6 KiB
Review — feature/keep-her-safe
Adversarial self-review (CLAUDE.md §5.3). Analysis: features/keep-her-safe.md.
Reviewed 2026-11-02 on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea.
Gates
Counts are on the merge; HANDOVER repeats them. New here: engine +4, storage +6, ui +5, e2e +1 (save on one browser profile, bring her back on a fresh one, reload).
The app changed (CLAUDE.md §5.4): Keep her safe beside Her numbers. Rebuilt by the e2e run; not deployed (no host, G0.13).
Bug drills — each put back once
| Put back | Result |
|---|---|
| Only the current key counts | CAUGHT: 3 |
| One replay for all keys (the lossy merge K3 avoids) | CAUGHT: 2, the merge property among them |
| Import appends acts already there | CAUGHT: 2 |
| Export leaks a field from the identity | MISSED at first (finding 1), then CAUGHT |
| A file with one bad act half-imports the rest | CAUGHT |
Findings
| # | Area | Finding | Resolution |
|---|---|---|---|
| 1 | Test honesty | The "nothing else in the file" test kept no identity, so a leaked field was undefined; toEqual treats a missing and an undefined property as equal, and JSON.stringify drops it. The leak drill passed. |
Fixed: the test keeps a real identity and uses toStrictEqual. Lesson: testing.md. |
| 2 | Correctness | The private key cannot be exported, so a rose brought back lives under a new key. | K2: a rose is named by her current key and her past keys; the log is never rewritten. |
| 3 | Correctness | Replaying two devices' care as one log can take a day away (one watering makes the other "too much"). | K3: one replay per key, days unioned; property-tested. |
| 4 | Correctness | Weeds, petals and wind are seeded by key, so a moved rose's pattern of needs changes. | Accepted: the pattern is arbitrary, and her days, stage and drift come with her. A moved rose that is opening still drops petals (tested). |
| 5 | Privacy | The file is a diary of when someone was in the app. | Made only on request; the screen says what it holds; no town and no private key (tested in unit and e2e). It goes wherever the player puts it, which Rosea cannot see. |
| 6 | Privacy | A file brought back could have been edited by hand to give her days she was never given. | It only changes the player's own garden; nothing is counted against anyone (CLAUDE.md §1). Phase 3 must not treat imported care as proof towards friends: noted in the analysis. |
| 7 | Soul | "This browser may clear her" can frighten. | Shown only behind Keep her safe, with the remedy in the same sentence; a refusal is said calmly. Nothing reminds or nags. |
| 8 | Process | The first e2e run and the full gate run both started with the CPU at 100 %, above the 80 % rule (CLAUDE.md §5.7). The load was another project's test run on this machine. The second time the reading was taken, but the run was chained after it without depending on it. Both passed. | Not fixed by intention alone: a gate script that refuses to start above 80 % would make the rule real. Lesson: process.md. |
| 9 | Accessibility | A file input styled as a button. | The real input stays in place, labelled by its text, keyboard-operable; axe passes on the restored garden. Not tested with a screen reader. |
What was not verified
persist()in real browsers: Chromium under Playwright only answers for itself. Firefox's prompt, Safari's behaviour, and an installed app's automatic call (K5) were not seen.- The iOS hint on a real iPhone.
- A file saved by a later version of Rosea (
version2): refused today, by design.