gitoria

calendar

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitdf2e4fa0df2e4fa0calendar#12: test push rate limit (1 per 30 s per device), owner-only gate checksmredf2e4fa0/reports/009-hltime.md

6.0 KB

  1. # Report 009 (A9): re-vendor Hybriel master, drop the calendar's own hl:time copies
  2. Branch w9-hltime (worktree A9/wt), from main ce16a4e. Not pushed, not deployed, no .env read. Evidence /media/STORAGE/claude-scratch/atlas-evidence/A9/ (logs + shots).
  3. ## Step 1 — re-vendor (commit 875353c)
  4. Hybriel master **022a3ac1** (contains 6b396322 = int 6 + hl:web batches 5+6, and 65e8ec21 = int 7; checked with `git merge-base --is-ancestor`). bin/hybriel = native/zig-out/bin/hybriel (sha256 6e0f77d77cc10b72f7620c16817bbf24e2380812f2157daf95dd600a069b9e80, static), bin/libhlrt.a + hlc.o + hlrt/ from native/zig-out/lib; plugins core crypto data fetch fs http http1 mpackdb proc time web copied whole (rsync --delete). Changed: mpackdb (MPackDB.hl, engine, mpackdb.zig, libmpackdb.so), web (WebFramework, client, compile, README); new in time/: client.js, tests/parity.*.
  5. ## Step 2 — what was removed
  6. - `lib/push-plan.hl` deleted (63 lines). The server clock (`lib/push.hl`) now calls `missed` of `components/month-view/reminders.hl` — the same code as the page.
  7. - reminders.hl: `offsetOf` (Intl.DateTimeFormat by hand) and the `new Date(...)` device-zone branch gone; `instantOf` is now `fromLocal` of hl:time (`import { fromLocal } from 'hl:time'`). `planBetween` / `plan` / `missed` take a `deviceZone` (an all-day event's day is read in it). Net over lib/ + components/: 22 insertions, 100 deletions.
  8. - month-view.hl: new `deviceZone()` (Intl zone name of the browser, read at each arm; not fZone, which is only set at the first pointer) passed to `missed` / `plan`.
  9. - No JavaScript written. No new Hybriel gap: the A7 repro (static calling fromLocal in a component) works.
  10. ## DST check (tests/dst.mjs, `tests/dst/`, in deploy.sh GATES)
  11. Real headless Chrome, device zones Europe/Vienna, America/New_York, Australia/Lord_Howe (Emulation time zone); a test page runs the OLD code (tests/dst/old-reminders.hl = main's reminders.hl) and the NEW next to each other on 3500 cases per device zone: events in Vienna/New York/Lord Howe/UTC/Kolkata on 2026-03-08, 03-29 (Vienna spring change), 03-30, 04-05, 10-25 (Vienna autumn change), 10-26, 11-01 (NY), 11-02, 2027-03-28, 2027-10-31, start times 00:30 02:30 03:00 09:00 23:30, timed and all-day, rows minutes/hours/days. Third source: python zoneinfo. **13/0.**
  12. - NEW = python zoneinfo in all 3 × 3500 cases.
  13. - NEW = OLD in 3473 of 3500; **27 differ by exactly one hour** (18 fold cases: the old Intl code took the LATER instant of the repeated hour, now the earlier; 9 gap cases: now moved forward), all with a wall clock inside the Vienna/New York change hour (fold/gap), and they equal what the server's push copy already did. Everything else, DST days included, identical. So not 100% identical: the old browser code was wrong by one hour in the fold/gap hour; page and push are now the same. (Old code vs python: the same 27 differ → the check "new = python" fails on old code.)
  14. ## Step 3 — gates (ports: notify 8732–8739 (app 8732, ident 8733, Chrome 8734–8739; its range is PORT+2…+7 for the 6 scenarios), push base 8788 (app 8788, ident 8789, fake push 8790, Chrome 8792), browser gate old 8788/8789/8790–8794 and new 8732/8733/8734–8739 (not at the same time as the others on one port set), dst 8793/8794, E2E app 8793 (ident 8794))
  15. | gate | old (main ce16a4e + its bin) | new (w9-hltime) |
  16. |---|---|---|
  17. | tests/browser.mjs | 81/0 | 81/0 |
  18. | theme/check-theme.mjs | – | 31 files, 0 problems |
  19. | tests/notify-paths.mjs | 7/0 + 3 gaps | 7/0 + 3 gaps |
  20. | tests/push.mjs | 16/16 | 16/16 |
  21. | tests/dst.mjs | n/a | 13/0 |
  22. Notes: the browser gate FAILS (79/1: "first pointer event runs no calLoad of its own — 2 frames") on old AND new whenever the local date differs from the UTC date, i.e. between 00:00 and 02:00 CEST (server's `today` is the UTC day; GATE_CLOCK shifts only the page). Rerun after 02:00 CEST: 81/0 both. Not caused by this mission; worth a note for the gate. Known gaps unchanged, none closed: permission button before first touch (no show hook), open-not-touched reminder, closed app (the gate text still says "needs Web Push" but Web Push exists since 008; its scenario is not changed).
  23. ## Step 4 — lisbeth E2E (tests/reminders-e2e.mjs, real Chrome 155, one tab, under the lock, fresh ident login each run, host localhost:8793 via ssh -R, real FCM)
  24. Same script on the old tree (PREFIX old) and the new (PREFIX new); each: subscribe (fcm.googleapis.com), event "Real push" 2.5 min ahead with 1 min + 1 day before 20:00, all-day event tomorrow (12 h), card/settings shots at 390 and 1280, the reminder fires with the page open (tag = `<id>:<start − 60 s>`), then real clicks on "Turn off on this device" (browser unsubscribed, "Turn on notifications" offered, text "Reminders show while the calendar is open on this device.") and back on (subscribed again), off control 44 px high at 390.
  25. - old: all RESULT lines yes (tag exact instant yes, off ok, on ok), push sent (201). new: identical results, tag `0mvirgmgn7ga:1792626480000` = reminder instant exactly, push sent (201). Checks: 2 × (exact tag, off, on) = 6 yes, 0 no. The planned text is "2 reminders set for the next 7 days" in both.
  26. - Shots (looked at): old-390-card / new-390-card, old-1280-card / new-1280-card — pixel layout the same: planned text, "Reminders also reach this device when the calendar is closed.", "Turn off on this device", "Reminder settings", the month with the 01:4x event on the 22nd and "All day tomorrow" on the 23rd; at 1280 one row. Also *-390-on, *-390-settings, *-1280-notified, *-1280-off, *-1280-on-again, *-390-on-again.
  27. - **Seen, not caused by this mission (old = new):** the "Reminder Settings" dialog at 390 px (old-390-settings.png / new-390-settings.png) shows its two reminder rows jumbled: inputs and selects of both rows stacked in two narrow columns, selects without readable text, × marks far below. The gate says "the editor fits a phone" (no horizontal overflow), so it does not see it. Worth a ticket.
  28. ## Gaps
  29. Closed: A7's gap "hl:time fromLocal in a browser static". Open: the three notify gaps above; the very first load hook; the settings-dialog layout at 390 px; the one-hour fold/gap change (intended).

Branches

Latest commits

  • df2e4fa0calendar#12: test push rate limit (1 per 30 s per device), owner-only gate checksmre
  • acb957cfcalendar#12: Send a test notification on a subscribed device (one push in ~10 s, owner's own device), push gate part 4mre
  • 0b222eb8tests: e2e-theme CDP port default from E2E_THEME_CDP_PORT (8756 unchanged)mre
  • 8b8a5abare-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
  • a69b27f9docker-compose: nofile 65536 (Hybriel int 6+ boot opened >1024 files in the tracker)mre
  • 1a97edfdcalendar mission 010: reminder rows at 390 px (the 7-column month grid no longer catches the reminder lists), gate checks, settings-shots, reportmre
  • 61b21404calendar mission 009: reminder times on hl:time in the browser (lib/push-plan.hl and the Intl code removed), DST gate tests/dst.mjs, E2E script, reportmre
  • 875353c1calendar mission 009: re-vendor Hybriel master 022a3ac1 (int 6 6b396322 hl:time browser side, int 7 65e8ec21; bin sha256 6e0f77d7, plugins whole)mre
  • ce16a4efdeploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
  • f490bc8cdeploy: Web Push gate tests/push.mjs (PUSH_GATE_PORT)mre
  • 3af29fc8calendar mission 008 (A8): report, README, LOG, push-shots.mjsmre
  • f91f3663calendar mission 008 (A8): push only asked of the browser when the app has the VAPID settings (pushAvailable); real-FCM E2E scripts (push-real-app.mjs, push-real.mjs)mre
  • bf571badcalendar mission 008 (A8): Turn off on this device (unsubscribes the browser, server drops the device, choice kept), subscribe/refresh when the app is shown again; push gate part 3mre
  • 50985708calendar mission 008 (A7): Web Push report, README, mission, LOGmre
  • ee318774calendar mission 008 (A7): push-real.mjs, push sent log linemre
  • ebda0fd1calendar mission 008 (A7): server-side reminder plan on hl:time (push-plan.hl; hl:time fromLocal in a browser static is refused: repro .scratch/hltime-client), push gate 9/9mre
  • d063dad3calendar mission 008 (A7): Web Push (WIP): lib/push.hl subscriptions + sender clock, faces calPushSave/calPushOff, button subscribes, VAPID tool, tests/push.mjs; instantOf on hl:timemre
  • cf175c80calendar mission 008 (A7): re-vendor Hybriel master 0e3c9830 (bin 9d957fed, plugins whole: hl:crypto Web Push primitives, hl:web sendPush)mre
  • 9bf3c38bcalendar mission 008: re-vendor Hybriel f9833544 (gates old = new); Web Push stopped: hl:crypto half missing on mastermre
  • 186f969bcalendar mission 007: signed-in gate for the first-pointer race (fails on 3c5604f), README theme section, reportmre