[docs] Sunrise: Analysis, review, and G1.10 closed
This commit is contained in:
@@ -8,6 +8,7 @@ One row per feature, with its analysis document (CLAUDE.md §5.1). Gaps live in
|
||||
| Workspace, contracts, gates, PWA shell | 0 | Merged to `main` 2026-11-01 (`d11d242`); built, not deployed. Phase 0 gate still open | [phase0-workspace.md](features/phase0-workspace.md) | [feature-phase0-workspace.md](reviews/feature-phase0-workspace.md) |
|
||||
| Roadmap and gameplay docs, read against the code | 0 | Merged 2026-11-01; Q1–Q7 answered by the author | — | [docs-roadmap-gameplay.md](reviews/docs-roadmap-gameplay.md) |
|
||||
| The Letter slot: page at `#letter`, empty `docs/LETTER.md` | 0 | Merged to `main`; built, not deployed. Invisible until the author writes | [letter-slot.md](features/letter-slot.md) | [feature-letter-slot.md](reviews/feature-letter-slot.md) |
|
||||
| The sunrise: the line names the real sunrise from sunset until it comes | 1 | Merged to `main`; built, not deployed | [sunrise.md](features/sunrise.md) | [feature-sunrise.md](reviews/feature-sunrise.md) |
|
||||
| Two tabs, one garden: what one tab writes, the others see | 1 | Merged to `main`; built, not deployed | [two-tabs.md](features/two-tabs.md) | [fix-two-tabs.md](reviews/fix-two-tabs.md) |
|
||||
| Thorns: touch her; a rush of taps, and she says she has thorns | 1 | Merged to `main`; built, not deployed | [thorns.md](features/thorns.md) | [feature-thorns.md](reviews/feature-thorns.md) |
|
||||
| The day's sentence: her folded petal, one a day, never lost, best at sunset; candidates and `library:verify` | 1 | Merged to `main`; built, not deployed. Invisible until the author verifies sentences | [day-sentence.md](features/day-sentence.md) | [feature-day-sentence.md](reviews/feature-day-sentence.md) |
|
||||
|
||||
@@ -60,6 +60,7 @@ sentences). Nothing in Phase 1 is visible to the player yet.
|
||||
| ~~G1.6~~ | ~~The in-game sunset: move the chair, watch it again~~ | Closed 2026-11-02 on `feature/chair-sunset`: half a minute with nothing to press, then the real sunset's time; Escape and a tap leave; the offline suite watches one with the server gone. 4 of 4 put-back bugs caught. |
|
||||
| ~~G1.7~~ | ~~Thorns were on the roadmap but undesigned~~ | Closed 2026-11-02 on `feature/thorns`, as the author chose: thorns teach gentleness. `engine/touch` (2 properties: spaced taps are never a rush; one blush a visit); a tremor is one touch; nothing recorded. 6 of 6 put-back bugs caught. |
|
||||
| ~~G1.8~~ | ~~Two tabs (CLAUDE.md §8, predicted)~~ | Closed 2026-11-07 on `fix/two-tabs`. Measured first: two e2e tests failed (an open tab saw neither care nor a town from the other). Storage announces committed writes on a `BroadcastChannel`; the rose and the garden read again, adding to what they show. No lock needed: nothing stored drifts. 7 of 7 put-back bugs caught. |
|
||||
| ~~G1.10~~ | ~~The garden named only the sunset, never the sunrise (ROADMAP Phase 1: *sunset and sunrise*)~~ | Closed 2026-11-17 on `feature/sunrise`: from sunset until it comes, the line names the real sunrise; the in-game sunset still names the sunset. engine `nextSunEvent` with a 300-run property; e2e at 05:00 in Brno; seen on a real Android tablet. 5 of 5 put-back bugs caught. |
|
||||
| G1.3 | Towns have no Czech names (*Vídeň*) | Open. Natural Earth has none; arrives with Czech copy. |
|
||||
|
||||
## Design questions — answered
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
# The sunrise in the garden
|
||||
|
||||
Status: built on `feature/sunrise`. ROADMAP Phase 1: *the sun: real local sunset **and sunrise**, on
|
||||
device; polar day/night handled.* CLAUDE.md §1, *points beyond the screen: the real sunset, the real
|
||||
sunrise*. The sun module (`sun.md`) has computed sunrise since Phase 1 began; the garden never showed
|
||||
it. Review: [`feature-sunrise.md`](../reviews/feature-sunrise.md).
|
||||
|
||||
## 1. Why and what, in the player's terms
|
||||
|
||||
The line under the garden names the next real thing to look up for:
|
||||
|
||||
| When | The line |
|
||||
|:--|:--|
|
||||
| From midnight until sunrise | *The sun rises at 06:41 in Brno.* |
|
||||
| From sunrise until tonight's sunset | *Tonight the sun sets at 16:12 in Brno.* (as before) |
|
||||
| From sunset until midnight | *Tomorrow the sun rises at 06:43 in Brno.* |
|
||||
| Polar day, polar night | As before: the lowest light; the brightest twilight. |
|
||||
|
||||
Someone awake at three in the morning is told, quietly, when the light comes back; nothing invites
|
||||
them anywhere. The sunset stays the game's invitation (the petal's good moment, the in-game sunset):
|
||||
**the in-game sunset's closing words keep naming the real sunset**, because that is what they are for.
|
||||
|
||||
## 2. Technical architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
shell["packages/ui<br/>Shell: SunsetLine (next)"] --> engine["packages/engine<br/>sun.ts: nextSunEvent"]
|
||||
chair["packages/ui<br/>ChairSunset: SunsetLine (sunset)"] --> engine2["packages/engine<br/>sun.ts: nextInvitation"]
|
||||
```
|
||||
|
||||
| # | Decision | Why |
|
||||
|:--|:--|:--|
|
||||
| R1 | **`nextSunEvent(now, place)`** in `engine/sun`: the next invitation's day; if that day's sunrise is still ahead, the sunrise; else the invitation. Pure, instants only (sun.md D3). | One module computes the sun (CLAUDE.md §7); the UI reads, never decides. |
|
||||
| R2 | Built on `nextInvitation`, so Reykjavík's after-midnight midsummer sunset (sun.md D2) still shows as tonight's sunset, not as a sunrise. | The only subtle case; tested. |
|
||||
| R3 | *Tomorrow* only when the sunrise belongs to a later local day than now, as the sunset line already does. | Same reading of the clock in both. |
|
||||
| R4 | `SunsetLine` gains `of: 'next' \| 'sunset'`; the garden asks for the next event, the in-game sunset for the sunset. | The chair scene tells the player when the real sunset is (chair-sunset.md). |
|
||||
| R5 | Polar day and night are unchanged: no sunrise exists to name. | sun.md D4. |
|
||||
|
||||
## 3. Risk analysis
|
||||
|
||||
| Risk | Answer |
|
||||
|:--|:--|
|
||||
| **Dependence / a nudge at night**: a line that pulls an awake player to the screen. | It is the same quiet line, changed only in what it names; no new notice, no invitation, nothing counted. |
|
||||
| **Guilt**: *you missed the sunrise*. | Nothing ever refers to a missed sunrise; after sunrise the line simply names the sunset. |
|
||||
| Privacy, reachability, offline | Unchanged: computed on the device from the chosen town. |
|
||||
|
||||
## 4. Gap analysis
|
||||
|
||||
Closes the last Phase 1 roadmap item that the screen did not show. Sunrise *mechanics* (sunrise-only
|
||||
visitors, Phase 2; ROADMAP §6 open question) are not designed here.
|
||||
|
||||
## 5. Verification matrix
|
||||
|
||||
| Case | Kind | Where |
|
||||
|:--|:--|:--|
|
||||
| Before sunrise: today's sunrise; after sunrise: tonight's sunset; after sunset: tomorrow's sunrise | unit | `engine/test/sun.test.ts` |
|
||||
| Reykjavík midsummer after midnight, before the late sunset: the sunset, not a sunrise | unit | same |
|
||||
| Polar day and night: unchanged | unit | same |
|
||||
| **Property:** the event is never in the past, and nothing (sunrise or sunset) comes between now and it | property | same |
|
||||
| The garden's line at 05:00, 12:00, 22:00; the in-game sunset's words still name the sunset at 22:00 | unit | `ui/test/sunset.test.ts`, `ui/test/chair-sunset.test.ts` |
|
||||
| Built app at 05:00 in Brno: the sunrise line | e2e | `e2e/shell.spec.ts` |
|
||||
@@ -0,0 +1,38 @@
|
||||
# Review — `feature/sunrise`
|
||||
|
||||
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/sunrise.md`](../features/sunrise.md).
|
||||
Reviewed 2026-11-17 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: engine +6 (one property, 300 runs), ui +2
|
||||
(plus one rewritten), e2e +1 (05:00 in Brno).
|
||||
|
||||
**The app changed** (CLAUDE.md §5.4): the line under the garden names the sunrise from sunset until
|
||||
it comes. Rebuilt by the e2e and offline runs; **not deployed** (G0.13).
|
||||
|
||||
## Bug drills
|
||||
|
||||
| Put back | Result |
|
||||
|:--|:--|
|
||||
| The sunrise is never named | CAUGHT |
|
||||
| A sunrise already past is named | CAUGHT: 3 |
|
||||
| The sunrise is looked up on today instead of the next invitation's day | CAUGHT: 3 |
|
||||
| Tomorrow's sunrise is called this morning's | CAUGHT |
|
||||
| The in-game sunset names the sunrise | CAUGHT |
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Area | Finding | Resolution |
|
||||
|:--|:--|:--|:--|
|
||||
| 1 | Correctness | Reykjavík at midsummer: just after midnight the evening's sunset is still ahead; a naive "before sunrise, name the sunrise" rule would name a sunrise there. | The sunrise is taken from the next invitation's own day (R2); tested, and drilled. |
|
||||
| 2 | Correctness | *Tomorrow* for a sunrise. | Compares the sunrise's local day with today's, the one module computing days; drilled. |
|
||||
| 3 | Design | The in-game sunset reused the line; late in the evening it would have named the sunrise. | `of="sunset"` keeps its words on the sunset (R4); tested at 22:00, drilled. |
|
||||
| 4 | Soul | Someone awake at night sees a sunrise time. Could that pull them to the screen? | It is the same line, only naming the next light; no invitation, notice or count. Looked for guilt: nothing ever says a sunrise was missed. |
|
||||
| 5 | Polar | Polar day and night have no sunrise. | Unchanged lines (R5); tested. Near the polar edges the sun module's clamping (sun.md D5) applies to the sunrise too: accuracy there is worse, as before. |
|
||||
| 6 | Process | On 2026-11-17 `node_modules` was missing again (the second time in ten days, cause unknown) and the machine sat at 100 % CPU (other sessions and a virtual machine), so the guard refused the full runs for a while. | Reinstalled from the lockfile; the full runs waited for the guard rather than overriding it (§5.7). |
|
||||
| — | Privacy, reachability, offline | Computed on the device from the chosen town; nothing new is stored or sent. | — |
|
||||
|
||||
## What was not verified
|
||||
|
||||
- A real phone at dawn; Safari's time formatting.
|
||||
Reference in New Issue
Block a user