Skip to content

Keep the fake Telegram's clock inside the Inbox window - #239

Merged
itz4blitz merged 1 commit into
mainfrom
fix/telegram-fixture-clock
Nov 11, 2026
Merged

itz4blitz merged 1 commit into
mainfrom
fix/telegram-fixture-clock

Conversation

@itz4blitz

Copy link
Copy Markdown
Collaborator

What changed and why

Every open pull request started failing the Telegram test the_chats_are_one_list_with_no_space_each_filed_in_every_folder_it_matches on macOS and Windows at 12:00 UTC on 2026-11-11, with no code change. The Inbox leaves out a chat nobody touched for thirty days (IN_INBOX, crates/chatd/src/store.rs), and the fake Telegram stamps its whole world at a fixed 2026-10-13 12:00 UTC (T0). Its older chats turned thirty days old at noon today.

The fake now reads its start time from TINYCLIENT_TELEGRAM_T0 and falls back to the old fixed date. The test harness sets it to yesterday's midnight UTC, and the two assertions that named absolute times (1_791_892_760, 1_791_891_800) are now relative to it.

Type

  • feature
  • fix
  • perf
  • refactor
  • chore
  • docs

Platforms

  • windows
  • macos
  • linux
  • android
  • ios

Proof

Test fixtures only; the app is unchanged. Reproduced the failure locally first (same assertion, telegram.rs:350), then cargo test -p chatd --no-default-features --test telegram: 54 passed, and --lib telegram: 19 passed.

Scenario: none (chore)

Compatibility

None. fake.rs is only compiled behind TINYCLIENT_TELEGRAM_FAKE; with the new variable unset it behaves as before.

Risk and rollback

Test-only. Revert the commit.

Not fixed here, and will break next: the Signal fake (crates/chatd/tests/signal.rs, T0 2026-10-13 12:00 UTC) and the Discord and Teams test timestamps (2026-10-13 08:15 and 2026-10-09) are pinned the same way. Tests that go through the Inbox window will fail the same way about 21 hours from now. They need the same treatment.

Release note

None.

🤖 Generated with Claude Code

The Inbox leaves out a chat nobody touched for thirty days. The fake Telegram
stamped its whole world at a fixed 2026-10-13 12:00 UTC, so at 12:00 UTC on
2026-11-11 its older chats aged out and
the_chats_are_one_list_with_no_space_each_filed_in_every_folder_it_matches
failed on every platform, on every open pull request, with no code change.

The fake now starts its clock at TINYCLIENT_TELEGRAM_T0 (unix seconds) and falls
back to the old fixed date. The test harness sets it to yesterday's midnight
UTC, and the two assertions that named absolute times are relative to it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@itz4blitz
itz4blitz merged commit e27745c into main Nov 11, 2026
7 of 9 checks passed
@itz4blitz
itz4blitz deleted the fix/telegram-fixture-clock branch November 11, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant