Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
934588d
feat: Add comprehensive documentation for concurrency model, cache st…
Feb 9, 2026
76cdad4
feat: add initial implementation of sliding window cache with range h…
Feb 9, 2026
999a0f1
test: add invariants as decription for related tests
Feb 9, 2026
fbda138
feat: refactor cache state management to enforce single-writer archit…
Feb 10, 2026
0626565
refactor: refactor mock data source creation to centralize logic in T…
Feb 10, 2026
fd057bf
docs: update README.md to clarify rebalancing advantages in List<T> o…
Feb 10, 2026
7fc1c99
refactor: refactor WindowCacheInvariantTests for improved readability…
Feb 10, 2026
edf5a1b
refactor: refactor invariants and tests for cancellation support, enh…
Feb 11, 2026
2a668e0
refactor: refactor whitespace and formatting for improved code readab…
Feb 11, 2026
0d12925
refactor: refactor RebalanceExecutor to improve clarity by renaming v…
Feb 11, 2026
ff4a999
refactor: migrate instrumentation from #if DEBUG to [Conditional("DEB…
Feb 11, 2026
22da647
chore: redundant file was removed
Feb 11, 2026
c3afa7a
refactor: add helper methods for WindowCache testing and assertions
Feb 11, 2026
8e6144b
feat: feature/add user request cache hit/miss instrumentation counter…
Feb 11, 2026
652576f
test: enhance cache instrumentation by adding counters for data sourc…
Feb 11, 2026
12ebae6
refactor: refactor namespaces and update references for improved orga…
Feb 11, 2026
2801079
docs: fix documentation links and remove redundant references to inte…
Feb 11, 2026
c2915ef
test: refactor WindowCacheInvariantTests for improved readability and…
Feb 11, 2026
452378d
test: enhance testing infrastructure with deterministic synchronizati…
Feb 11, 2026
192c047
refactor: refactor rebalance scheduling logic to improve intent handl…
Feb 11, 2026
f117aa9
refactor: fix formatting and improve readability in CacheDataFetcher …
Feb 11, 2026
6257bec
test: enhance WindowCacheInvariantTests to validate cache instrumenta…
Feb 12, 2026
c10a63f
test: refactor WindowCacheInvariantTests to simplify assertions and i…
Feb 12, 2026
db4e1f3
test: udate comments in WindowCacheInvariantTests to clarify invarian…
Feb 12, 2026
a5f4b59
test: refactor WindowCacheInvariantTests to improve assertions for us…
Feb 12, 2026
32ef2da
test: update WindowCacheInvariantTests to assert exact values for reb…
Feb 12, 2026
9e80b3b
fix: enhance IntentController with lock-free implementation for cance…
Feb 13, 2026
987fd56
docs: enhance concurrency model documentation with lock-free implemen…
Feb 13, 2026
9486b5c
test: Add comprehensive dependency contract and robustness tests for …
Feb 13, 2026
dd36ce2
fix: rename CacheDataFetcher to CacheDataExtensionService and update …
Feb 14, 2026
3f303d1
feat: add diagnostics infrastructure for cache behavior monitoring an…
Feb 14, 2026
93c180f
feat: add integration contract and robustness tests for SlidingWindow…
Feb 14, 2026
9f930f0
refactor: clean up whitespace in diagnostic and test files for improv…
Feb 14, 2026
d3705b6
fix: rename DefaultCacheDiagnostics to EventCounterCacheDiagnostics f…
Feb 14, 2026
105b82a
test: add unit tests for WindowCacheOptions and IntegerVariableStepDo…
Feb 14, 2026
de146d6
test: add unit tests for NoOpDiagnostics to ensure no exceptions are …
Feb 14, 2026
181121f
test: add comprehensive unit tests for CopyOnReadStorage and Snapshot…
Feb 14, 2026
79a2672
test: refactor for-loop variable declarations to use 'var' for consis…
Feb 14, 2026
601065d
fix: refactor documentation to clarify the purpose of WaitForIdleAsyn…
Feb 14, 2026
ff7ca77
feat: feature/add WebAssembly compilation validation project for Slid…
Feb 14, 2026
7bee3ac
feat: add CI/CD configuration and local testing script for SlidingWin…
Feb 14, 2026
9e69ff3
fix: remove DEBUG-only task tracking from RebalanceScheduler and upda…
Feb 14, 2026
b980220
feat: add benchmark suite for SlidingWindowCache performance evaluation
Feb 14, 2026
6623095
fix: refactor UserRequestHandler to improve cache handling and data f…
Feb 15, 2026
65f3ce3
benchmark: update cache options in benchmarks for improved prefetchin…
Feb 15, 2026
c0dd884
benchmark: enhance benchmark parameterization for scaling behavior an…
Feb 15, 2026
7c9381c
benchmark: reduce parameter ranges in benchmark tests for improved pe…
Feb 15, 2026
9be1cb1
benchmark: update InitialCacheRangeAfterRebalance to use CacheCoeffic…
Feb 15, 2026
5aaf15d
benchmark: update InitialCacheRangeAfterRebalance to use CacheCoeffic…
Feb 15, 2026
6f28cff
benhcmark: enhance Rebalance Flow Benchmarks with detailed documentat…
Feb 15, 2026
5c98eac
benchmark: remove unused sequential ranges and related locality scena…
Feb 15, 2026
0b30c41
refactor: add benchmarks for SlidingWindowCache performance evaluation
Feb 15, 2026
52ba4cc
benchmark: add benchmark reports for Rebalance, Scenario, and User Fl…
Feb 15, 2026
21016ed
dcos: update benchmark parameters for improved clarity and accuracy, …
Feb 15, 2026
4efeab9
refactor: remove unnecessary blank lines in benchmark and test files …
Feb 15, 2026
2116864
fix: fix all the obvious issues in docs
Feb 15, 2026
7e198f3
docs: enhance README.md with improved structure and content, adding t…
Feb 15, 2026
b926ab1
test: refactor cache diagnostics initialization and replace Task.Dela…
Feb 16, 2026
3d323de
fix: remove redundant assignment of Range in SnapshotReadStorage cons…
Feb 16, 2026
bd04e74
docs: remove outdated integration test suite references from README
Feb 16, 2026
14ef644
docs: fix formatting in cache-state-machine.md by removing redundant …
Feb 16, 2026
abea921
fix: refactor UserRequestHandler to handle null assembledData before …
Feb 16, 2026
27be58c
docs: add internal note to CacheDataExtensionService for input valida…
Feb 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 141 additions & 0 deletions .github/test-ci-locally.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Local CI/CD Testing Script
# This script replicates the GitHub Actions workflow locally for testing

