Merged
Conversation
added 30 commits
March 7, 2026 02:30
…nd dependencies; docs were updated to describe new VPC; refactor: update benchmarks for cache performance evaluation; refactor: refactor rebalance decision logic and diagnostics interface; test: refactor unit tests for cache interaction and diagnostics; chore: update project files for new cache implementation
…tion helpers and test data sources; chore: add project files for Visited Places cache and its tests; refactor: remove unused caching references from various files
…iction logic; refactor(evaluators): consolidate eviction count computation methods; refactor(scheduler): enhance event channel capacity configuration options; docs: update comments and documentation for clarity and accuracy;
…ed clarity and functionality; feat(eviction): introduce new eviction selectors and policies for enhanced cache management; docs: update documentation to reflect changes in eviction strategy and cache structure; test: add unit tests for new eviction policies and selectors
…initialization; feat(eviction): introduce IEvictionMetadata interface for selector-owned metadata; test: update tests to reflect changes in segment metadata handling; docs: update documentation to describe new eviction metadata structure;
…larity and consistency; refactor(eviction): improve documentation for pressure produced by policies
… span metadata; add tests for metadata initialization and ordering fallback
…lectors; update selector interfaces and metadata handling
…implify interface and clarify metadata requirements
…ith task-based scheduler
…est configuration in options
…e typed configuration objects; refactor(visited-places-cache): simplify cache options handling for storage strategies; refactor(visited-places-cache): remove unused using directives from cache-related files; refactor(storage-strategy-options): introduce new storage strategy options classes for better configuration management; refactor(tests): update tests to accommodate changes in storage strategy options
…larify usage of builder API
…ion logic in a dedicated evaluator class; refactor(eviction): simplify null checks using ArgumentNullException.ThrowIfNull; refactor(eviction): update BackgroundEventProcessor to use the new EvictionPolicyEvaluator; refactor(eviction): enhance MaxTotalSpanPolicy to implement stateful behavior; refactor(eviction): improve documentation for eviction policies and their lifecycle methods; refactor(eviction): add unit tests for EvictionPolicyEvaluator and stateful policies
…ngine class; update BackgroundEventProcessor to utilize the engine for metadata management, policy evaluation, and eviction execution
…heNormalizationExecutor; update related diagnostics and documentation
…olicyEvaluator and UserRequestHandler
…ync; docs: update documentation for clarity
…eDiagnostics and update related references; fix(diagnostics): ensure background operation failure events are correctly reported; refactor: update diagnostics handling in various components to use new interface
…ethods; refactor(diagnostics): remove unused using directives from diagnostics files;
…erable instead of IList
…merable for segment assembly
…eData sources and optimizing memory usage
…t with Array and improving memory allocation
added 22 commits
March 14, 2026 18:24
…s; new test data sources have been introduced for boundary handling and exception testing
…or thread safety; cache layer initialization has been enhanced for better readability; exception handling during cache building has been refined
…fety; NaN checks have been added for cache size and threshold parameters; TOCTOU race conditions have been mitigated in caching mechanisms
…been introduced; benchmark runner has been implemented; synchronous and slow data sources have been added for testing; construction benchmarks for layered cache have been created
…nsertion; CacheNormalizationRequest has been updated to support multiple fetched chunks; documentation for AddRange has been added; tests for AddRange functionality have been implemented
… have been introduced for VisitedPlaces cache; CacheMissBenchmarks have been updated for improved parameterization; README has been updated to reflect new benchmark files and cases
…zation process; diagnostics for expired segments have been updated; time provider has been introduced for deterministic testing; documentation has been revised to reflect changes
…only removed if present
…moving the TDomain type parameter; related tests have been updated accordingly
…e expired segments directly
…ryAdd and TryAddRange for overlap checks; test: unit tests for TryAdd and TryAddRange methods have been updated accordingly
…ove; documentation has been clarified for segment storage invariants
…nd TTL normalization changes; refactor(storage): segment removal logic has been updated to use TryRemove with idempotent removal; refactor(builder): Build method has been restricted to single use per builder instance; refactor: linked list storage synchronization has been clarified and structural mutations have been guarded; refactor: SnapshotReadStorage read path has been optimized for consistency; test: SlidingWindowCacheBuilder tests have been updated to verify single-use restriction; test: SegmentStorageBaseTests naming has been clarified for intra-batch overlap behavior
…ncy; refactor: parameter descriptions in various classes have been simplified; refactor: remarks and comments have been cleaned up for better readability.
…tDataAsync for improved performance; documentation has been updated to clarify event channel capacity requirements
…introduced for improved caching performance; learning pass has been implemented in benchmarks to ensure data sources are pre-learned before measurements.
… consistency; new eventual and strong consistency benchmarks for cache hits and misses have been added
…streamlined for clarity; learning pass logic has been centralized for improved maintainability; cache setup methods have been standardized across benchmark classes
…s caching scenarios have been added
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modularizes the repository’s CI/CD and documentation around two cache implementations (SlidingWindow and VisitedPlaces), while also expanding the benchmark suite—especially for VisitedPlaces and layered-cache scenarios.
Changes:
- Split GitHub Actions CI/CD into module-specific workflows for SlidingWindow (SWC) and VisitedPlaces (VPC), including per-module build/test/WASM validation and NuGet publishing.
- Refactored + expanded documentation into shared vs implementation-specific sections (shared glossary/invariants/architecture + SWC/VPC-specific pages).
- Added substantial new BenchmarkDotNet benchmarks for VPC, SWC, and layered topologies, plus committed benchmark result reports.
Reviewed changes
Copilot reviewed 94 out of 337 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/visited-places/glossary.md | Adds VisitedPlaces-specific glossary to complement shared terms. |
| docs/sliding-window/state-machine.md | Re-scopes SlidingWindow state machine doc, updates invariant references and structure. |
| docs/sliding-window/components/user-path.md | Updates SWC user-path component references and invariant links after module split. |
| docs/sliding-window/components/state-and-storage.md | Updates SWC storage/state doc paths, terms, and invariant references post-split. |
| docs/sliding-window/components/rebalance-path.md | Adds SWC rebalance-path component doc aligned to new scheduler abstraction. |
| docs/sliding-window/components/intent-management.md | Updates SWC intent management docs to new paths and scheduler abstraction. |
| docs/sliding-window/components/decision.md | Updates SWC decision docs to new paths and scheduler terminology. |
| docs/shared/invariants.md | Introduces shared invariants (activity tracking, disposal, bounded request). |
| docs/shared/glossary.md | Introduces shared glossary for cross-cache concepts and APIs. |
| docs/shared/diagnostics.md | Adds shared diagnostics pattern doc for all cache implementations. |
| docs/shared/boundary-handling.md | Adds shared boundary/nullable-range definition doc. |
| docs/shared/architecture.md | Adds shared architecture principles (single-writer, schedulers, disposal). |
| docs/shared/actors.md | Adds shared “actor” pattern explanation used across implementations. |
| docs/components/rebalance-path.md | Removes old non-modular rebalance-path doc (replaced by SWC-specific + shared docs). |
| docs/components/execution.md | Removes old non-modular execution doc (replaced by SWC-specific + shared docs). |
| benchmarks/Intervals.NET.Caching.Benchmarks/VisitedPlaces/VpcSingleGapPartialHitStrongBenchmarks.cs | Adds VPC strong-consistency partial-hit benchmark for single-gap case. |
| benchmarks/Intervals.NET.Caching.Benchmarks/VisitedPlaces/VpcSingleGapPartialHitEventualBenchmarks.cs | Adds VPC eventual-consistency partial-hit benchmark for single-gap case. |
| benchmarks/Intervals.NET.Caching.Benchmarks/VisitedPlaces/VpcScenarioBenchmarks.cs | Adds end-to-end VPC scenario benchmarks (cold start, all hits, churn). |
| benchmarks/Intervals.NET.Caching.Benchmarks/VisitedPlaces/VpcMultipleGapsPartialHitStrongBenchmarks.cs | Adds VPC strong-consistency partial-hit benchmark for multi-gap case. |
| benchmarks/Intervals.NET.Caching.Benchmarks/VisitedPlaces/VpcMultipleGapsPartialHitEventualBenchmarks.cs | Adds VPC eventual-consistency partial-hit benchmark for multi-gap case. |
| benchmarks/Intervals.NET.Caching.Benchmarks/VisitedPlaces/VpcConstructionBenchmarks.cs | Adds VPC construction benchmarks (builder vs constructor). |
| benchmarks/Intervals.NET.Caching.Benchmarks/VisitedPlaces/VpcCacheMissStrongBenchmarks.cs | Adds VPC strong-consistency miss benchmarks (with/without eviction). |
| benchmarks/Intervals.NET.Caching.Benchmarks/VisitedPlaces/VpcCacheMissEventualBenchmarks.cs | Adds VPC eventual-consistency miss benchmark. |
| benchmarks/Intervals.NET.Caching.Benchmarks/VisitedPlaces/VpcCacheHitStrongBenchmarks.cs | Adds VPC strong-consistency hit benchmark (includes background wait). |
| benchmarks/Intervals.NET.Caching.Benchmarks/VisitedPlaces/VpcCacheHitEventualBenchmarks.cs | Adds VPC eventual-consistency hit benchmark (drains in cleanup). |
| benchmarks/Intervals.NET.Caching.Benchmarks/VisitedPlaces/Base/VpcSingleGapPartialHitBenchmarksBase.cs | Adds shared base for VPC single-gap partial-hit benchmarks. |
| benchmarks/Intervals.NET.Caching.Benchmarks/VisitedPlaces/Base/VpcMultipleGapsPartialHitBenchmarksBase.cs | Adds shared base for VPC multi-gap partial-hit benchmarks. |
| benchmarks/Intervals.NET.Caching.Benchmarks/VisitedPlaces/Base/VpcCacheMissBenchmarksBase.cs | Adds shared base for VPC miss benchmarks. |
| benchmarks/Intervals.NET.Caching.Benchmarks/VisitedPlaces/Base/VpcCacheHitBenchmarksBase.cs | Adds shared base for VPC hit benchmarks. |
| benchmarks/Intervals.NET.Caching.Benchmarks/SlidingWindow/SwcUserFlowBenchmarks.cs | Refactors SWC user-flow benchmarks to new module + frozen data source learning pass. |
| benchmarks/Intervals.NET.Caching.Benchmarks/SlidingWindow/SwcScenarioBenchmarks.cs | Refactors SWC scenario benchmarks to new module + frozen data source learning pass. |
| benchmarks/Intervals.NET.Caching.Benchmarks/SlidingWindow/SwcRebalanceFlowBenchmarks.cs | Refactors SWC rebalance benchmarks to new module + frozen data source learning pass. |
| benchmarks/Intervals.NET.Caching.Benchmarks/SlidingWindow/SwcConstructionBenchmarks.cs | Adds SWC construction benchmarks (builder vs constructor). |
| benchmarks/Intervals.NET.Caching.Benchmarks/Results/Intervals.NET.Caching.Benchmarks.VisitedPlaces.VpcSingleGapPartialHitStrongBenchmarks-report-github.md | Adds committed VPC single-gap strong benchmark report output. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Results/Intervals.NET.Caching.Benchmarks.VisitedPlaces.VpcSingleGapPartialHitEventualBenchmarks-report-github.md | Adds committed VPC single-gap eventual benchmark report output. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Results/Intervals.NET.Caching.Benchmarks.VisitedPlaces.VpcScenarioBenchmarks-report-github.md | Adds committed VPC scenario benchmark report output. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Results/Intervals.NET.Caching.Benchmarks.VisitedPlaces.VpcMultipleGapsPartialHitStrongBenchmarks-report-github.md | Adds committed VPC multi-gap strong benchmark report output. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Results/Intervals.NET.Caching.Benchmarks.VisitedPlaces.VpcMultipleGapsPartialHitEventualBenchmarks-report-github.md | Adds committed VPC multi-gap eventual benchmark report output. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Results/Intervals.NET.Caching.Benchmarks.VisitedPlaces.VpcConstructionBenchmarks-report-github.md | Adds committed VPC construction benchmark report output. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Results/Intervals.NET.Caching.Benchmarks.VisitedPlaces.VpcCacheMissStrongBenchmarks-report-github.md | Adds committed VPC miss-strong benchmark report output. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Results/Intervals.NET.Caching.Benchmarks.VisitedPlaces.VpcCacheMissEventualBenchmarks-report-github.md | Adds committed VPC miss-eventual benchmark report output. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Results/Intervals.NET.Caching.Benchmarks.VisitedPlaces.VpcCacheHitEventualBenchmarks-report-github.md | Adds committed VPC hit-eventual benchmark report output. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Results/Intervals.NET.Caching.Benchmarks.Layered.LayeredUserFlowBenchmarks-report-github.md | Adds committed layered user-flow benchmark report output. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Results/Intervals.NET.Caching.Benchmarks.Layered.LayeredScenarioBenchmarks-report-github.md | Adds committed layered scenario benchmark report output. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Results/Intervals.NET.Caching.Benchmarks.Layered.LayeredRebalanceBenchmarks-report-github.md | Adds committed layered rebalance benchmark report output. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Results/Intervals.NET.Caching.Benchmarks.Layered.LayeredConstructionBenchmarks-report-github.md | Adds committed layered construction benchmark report output. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Program.cs | Updates benchmark runner usage to BenchmarkSwitcher for filtering support. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Layered/LayeredUserFlowBenchmarks.cs | Adds layered user-flow benchmarks across topologies and hit/miss scenarios. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Layered/LayeredScenarioBenchmarks.cs | Adds layered end-to-end scenario benchmarks (cold start, sequential locality). |
| benchmarks/Intervals.NET.Caching.Benchmarks/Layered/LayeredRebalanceBenchmarks.cs | Adds layered rebalance benchmarks mirroring SWC rebalance pattern. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Layered/LayeredConstructionBenchmarks.cs | Adds layered construction benchmarks for 3 topologies. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Intervals.NET.Caching.Benchmarks.csproj | Adds project references for SWC and VPC modules to the benchmark project. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Infrastructure/YieldingDataSource.cs | Adds async-dispatching benchmark data source with freeze-to-immutable behavior. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Infrastructure/VpcCacheHelpers.cs | Adds VPC benchmark setup helpers for storage/eviction configuration + population. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Infrastructure/SynchronousDataSource.cs | Refactors benchmark data source to cache learned ranges and support freezing. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Infrastructure/SlowDataSource.cs | Updates data-source DTO usage + switches to array materialization. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Infrastructure/LayeredCacheHelpers.cs | Adds layered cache construction helpers using public builders and deterministic options. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Infrastructure/FrozenYieldingDataSource.cs | Adds immutable yielding data source used post-learning-pass for stable async overhead. |
| benchmarks/Intervals.NET.Caching.Benchmarks/Infrastructure/FrozenDataSource.cs | Adds immutable allocation-free data source used post-learning-pass for stable runs. |
| .github/workflows/intervals-net-caching-vpc.yml | Adds VPC-specific CI/CD workflow (build/test/WASM/coverage/publish). |
| .github/workflows/intervals-net-caching-swc.yml | Refactors SWC workflow to module-specific paths, packaging, publishing, and messaging. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
benchmarks/Intervals.NET.Caching.Benchmarks/Infrastructure/FrozenDataSource.cs
Show resolved
Hide resolved
...esults/Intervals.NET.Caching.Benchmarks.VisitedPlaces.VpcScenarioBenchmarks-report-github.md
Show resolved
Hide resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Collaborator
Author
|
A thorough review has been conducted in multiple iterations at the local level. If you have any comments or suggestions, please create a new issue. |
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.
This pull request introduces significant improvements to the CI/CD setup for the project by splitting workflows and scripts to support two separate modules: SlidingWindow and VisitedPlaces. The changes provide clearer, more modular automation for building, testing, validating WebAssembly compatibility, and packaging each module independently. The local CI script and GitHub Actions workflows are updated to reflect this separation, making it easier to maintain and extend the project.
CI/CD Workflow Modularization
intervals-net-caching-vpc.ymlfor the VisitedPlaces module, including build, test, WebAssembly validation, coverage reporting, and NuGet publishing steps.intervals-net-caching-swc.ymlfor the SlidingWindow module, updating paths, environment variables, and job names to focus specifically on SlidingWindow.Local CI Script Enhancements
.github/test-ci-locally.ps1to support both SlidingWindow and VisitedPlaces modules, including new environment variables, build/test steps, WebAssembly validation, and NuGet packaging for each module. The script now runs 12 steps instead of 9, and provides more granular feedback for each module. [1] [2] [3] [4]SlidingWindow Workflow Improvements
These changes make the CI/CD process more maintainable, scalable, and better aligned with the modular structure of the codebase.