Screen captures print the pinned times in the time zone the console process runs in, so a capture from another zone differs from the baseline #274

Open
opened 2026-10-26 20:58:24 +00:00 by cgalo5758 · 0 comments
Owner

What happens

make screens restores the application database from a demo snapshot whose row clocks are pinned to 2026-01-01 09:00 UTC plus one second per distinct original instant (test/pin-timestamps.sql:4-7), so that two captures of one state show the same data. The console then prints those instants in its own process's local time zone, as it prints every date and time (#151). The test stack runs the console on the contributor's host (go run .. start --config mc-config.yaml, test/AGENTS.md:106), and nothing sets its zone, so the zone is the host's. A baseline accepted on a host in one zone and a capture taken on a host in a zone an hour away differ in every place that prints a time of day, such as the time under each grant's Activated date on an organization's page, and changes.txt lists each of those pages as changed. A zone far enough from UTC moves the printed date as well. The browser's zone plays no part: the times are formatted on the server.

docs/testing.md:600-601 says a page nobody touched never reads as changed, except for relative ages once a day.

#120 (cells that count from today) and #263 (the Stripe integration page's reads and their time) are the same symptom from other causes.

What should happen

Two captures of an unchanged page are identical whatever zone the host is in, for example because the console that serves the captures runs in UTC, set by the test stack's documented start command, and make screens checks that before it captures.

Where

test/pin-timestamps.sql:4-7; test/AGENTS.md:106; test/e2e/screens/screens_test.go; docs/testing.md:588-614.

Steps

  1. With the console running on a host in one time zone, run make screens and then make screens-accept.
  2. Restart the console with TZ set to a zone an hour away and run make screens again.
  3. test/screens/out/changes.txt lists every page that prints a time of day.

Why it matters

Each false difference costs a reviewer a page diff to tell it from a real change, and a contributor in another zone can never reproduce the accepted baseline.

### What happens `make screens` restores the application database from a demo snapshot whose row clocks are pinned to 2026-01-01 09:00 UTC plus one second per distinct original instant (`test/pin-timestamps.sql:4-7`), so that two captures of one state show the same data. The console then prints those instants in its own process's local time zone, as it prints every date and time (#151). The test stack runs the console on the contributor's host (`go run .. start --config mc-config.yaml`, `test/AGENTS.md:106`), and nothing sets its zone, so the zone is the host's. A baseline accepted on a host in one zone and a capture taken on a host in a zone an hour away differ in every place that prints a time of day, such as the time under each grant's Activated date on an organization's page, and `changes.txt` lists each of those pages as changed. A zone far enough from UTC moves the printed date as well. The browser's zone plays no part: the times are formatted on the server. `docs/testing.md:600-601` says a page nobody touched never reads as changed, except for relative ages once a day. #120 (cells that count from today) and #263 (the Stripe integration page's reads and their time) are the same symptom from other causes. ### What should happen Two captures of an unchanged page are identical whatever zone the host is in, for example because the console that serves the captures runs in UTC, set by the test stack's documented start command, and `make screens` checks that before it captures. ### Where `test/pin-timestamps.sql:4-7`; `test/AGENTS.md:106`; `test/e2e/screens/screens_test.go`; `docs/testing.md:588-614`. ### Steps 1. With the console running on a host in one time zone, run `make screens` and then `make screens-accept`. 2. Restart the console with `TZ` set to a zone an hour away and run `make screens` again. 3. `test/screens/out/changes.txt` lists every page that prints a time of day. ### Why it matters Each false difference costs a reviewer a page diff to tell it from a real change, and a contributor in another zone can never reproduce the accepted baseline.
cgalo5758 added the
kind
bug
area/testing
labels 2026-10-26 20:58:24 +00:00
Sign in to join this conversation.
No labels area/testing
kind
bug
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#274