Skip to content

[fix] Exclude POSIX special files from inventory#275

Merged
paul-fresquet merged 5 commits intomasterfrom
fix/261-exclude-posix-special-files
Feb 7, 2026
Merged

[fix] Exclude POSIX special files from inventory#275
paul-fresquet merged 5 commits intomasterfrom
fix/261-exclude-posix-special-files

Conversation

@paul-fresquet
Copy link
Contributor

@paul-fresquet paul-fresquet commented Feb 3, 2026

Summary:

  • Skip POSIX special files during inventory building without marking parts incomplete.

Key changes:

  • Stop creating inaccessible FileDescriptions for POSIX special files; record global skipped entry and warn.
  • Update unit and integration tests to assert exclusion and skipped entries.

Notes/risks:

  • Inventory parts are no longer marked incomplete for POSIX special files; downstream logic may change accordingly.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 3, 2026

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates inventory building to exclude POSIX special files/directories (e.g., FIFO, block devices) from generated inventories, while still tracking them as skipped entries and avoiding marking inventory parts as incomplete due to access.

Changes:

  • Stop emitting inaccessible FileDescriptions for POSIX special files; instead record a SkippedEntry with SkipReason.SpecialPosixFile and log a warning.
  • Add/adjust unit and integration tests to assert POSIX special entries are excluded from inventories and properly recorded as skipped.
  • Add warning logging for POSIX special directories when encountered during directory analysis.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tests/ByteSync.Client.UnitTests/Services/Inventories/InventoryBuilderInspectorTests.cs Updates expectations for POSIX special files and adds coverage for POSIX special directories being skipped without marking parts incomplete.
tests/ByteSync.Client.IntegrationTests/Services/Inventories/TestInventoryBuilder.cs Updates POSIX FIFO integration test to assert exclusion from inventory and presence in InventoryProcessData.SkippedEntries.
src/ByteSync.Client/Services/Inventories/InventoryBuilder.cs Refactors file skip logic into TryHandleFileSkip, removes creation of inaccessible descriptions for POSIX special files, and adds warning log for POSIX special directories.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@paul-fresquet paul-fresquet merged commit 871c111 into master Feb 7, 2026
48 of 50 checks passed
@paul-fresquet paul-fresquet deleted the fix/261-exclude-posix-special-files branch February 7, 2026 08:06
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.

1 participant