Write-Host "========================================" -ForegroundColor Cyan
Write-Host "SlidingWindowCache CI/CD Local Test" -ForegroundColor Cyan
Write-Host "========================================" -ForegroundColor Cyan
Write-Host ""

# Environment variables (matching GitHub Actions)
$env:SOLUTION_PATH = "SlidingWindowCache.sln"
$env:PROJECT_PATH = "src/SlidingWindowCache/SlidingWindowCache.csproj"
$env:WASM_VALIDATION_PATH = "src/SlidingWindowCache.WasmValidation/SlidingWindowCache.WasmValidation.csproj"
$env:UNIT_TEST_PATH = "tests/SlidingWindowCache.Unit.Tests/SlidingWindowCache.Unit.Tests.csproj"
$env:INTEGRATION_TEST_PATH = "tests/SlidingWindowCache.Integration.Tests/SlidingWindowCache.Integration.Tests.csproj"
$env:INVARIANTS_TEST_PATH = "tests/SlidingWindowCache.Invariants.Tests/SlidingWindowCache.Invariants.Tests.csproj"

# Track failures
$failed = $false

# Step 1: Restore solution dependencies
Write-Host "[Step 1/9] Restoring solution dependencies..." -ForegroundColor Yellow
dotnet restore $env:SOLUTION_PATH
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Restore failed" -ForegroundColor Red
$failed = $true
}
else {
Write-Host "✅ Restore successful" -ForegroundColor Green
}
Write-Host ""

