Repository navigation
Stop the flaky date-column test failing on the hour it runs at - #722
Merged
Merged
Conversation
The sizing date the history column is measured against renders as an evening time, and "AM" is set wider than "PM", so a two digit morning hour renders wider than the date the estimate was made from. The test compared the two against the clock, so it failed on a run that happened to start at 10:56 in the morning and passed an hour later. - Compare the sizing date against dates written down in the test rather than against `[NSDate date]`, so the result does not move with the hour - Move the column's slack and inset next to the sizing date they apply to, so the test and the history controller read one definition
goneng
force-pushed
the
widen-the-date-column-allowance
branch
from
September 22, 2026 18:13
5217821 to
2120723
Compare
Contributor
hannesa2
approved these changes
Sep 23, 2026
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.

PBGitCommitDateFormatterTests.testTheSizingDateDoesNotDependOnTodayfailed on master, and would have gone on failing at unpredictable times,
because it measured a fixed string against the clock.
than against
[NSDate date], so the result does not move with the hourto, so the test and the history controller read one definition
The failure
From run 35718227392,
on an unrelated pull request:
The history column is sized against a fixed date rather than the rows on
screen, so scrolling into a longer month does not meet a clipped column.
The test asserted that this fixed date renders at least as wide as
today's, which quietly assumes no real date can be wider.
One can. The sizing date is
2026-09-28 22:58, an evening time, so itrenders "10:58 PM". Measured in the font the test uses,
AMis 19.9697points wide against
PMat 19.4683. That half point is enough for a twodigit morning hour to beat it, by 0.2729 locally and 0.27295 on CI.
So the test passes or fails on the hour it happens to run at. The 05:45
runs on master pass because a single digit hour is much narrower, and
afternoon runs pass because they are
PMthemselves, which is why thissurfaced as an occasional flake on somebody else's pull request rather
than as a steady failure.
What this does not change
The sizing date itself, and the room the column is given on top of it.
The column is a starting width the reader can drag, and a 5% allowance
on a 200 point string is some 14 points, comfortably more than the half
point at stake. Nothing here is a real sizing defect - only the test was
wrong to compare against
now.Test plan:
PBGitCommitDateFormatterTestspasses, 209 tests overall with nonefailing
give the same answer whenever CI happens to run
PBDateColumnSlackrather than anumber copied into the test, so it follows the constant if it moves