Cause confirmed by reproduction, not inference. Stamping the issue 5 seconds into the future (emulating a Postgres clock ahead of the Go clock) reproduces the reported failure exactly:
default-clock last point = {PeriodStart:2026-09-14 ... Total:0 Completed:0 Rate:0} <- the reported failure
pinned last point = {PeriodStart:2026-04-20 ... Total:1 Completed:1 Rate:100}
Fix (#148):
- Pinned
created_at, the close event, andNowin the failing test — same shapeTestGetProjectCompletionHistoryReplaysLifecycleEventsalready uses. Nothing reads a wall clock, so no skew reaches it. - While checking siblings:
TestUIProjectCompletionHistoryVisibleToReadonlyAndPublicReaders(internal/server/ui_project_integration_test.go) has the same defect — it asserts100% (1 of 1 tickets completed)against handler-dated output, and a skewed clock would either drop the issue or replay its completion away. The handler takes noNow, so its rows are backdated an hour out of the contested window instead. Outside the file this ticket named, but the same bug, so it is fixed here. TestGetProjectCompletionHistoryEmptyDefaultAndMissingProjectkeeps the default-clock path for coverage. It holds no issues, which is what makes it immune — now stated in a comment so an issue is not added there later.
No production change; the time.Now() default and its coverage are untouched. Both packages pass in full; the two touched tests ran at -count=5.