Skip to content

test(core): accept any non-coarse granularity in the mtime probe tests - #147

Merged
pmaxhogan merged 1 commit into
mainfrom
fix/probe-granularity-test-flake
Jul 24, 2026
Merged

pmaxhogan merged 1 commit into
mainfrom
fix/probe-granularity-test-flake

Conversation

@pmaxhogan

Copy link
Copy Markdown
Owner

Why

Main CI run 30129432441 (post-#146 merge) flaked on windows-latest: scan_reports_probe_only_when_unpersisted asserted the probe returns exactly Some(0) but got Some(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_fine had the same latent == 0 assertion.

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

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
@github-actions

Copy link
Copy Markdown
Contributor

Coverage

Area main this PR delta
Rust (lib crates) 79.26% 79.26% +0.00 (OK)
UI (vue/ts) 89.71% 89.71% +0.00 (OK)

Gate: passed - no coverage regression (epsilon 0.1 pp).

@pmaxhogan
pmaxhogan merged commit 6555eea into main Jul 24, 2026
18 checks passed
@pmaxhogan
pmaxhogan deleted the fix/probe-granularity-test-flake branch July 24, 2026 23:16
@github-project-automation github-project-automation Bot moved this from Todo to Done in Driven Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant