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:
@@ -356,6 +356,7 @@ SPRINT_3600_0004 (UI) Integration
|
||||
|---|---|---|
|
||||
| 2025-12-17 | Created master sprint from advisory analysis | Agent |
|
||||
| 2025-12-18 | Marked SPRINT_3600_0002 + SPRINT_3600_0003 as DONE (call graph + drift engine + storage + API); UI sprint remains TODO. | Agent |
|
||||
| 2025-12-19 | RDRIFT-MASTER-0006 DONE: Created docs/airgap/reachability-drift-airgap-workflows.md with comprehensive air-gap workflow documentation covering offline call graph extraction, drift detection without live endpoints, and portable bundle formats. | Agent |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -85,3 +85,11 @@ Implement Node.js call graph extraction using Babel AST parsing via an external
|
||||
- [x] Express/Fastify/NestJS entrypoints detected
|
||||
- [x] socket.io/Lambda entrypoints detected
|
||||
- [x] Node.js sinks matched (child_process, eval)
|
||||
|
||||
---
|
||||
|
||||
## Execution Log
|
||||
|
||||
| Date (UTC) | Update | Owner |
|
||||
|------------|--------|-------|
|
||||
| 2025-12-19 | NCG-012 DONE: Created JavaScriptCallGraphExtractorTests.cs with comprehensive unit tests for JsEntrypointClassifier, JsSinkMatcher, and extractor properties. Tests cover HTTP handlers, Lambda, CLI, GraphQL, NestJS patterns, and sink matching for CmdExec, SqlRaw, UnsafeDeser, PathTraversal, CodeInjection. All tests pass. | Agent |
|
||||
|
||||
@@ -242,8 +242,8 @@ This sprint addresses architectural alignment between StellaOps and the referenc
|
||||
| 1.2 Update Package References | DONE | Updated to CycloneDX.Core 10.0.2 (kept 1.6 spec) |
|
||||
| 1.3 Update Specification Version | BLOCKED | Awaiting CycloneDX.Core v1_7 support |
|
||||
| 1.4 Update Media Type Constants | BLOCKED | Awaiting CycloneDX.Core v1_7 support |
|
||||
| 1.5 Update Documentation | TODO | 2 docs files |
|
||||
| 1.6 Integration Testing | TODO | Scanner.Emit.Tests |
|
||||
| 1.5 Update Documentation | BLOCKED | Awaiting CycloneDX.Core v1_7 support; docs should reflect actual code |
|
||||
| 1.6 Integration Testing | DONE | Scanner.Emit.Tests: 35/35 passed (CycloneDX 1.6) |
|
||||
| 1.7 Validate Acceptance Criteria | BLOCKED | Awaiting 1.7 support |
|
||||
| 2.1 Create Signal Mapping Reference | DONE | `docs/architecture/signal-contract-mapping.md` (965 lines) |
|
||||
| 2.2 Document Idempotency Mechanisms | DONE | Section 4 in signal-contract-mapping.md |
|
||||
@@ -272,6 +272,7 @@ This sprint addresses architectural alignment between StellaOps and the referenc
|
||||
| 2025-12-19 | Fixed Scanner.CallGraph build errors (cross-sprint fix): Extended SinkCategory enum, added EntrypointType.Lambda/EventHandler, created shared CallGraphEdgeComparer, fixed all language extractors (Java/Go/JS/Python). | Agent |
|
||||
| 2025-12-19 | Fixed additional build errors: PHP/Ruby/Binary extractors accessibility + SinkCategory values. Added BinaryEntrypointClassifier. All tests pass (35/35). | Agent |
|
||||
| 2025-12-19 | Task 3.3 complete: Added EPSS versioning clarification section to docs/guides/epss-integration-v4.md explaining model_date vs. formal version numbers. | Agent |
|
||||
| 2025-12-19 | Task 1.6 DONE: Ran Scanner.Emit.Tests integration tests - 35/35 passed for CycloneDX 1.6 code path. Task 1.5 set BLOCKED pending 1.7 code upgrade. | Agent |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -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