stabilize tests
This commit is contained in:
@@ -8,40 +8,40 @@ The Router module provides transport-agnostic microservice communication with a
|
||||
|
||||
```
|
||||
src/Router/
|
||||
├── StellaOps.Gateway.WebService/ # HTTP ingress gateway
|
||||
├── __Libraries/
|
||||
│ ├── StellaOps.Router.Gateway/ # Gateway core logic
|
||||
│ ├── StellaOps.Router.Common/ # Shared models, enums
|
||||
│ ├── StellaOps.Router.Config/ # YAML configuration
|
||||
│ ├── StellaOps.Router.AspNet/ # ASP.NET integration
|
||||
│ ├── StellaOps.Microservice/ # Microservice SDK
|
||||
│ ├── StellaOps.Microservice.AspNetCore/ # ASP.NET hosting
|
||||
│ ├── StellaOps.Microservice.SourceGen/ # Compile-time generator
|
||||
│ ├── StellaOps.Messaging/ # Queue abstractions
|
||||
│ ├── StellaOps.Messaging.Transport.InMemory/
|
||||
│ ├── StellaOps.Messaging.Transport.Valkey/
|
||||
│ ├── StellaOps.Messaging.Transport.Postgres/
|
||||
│ ├── StellaOps.Router.Transport.InMemory/
|
||||
│ ├── StellaOps.Router.Transport.Tcp/
|
||||
│ ├── StellaOps.Router.Transport.Tls/
|
||||
│ ├── StellaOps.Router.Transport.RabbitMq/
|
||||
│ ├── StellaOps.Router.Transport.Udp/
|
||||
│ └── StellaOps.Router.Transport.Messaging/
|
||||
├── __Tests/
|
||||
│ ├── __Libraries/
|
||||
│ │ └── StellaOps.Router.Testing/ # Test fixtures
|
||||
│ ├── StellaOps.Gateway.WebService.Tests/
|
||||
│ ├── StellaOps.Microservice.Tests/
|
||||
│ ├── StellaOps.Microservice.SourceGen.Tests/
|
||||
│ ├── StellaOps.Router.Common.Tests/
|
||||
│ ├── StellaOps.Router.Config.Tests/
|
||||
│ ├── StellaOps.Router.Integration.Tests/
|
||||
│ ├── StellaOps.Router.Transport.*.Tests/
|
||||
│ └── StellaOps.Messaging.Transport.*.Tests/
|
||||
└── examples/
|
||||
├── Examples.OrderService/
|
||||
├── Examples.NotificationService/
|
||||
└── Examples.MultiTransport.Gateway/
|
||||
????????? StellaOps.Gateway.WebService/ # HTTP ingress gateway
|
||||
????????? __Libraries/
|
||||
??? ????????? StellaOps.Router.Gateway/ # Gateway core logic
|
||||
??? ????????? StellaOps.Router.Common/ # Shared models, enums
|
||||
??? ????????? StellaOps.Router.Config/ # YAML configuration
|
||||
??? ????????? StellaOps.Router.AspNet/ # ASP.NET integration
|
||||
??? ????????? StellaOps.Microservice/ # Microservice SDK
|
||||
??? ????????? StellaOps.Microservice.AspNetCore/ # ASP.NET hosting
|
||||
??? ????????? StellaOps.Microservice.SourceGen/ # Compile-time generator
|
||||
??? ????????? StellaOps.Messaging/ # Queue abstractions
|
||||
??? ????????? StellaOps.Messaging.Transport.InMemory/
|
||||
??? ????????? StellaOps.Messaging.Transport.Valkey/
|
||||
??? ????????? StellaOps.Messaging.Transport.Postgres/
|
||||
??? ????????? StellaOps.Router.Transport.InMemory/
|
||||
??? ????????? StellaOps.Router.Transport.Tcp/
|
||||
??? ????????? StellaOps.Router.Transport.Tls/
|
||||
??? ????????? StellaOps.Router.Transport.RabbitMq/
|
||||
??? ????????? StellaOps.Router.Transport.Udp/
|
||||
??? ????????? StellaOps.Router.Transport.Messaging/
|
||||
????????? __Tests/
|
||||
??? ????????? __Libraries/
|
||||
??? ??? ????????? StellaOps.Router.Testing/ # Test fixtures
|
||||
??? ????????? StellaOps.Gateway.WebService.Tests/
|
||||
??? ????????? StellaOps.Microservice.Tests/
|
||||
??? ????????? StellaOps.Microservice.SourceGen.Tests/
|
||||
??? ????????? StellaOps.Router.Common.Tests/
|
||||
??? ????????? StellaOps.Router.Config.Tests/
|
||||
??? ????????? StellaOps.Router.Integration.Tests/
|
||||
??? ????????? StellaOps.Router.Transport.*.Tests/
|
||||
??? ????????? StellaOps.Messaging.Transport.*.Tests/
|
||||
????????? examples/
|
||||
????????? Examples.OrderService/
|
||||
????????? Examples.NotificationService/
|
||||
????????? Examples.MultiTransport.Gateway/
|
||||
```
|
||||
|
||||
## Key Components
|
||||
@@ -178,6 +178,7 @@ dotnet run --project src/Router/examples/Examples.OrderService/
|
||||
## Documentation
|
||||
|
||||
- `/docs/modules/router/README.md` - Product overview
|
||||
- `/docs/modules/router/guides/ARCHITECTURE.md` - Technical architecture
|
||||
- `/docs/modules/router/architecture.md` - Technical architecture
|
||||
- `/docs/modules/router/guides/GETTING_STARTED.md` - Tutorial
|
||||
- `/docs/modules/router/examples/` - Example documentation
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Text.Json;
|
||||
|
||||
using StellaOps.Router.Common.Models;
|
||||
using StellaOps.Router.Gateway;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Gateway.WebService.Authorization;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using StellaOps.Router.Gateway.Authorization;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace StellaOps.Gateway.WebService.Authorization;
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
using System.Security.Claims;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
using StellaOps.Gateway.WebService.Services;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using StellaOps.Gateway.WebService.Services;
|
||||
|
||||
namespace StellaOps.Gateway.WebService.Middleware;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
using StellaOps.Auth.Abstractions;
|
||||
using System.Security.Claims;
|
||||
using System.Text.Json;
|
||||
using StellaOps.Auth.Abstractions;
|
||||
|
||||
namespace StellaOps.Gateway.WebService.Middleware;
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
|
||||
using Microsoft.AspNetCore.Http.Extensions;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using StellaOps.Auth.Security.Dpop;
|
||||
using StellaOps.Gateway.WebService.Configuration;
|
||||
using System.Security.Claims;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text.Json;
|
||||
using Microsoft.AspNetCore.Http.Extensions;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Auth.Security.Dpop;
|
||||
using StellaOps.Gateway.WebService.Configuration;
|
||||
|
||||
namespace StellaOps.Gateway.WebService.Middleware;
|
||||
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
using System.Net;
|
||||
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.Extensions.Logging.Abstractions;
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Auth.Abstractions;
|
||||
using StellaOps.Auth.ServerIntegration;
|
||||
using StellaOps.Auth.Security.Dpop;
|
||||
using StellaOps.Auth.ServerIntegration;
|
||||
using StellaOps.Configuration;
|
||||
using StellaOps.Gateway.WebService.Authorization;
|
||||
using StellaOps.Gateway.WebService.Configuration;
|
||||
using StellaOps.Gateway.WebService.Middleware;
|
||||
using StellaOps.Gateway.WebService.Security;
|
||||
using StellaOps.Gateway.WebService.Services;
|
||||
using StellaOps.Messaging.DependencyInjection;
|
||||
using StellaOps.Messaging.Transport.Valkey;
|
||||
using StellaOps.Router.AspNet;
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using StellaOps.Router.Common.Plugins;
|
||||
using StellaOps.Router.Gateway;
|
||||
using StellaOps.Router.Gateway.Configuration;
|
||||
using StellaOps.Router.Gateway.DependencyInjection;
|
||||
@@ -20,14 +24,11 @@ using StellaOps.Router.Gateway.Middleware;
|
||||
using StellaOps.Router.Gateway.OpenApi;
|
||||
using StellaOps.Router.Gateway.RateLimit;
|
||||
using StellaOps.Router.Gateway.Routing;
|
||||
using StellaOps.Router.Transport.Tcp;
|
||||
using StellaOps.Router.Transport.Tls;
|
||||
using StellaOps.Router.Transport.Messaging;
|
||||
using StellaOps.Router.Transport.Messaging.Options;
|
||||
using StellaOps.Messaging.DependencyInjection;
|
||||
using StellaOps.Messaging.Transport.Valkey;
|
||||
using StellaOps.Router.AspNet;
|
||||
using StellaOps.Router.Common.Plugins;
|
||||
using StellaOps.Router.Transport.Tcp;
|
||||
using StellaOps.Router.Transport.Tls;
|
||||
using System.Net;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Security.Claims;
|
||||
using System.Text.Encodings.Web;
|
||||
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Security.Claims;
|
||||
using System.Text.Encodings.Web;
|
||||
|
||||
namespace StellaOps.Gateway.WebService.Security;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Gateway.WebService.Authorization;
|
||||
using StellaOps.Gateway.WebService.Configuration;
|
||||
@@ -7,9 +6,11 @@ using StellaOps.Router.Common.Abstractions;
|
||||
using StellaOps.Router.Common.Enums;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using StellaOps.Router.Gateway.OpenApi;
|
||||
using StellaOps.Router.Transport.Messaging;
|
||||
using StellaOps.Router.Transport.Tcp;
|
||||
using StellaOps.Router.Transport.Tls;
|
||||
using StellaOps.Router.Transport.Messaging;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Gateway.WebService.Services;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
using System.Diagnostics.Metrics;
|
||||
using System.Linq;
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
|
||||
namespace StellaOps.Gateway.WebService.Services;
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using System.Buffers;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Threading.Channels;
|
||||
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
using StellaOps.Router.Common.Enums;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using StellaOps.Router.Transport.Messaging;
|
||||
using StellaOps.Router.Transport.Tcp;
|
||||
using StellaOps.Router.Transport.Tls;
|
||||
using StellaOps.Router.Transport.Messaging;
|
||||
using System.Buffers;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Threading.Channels;
|
||||
|
||||
namespace StellaOps.Gateway.WebService.Services;
|
||||
|
||||
|
||||
@@ -8,3 +8,4 @@ Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229
|
||||
| AUDIT-0347-M | DONE | Revalidated 2026-01-07; maintainability audit for Router Gateway WebService. |
|
||||
| AUDIT-0347-T | DONE | Revalidated 2026-01-07; test coverage audit for Router Gateway WebService. |
|
||||
| AUDIT-0347-A | TODO | Pending approval (non-test project; revalidated 2026-01-07). |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
|
||||
8
src/Router/StellaOps.Router.Plugin.Unified/TASKS.md
Normal file
8
src/Router/StellaOps.Router.Plugin.Unified/TASKS.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# StellaOps.Router.Plugin.Unified Task Board
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20260130_002_Tools_csproj_remediation_solid_review.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| REMED-05 | TODO | Remediation checklist: docs/implplan/audits/csproj-standards/remediation/checklists/src/Router/StellaOps.Router.Plugin.Unified/StellaOps.Router.Plugin.Unified.md. |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
@@ -1,11 +1,12 @@
|
||||
namespace StellaOps.Router.Plugin.Unified;
|
||||
|
||||
using StellaOps.Plugin.Abstractions.Capabilities;
|
||||
using StellaOps.Plugin.Abstractions.Context;
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
using StellaOps.Router.Common.Enums;
|
||||
using StellaOps.Router.Common.Models;
|
||||
|
||||
namespace StellaOps.Router.Plugin.Unified;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Adapts ITransportClient to ITransportClientInstance.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
namespace StellaOps.Router.Plugin.Unified;
|
||||
|
||||
using System.Collections.Concurrent;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StellaOps.Plugin.Abstractions;
|
||||
@@ -10,6 +7,10 @@ using StellaOps.Plugin.Abstractions.Health;
|
||||
using StellaOps.Plugin.Abstractions.Lifecycle;
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
using StellaOps.Router.Common.Plugins;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace StellaOps.Router.Plugin.Unified;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Adapts an existing IRouterTransportPlugin to the unified IPlugin and ITransportCapability interfaces.
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
namespace StellaOps.Router.Plugin.Unified;
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StellaOps.Plugin.Abstractions;
|
||||
using StellaOps.Plugin.Abstractions.Capabilities;
|
||||
using StellaOps.Router.Common.Plugins;
|
||||
|
||||
namespace StellaOps.Router.Plugin.Unified;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Factory for creating unified transport plugin adapters from existing router transport plugins.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
namespace StellaOps.Router.Plugin.Unified;
|
||||
|
||||
using StellaOps.Plugin.Abstractions.Capabilities;
|
||||
using StellaOps.Plugin.Abstractions.Context;
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
|
||||
namespace StellaOps.Router.Plugin.Unified;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Adapts ITransportServer to ITransportServerInstance.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Security.Cryptography;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.InMemory;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.InMemory;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.InMemory;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Collections.Concurrent;
|
||||
using System.Threading.Channels;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Threading.Channels;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.InMemory;
|
||||
|
||||
|
||||
@@ -8,3 +8,4 @@ Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229
|
||||
| AUDIT-0381-M | DONE | Revalidated 2026-01-07; maintainability audit for InMemory transport. |
|
||||
| AUDIT-0381-T | DONE | Revalidated 2026-01-07; test coverage audit for InMemory transport. |
|
||||
| AUDIT-0381-A | TODO | Revalidated 2026-01-07 (open findings). |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using System.Security.Cryptography;
|
||||
using System.Text.Json;
|
||||
|
||||
using Dapper;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Postgres;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Postgres;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Text.Json;
|
||||
|
||||
using Dapper;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Postgres;
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text.Json;
|
||||
|
||||
using Dapper;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Postgres;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Text.Json;
|
||||
|
||||
using Dapper;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Postgres;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Postgres;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Text.Json;
|
||||
|
||||
using Dapper;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Postgres;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Text.Json;
|
||||
|
||||
using Dapper;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Postgres;
|
||||
|
||||
|
||||
@@ -8,3 +8,4 @@ Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229
|
||||
| AUDIT-0382-M | DONE | Revalidated 2026-01-07; maintainability audit for Postgres transport. |
|
||||
| AUDIT-0382-T | DONE | Revalidated 2026-01-07; test coverage audit for Postgres transport. |
|
||||
| AUDIT-0382-A | TODO | Revalidated 2026-01-07 (open findings). |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
|
||||
@@ -8,3 +8,4 @@ Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229
|
||||
| AUDIT-0383-M | DONE | Revalidated 2026-01-07; maintainability audit for Valkey transport. |
|
||||
| AUDIT-0383-T | DONE | Revalidated 2026-01-07; test coverage audit for Valkey transport. |
|
||||
| AUDIT-0383-A | TODO | Revalidated 2026-01-07 (open findings). |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StackExchange.Redis;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text.Json;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using StackExchange.Redis;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Valkey;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Valkey;
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using StackExchange.Redis;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Valkey;
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StackExchange.Redis;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text.Json;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using StackExchange.Redis;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Valkey;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using StackExchange.Redis;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Valkey;
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using RedisStreamPosition = StackExchange.Redis.StreamPosition;
|
||||
using StackExchange.Redis;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Buffers;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Text.Json;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using StackExchange.Redis;
|
||||
using RedisStreamPosition = StackExchange.Redis.StreamPosition;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Valkey;
|
||||
|
||||
@@ -233,9 +234,11 @@ public sealed class ValkeyMessageQueue<TMessage> : IMessageQueue<TMessage>, IAsy
|
||||
|
||||
var now = _timeProvider.GetUtcNow();
|
||||
var leaseDuration = request.LeaseDuration ?? _queueOptions.DefaultLeaseDuration;
|
||||
// DeliveryCount from XPENDING reflects the count before XCLAIM increments it.
|
||||
// Add 1 to account for the XCLAIM delivery that is about to happen.
|
||||
var attemptLookup = eligible.ToDictionary(
|
||||
info => info.MessageId.IsNullOrEmpty ? string.Empty : info.MessageId.ToString(),
|
||||
info => (int)Math.Max(1, info.DeliveryCount),
|
||||
info => (int)Math.Max(2, info.DeliveryCount + 1),
|
||||
StringComparer.Ordinal);
|
||||
|
||||
var leases = new List<IMessageLease<TMessage>>(claimed.Length);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Valkey;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using StackExchange.Redis;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Valkey;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using StackExchange.Redis;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Valkey;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using StackExchange.Redis;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Valkey;
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using System.Reflection;
|
||||
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using StellaOps.Messaging.Plugins;
|
||||
using System.Reflection;
|
||||
|
||||
namespace StellaOps.Messaging.DependencyInjection;
|
||||
|
||||
|
||||
@@ -8,3 +8,4 @@ Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229
|
||||
| AUDIT-0379-M | DONE | Revalidated 2026-01-07; maintainability audit for StellaOps.Messaging. |
|
||||
| AUDIT-0379-T | DONE | Revalidated 2026-01-07; test coverage audit for StellaOps.Messaging. |
|
||||
| AUDIT-0379-A | TODO | Revalidated 2026-01-07 (open findings). |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http.Metadata;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
using Microsoft.AspNetCore.Routing.Patterns;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace StellaOps.Microservice.AspNetCore;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
@@ -9,6 +7,9 @@ using Microsoft.AspNetCore.Routing.Patterns;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Router.Common.Frames;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Microservice.AspNetCore;
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using System.Security.Claims;
|
||||
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Authorization.Infrastructure;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace StellaOps.Microservice.AspNetCore;
|
||||
|
||||
|
||||
@@ -8,3 +8,4 @@ Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229
|
||||
| AUDIT-0388-M | DONE | Revalidated 2026-01-07; maintainability audit for StellaOps.Microservice.AspNetCore. |
|
||||
| AUDIT-0388-T | DONE | Revalidated 2026-01-07; test coverage audit for StellaOps.Microservice.AspNetCore. |
|
||||
| AUDIT-0388-A | TODO | Revalidated 2026-01-07 (open findings). |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Text;
|
||||
|
||||
using Microsoft.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace StellaOps.Microservice.SourceGen;
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using System.Collections.Immutable;
|
||||
using System.Text;
|
||||
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
using Microsoft.CodeAnalysis.Text;
|
||||
using System.Collections.Immutable;
|
||||
using System.Text;
|
||||
|
||||
namespace StellaOps.Microservice.SourceGen;
|
||||
|
||||
|
||||
@@ -8,3 +8,4 @@ Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229
|
||||
| AUDIT-0390-M | DONE | Revalidated 2026-01-07; maintainability audit for StellaOps.Microservice.SourceGen. |
|
||||
| AUDIT-0390-T | DONE | Revalidated 2026-01-07; test coverage audit for StellaOps.Microservice.SourceGen. |
|
||||
| AUDIT-0390-A | TODO | Revalidated 2026-01-07 (open findings). |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
using StellaOps.Microservice.Validation;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using StellaOps.Microservice.Validation;
|
||||
|
||||
namespace StellaOps.Microservice.Endpoints;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Reflection;
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Reflection;
|
||||
|
||||
namespace StellaOps.Microservice;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace StellaOps.Microservice;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Globalization;
|
||||
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Globalization;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace StellaOps.Microservice;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Reflection;
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Reflection;
|
||||
|
||||
namespace StellaOps.Microservice;
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Microservice.Validation;
|
||||
using StellaOps.Router.Common.Frames;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Microservice;
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using System.Collections.Concurrent;
|
||||
using System.Text;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
using StellaOps.Router.Common.Enums;
|
||||
using StellaOps.Router.Common.Frames;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Text;
|
||||
|
||||
namespace StellaOps.Microservice;
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using System.Reflection;
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using StellaOps.Microservice.Validation;
|
||||
using System.Reflection;
|
||||
|
||||
namespace StellaOps.Microservice;
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
using System.Threading.Channels;
|
||||
|
||||
namespace StellaOps.Microservice.Streaming;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
using System.Threading.Channels;
|
||||
|
||||
namespace StellaOps.Microservice.Streaming;
|
||||
|
||||
@@ -9,3 +9,4 @@ Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229
|
||||
| AUDIT-0387-T | DONE | Revalidated 2026-01-07; test coverage audit for StellaOps.Microservice. |
|
||||
| AUDIT-0387-A | DONE | Applied 2026-01-13; superseded by AUDIT-0598-A. |
|
||||
| AUDIT-0598-A | DONE | Applied 2026-01-13; hotlist fixes and tests. |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Text.Json;
|
||||
|
||||
using Json.Schema;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Microservice.Validation;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Text.Json;
|
||||
|
||||
using Json.Schema;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Microservice.Validation;
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
|
||||
using Json.Schema;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using Json.Schema;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace StellaOps.Microservice.Validation;
|
||||
|
||||
|
||||
8
src/Router/__Libraries/StellaOps.Router.AspNet/TASKS.md
Normal file
8
src/Router/__Libraries/StellaOps.Router.AspNet/TASKS.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# StellaOps.Router.AspNet Task Board
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20260130_002_Tools_csproj_remediation_solid_review.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| REMED-05 | TODO | Remediation checklist: docs/implplan/audits/csproj-standards/remediation/checklists/src/Router/__Libraries/StellaOps.Router.AspNet/StellaOps.Router.AspNet.md. |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Text.Json;
|
||||
|
||||
using StellaOps.Router.Common.Enums;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Router.Common.Frames;
|
||||
|
||||
|
||||
8
src/Router/__Libraries/StellaOps.Router.Common/TASKS.md
Normal file
8
src/Router/__Libraries/StellaOps.Router.Common/TASKS.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# StellaOps.Router.Common Task Board
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20260130_002_Tools_csproj_remediation_solid_review.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| REMED-05 | TODO | Remediation checklist: docs/implplan/audits/csproj-standards/remediation/checklists/src/Router/__Libraries/StellaOps.Router.Common/StellaOps.Router.Common.md. |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
8
src/Router/__Libraries/StellaOps.Router.Config/TASKS.md
Normal file
8
src/Router/__Libraries/StellaOps.Router.Config/TASKS.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# StellaOps.Router.Config Task Board
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20260130_002_Tools_csproj_remediation_solid_review.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| REMED-05 | TODO | Remediation checklist: docs/implplan/audits/csproj-standards/remediation/checklists/src/Router/__Libraries/StellaOps.Router.Config/StellaOps.Router.Config.md. |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace StellaOps.Router.Gateway.Authorization;
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using System.Net.Http.Json;
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Net.Http.Json;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Router.Gateway.Authorization;
|
||||
|
||||
|
||||
@@ -5,12 +5,13 @@
|
||||
// Description: Middleware for attestation verification in registry proxy mode
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Metrics;
|
||||
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Metrics;
|
||||
|
||||
namespace StellaOps.Router.Gateway.Middleware;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace StellaOps.Router.Gateway.Middleware;
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using System.Collections.Concurrent;
|
||||
using System.Diagnostics;
|
||||
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
using StellaOps.Router.Common.Frames;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace StellaOps.Router.Gateway.Middleware;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Text.Json.Nodes;
|
||||
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Text.Json.Nodes;
|
||||
|
||||
namespace StellaOps.Router.Gateway.OpenApi;
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
|
||||
namespace StellaOps.Router.Gateway.OpenApi;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Globalization;
|
||||
using System.Text.Json.Nodes;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using YamlDotNet.Serialization;
|
||||
using YamlDotNet.Serialization.NamingConventions;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace StellaOps.Router.Gateway.OpenApi;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
// Description: Distributed rate limiter using Valkey for environment-level protection
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace StellaOps.Router.Gateway.RateLimit;
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
// Description: ASP.NET Core middleware for rate limiting requests
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Router.Gateway.RateLimit;
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
using StellaOps.Router.Common.Enums;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using StellaOps.Router.Gateway.Configuration;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace StellaOps.Router.Gateway.Routing;
|
||||
|
||||
|
||||
@@ -5,14 +5,15 @@
|
||||
// Description: Service for submitting attestations to Rekor from Router
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Diagnostics.Metrics;
|
||||
using System.Net.Http.Json;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Channels;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace StellaOps.Router.Gateway.Services;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using StellaOps.Router.Common;
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace StellaOps.Router.Gateway.State;
|
||||
|
||||
|
||||
8
src/Router/__Libraries/StellaOps.Router.Gateway/TASKS.md
Normal file
8
src/Router/__Libraries/StellaOps.Router.Gateway/TASKS.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# StellaOps.Router.Gateway Task Board
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20260130_002_Tools_csproj_remediation_solid_review.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| REMED-05 | TODO | Remediation checklist: docs/implplan/audits/csproj-standards/remediation/checklists/src/Router/__Libraries/StellaOps.Router.Gateway/StellaOps.Router.Gateway.md. |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Threading.Channels;
|
||||
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Threading.Channels;
|
||||
|
||||
namespace StellaOps.Router.Transport.InMemory;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace StellaOps.Router.Transport.InMemory;
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using System.Buffers;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using static StellaOps.Router.Common.Models.CancelReasons;
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
using StellaOps.Router.Common.Enums;
|
||||
using StellaOps.Router.Common.Frames;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using static StellaOps.Router.Common.Models.CancelReasons;
|
||||
using System.Buffers;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace StellaOps.Router.Transport.InMemory;
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
using StellaOps.Router.Common.Enums;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace StellaOps.Router.Transport.InMemory;
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# StellaOps.Router.Transport.InMemory Task Board
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20260130_002_Tools_csproj_remediation_solid_review.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| REMED-05 | TODO | Remediation checklist: docs/implplan/audits/csproj-standards/remediation/checklists/src/Router/__Libraries/StellaOps.Router.Transport.InMemory/StellaOps.Router.Transport.InMemory.md. |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Buffers;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Messaging;
|
||||
@@ -10,6 +8,9 @@ using StellaOps.Router.Common.Enums;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using StellaOps.Router.Transport.Messaging.Options;
|
||||
using StellaOps.Router.Transport.Messaging.Protocol;
|
||||
using System.Buffers;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Router.Transport.Messaging;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Concurrent;
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using StellaOps.Messaging;
|
||||
@@ -9,6 +8,8 @@ using StellaOps.Router.Common.Enums;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using StellaOps.Router.Transport.Messaging.Options;
|
||||
using StellaOps.Router.Transport.Messaging.Protocol;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace StellaOps.Router.Transport.Messaging;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace StellaOps.Router.Transport.Messaging.Protocol;
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# StellaOps.Router.Transport.Messaging Task Board
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20260130_002_Tools_csproj_remediation_solid_review.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| REMED-05 | TODO | Remediation checklist: docs/implplan/audits/csproj-standards/remediation/checklists/src/Router/__Libraries/StellaOps.Router.Transport.Messaging/StellaOps.Router.Transport.Messaging.md. |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Text;
|
||||
|
||||
using RabbitMQ.Client;
|
||||
using StellaOps.Router.Common.Enums;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Text;
|
||||
|
||||
namespace StellaOps.Router.Transport.RabbitMq;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using RabbitMQ.Client;
|
||||
@@ -6,6 +6,7 @@ using RabbitMQ.Client.Events;
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
using StellaOps.Router.Common.Enums;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace StellaOps.Router.Transport.RabbitMq;
|
||||
|
||||
@@ -90,8 +91,26 @@ public sealed class RabbitMqTransportClient : ITransportClient, IMicroserviceTra
|
||||
_connection = await factory.CreateConnectionAsync(cancellationToken);
|
||||
_channel = await _connection.CreateChannelAsync(cancellationToken: cancellationToken);
|
||||
|
||||
// Wire recovery event to re-establish topology and consumers after broker restart (Q9 quirk)
|
||||
_connection.RecoverySucceededAsync += OnConnectionRecoverySucceededAsync;
|
||||
_connection.ConnectionShutdownAsync += OnConnectionShutdownAsync;
|
||||
|
||||
await DeclareTopologyAsync(cancellationToken);
|
||||
await StartConsumerAsync(cancellationToken);
|
||||
await SendHelloFrameAsync(cancellationToken);
|
||||
|
||||
_logger.LogInformation(
|
||||
"Connected to RabbitMQ gateway at {Host}:{Port} as {ServiceName}/{Version}",
|
||||
_options.HostName,
|
||||
_options.Port,
|
||||
instance.ServiceName,
|
||||
instance.Version);
|
||||
}
|
||||
|
||||
private async Task DeclareTopologyAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
// Set QoS
|
||||
await _channel.BasicQosAsync(
|
||||
await _channel!.BasicQosAsync(
|
||||
prefetchSize: 0,
|
||||
prefetchCount: _options.PrefetchCount,
|
||||
global: false,
|
||||
@@ -127,18 +146,22 @@ public sealed class RabbitMqTransportClient : ITransportClient, IMicroserviceTra
|
||||
exchange: _options.ResponseExchange,
|
||||
routingKey: _instanceId,
|
||||
cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
// Start consuming responses
|
||||
var consumer = new AsyncEventingBasicConsumer(_channel);
|
||||
private async Task StartConsumerAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
var consumer = new AsyncEventingBasicConsumer(_channel!);
|
||||
consumer.ReceivedAsync += OnMessageReceivedAsync;
|
||||
|
||||
await _channel.BasicConsumeAsync(
|
||||
queue: _responseQueueName,
|
||||
await _channel!.BasicConsumeAsync(
|
||||
queue: _responseQueueName!,
|
||||
autoAck: true,
|
||||
consumer: consumer,
|
||||
cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
// Send HELLO frame
|
||||
private async Task SendHelloFrameAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
var helloFrame = new Frame
|
||||
{
|
||||
Type = FrameType.Hello,
|
||||
@@ -146,13 +169,33 @@ public sealed class RabbitMqTransportClient : ITransportClient, IMicroserviceTra
|
||||
Payload = ReadOnlyMemory<byte>.Empty
|
||||
};
|
||||
await SendToGatewayAsync(helloFrame, cancellationToken);
|
||||
}
|
||||
|
||||
_logger.LogInformation(
|
||||
"Connected to RabbitMQ gateway at {Host}:{Port} as {ServiceName}/{Version}",
|
||||
_options.HostName,
|
||||
_options.Port,
|
||||
instance.ServiceName,
|
||||
instance.Version);
|
||||
private async Task OnConnectionRecoverySucceededAsync(object sender, EventArgs e)
|
||||
{
|
||||
_logger.LogInformation("RabbitMQ connection recovered, re-establishing topology and consumer");
|
||||
try
|
||||
{
|
||||
_channel = await _connection!.CreateChannelAsync();
|
||||
await DeclareTopologyAsync(CancellationToken.None);
|
||||
await StartConsumerAsync(CancellationToken.None);
|
||||
await SendHelloFrameAsync(CancellationToken.None);
|
||||
_logger.LogInformation("RabbitMQ topology and consumer re-established after recovery");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Failed to re-establish topology after RabbitMQ recovery");
|
||||
}
|
||||
}
|
||||
|
||||
private Task OnConnectionShutdownAsync(object sender, ShutdownEventArgs e)
|
||||
{
|
||||
_logger.LogWarning(
|
||||
"RabbitMQ connection shutdown: {ReplyCode} {ReplyText}, initiator: {Initiator}",
|
||||
e.ReplyCode,
|
||||
e.ReplyText,
|
||||
e.Initiator);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private async Task OnMessageReceivedAsync(object sender, BasicDeliverEventArgs e)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using RabbitMQ.Client;
|
||||
@@ -6,6 +6,7 @@ using RabbitMQ.Client.Events;
|
||||
using StellaOps.Router.Common.Abstractions;
|
||||
using StellaOps.Router.Common.Enums;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace StellaOps.Router.Transport.RabbitMq;
|
||||
|
||||
@@ -82,8 +83,22 @@ public sealed class RabbitMqTransportServer : ITransportServer, IAsyncDisposable
|
||||
_connection = await factory.CreateConnectionAsync(cancellationToken);
|
||||
_channel = await _connection.CreateChannelAsync(cancellationToken: cancellationToken);
|
||||
|
||||
// Wire recovery event to re-establish topology and consumers after broker restart (Q9 quirk)
|
||||
_connection.RecoverySucceededAsync += OnConnectionRecoverySucceededAsync;
|
||||
_connection.ConnectionShutdownAsync += OnConnectionShutdownAsync;
|
||||
|
||||
await DeclareTopologyAsync(cancellationToken);
|
||||
await StartConsumerAsync(cancellationToken);
|
||||
|
||||
_logger.LogInformation(
|
||||
"RabbitMQ transport server started, consuming from {Queue}",
|
||||
_requestQueueName);
|
||||
}
|
||||
|
||||
private async Task DeclareTopologyAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
// Set QoS (prefetch count)
|
||||
await _channel.BasicQosAsync(
|
||||
await _channel!.BasicQosAsync(
|
||||
prefetchSize: 0,
|
||||
prefetchCount: _options.PrefetchCount,
|
||||
global: false,
|
||||
@@ -118,20 +133,44 @@ public sealed class RabbitMqTransportServer : ITransportServer, IAsyncDisposable
|
||||
exchange: _options.RequestExchange,
|
||||
routingKey: _nodeId,
|
||||
cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
// Start consuming
|
||||
var consumer = new AsyncEventingBasicConsumer(_channel);
|
||||
private async Task StartConsumerAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
var consumer = new AsyncEventingBasicConsumer(_channel!);
|
||||
consumer.ReceivedAsync += OnMessageReceivedAsync;
|
||||
|
||||
await _channel.BasicConsumeAsync(
|
||||
queue: _requestQueueName,
|
||||
await _channel!.BasicConsumeAsync(
|
||||
queue: _requestQueueName!,
|
||||
autoAck: true, // At-most-once delivery
|
||||
consumer: consumer,
|
||||
cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
_logger.LogInformation(
|
||||
"RabbitMQ transport server started, consuming from {Queue}",
|
||||
_requestQueueName);
|
||||
private async Task OnConnectionRecoverySucceededAsync(object sender, EventArgs e)
|
||||
{
|
||||
_logger.LogInformation("RabbitMQ server connection recovered, re-establishing topology and consumer");
|
||||
try
|
||||
{
|
||||
_channel = await _connection!.CreateChannelAsync();
|
||||
await DeclareTopologyAsync(CancellationToken.None);
|
||||
await StartConsumerAsync(CancellationToken.None);
|
||||
_logger.LogInformation("RabbitMQ server topology and consumer re-established after recovery");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Failed to re-establish server topology after RabbitMQ recovery");
|
||||
}
|
||||
}
|
||||
|
||||
private Task OnConnectionShutdownAsync(object sender, ShutdownEventArgs e)
|
||||
{
|
||||
_logger.LogWarning(
|
||||
"RabbitMQ server connection shutdown: {ReplyCode} {ReplyText}, initiator: {Initiator}",
|
||||
e.ReplyCode,
|
||||
e.ReplyText,
|
||||
e.Initiator);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private async Task OnMessageReceivedAsync(object sender, BasicDeliverEventArgs e)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# StellaOps.Router.Transport.RabbitMq Task Board
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20260130_002_Tools_csproj_remediation_solid_review.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| REMED-05 | TODO | Remediation checklist: docs/implplan/audits/csproj-standards/remediation/checklists/src/Router/__Libraries/StellaOps.Router.Transport.RabbitMq/StellaOps.Router.Transport.RabbitMq.md. |
|
||||
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Buffers.Binary;
|
||||
|
||||
using StellaOps.Router.Common.Enums;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Buffers.Binary;
|
||||
|
||||
namespace StellaOps.Router.Transport.Tcp;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using StellaOps.Router.Common.Models;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace StellaOps.Router.Transport.Tcp;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user