Refactor and enhance tests for call graph extractors and connection management
- Updated JavaScriptCallGraphExtractorTests to improve naming conventions and test cases for Azure Functions, CLI commands, and socket handling. - Modified NodeCallGraphExtractorTests to correctly assert exceptions for null inputs. - Enhanced WitnessModalComponent tests in Angular to use Jasmine spies and improved assertions for path visualization and signature verification. - Added ConnectionState property for tracking connection establishment time in Router.Common. - Implemented validation for HelloPayload in ConnectionManager to ensure required fields are present. - Introduced RabbitMqContainerFixture method for restarting RabbitMQ container during tests. - Added integration tests for RabbitMq to verify connection recovery after broker restarts. - Created new BinaryCallGraphExtractorTests, GoCallGraphExtractorTests, and PythonCallGraphExtractorTests for comprehensive coverage of binary, Go, and Python call graph extraction functionalities. - Developed ConnectionManagerTests to validate connection handling, including rejection of invalid hello messages and proper cleanup on client disconnects.
This commit is contained in:
@@ -5,5 +5,5 @@ These sprint plans were deleted on 2025-12-05 during test refactors. They have b
|
||||
## Archive Audit Notes (2025-12-19)
|
||||
|
||||
- Task tables in archived sprints were audited against current code/tests and updated where clearly implemented.
|
||||
- Remaining `TODO`/`BLOCKED` rows represent real gaps (mostly missing wiring and/or failing or missing tests).
|
||||
- All router sprint tasks in this archive are now marked `DONE` with corresponding implementation/tests.
|
||||
- `SPRINT_INDEX.md` reflects the audit status; “working directory” paths were corrected where the implementation moved into `src/__Libraries/*`.
|
||||
|
||||
@@ -29,7 +29,7 @@ Implement connection handling in the Gateway: processing HELLO frames from micro
|
||||
| 1 | CON-001 | DONE | Create `IConnectionHandler` interface | Superseded by event-driven transport handling (no `IConnectionHandler` abstraction) |
|
||||
| 2 | CON-002 | DONE | Implement `ConnectionHandler` | Superseded by `InMemoryTransportServer` frame processing + gateway `ConnectionManager` |
|
||||
| 3 | CON-010 | DONE | Implement HELLO frame processing | InMemory server handles HELLO in `src/__Libraries/StellaOps.Router.Transport.InMemory/InMemoryTransportServer.cs` and gateway registers via `src/__Libraries/StellaOps.Router.Gateway/Services/ConnectionManager.cs` |
|
||||
| 4 | CON-011 | TODO | Validate HELLO payload | Not implemented (no explicit HelloPayload validation; real transports still send empty payloads) |
|
||||
| 4 | CON-011 | DONE | Validate HELLO payload | Validation + invalid-HELLO rejection implemented in `src/__Libraries/StellaOps.Router.Gateway/Services/ConnectionManager.cs` (closes channel on invalid payload) |
|
||||
| 5 | CON-012 | DONE | Register connection in IGlobalRoutingState | `src/__Libraries/StellaOps.Router.Gateway/Services/ConnectionManager.cs` |
|
||||
| 6 | CON-013 | DONE | Build endpoint index from HELLO | Index built when `ConnectionState` is registered (HELLO-triggered) via `src/__Libraries/StellaOps.Router.Gateway/State/InMemoryRoutingState.cs` |
|
||||
| 7 | CON-020 | DONE | Create `TransportServerHost` hosted service | Implemented as gateway `ConnectionManager` hosted service |
|
||||
@@ -39,10 +39,10 @@ Implement connection handling in the Gateway: processing HELLO frames from micro
|
||||
| 11 | CON-031 | DONE | Clean up endpoint index on disconnect | `src/__Libraries/StellaOps.Router.Gateway/State/InMemoryRoutingState.cs` |
|
||||
| 12 | CON-032 | DONE | Log connection lifecycle events | `src/__Libraries/StellaOps.Router.Gateway/Services/ConnectionManager.cs` + `src/__Libraries/StellaOps.Router.Transport.InMemory/InMemoryTransportServer.cs` |
|
||||
| 13 | CON-040 | DONE | Implement connection ID generation | InMemory client uses GUID connection IDs |
|
||||
| 14 | CON-041 | TODO | Store connection metadata | No explicit connect-time stored (only `LastHeartbeatUtc`, `TransportType`) |
|
||||
| 14 | CON-041 | DONE | Store connection metadata | Added `ConnectedAtUtc` to `src/__Libraries/StellaOps.Router.Common/Models/ConnectionState.cs` |
|
||||
| 15 | CON-050 | DONE | Write integration tests for HELLO flow | Covered by `examples/router/tests/Examples.Integration.Tests` (microservices register + routes resolve) |
|
||||
| 16 | CON-051 | TODO | Write tests for connection cleanup | Not present |
|
||||
| 17 | CON-052 | TODO | Write tests for multiple connections from same service | Not present |
|
||||
| 16 | CON-051 | DONE | Write tests for connection cleanup | Added in `tests/StellaOps.Router.Gateway.Tests/ConnectionManagerTests.cs` |
|
||||
| 17 | CON-052 | DONE | Write tests for multiple connections from same service | Added in `tests/StellaOps.Router.Gateway.Tests/ConnectionManagerTests.cs` |
|
||||
|
||||
## Connection Lifecycle
|
||||
|
||||
@@ -211,10 +211,11 @@ Before marking this sprint DONE:
|
||||
| 2025-12-19 | Archive audit: updated working directory and task statuses based on current gateway/in-memory transport implementation. | Planning |
|
||||
| 2025-12-19 | Archive audit: examples integration tests now pass (covers HELLO+registration for InMemory). | Planning |
|
||||
| 2025-12-19 | Re-audit: marked CON-010/CON-013 DONE for InMemory (HELLO triggers registration + endpoint indexing). | Implementer |
|
||||
| 2025-12-19 | Started closing remaining Gateway connection gaps (HELLO validation, metadata, cleanup/multi-connection tests). | Implementer |
|
||||
| 2025-12-19 | Completed HELLO validation + connection cleanup/multi-connection tests; marked remaining tasks DONE. | Implementer |
|
||||
|
||||
## Decisions & Risks
|
||||
|
||||
- Initial health status is `Unknown` until first heartbeat
|
||||
- Connection ID format: GUID for InMemory, transport-specific for real transports
|
||||
- HELLO payload parsing/validation is not implemented (transport currently does not carry HelloPayload)
|
||||
- Duplicate HELLO semantics are not validated by tests
|
||||
- HELLO payload serialization for real transports is still minimal (current in-memory and gateway validation covers the in-process demo path).
|
||||
|
||||
@@ -54,7 +54,7 @@ Implement the RabbitMQ transport plugin. Uses message queue infrastructure for r
|
||||
| 26 | RMQ-070 | DONE | Create RabbitMqTransportOptions | Connection, queues, durability |
|
||||
| 27 | RMQ-071 | DONE | Create DI registration `AddRabbitMqTransport()` | |
|
||||
| 28 | RMQ-080 | DONE | Write integration tests with local RabbitMQ | Implemented in `src/__Libraries/__Tests/StellaOps.Router.Transport.RabbitMq.Tests/` (skipped unless `STELLAOPS_TEST_RABBITMQ=1`) |
|
||||
| 29 | RMQ-081 | TODO | Write tests for connection recovery | Connection recovery scenarios still untested (forced disconnect/reconnect assertions missing) |
|
||||
| 29 | RMQ-081 | DONE | Write tests for connection recovery | Added opt-in integration coverage in `src/__Libraries/__Tests/StellaOps.Router.Transport.RabbitMq.Tests/RabbitMqIntegrationTests.cs` (broker restart + heartbeat publish/consume) |
|
||||
|
||||
## Queue/Exchange Topology
|
||||
|
||||
@@ -210,6 +210,8 @@ Before marking this sprint DONE:
|
||||
| 2025-12-05 | Code DONE but BLOCKED - RabbitMQ.Client NuGet package not available in local-nugets. Code written: RabbitMqTransportServer, RabbitMqTransportClient, RabbitMqFrameProtocol, RabbitMqTransportOptions, ServiceCollectionExtensions | Claude |
|
||||
| 2025-12-19 | Archive audit: RabbitMQ.Client now referenced and restores; reopened remaining test work as TODO (tests were failing build at audit time). | Planning |
|
||||
| 2025-12-19 | Archive audit: RabbitMQ tests now build and pass; integration tests are opt-in via `STELLAOPS_TEST_RABBITMQ=1`. | Planning |
|
||||
| 2025-12-19 | Started implementing RMQ-081 connection recovery integration coverage. | Implementer |
|
||||
| 2025-12-19 | Completed RMQ-081 by adding broker-restart recovery integration test (opt-in). | Implementer |
|
||||
|
||||
## Decisions & Risks
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
This document provides an overview of all sprints for implementing the StellaOps Router infrastructure. Sprints are organized for maximum agent independence while respecting dependencies.
|
||||
|
||||
> **Archive notice (2025-12-19):** This index lives under `docs/router/archived/` and is not an active tracker. Statuses and working directories were audited against current repo layout; remaining `TODO` items reflect real gaps (mostly missing wiring and/or failing tests).
|
||||
> **Archive notice (2025-12-19):** This index lives under `docs/router/archived/` and is not an active tracker. Statuses and working directories were audited against current repo layout; all tasks in this archive are now marked `DONE` with corresponding implementation/tests.
|
||||
|
||||
## Key Documents
|
||||
|
||||
@@ -130,7 +130,7 @@ These sprints can run in parallel:
|
||||
| 7000-0003-0002 | SDK Handlers | DONE | `src/__Libraries/StellaOps.Microservice/` |
|
||||
| 7000-0004-0001 | Gateway Core | DONE | `src/__Libraries/StellaOps.Router.Gateway/` |
|
||||
| 7000-0004-0002 | Gateway Middleware | DONE | `src/__Libraries/StellaOps.Router.Gateway/` |
|
||||
| 7000-0004-0003 | Gateway Connections | TODO | `src/__Libraries/StellaOps.Router.Gateway/` + `src/__Libraries/StellaOps.Router.Transport.InMemory/` |
|
||||
| 7000-0004-0003 | Gateway Connections | DONE | `src/__Libraries/StellaOps.Router.Gateway/` + `src/__Libraries/StellaOps.Router.Transport.InMemory/` |
|
||||
| 7000-0005-0001 | Heartbeat & Health | DONE | `src/__Libraries/StellaOps.Microservice/` + `src/__Libraries/StellaOps.Router.Gateway/` |
|
||||
| 7000-0005-0002 | Routing Algorithm | DONE | `src/__Libraries/StellaOps.Router.Gateway/` |
|
||||
| 7000-0005-0003 | Cancellation | DONE | `src/__Libraries/StellaOps.Router.Gateway/` + `src/__Libraries/StellaOps.Router.Transport.InMemory/` |
|
||||
@@ -139,7 +139,7 @@ These sprints can run in parallel:
|
||||
| 7000-0006-0001 | TCP Transport | DONE | `src/__Libraries/StellaOps.Router.Transport.Tcp/` |
|
||||
| 7000-0006-0002 | TLS Transport | DONE | `src/__Libraries/StellaOps.Router.Transport.Tls/` |
|
||||
| 7000-0006-0003 | UDP Transport | DONE | `src/__Libraries/StellaOps.Router.Transport.Udp/` |
|
||||
| 7000-0006-0004 | RabbitMQ Transport | TODO | `src/__Libraries/StellaOps.Router.Transport.RabbitMq/` |
|
||||
| 7000-0006-0004 | RabbitMQ Transport | DONE | `src/__Libraries/StellaOps.Router.Transport.RabbitMq/` |
|
||||
| 7000-0007-0001 | Router Config | DONE | `src/__Libraries/StellaOps.Router.Config/` |
|
||||
| 7000-0007-0002 | Microservice YAML | DONE | `src/__Libraries/StellaOps.Microservice/` |
|
||||
| 7000-0008-0001 | Authority Integration | DONE | `src/__Libraries/StellaOps.Router.Gateway/` + `src/Authority/*` |
|
||||
|
||||
Reference in New Issue
Block a user