Skip to content

Commit af912bb

Browse files
blaze6950Mykyta Zotov
andauthored
[PUBLIC API BREAKING CHANGE] Feature/renaming (#11)
* refactor: rename SlidingWindowCache to Intervals.NET.Caching across the codebase; update documentation references accordingly * chore: update package references for BenchmarkDotNet, Microsoft.SourceLink.GitHub, coverlet.collector, Microsoft.NET.Test.Sdk, xunit, and Moq * docs: update storage strategies documentation for improved clarity and formatting --------- Co-authored-by: Mykyta Zotov <mykyta.zotov@ihsmarkit.com>
1 parent dedfc60 commit af912bb

130 files changed

Lines changed: 926 additions & 907 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/test-ci-locally.ps1

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# Local CI/CD Testing Script
1+
# Local CI/CD Testing Script
22
# This script replicates the GitHub Actions workflow locally for testing
33

44
Write-Host "========================================" -ForegroundColor Cyan
5-
Write-Host "SlidingWindowCache CI/CD Local Test" -ForegroundColor Cyan
5+
Write-Host "Intervals.NET.Caching CI/CD Local Test" -ForegroundColor Cyan
66
Write-Host "========================================" -ForegroundColor Cyan
77
Write-Host ""
88

99
# Environment variables (matching GitHub Actions)
10-
$env:SOLUTION_PATH = "SlidingWindowCache.sln"
11-
$env:PROJECT_PATH = "src/SlidingWindowCache/SlidingWindowCache.csproj"
12-
$env:WASM_VALIDATION_PATH = "src/SlidingWindowCache.WasmValidation/SlidingWindowCache.WasmValidation.csproj"
13-
$env:UNIT_TEST_PATH = "tests/SlidingWindowCache.Unit.Tests/SlidingWindowCache.Unit.Tests.csproj"
14-
$env:INTEGRATION_TEST_PATH = "tests/SlidingWindowCache.Integration.Tests/SlidingWindowCache.Integration.Tests.csproj"
15-
$env:INVARIANTS_TEST_PATH = "tests/SlidingWindowCache.Invariants.Tests/SlidingWindowCache.Invariants.Tests.csproj"
10+
$env:SOLUTION_PATH = "Intervals.NET.Caching.sln"
11+
$env:PROJECT_PATH = "src/Intervals.NET.Caching/Intervals.NET.Caching.csproj"
12+
$env:WASM_VALIDATION_PATH = "src/Intervals.NET.Caching.WasmValidation/Intervals.NET.Caching.WasmValidation.csproj"
13+
$env:UNIT_TEST_PATH = "tests/Intervals.NET.Caching.Unit.Tests/Intervals.NET.Caching.Unit.Tests.csproj"
14+
$env:INTEGRATION_TEST_PATH = "tests/Intervals.NET.Caching.Integration.Tests/Intervals.NET.Caching.Integration.Tests.csproj"
15+
$env:INVARIANTS_TEST_PATH = "tests/Intervals.NET.Caching.Invariants.Tests/Intervals.NET.Caching.Invariants.Tests.csproj"
1616

1717
# Track failures
1818
$failed = $false
@@ -21,85 +21,85 @@ $failed = $false
2121
Write-Host "[Step 1/9] Restoring solution dependencies..." -ForegroundColor Yellow
2222
dotnet restore $env:SOLUTION_PATH
2323
if ($LASTEXITCODE -ne 0) {
24-
Write-Host " Restore failed" -ForegroundColor Red
24+
Write-Host "? Restore failed" -ForegroundColor Red
2525
$failed = $true
2626
}
2727
else {
28-
Write-Host " Restore successful" -ForegroundColor Green
28+
Write-Host "? Restore successful" -ForegroundColor Green
2929
}
3030
Write-Host ""
3131

3232
# Step 2: Build solution
3333
Write-Host "[Step 2/9] Building solution (Release)..." -ForegroundColor Yellow
3434
dotnet build $env:SOLUTION_PATH --configuration Release --no-restore
3535
if ($LASTEXITCODE -ne 0) {
36-
Write-Host " Build failed" -ForegroundColor Red
36+
Write-Host "? Build failed" -ForegroundColor Red
3737
$failed = $true
3838
}
3939
else {
40-
Write-Host " Build successful" -ForegroundColor Green
40+
Write-Host "? Build successful" -ForegroundColor Green
4141
}
4242
Write-Host ""
4343

4444
# Step 3: Validate WebAssembly compatibility
4545
Write-Host "[Step 3/9] Validating WebAssembly compatibility..." -ForegroundColor Yellow
4646
dotnet build $env:WASM_VALIDATION_PATH --configuration Release --no-restore
4747
if ($LASTEXITCODE -ne 0) {
48-
Write-Host " WebAssembly validation failed" -ForegroundColor Red
48+
Write-Host "? WebAssembly validation failed" -ForegroundColor Red
4949
$failed = $true
5050
}
5151
else {
52-
Write-Host " WebAssembly compilation successful - library is compatible with net8.0-browser" -ForegroundColor Green
52+
Write-Host "? WebAssembly compilation successful - library is compatible with net8.0-browser" -ForegroundColor Green
5353
}
5454
Write-Host ""
5555

5656
# Step 4: Run Unit Tests
5757
Write-Host "[Step 4/9] Running Unit Tests with coverage..." -ForegroundColor Yellow
5858
dotnet test $env:UNIT_TEST_PATH --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./TestResults/Unit
5959
if ($LASTEXITCODE -ne 0) {
60-
Write-Host " Unit tests failed" -ForegroundColor Red
60+
Write-Host "? Unit tests failed" -ForegroundColor Red
6161
$failed = $true
6262
}
6363
else {
64-
Write-Host " Unit tests passed" -ForegroundColor Green
64+
Write-Host "? Unit tests passed" -ForegroundColor Green
6565
}
6666
Write-Host ""
6767

6868
# Step 5: Run Integration Tests
6969
Write-Host "[Step 5/9] Running Integration Tests with coverage..." -ForegroundColor Yellow
7070
dotnet test $env:INTEGRATION_TEST_PATH --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./TestResults/Integration
7171
if ($LASTEXITCODE -ne 0) {
72-
Write-Host " Integration tests failed" -ForegroundColor Red
72+
Write-Host "? Integration tests failed" -ForegroundColor Red
7373
$failed = $true
7474
}
7575
else {
76-
Write-Host " Integration tests passed" -ForegroundColor Green
76+
Write-Host "? Integration tests passed" -ForegroundColor Green
7777
}
7878
Write-Host ""
7979

8080
# Step 6: Run Invariants Tests
8181
Write-Host "[Step 6/9] Running Invariants Tests with coverage..." -ForegroundColor Yellow
8282
dotnet test $env:INVARIANTS_TEST_PATH --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./TestResults/Invariants
8383
if ($LASTEXITCODE -ne 0) {
84-
Write-Host " Invariants tests failed" -ForegroundColor Red
84+
Write-Host "? Invariants tests failed" -ForegroundColor Red
8585
$failed = $true
8686
}
8787
else {
88-
Write-Host " Invariants tests passed" -ForegroundColor Green
88+
Write-Host "? Invariants tests passed" -ForegroundColor Green
8989
}
9090
Write-Host ""
9191

9292
# Step 7: Check coverage files
9393
Write-Host "[Step 7/9] Checking coverage files..." -ForegroundColor Yellow
9494
$coverageFiles = Get-ChildItem -Path "./TestResults" -Filter "coverage.cobertura.xml" -Recurse
9595
if ($coverageFiles.Count -gt 0) {
96-
Write-Host " Found $($coverageFiles.Count) coverage file(s)" -ForegroundColor Green
96+
Write-Host "? Found $($coverageFiles.Count) coverage file(s)" -ForegroundColor Green
9797
foreach ($file in $coverageFiles) {
9898
Write-Host " - $($file.FullName)" -ForegroundColor Gray
9999
}
100100
}
101101
else {
102-
Write-Host "⚠️ No coverage files found" -ForegroundColor Yellow
102+
Write-Host "?? No coverage files found" -ForegroundColor Yellow
103103
}
104104
Write-Host ""
105105

@@ -110,12 +110,12 @@ if (Test-Path "./artifacts") {
110110
}
111111
dotnet pack $env:PROJECT_PATH --configuration Release --no-build --output ./artifacts
112112
if ($LASTEXITCODE -ne 0) {
113-
Write-Host " Package creation failed" -ForegroundColor Red
113+
Write-Host "? Package creation failed" -ForegroundColor Red
114114
$failed = $true
115115
}
116116
else {
117117
$packages = Get-ChildItem -Path "./artifacts" -Filter "*.nupkg"
118-
Write-Host " Package created successfully" -ForegroundColor Green
118+
Write-Host "? Package created successfully" -ForegroundColor Green
119119
foreach ($pkg in $packages) {
120120
Write-Host " - $($pkg.Name)" -ForegroundColor Gray
121121
}
@@ -127,11 +127,11 @@ Write-Host "========================================" -ForegroundColor Cyan
127127
Write-Host "Test Summary" -ForegroundColor Cyan
128128
Write-Host "========================================" -ForegroundColor Cyan
129129
if ($failed) {
130-
Write-Host " Some steps failed - see output above" -ForegroundColor Red
130+
Write-Host "? Some steps failed - see output above" -ForegroundColor Red
131131
exit 1
132132
}
133133
else {
134-
Write-Host " All steps passed successfully!" -ForegroundColor Green
134+
Write-Host "? All steps passed successfully!" -ForegroundColor Green
135135
Write-Host ""
136136
Write-Host "Next steps:" -ForegroundColor Cyan
137137
Write-Host " - Review coverage reports in ./TestResults/" -ForegroundColor Gray

.github/workflows/slidingwindowcache.yml renamed to .github/workflows/intervals-net-caching.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
name: CI/CD - SlidingWindowCache
1+
name: CI/CD - Intervals.NET.Caching
22

33
on:
44
push:
55
branches: [ master, main ]
66
paths:
7-
- 'src/SlidingWindowCache/**'
8-
- 'src/SlidingWindowCache.WasmValidation/**'
7+
- 'src/Intervals.NET.Caching/**'
8+
- 'src/Intervals.NET.Caching.WasmValidation/**'
99
- 'tests/**'
10-
- '.github/workflows/slidingwindowcache.yml'
10+
- '.github/workflows/Intervals.NET.Caching.yml'
1111
pull_request:
1212
branches: [ master, main ]
1313
paths:
14-
- 'src/SlidingWindowCache/**'
15-
- 'src/SlidingWindowCache.WasmValidation/**'
14+
- 'src/Intervals.NET.Caching/**'
15+
- 'src/Intervals.NET.Caching.WasmValidation/**'
1616
- 'tests/**'
17-
- '.github/workflows/slidingwindowcache.yml'
17+
- '.github/workflows/Intervals.NET.Caching.yml'
1818
workflow_dispatch:
1919

2020
env:
2121
DOTNET_VERSION: '8.x.x'
22-
SOLUTION_PATH: 'SlidingWindowCache.sln'
23-
PROJECT_PATH: 'src/SlidingWindowCache/SlidingWindowCache.csproj'
24-
WASM_VALIDATION_PATH: 'src/SlidingWindowCache.WasmValidation/SlidingWindowCache.WasmValidation.csproj'
25-
UNIT_TEST_PATH: 'tests/SlidingWindowCache.Unit.Tests/SlidingWindowCache.Unit.Tests.csproj'
26-
INTEGRATION_TEST_PATH: 'tests/SlidingWindowCache.Integration.Tests/SlidingWindowCache.Integration.Tests.csproj'
27-
INVARIANTS_TEST_PATH: 'tests/SlidingWindowCache.Invariants.Tests/SlidingWindowCache.Invariants.Tests.csproj'
22+
SOLUTION_PATH: 'Intervals.NET.Caching.sln'
23+
PROJECT_PATH: 'src/Intervals.NET.Caching/Intervals.NET.Caching.csproj'
24+
WASM_VALIDATION_PATH: 'src/Intervals.NET.Caching.WasmValidation/Intervals.NET.Caching.WasmValidation.csproj'
25+
UNIT_TEST_PATH: 'tests/Intervals.NET.Caching.Unit.Tests/Intervals.NET.Caching.Unit.Tests.csproj'
26+
INTEGRATION_TEST_PATH: 'tests/Intervals.NET.Caching.Integration.Tests/Intervals.NET.Caching.Integration.Tests.csproj'
27+
INVARIANTS_TEST_PATH: 'tests/Intervals.NET.Caching.Invariants.Tests/Intervals.NET.Caching.Invariants.Tests.csproj'
2828

2929
jobs:
3030
build-and-test:
@@ -48,9 +48,9 @@ jobs:
4848
- name: Validate WebAssembly compatibility
4949
run: |
5050
echo "::group::WebAssembly Validation"
51-
echo "Building SlidingWindowCache.WasmValidation for net8.0-browser target..."
51+
echo "Building Intervals.NET.Caching.WasmValidation for net8.0-browser target..."
5252
dotnet build ${{ env.WASM_VALIDATION_PATH }} --configuration Release --no-restore
53-
echo " WebAssembly compilation successful - library is compatible with net8.0-browser"
53+
echo "? WebAssembly compilation successful - library is compatible with net8.0-browser"
5454
echo "::endgroup::"
5555
5656
- name: Run Unit Tests with coverage
@@ -89,17 +89,17 @@ jobs:
8989
- name: Restore dependencies
9090
run: dotnet restore ${{ env.PROJECT_PATH }}
9191

92-
- name: Build SlidingWindowCache
92+
- name: Build Intervals.NET.Caching
9393
run: dotnet build ${{ env.PROJECT_PATH }} --configuration Release --no-restore
9494

95-
- name: Pack SlidingWindowCache
95+
- name: Pack Intervals.NET.Caching
9696
run: dotnet pack ${{ env.PROJECT_PATH }} --configuration Release --no-build --output ./artifacts
9797

98-
- name: Publish SlidingWindowCache to NuGet
99-
run: dotnet nuget push ./artifacts/SlidingWindowCache.*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
98+
- name: Publish Intervals.NET.Caching to NuGet
99+
run: dotnet nuget push ./artifacts/Intervals.NET.Caching.*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
100100

101101
- name: Upload package artifacts
102102
uses: actions/upload-artifact@v4
103103
with:
104-
name: slidingwindowcache-package
104+
name: Intervals.NET.Caching-package
105105
path: ./artifacts/*.nupkg

AGENTS.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Agent Guidelines for SlidingWindowCache
1+
# Agent Guidelines for Intervals.NET.Caching
22

3-
This document provides essential information for AI coding agents working on the SlidingWindowCache codebase.
3+
This document provides essential information for AI coding agents working on the Intervals.NET.Caching codebase.
44

55
## Project Overview
66

7-
**SlidingWindowCache** is a C# .NET 8.0 library implementing a read-only, range-based, sequential-optimized cache with decision-driven background rebalancing. This is a production-ready concurrent systems project with extensive architectural documentation.
7+
**Intervals.NET.Caching** is a C# .NET 8.0 library implementing a read-only, range-based, sequential-optimized cache with decision-driven background rebalancing. This is a production-ready concurrent systems project with extensive architectural documentation.
88

99
**Key Architecture Principles:**
1010
- Single-Writer Architecture: Only rebalance execution mutates cache state
@@ -21,19 +21,19 @@ This document provides essential information for AI coding agents working on the
2121
### Common Build Commands
2222
```bash
2323
# Restore dependencies
24-
dotnet restore SlidingWindowCache.sln
24+
dotnet restore Intervals.NET.Caching.sln
2525

2626
# Build solution (Debug)
27-
dotnet build SlidingWindowCache.sln
27+
dotnet build Intervals.NET.Caching.sln
2828

2929
# Build solution (Release)
30-
dotnet build SlidingWindowCache.sln --configuration Release
30+
dotnet build Intervals.NET.Caching.sln --configuration Release
3131

3232
# Build specific project
33-
dotnet build src/SlidingWindowCache/SlidingWindowCache.csproj --configuration Release
33+
dotnet build src/Intervals.NET.Caching/Intervals.NET.Caching.csproj --configuration Release
3434

3535
# Pack for NuGet
36-
dotnet pack src/SlidingWindowCache/SlidingWindowCache.csproj --configuration Release --output ./artifacts
36+
dotnet pack src/Intervals.NET.Caching/Intervals.NET.Caching.csproj --configuration Release --output ./artifacts
3737
```
3838

3939
## Test Commands
@@ -42,15 +42,15 @@ dotnet pack src/SlidingWindowCache/SlidingWindowCache.csproj --configuration Rel
4242

4343
```bash
4444
# Run all tests
45-
dotnet test SlidingWindowCache.sln --configuration Release
45+
dotnet test Intervals.NET.Caching.sln --configuration Release
4646

4747
# Run specific test project
48-
dotnet test tests/SlidingWindowCache.Unit.Tests/SlidingWindowCache.Unit.Tests.csproj
49-
dotnet test tests/SlidingWindowCache.Integration.Tests/SlidingWindowCache.Integration.Tests.csproj
50-
dotnet test tests/SlidingWindowCache.Invariants.Tests/SlidingWindowCache.Invariants.Tests.csproj
48+
dotnet test tests/Intervals.NET.Caching.Unit.Tests/Intervals.NET.Caching.Unit.Tests.csproj
49+
dotnet test tests/Intervals.NET.Caching.Integration.Tests/Intervals.NET.Caching.Integration.Tests.csproj
50+
dotnet test tests/Intervals.NET.Caching.Invariants.Tests/Intervals.NET.Caching.Invariants.Tests.csproj
5151

5252
# Run single test by fully qualified name
53-
dotnet test --filter "FullyQualifiedName=SlidingWindowCache.Unit.Tests.Public.Configuration.WindowCacheOptionsTests.Constructor_WithValidParameters_InitializesAllProperties"
53+
dotnet test --filter "FullyQualifiedName=Intervals.NET.Caching.Unit.Tests.Public.Configuration.WindowCacheOptionsTests.Constructor_WithValidParameters_InitializesAllProperties"
5454

5555
# Run tests matching pattern
5656
dotnet test --filter "FullyQualifiedName~Constructor"
@@ -77,15 +77,15 @@ dotnet test --collect:"XPlat Code Coverage" --results-directory ./TestResults
7777
### Namespace Organization
7878
```csharp
7979
// Use file-scoped namespace declarations (C# 10+)
80-
namespace SlidingWindowCache.Public;
81-
namespace SlidingWindowCache.Core.UserPath;
82-
namespace SlidingWindowCache.Infrastructure.Storage;
80+
namespace Intervals.NET.Caching.Public;
81+
namespace Intervals.NET.Caching.Core.UserPath;
82+
namespace Intervals.NET.Caching.Infrastructure.Storage;
8383
```
8484

8585
**Namespace Structure:**
86-
- `SlidingWindowCache.Public` - Public API surface
87-
- `SlidingWindowCache.Core` - Business logic (internal)
88-
- `SlidingWindowCache.Infrastructure` - Infrastructure concerns (internal)
86+
- `Intervals.NET.Caching.Public` - Public API surface
87+
- `Intervals.NET.Caching.Core` - Business logic (internal)
88+
- `Intervals.NET.Caching.Infrastructure` - Infrastructure concerns (internal)
8989

9090
### Naming Conventions
9191

@@ -123,16 +123,16 @@ namespace SlidingWindowCache.Infrastructure.Storage;
123123

124124
**Import Order:**
125125
1. External libraries (e.g., `Intervals.NET`)
126-
2. Project namespaces (e.g., `SlidingWindowCache.*`)
126+
2. Project namespaces (e.g., `Intervals.NET.Caching.*`)
127127
3. Alphabetically sorted within each group
128128

129129
**Example:**
130130
```csharp
131131
using Intervals.NET;
132132
using Intervals.NET.Domain.Abstractions;
133-
using SlidingWindowCache.Core.Planning;
134-
using SlidingWindowCache.Core.State;
135-
using SlidingWindowCache.Public.Instrumentation;
133+
using Intervals.NET.Caching.Core.Planning;
134+
using Intervals.NET.Caching.Core.State;
135+
using Intervals.NET.Caching.Public.Instrumentation;
136136
```
137137

138138
### XML Documentation
@@ -350,24 +350,24 @@ refactor: AsyncActivityCounter lock has been removed and replaced with lock-free
350350
## File Locations
351351

352352
**Public API:**
353-
- `src/SlidingWindowCache/Public/WindowCache.cs` - Main cache facade
354-
- `src/SlidingWindowCache/Public/IDataSource.cs` - Data source contract
355-
- `src/SlidingWindowCache/Public/Configuration/` - Configuration classes
356-
- `src/SlidingWindowCache/Public/Instrumentation/` - Diagnostics
353+
- `src/Intervals.NET.Caching/Public/WindowCache.cs` - Main cache facade
354+
- `src/Intervals.NET.Caching/Public/IDataSource.cs` - Data source contract
355+
- `src/Intervals.NET.Caching/Public/Configuration/` - Configuration classes
356+
- `src/Intervals.NET.Caching/Public/Instrumentation/` - Diagnostics
357357

358358
**Core Logic:**
359-
- `src/SlidingWindowCache/Core/UserPath/` - User request handling (read-only)
360-
- `src/SlidingWindowCache/Core/Rebalance/Decision/` - Decision engine
361-
- `src/SlidingWindowCache/Core/Rebalance/Execution/` - Cache mutations (single writer)
362-
- `src/SlidingWindowCache/Core/State/` - State management
359+
- `src/Intervals.NET.Caching/Core/UserPath/` - User request handling (read-only)
360+
- `src/Intervals.NET.Caching/Core/Rebalance/Decision/` - Decision engine
361+
- `src/Intervals.NET.Caching/Core/Rebalance/Execution/` - Cache mutations (single writer)
362+
- `src/Intervals.NET.Caching/Core/State/` - State management
363363

364364
**Infrastructure:**
365-
- `src/SlidingWindowCache/Infrastructure/Storage/` - Storage strategies
366-
- `src/SlidingWindowCache/Infrastructure/Concurrency/` - Async coordination
365+
- `src/Intervals.NET.Caching/Infrastructure/Storage/` - Storage strategies
366+
- `src/Intervals.NET.Caching/Infrastructure/Concurrency/` - Async coordination
367367

368368
## CI/CD
369369

370-
**GitHub Actions:** `.github/workflows/slidingwindowcache.yml`
370+
**GitHub Actions:** `.github/workflows/Intervals.NET.Caching.yml`
371371
- Triggers: Push/PR to main/master, manual dispatch
372372
- Runs: Build, WebAssembly validation, all test suites with coverage
373373
- Coverage: Uploaded to Codecov

0 commit comments

Comments
 (0)