test(core): accept any non-coarse granularity in the mtime probe tests - #147
Merged
Merged
Conversation
NTFS stamps mtimes from the interrupt-time clock, so a burst of rewrites inside one timer tick legitimately probes ~2.5ms instead of 0 on windows-latest (flaked on main run 30129432441). Assert non-coarse instead of exactly zero. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YnYLjHgYhhnJjUxojsRhn
Contributor
Coverage
Gate: passed - no coverage regression (epsilon 0.1 pp). |
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.
Why
Main CI run 30129432441 (post-#146 merge) flaked on windows-latest:
scan_reports_probe_only_when_unpersistedasserted the probe returns exactlySome(0)but gotSome(2511100)(~2.5ms).NTFS stamps file times from the interrupt-time clock, which advances in ~0.5-16ms ticks. When the probe's 8-rewrite burst lands inside a single tick, phase 2's first 2ms sleep sees the mtime advance and correctly reports a millisecond-scale window - a coin flip on fast runners. The probe is right; the assertion was too strict.
probe_classifies_local_fs_finehad the same latent== 0assertion.Fix
Both tests now assert the probed granularity is present and non-coarse (
!granularity_is_coarse(g), i.e. <= 1s) - the boundary that actually drives behavior (the re-hash fallback) - instead of exactly zero. Test-only change; no production code touched.🤖 Generated with Claude Code
https://claude.ai/code/session_016YnYLjHgYhhnJjUxojsRhn