Skip to content

Commit 5374144

Browse files
blaze6950Mykyta ZotovCopilot
authored
Refactor/improve code (#5)
* docs: update FaultyDataSource documentation for clarity and accuracy * refactor: improve diagnostics and data source handling; refactor: update range chunk and intent structures; chore: add new test infrastructure project * refactor: improve thread safety and synchronization in CopyOnReadStorage; enhance documentation for clarity * refactor: update documentation to reflect changes in cache state management * refactor: revise ICacheDiagnostics interface to focus on key events * refactor: improve user request handling logic for cache scenarios and enhance documentation * refactor: improve code structure and remove redundant elements; refactor: enhance clarity in comments and documentation; chore: exclude benchmark project from code coverage * refactor: update method signatures and improve data handling in various classes; feat: introduce new diagnostics tests for NoOpDiagnostics; fix: correct range handling in tests and documentation; chore: remove redundant test data source and simplify test infrastructure; style: enhance code readability and consistency across files * docs: README and documentation files have been updated for clarity and accuracy; style: formatting improvements have been made to tables and lists; refactor: redundant references in documentation have been removed * chore: update documentation links and structure in various markdown files; refactor: enhance .gitignore for IDE and OS-specific files; docs: add public API and user path documentation * test: unit tests for cache data extension service and async activity counter have been added; test: rebalance failure handling and disposal scenarios have been validated; test: execution request lifecycle behavior has been verified * style: code formatting has been improved in NoRebalanceRangePlanner and UserRequestHandler * docs: README file has been updated to include current performance baselines and benchmark reports; refactor: benchmark reports have been reorganized for clarity and consistency; style: formatting improvements made to benchmark sections for better readability * Update docs/components/rebalance-path.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: improve diagnostics and data handling in IDataSource and RangeChunk * refactor: update user-path documentation for improved clarity and accuracy * refactor: improve documentation for CopyOnReadStorage and clarify locking behavior; refactor: enhance ToRangeData method to ensure immutable snapshot is returned; refactor: update invariants and summaries for better clarity on storage strategies * Update docs/components/public-api.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update docs/components/public-api.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update docs/components/intent-management.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor(execution): improve execution controller structure and semantics; refactor(intent-management): enhance intent management logic for clarity; refactor(state): update state management to reflect storage changes; refactor(api): adjust public API documentation for consistency --------- Co-authored-by: Mykyta Zotov <mykyta.zotov@ihsmarkit.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 72ac47c commit 5374144

99 files changed

Lines changed: 5671 additions & 8319 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.

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,12 @@ bin/
22
obj/
33
/packages/
44
riderModule.iml
5-
/_ReSharper.Caches/
5+
/_ReSharper.Caches/
6+
7+
# IDE / user-specific
8+
.idea/
9+
.vs/
10+
*.DotSettings.user
11+
12+
# Stray / OS artifacts
13+
nul

AGENTS.md

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ using Intervals.NET;
132132
using Intervals.NET.Domain.Abstractions;
133133
using SlidingWindowCache.Core.Planning;
134134
using SlidingWindowCache.Core.State;
135-
using SlidingWindowCache.Infrastructure.Instrumentation;
135+
using SlidingWindowCache.Public.Instrumentation;
136136
```
137137

138138
### XML Documentation
@@ -207,7 +207,7 @@ catch (Exception ex)
207207
### Concurrency Patterns
208208

209209
**Single-Writer Architecture (CRITICAL):**
210-
- User Path: READ-ONLY (never mutates Cache, LastRequested, or NoRebalanceRange)
210+
- User Path: READ-ONLY (never mutates Cache, IsInitialized, or NoRebalanceRange)
211211
- Rebalance Execution: SINGLE WRITER (sole authority for cache mutations)
212212
- Serialization: Channel-based with single reader/single writer (intent processing loop)
213213

@@ -305,29 +305,32 @@ refactor: AsyncActivityCounter lock has been removed and replaced with lock-free
305305
- Documentation may be outdated; long-term goal is synchronization with code
306306

307307
### Documentation Update Map
308-
| File | Update When | Focus |
309-
|------|-------------|-------|
310-
| `README.md` | Public API changes, new features | User-facing examples, configuration |
311-
| `docs/invariants.md` | Architectural invariants changed | System constraints, concurrency rules |
312-
| `docs/architecture-model.md` | Concurrency mechanisms changed | Thread safety, synchronization primitives |
313-
| `docs/component-map.md` | New components, major refactoring | Component catalog, dependencies |
314-
| `docs/actors-and-responsibilities.md` | Component responsibilities changed | Actor roles, explicit responsibilities |
315-
| `docs/cache-state-machine.md` | State transitions changed | State machine specification |
316-
| `docs/storage-strategies.md` | Storage implementation changed | Strategy comparison, performance |
317-
| `docs/scenario-model.md` | Temporal behavior changed | Scenario walkthroughs, sequences |
318-
| `docs/diagnostics.md` | New diagnostics events | Instrumentation guide |
319-
| `benchmarks/*/README.md` | Benchmark changes | Performance methodology, results |
320-
| `tests/*/README.md` | Test architecture changes | Test suite documentation |
321-
| XML comments (in code) | All code changes | Component purpose, invariant references |
308+
309+
| File | Update When | Focus |
310+
|-------------------------------|------------------------------------|-----------------------------------------|
311+
| `README.md` | Public API changes, new features | User-facing examples, configuration |
312+
| `docs/invariants.md` | Architectural invariants changed | System constraints, concurrency rules |
313+
| `docs/architecture.md` | Concurrency mechanisms changed | Thread safety, coordination model |
314+
| `docs/components/overview.md` | New components, major refactoring | Component catalog, dependencies |
315+
| `docs/actors.md` | Component responsibilities changed | Actor roles, explicit responsibilities |
316+
| `docs/state-machine.md` | State transitions changed | State machine specification |
317+
| `docs/storage-strategies.md` | Storage implementation changed | Strategy comparison, performance |
318+
| `docs/scenarios.md` | Temporal behavior changed | Scenario walkthroughs, sequences |
319+
| `docs/diagnostics.md` | New diagnostics events | Instrumentation guide |
320+
| `docs/glossary.md` | Terms or semantics change | Canonical terminology |
321+
| `benchmarks/*/README.md` | Benchmark changes | Performance methodology, results |
322+
| `tests/*/README.md` | Test architecture changes | Test suite documentation |
323+
| XML comments (in code) | All code changes | Component purpose, invariant references |
322324

323325
## Architecture References
324326

325327
**Before making changes, consult these critical documents:**
326-
- `docs/invariants.md` - System invariants (33KB) - READ THIS FIRST
327-
- `docs/architecture-model.md` - Architecture and concurrency model
328-
- `docs/actors-and-responsibilities.md` - Component responsibilities
329-
- `docs/component-map.md` - Detailed component catalog (86KB)
330-
- `README.md` - User guide and examples (32KB)
328+
- `docs/invariants.md` - System invariants - READ THIS FIRST
329+
- `docs/architecture.md` - Architecture and concurrency model
330+
- `docs/actors.md` - Actor responsibilities and boundaries
331+
- `docs/components/overview.md` - Component catalog (split by subsystem)
332+
- `docs/glossary.md` - Canonical terminology
333+
- `README.md` - User guide and examples
331334

332335
**Key Invariants to NEVER violate:**
333336
1. Cache Contiguity: No gaps allowed in cached ranges
@@ -342,6 +345,7 @@ refactor: AsyncActivityCounter lock has been removed and replaced with lock-free
342345
- `src/SlidingWindowCache/Public/WindowCache.cs` - Main cache facade
343346
- `src/SlidingWindowCache/Public/IDataSource.cs` - Data source contract
344347
- `src/SlidingWindowCache/Public/Configuration/` - Configuration classes
348+
- `src/SlidingWindowCache/Public/Instrumentation/` - Diagnostics
345349

346350
**Core Logic:**
347351
- `src/SlidingWindowCache/Core/UserPath/` - User request handling (read-only)
@@ -351,7 +355,6 @@ refactor: AsyncActivityCounter lock has been removed and replaced with lock-free
351355

352356
**Infrastructure:**
353357
- `src/SlidingWindowCache/Infrastructure/Storage/` - Storage strategies
354-
- `src/SlidingWindowCache/Infrastructure/Instrumentation/` - Diagnostics
355358
- `src/SlidingWindowCache/Infrastructure/Concurrency/` - Async coordination
356359

357360
## CI/CD

0 commit comments

Comments
 (0)