Repository navigation
Keep the fake Telegram's clock inside the Inbox window - #239
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_matcheson 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_T0and 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
Platforms
Proof
Test fixtures only; the app is unchanged. Reproduced the failure locally first (same assertion,
telegram.rs:350), thencargo test -p chatd --no-default-features --test telegram: 54 passed, and--lib telegram: 19 passed.Scenario: none (chore)
Compatibility
None.
fake.rsis only compiled behindTINYCLIENT_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,T02026-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