Skip to content

Handle file deletion races during indexing - #2634

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue2044
May 24, 2026
Merged

Handle file deletion races during indexing#2634
Widthdom merged 2 commits into
mainfrom
fix-issue2044

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Distinguish files that disappear during scan probes from unsupported/probe-failed files.
  • Report deletion races as non-fatal warnings in scan/update/full-index paths and remove stale rows when possible.
  • Add a focused FileIndexer regression test and a bilingual changelog fragment.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~FileIndexerTests" passed before the latest origin/main merge.
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~FileIndexerTests.ScanFilesDetailed_FileDeletedAfterEnumeration_RecordsWarning" passed after the latest origin/main merge.
  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false passed after the latest origin/main merge.
  • dotnet run --project tools/CodeIndex.Changelog -- check passed.
  • dotnet test CodeIndex.sln -c Release -p:UseSharedCompilation=false was attempted, but a trimmed publish test failed due an unrelated file lock on src/CodeIndex/obj/Debug/net8.0/osx-arm64/linked/cdidx.pdb while publishing.

Review

  • Manual adversarial review of origin/main..HEAD: No blocking/actionable issues found.
  • codex exec adversarial review was attempted but could not run because the local Codex CLI reported a usage limit.

Changelog

  • changelog.d/unreleased/2044.fixed.md

Fixes #2044

@Widthdom
Widthdom marked this pull request as ready for review May 24, 2026 13:53
@Widthdom
Widthdom merged commit d3a8691 into main May 24, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue2044 branch May 24, 2026 13:53
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.

File-deletion race during directory enumeration causes unhandled FileNotFoundException in BuildRecord

1 participant