calendar
All repositories: gitoria
3.7 KB
# Report 002 (w2): the gate fails in the early morning, "3 reminders" where 1 is expected**Verdict: the bug is in the TEST, not the app.** Users got the right reminders.**Where:** branch w2 in /media/STORAGE/projects/calendar-w2:- `54fb0ce`: the gate's clock override- `00f7278`: the fix- the docs commit with this reportNot pushed, not deployed. No `.env` read. bin/ was not changed (hybriel 21059cc7). Ports used: 8740–8759 only. All processes I started were stopped by their PID.## CauseThe reminder steps signed in as **alice**, the same user as the events steps before them. One event from those steps was never deleted: the all-day **"Vacation" on the 20th–22nd of the current month**.The check "N reminders set for the next 7 days" counts every event of the user. With the default reminders, Vacation adds two:- the day before at 20:00: the 19th at 20:00;- 1 hour before its 00:00 start: the 19th at 23:00.Both fall inside the next 7 days from about **the 12th at 20:00 until the 19th at 23:00, in every month**. On 2026-10-19 at 05:40 that gave 1 (Bus to the lake) + 2 = **3**. The Tokyo check uses the same `want`, so it failed too. The gates on 2026-10-03 passed because the 20th was then more than 7 days away.Nothing here comes from 05:40, UTC vs local, or the time zone. It is the date (and the hour only on the 19th itself). The app's plan (`components/month-view/reminders.hl plan`) counted correctly.## Evidence (.scratch/w2/gate-*.log; runner `.scratch/w2/run.sh <slot> <HH:MM|real> <label> [rev]`)| run | clock | result ||---|---|---|| old test, real time | 05:45 | 76/2: the two FAILs of /tmp/initdeploy-calendar.log, word for word || old test (54fb0ce) | GATE_CLOCK 05:40 | 76/2: same two FAILs || old test | GATE_CLOCK 23:30 | 78/0: Vacation's 20:00 and 23:00 are already past, which shows the clock dependence || **fixed (00f7278)** | 00:30 | **78/0** || **fixed** | 05:40 | **78/0** || **fixed** | 12:00 | **78/0** (the Tokyo check runs here now; before, it was skipped) || **fixed** | 19:59 | **78/0** || **fixed** | 20:01 | **78/0** || **fixed** | 23:30 | **NOT RUN**: stopped by the quota stop |One early run at GATE_CLOCK 05:40 failed in ident sign-in instead ("email and code must be strings", meaning the mail sink had no code yet). The re-run passed. I count it as a flake of tests/identkit.mjs and did not investigate it.## Fix (test only, no app change)- **`tests/browser.mjs`:** the reminder steps get an identity of their own (**carol**, `ident.signIn('[email protected]')`), so events left over from the events steps cannot count.- The Tokyo check's `tkHour < 19` skip is gone. The day-before reminder (20:00 the Tokyo day before) of an event 30 minutes ahead is always past, so the check now runs at every hour.- The gate now has 78 checks at any hour. Before, it had 77 while Tokyo was past 19:00.- **`GATE_CLOCK=HH:MM` (new):** runs the gate as if the local clock showed that time today.- The node process and every page get `Date` shifted by the same amount (a CDP init script).- The server keeps its real clock. It only uses the UTC day for `soon`, a −2…+9 day window.- Why not faketime: libfaketime (built in /tmp/w2-faketime) works for node, but headless Chrome hangs under it, and hybriel ignores it (`hl:time now()` stays real).## Not changed (for Atlas)An all-day event with the default "1 hour before" gets a notification at 23:00 the evening before, saying "Starts in 1 hour". That is what the code means to do (an all-day event starts at 00:00), but users may find it odd. If wanted, it needs a ticket.## Next stepRun `.scratch/w2/run.sh A 23:30 new-2330 00f7278` and expect 78/0. Optionally also `.scratch/w2/run.sh B 20:01 old-2001 54fb0ce` and expect FAIL "2 reminders". Then add both results to the table above.
Branches
Latest commits
- f9b8f918Merge branch 'calendar-vendor-day61' into mainAtlas
- 66341793|||PR Vendor Hybriel day61Atlas
- 36fc596bMerge branch 'vendor-day59' into mainAtlas
- b37cc1da|||PR Vendor Hybriel day59Atlas
- 05665102Merge branch 'vendor-day56' into mainAtlas
- 687296fb|||PR Vendor Hybriel day56Atlas
- a6166d4eMerge branch 'hl-standard-3' into mainAtlas
- 6d0eb3b0|||PR Calendar day add buttons only when signed in (Kunibert minor)Atlas
- add4b499|||PR Make calendar day actions keyboard accessibleAtlas
- 79e49b4dMerge branch 'hl-standard' into mainAtlas
- e9fec7bb|||PR HL-STANDARD clean-up: typed parameters, plain locals, by-reference cacheAtlas
- eff166a4Re-vendor complete Hybriel plugins and runtime to day44mre
- cef81394Wait for the DST fixture page instead of an unused socketmre
- 42434f47Check lazy-session cookies after login with a stored anonymous fixturemre
- 728e84e3Re-vendor complete Hybriel day41 plugin directoriesmre
- cbd7ff43Backup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
- 59d1da0acalendar: plain declarations instead of needless let in 9 files (calendar#17): 49 declarations that are never reassigned; reassigned ones and the timer closure's p stay letmre
- f5415cf9calendar: the Style blocks in the language's nested form (calendar#16): rules named after the View's own elements with their children nested, pseudo-classes and @media nested, merged duplicate select rule; same CSS, shots identical in Chrome at 4 sizesmre
- edb7c947calendar: the sign-in callback keeps the session it finds and signs it in (same cookie, nothing signed out; ident#28); security gate 56+4 failing → 60 passedmre
- bf8cc0fcStyles move into their components: the shell's styles into main.hl, the events and the editors into the month view's Style block; styles.hl keeps only the theme inherit, the accent and the message line; .gitignore ignores a bin symlink too; tests/styles-shots.mjs for the before/after pixel comparemre