# Step 2: Build solution
Write-Host "[Step 2/9] Building solution (Release)..." -ForegroundColor Yellow
dotnet build $env:SOLUTION_PATH --configuration Release --no-restore
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Build failed" -ForegroundColor Red
$failed = $true
}
else {
Write-Host "✅ Build successful" -ForegroundColor Green
}
Write-Host ""

# Step 3: Validate WebAssembly compatibility
Write-Host "[Step 3/9] Validating WebAssembly compatibility..." -ForegroundColor Yellow
dotnet build $env:WASM_VALIDATION_PATH --configuration Release --no-restore
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ WebAssembly validation failed" -ForegroundColor Red
$failed = $true
}
else {
Write-Host "✅ WebAssembly compilation successful - library is compatible with net8.0-browser" -ForegroundColor Green
}
Write-Host ""

# Step 4: Run Unit Tests
Write-Host "[Step 4/9] Running Unit Tests with coverage..." -ForegroundColor Yellow
dotnet test $env:UNIT_TEST_PATH --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./TestResults/Unit
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Unit tests failed" -ForegroundColor Red
$failed = $true
}
else {
Write-Host "✅ Unit tests passed" -ForegroundColor Green
}
Write-Host ""

# Step 5: Run Integration Tests
Write-Host "[Step 5/9] Running Integration Tests with coverage..." -ForegroundColor Yellow
dotnet test $env:INTEGRATION_TEST_PATH --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./TestResults/Integration
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Integration tests failed" -ForegroundColor Red
$failed = $true
}
else {
Write-Host "✅ Integration tests passed" -ForegroundColor Green
}
Write-Host ""

# Step 6: Run Invariants Tests
Write-Host "[Step 6/9] Running Invariants Tests with coverage..." -ForegroundColor Yellow
dotnet test $env:INVARIANTS_TEST_PATH --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./TestResults/Invariants
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Invariants tests failed" -ForegroundColor Red
$failed = $true
}
else {
Write-Host "✅ Invariants tests passed" -ForegroundColor Green
}
Write-Host ""

# Step 7: Check coverage files
Write-Host "[Step 7/9] Checking coverage files..." -ForegroundColor Yellow
$coverageFiles = Get-ChildItem -Path "./TestResults" -Filter "coverage.cobertura.xml" -Recurse
if ($coverageFiles.Count -gt 0) {
Write-Host "✅ Found $($coverageFiles.Count) coverage file(s)" -ForegroundColor Green
foreach ($file in $coverageFiles) {
Write-Host " - $($file.FullName)" -ForegroundColor Gray
}
}
else {
Write-Host "⚠️ No coverage files found" -ForegroundColor Yellow
}
Write-Host ""

# Step 8: Build NuGet package
Write-Host "[Step 8/9] Creating NuGet package..." -ForegroundColor Yellow
if (Test-Path "./artifacts") {
Remove-Item -Path "./artifacts" -Recurse -Force
}
dotnet pack $env:PROJECT_PATH --configuration Release --no-build --output ./artifacts
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Package creation failed" -ForegroundColor Red
$failed = $true
}
else {
$packages = Get-ChildItem -Path "./artifacts" -Filter "*.nupkg"
Write-Host "✅ Package created successfully" -ForegroundColor Green
foreach ($pkg in $packages) {
Write-Host " - $($pkg.Name)" -ForegroundColor Gray
}
}
Write-Host ""

