Repository navigation
Conversation
test_remember_date_into_matches_remember_date_with_tz read the clock twice (once via `_remember_date`, once via `_remember_date_into`) and asserted the two minute-resolution strings were equal. A minute boundary crossed between the two reads made the assertion fail even though both functions were correct -- observed on the macOS 3.9 CI leg, the slowest one, where the subshell fork on bash 3.2 widens the gap. Retry once on a mismatch, mirroring the sibling test_remember_date_into_matches_remember_date_builtin_path test's existing pattern three lines above it: the assertion stays exact (`==`, no `in` tolerance), only the race is absorbed by re-running the whole script pair. Co-Authored-By: Claude Sonnet 5 <[email protected]>
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.
test_remember_date_into_matches_remember_date_with_tz read the clock twice (once via _remember_date, once via _remember_date_into) and asserted the two minute-resolution strings were exactly equal. A minute boundary crossing between the two reads made the assertion fail even though both functions were correct -- observed once on the macOS 3.9 CI leg (the slowest), at commit bb71467, job 108405447527:
AssertionError: {'NEW': '2026-09-26 12:40 UTC', 'OLD': '2026-09-26 12:39 UTC'}.Fixed by retrying once on a mismatch and re-asserting equality on the second pair, mirroring the sibling test three lines above it in the same file (test_remember_date_into_matches_remember_date_builtin_path), which already carries this exact pattern for the same race on the untz'd variant. The assertion stays an exact
==; only the race is tolerated, never by widening the comparison toin (OLD, OLD2).No production code changed -- test-only fix, plus a changelog.d/794.fixed.md fragment.
Evidence. The true red state is the CI failure quoted above, not something reproduced on demand locally (the race is non-deterministic and rare -- one occurrence in the project's CI history so far). Green:
pytest tests/test_fast_path_subshells_511.py -vpasses 9/9 post-fix. A standalone synthetic script fed fabricated OLD/NEW values reproducing the same boundary crossing confirmed the pre-fix assertion fails on them and the new retry logic passes given a clean second sample while still catching a genuine deterministic bug on both attempts.Self-reviewed by two concurrent spawned reviewers (Explore, oss:auditor); both returned NO FINDINGS, tree_snapshot clean.
Closes #794.
[AI-generated]