Make explicit file updates atomic and harden filesystem handling - #5126
Merged
Conversation
Widthdom
force-pushed
the
fix-issue5091
branch
from
August 18, 2026 18:09
5c388db to
d5e673b
Compare
Widthdom
force-pushed
the
fix-issue5091
branch
from
August 18, 2026 18:09
d5e673b to
89f6879
Compare
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.
Summary
index --filesupdates fail atomically when any directly supplied input is invalid or resolves to a duplicate target.Root cause
The explicit-file pipeline could filter or normalize inputs before validating the complete user-supplied selection, allowing partial or empty updates instead of one atomic rejection. Related filesystem paths also relied on lexical or workspace-wide comparisons and path-based reopening, so aliases, target-specific casing, symlinks, special files, and watch-internal artifacts could be handled inconsistently.
Implementation
--filestoken provenance and preflight the complete selection before database writes, with bounded structured rejection diagnostics.--files, invalid paths, directories, unsupported inputs, and canonical duplicates while retaining indexed cleanup and reconciliation-control exceptions.filesscan per request.UsageErrorto one full-workspace rescan so valid sibling changes are reconciled.Validation
dotnet restore CodeIndex.sln --locked-mode -p:NuGetAudit=falsedotnet build CodeIndex.sln -c Release --no-restore -p:UseSharedCompilation=false(0 warnings, 0 errors)dotnet format CodeIndex.sln --no-restore --verify-no-changesdotnet run --project tools/CodeIndex.Changelog -- check(26 fragments)backfill-fold,status --check, andworkspace status --checkNo blocking/actionable issues found.Documentation and changelog
USER_GUIDE.md,DEVELOPER_GUIDE.md, andTESTING_GUIDE.mdin English and Japanese.changelog.d/unreleased/5091.fixed.md.Follow-ups
Remaining out-of-scope work is tracked in #5120 and #5124.
Fixes #5091
Fixes #5122