# Step 9: Summary
Write-Host "========================================" -ForegroundColor Cyan
Write-Host "Test Summary" -ForegroundColor Cyan
Write-Host "========================================" -ForegroundColor Cyan
if ($failed) {
Write-Host "❌ Some steps failed - see output above" -ForegroundColor Red
exit 1
}
else {
Write-Host "✅ All steps passed successfully!" -ForegroundColor Green
Write-Host ""
Write-Host "Next steps:" -ForegroundColor Cyan
Write-Host " - Review coverage reports in ./TestResults/" -ForegroundColor Gray
Write-Host " - Inspect NuGet package in ./artifacts/" -ForegroundColor Gray
Write-Host " - Push to trigger GitHub Actions workflow" -ForegroundColor Gray
exit 0
}
105 changes: 105 additions & 0 deletions .github/workflows/slidingwindowcache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: CI/CD - SlidingWindowCache

on:
push:
branches: [ master, main ]
paths:
- 'src/SlidingWindowCache/**'
- 'src/SlidingWindowCache.WasmValidation/**'
- 'tests/**'
- '.github/workflows/slidingwindowcache.yml'
pull_request:
branches: [ master, main ]
paths:
- 'src/SlidingWindowCache/**'
- 'src/SlidingWindowCache.WasmValidation/**'
- 'tests/**'
- '.github/workflows/slidingwindowcache.yml'
workflow_dispatch:

env:
DOTNET_VERSION: '8.x.x'
SOLUTION_PATH: 'SlidingWindowCache.sln'
PROJECT_PATH: 'src/SlidingWindowCache/SlidingWindowCache.csproj'
WASM_VALIDATION_PATH: 'src/SlidingWindowCache.WasmValidation/SlidingWindowCache.WasmValidation.csproj'
UNIT_TEST_PATH: 'tests/SlidingWindowCache.Unit.Tests/SlidingWindowCache.Unit.Tests.csproj'
INTEGRATION_TEST_PATH: 'tests/SlidingWindowCache.Integration.Tests/SlidingWindowCache.Integration.Tests.csproj'
INVARIANTS_TEST_PATH: 'tests/SlidingWindowCache.Invariants.Tests/SlidingWindowCache.Invariants.Tests.csproj'

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Restore solution dependencies
run: dotnet restore ${{ env.SOLUTION_PATH }}

- name: Build solution
run: dotnet build ${{ env.SOLUTION_PATH }} --configuration Release --no-restore

- name: Validate WebAssembly compatibility
run: |
echo "::group::WebAssembly Validation"
echo "Building SlidingWindowCache.WasmValidation for net8.0-browser target..."
dotnet build ${{ env.WASM_VALIDATION_PATH }} --configuration Release --no-restore
echo "✅ WebAssembly compilation successful - library is compatible with net8.0-browser"
echo "::endgroup::"

- name: Run Unit Tests with coverage
run: dotnet test ${{ env.UNIT_TEST_PATH }} --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./TestResults/Unit

- name: Run Integration Tests with coverage
run: dotnet test ${{ env.INTEGRATION_TEST_PATH }} --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./TestResults/Integration

- name: Run Invariants Tests with coverage
run: dotnet test ${{ env.INVARIANTS_TEST_PATH }} --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./TestResults/Invariants

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
files: ./TestResults/**/coverage.cobertura.xml
fail_ci_if_error: false
verbose: true
flags: unittests,integrationtests,invarianttests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

publish-nuget:
runs-on: ubuntu-latest
needs: build-and-test
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Restore dependencies
run: dotnet restore ${{ env.PROJECT_PATH }}

- name: Build SlidingWindowCache
run: dotnet build ${{ env.PROJECT_PATH }} --configuration Release --no-restore

- name: Pack SlidingWindowCache
run: dotnet pack ${{ env.PROJECT_PATH }} --configuration Release --no-build --output ./artifacts

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

- name: Upload package artifacts
uses: actions/upload-artifact@v4
with:
name: slidingwindowcache-package
path: ./artifacts/*.nupkg
Loading