Skip to content

[feature] Add skipped inventory aggregates for issue 267#279

Merged
paul-fresquet merged 10 commits intomasterfrom
feature/267-skipped-aggregates
Feb 18, 2026
Merged

[feature] Add skipped inventory aggregates for issue 267#279
paul-fresquet merged 10 commits intomasterfrom
feature/267-skipped-aggregates

Conversation

@paul-fresquet
Copy link
Contributor

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

Summary:

  • Add skipped-entry aggregates to inventory models to support reliable cross-machine reporting.
  • Keep runtime skipped tracking while introducing persisted per-part skipped counts.

Key changes:

  • Added persisted skip aggregates in InventoryPart (SkippedCountsByReason, SkippedCount, GetSkippedCountByReason, RecordSkippedEntry).
  • Extended InventoryProcessData with runtime aggregate counters (SkippedCount + per-reason counts) and reset handling.
  • Updated InventoryBuilder.RecordSkippedEntry to write through a single path: InventoryPart aggregate + runtime skipped entry/counters.
  • Added/updated unit tests for InventoryPart aggregates, process data counters, builder propagation, and loader persistence.

Notes/risks:

Closes #267

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 implements persisted skip aggregates for inventory tracking (issue #267) to enable cross-machine reporting of skipped entries. The changes add both persistent storage of skip counts in InventoryPart and runtime tracking in InventoryProcessData, preparing the foundation for UI display (issue #268).

Changes:

  • Added SkippedCountsByReason dictionary and related methods to InventoryPart for persistent skip count storage
  • Extended InventoryProcessData with thread-safe runtime skip counters and per-reason tracking
  • Updated InventoryBuilder.RecordSkippedEntry to write skip data to both persistent and runtime storage in a single code path

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/ByteSync.Client/Models/Inventories/InventoryPart.cs Added persisted skip aggregates: SkippedCountsByReason dictionary, SkippedCount property, GetSkippedCountByReason() and RecordSkippedEntry() methods
src/ByteSync.Client/Business/Inventories/InventoryProcessData.cs Added runtime skip tracking with thread-safe counters (_skippedCount, _skippedCountsByReason) and reset handling in ClearSkippedEntries()
src/ByteSync.Client/Services/Inventories/InventoryBuilder.cs Updated to write skip data through both InventoryPart and InventoryProcessData in single call
tests/ByteSync.Client.UnitTests/Models/Inventories/InventoryPartSkippedCountsTests.cs New test class covering aggregate behavior and null handling for InventoryPart skip tracking
tests/ByteSync.Client.UnitTests/Business/Inventories/InventoryProcessDataTests.cs Added tests for runtime skip counter updates and reset behavior
tests/ByteSync.Client.UnitTests/Services/Inventories/InventoryBuilderInspectorTests.cs Extended existing tests to verify skip counts are propagated to both runtime and persistent storage
tests/ByteSync.Client.UnitTests/Services/Inventories/InventoryLoaderIncompleteFlagTests.cs Added test verifying skip counts persist through serialization/deserialization
AGENTS.md Refined language about when agents can create branches (unrelated to PR purpose)

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

@sonarqubecloud
Copy link

@paul-fresquet paul-fresquet merged commit 57d90c0 into master Feb 18, 2026
24 checks passed
@paul-fresquet paul-fresquet deleted the feature/267-skipped-aggregates branch February 18, 2026 16:56
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.

[feature] Track skipped entries in InventoryPart

1 participant

Comments