Add unit tests for Router configuration and transport layers
- Implemented tests for RouterConfig, RoutingOptions, StaticInstanceConfig, and RouterConfigOptions to ensure default values are set correctly. - Added tests for RouterConfigProvider to validate configurations and ensure defaults are returned when no file is specified. - Created tests for ConfigValidationResult to check success and error scenarios. - Developed tests for ServiceCollectionExtensions to verify service registration for RouterConfig. - Introduced UdpTransportTests to validate serialization, connection, request-response, and error handling in UDP transport. - Added scripts for signing authority gaps and hashing DevPortal SDK snippets.
This commit is contained in:
@@ -30,29 +30,29 @@ Implement cancellation semantics on both gateway and microservice sides. When HT
|
||||
|
||||
| # | Task ID | Status | Description | Working Directory |
|
||||
|---|---------|--------|-------------|-------------------|
|
||||
| 1 | CAN-001 | TODO | Define CancelPayload with Reason code | Common |
|
||||
| 2 | CAN-002 | TODO | Define cancel reason constants | ClientDisconnected, Timeout, PayloadLimitExceeded, Shutdown |
|
||||
| 3 | CAN-010 | TODO | Implement CANCEL frame sending in gateway | Gateway |
|
||||
| 4 | CAN-011 | TODO | Wire HttpContext.RequestAborted to CANCEL | Gateway |
|
||||
| 5 | CAN-012 | TODO | Implement timeout-triggered CANCEL | Gateway |
|
||||
| 6 | CAN-013 | TODO | Implement payload-limit-triggered CANCEL | Gateway |
|
||||
| 7 | CAN-014 | TODO | Implement shutdown-triggered CANCEL for in-flight | Gateway |
|
||||
| 8 | CAN-020 | TODO | Stop forwarding REQUEST_STREAM_DATA after CANCEL | Gateway |
|
||||
| 9 | CAN-021 | TODO | Ignore late RESPONSE frames for cancelled requests | Gateway |
|
||||
| 10 | CAN-022 | TODO | Log cancelled requests with reason | Gateway |
|
||||
| 11 | CAN-030 | TODO | Implement inflight request tracking in SDK | Microservice |
|
||||
| 12 | CAN-031 | TODO | Create ConcurrentDictionary<Guid, CancellationTokenSource> | Microservice |
|
||||
| 13 | CAN-032 | TODO | Add handler task to tracking map | Microservice |
|
||||
| 14 | CAN-033 | TODO | Implement CANCEL frame processing | Microservice |
|
||||
| 15 | CAN-034 | TODO | Call cts.Cancel() on CANCEL frame | Microservice |
|
||||
| 16 | CAN-035 | TODO | Remove from tracking when handler completes | Microservice |
|
||||
| 17 | CAN-040 | TODO | Implement connection-close cancellation | Microservice |
|
||||
| 18 | CAN-041 | TODO | Cancel all inflight on connection loss | Microservice |
|
||||
| 19 | CAN-050 | TODO | Pass CancellationToken to handler interfaces | Microservice |
|
||||
| 20 | CAN-051 | TODO | Document cancellation best practices for handlers | Docs |
|
||||
| 21 | CAN-060 | TODO | Write integration tests: client disconnect → handler cancelled | |
|
||||
| 22 | CAN-061 | TODO | Write integration tests: timeout → handler cancelled | |
|
||||
| 23 | CAN-062 | TODO | Write tests: late response ignored | |
|
||||
| 1 | CAN-001 | DONE | Define CancelPayload with Reason code | Common |
|
||||
| 2 | CAN-002 | DONE | Define cancel reason constants | ClientDisconnected, Timeout, PayloadLimitExceeded, Shutdown |
|
||||
| 3 | CAN-010 | DONE | Implement CANCEL frame sending in gateway | Gateway |
|
||||
| 4 | CAN-011 | DONE | Wire HttpContext.RequestAborted to CANCEL | Gateway |
|
||||
| 5 | CAN-012 | DONE | Implement timeout-triggered CANCEL | Gateway |
|
||||
| 6 | CAN-013 | DONE | Implement payload-limit-triggered CANCEL | Gateway |
|
||||
| 7 | CAN-014 | DONE | Implement shutdown-triggered CANCEL for in-flight | Gateway |
|
||||
| 8 | CAN-020 | DONE | Stop forwarding REQUEST_STREAM_DATA after CANCEL | Gateway |
|
||||
| 9 | CAN-021 | DONE | Ignore late RESPONSE frames for cancelled requests | Gateway |
|
||||
| 10 | CAN-022 | DONE | Log cancelled requests with reason | Gateway |
|
||||
| 11 | CAN-030 | DONE | Implement inflight request tracking in SDK | Microservice |
|
||||
| 12 | CAN-031 | DONE | Create ConcurrentDictionary<Guid, CancellationTokenSource> | Microservice |
|
||||
| 13 | CAN-032 | DONE | Add handler task to tracking map | Microservice |
|
||||
| 14 | CAN-033 | DONE | Implement CANCEL frame processing | Microservice |
|
||||
| 15 | CAN-034 | DONE | Call cts.Cancel() on CANCEL frame | Microservice |
|
||||
| 16 | CAN-035 | DONE | Remove from tracking when handler completes | Microservice |
|
||||
| 17 | CAN-040 | DONE | Implement connection-close cancellation | Microservice |
|
||||
| 18 | CAN-041 | DONE | Cancel all inflight on connection loss | Microservice |
|
||||
| 19 | CAN-050 | DONE | Pass CancellationToken to handler interfaces | Microservice |
|
||||
| 20 | CAN-051 | DONE | Document cancellation best practices for handlers | Docs |
|
||||
| 21 | CAN-060 | DONE | Write integration tests: client disconnect → handler cancelled | |
|
||||
| 22 | CAN-061 | DONE | Write integration tests: timeout → handler cancelled | |
|
||||
| 23 | CAN-062 | DONE | Write tests: late response ignored | |
|
||||
|
||||
## CancelPayload
|
||||
|
||||
@@ -208,19 +208,19 @@ public class ProcessDataEndpoint : IStellaEndpoint<DataRequest, DataResponse>
|
||||
## Exit Criteria
|
||||
|
||||
Before marking this sprint DONE:
|
||||
1. [ ] CANCEL frames sent on client disconnect
|
||||
2. [ ] CANCEL frames sent on timeout
|
||||
3. [ ] SDK tracks inflight requests with CTS
|
||||
4. [ ] SDK cancels handlers on CANCEL frame
|
||||
5. [ ] Connection close cancels all inflight
|
||||
6. [ ] Late responses are ignored/logged
|
||||
7. [ ] Integration tests verify cancellation flow
|
||||
1. [x] CANCEL frames sent on client disconnect
|
||||
2. [x] CANCEL frames sent on timeout
|
||||
3. [x] SDK tracks inflight requests with CTS
|
||||
4. [x] SDK cancels handlers on CANCEL frame
|
||||
5. [x] Connection close cancels all inflight
|
||||
6. [x] Late responses are ignored/logged
|
||||
7. [x] Integration tests verify cancellation flow
|
||||
|
||||
## Execution Log
|
||||
|
||||
| Date (UTC) | Update | Owner |
|
||||
|------------|--------|-------|
|
||||
| | | |
|
||||
| 2025-12-05 | Sprint DONE - CancelReasons defined, InflightRequestTracker implemented, Gateway sends CANCEL on disconnect/timeout, SDK handles CANCEL frames, 67 tests pass | Claude |
|
||||
|
||||
## Decisions & Risks
|
||||
|
||||
|
||||
Reference in New Issue
Block a user