Skip to content

Stabilize ancestor ignore watcher coverage on macOS - #4987

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue4966
Jul 30, 2026
Merged

Stabilize ancestor ignore watcher coverage on macOS#4987
Widthdom merged 2 commits into
mainfrom
fix-issue4966

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Make the ancestor-ignore watch integration test invoke the production enqueue callback after writing the real ancestor .gitignore on macOS.
  • Keep actual FileSystemWatcher delivery coverage on Linux and Windows while retaining the bounded database reconciliation assertion on every platform.
  • Document the platform-specific test contract in both the English and Japanese sections of TESTING_GUIDE.md.
  • Add the bilingual changelog fragment changelog.d/unreleased/4966.internal.md.

Root cause and scope

On macOS, FileSystemWatcher/FSEvents delivery for a newly written ancestor .gitignore can be silently delayed or dropped. The reported net9.0 test timed out, and an isolated net8.0 run reproduced the same timeout when real delivery was preserved. Injecting the exact production enqueue callback showed that classification, debounce, and full reconciliation complete within the existing bound.

This PR changes test orchestration only; production watcher behavior is unchanged. The deterministic handoff is limited to macOS, where runtime delivery is not a stable test oracle.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release -f net9.0 --no-restore --no-build -p:UseSharedCompilation=false --filter FullyQualifiedName=CodeIndex.Tests.IndexWatchRunnerTests.RunCore_SubprojectObservesAncestorIgnoreFileChanges_Issue4592
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release -f net8.0 --no-restore --no-build -p:UseSharedCompilation=false --filter FullyQualifiedName=CodeIndex.Tests.IndexWatchRunnerTests.RunCore_SubprojectObservesAncestorIgnoreFileChanges_Issue4592
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release -f net9.0 --no-restore --no-build -p:UseSharedCompilation=false --filter FullyQualifiedName~CodeIndex.Tests.IndexWatchRunnerTests (51 passed)
  • dotnet build CodeIndex.sln -c Release --no-restore -p:UseSharedCompilation=false
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • Codex adversarial review: No blocking/actionable issues found.

Follow-up candidates

None.

Fixes #4966

@Widthdom
Widthdom marked this pull request as ready for review July 30, 2026 00:29
@Widthdom
Widthdom merged commit f8a28aa into main Jul 30, 2026
11 checks passed
@Widthdom
Widthdom deleted the fix-issue4966 branch July 30, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate net9 ancestor .gitignore watcher reconciliation timeout

1 participant