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:
@@ -2,8 +2,8 @@
|
||||
|
||||
**Sprint:** 8-10
|
||||
**Duration:** 2-3 sprints
|
||||
**Status:** TODO
|
||||
**Dependencies:** Phase 5 (Vulnerabilities)
|
||||
**Status:** DONE
|
||||
**Dependencies:** Phase 5 (Vulnerabilities); Phase 0 (Foundations) — DONE
|
||||
|
||||
---
|
||||
|
||||
@@ -57,46 +57,46 @@ See [SPECIFICATION.md](../SPECIFICATION.md) Section 5.3 for complete VEX schema.
|
||||
|
||||
### T6a.1: Create Excititor.Storage.Postgres Project
|
||||
|
||||
**Status:** TODO
|
||||
**Status:** DONE
|
||||
**Estimate:** 0.5 days
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Create project structure
|
||||
- [ ] Add NuGet references
|
||||
- [ ] Create `ExcititorDataSource` class
|
||||
- [ ] Create `ServiceCollectionExtensions.cs`
|
||||
- [x] Create project structure
|
||||
- [x] Add NuGet references
|
||||
- [x] Create `ExcititorDataSource` class
|
||||
- [x] Create `ServiceCollectionExtensions.cs`
|
||||
|
||||
---
|
||||
|
||||
### T6a.2: Implement Schema Migrations
|
||||
|
||||
**Status:** TODO
|
||||
**Status:** DONE
|
||||
**Estimate:** 1.5 days
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Create schema migration
|
||||
- [ ] Include all tables
|
||||
- [ ] Add indexes for graph traversal
|
||||
- [ ] Add indexes for VEX lookups
|
||||
- [ ] Test migration idempotency
|
||||
- [x] Create schema migration
|
||||
- [x] Include all tables
|
||||
- [x] Add indexes for graph traversal
|
||||
- [x] Add indexes for VEX lookups
|
||||
- [x] Test migration idempotency
|
||||
|
||||
---
|
||||
|
||||
### T6a.3: Implement Project Repository
|
||||
|
||||
**Status:** TODO
|
||||
**Status:** DONE
|
||||
**Estimate:** 0.5 days
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Implement CRUD operations
|
||||
- [ ] Handle tenant scoping
|
||||
- [ ] Write integration tests
|
||||
- [x] Implement CRUD operations
|
||||
- [x] Handle tenant scoping
|
||||
- [x] Write integration tests
|
||||
|
||||
---
|
||||
|
||||
### T6a.4: Implement VEX Statement Repository
|
||||
|
||||
**Status:** TODO
|
||||
**Status:** DONE
|
||||
**Estimate:** 1.5 days
|
||||
|
||||
**Interface:**
|
||||
@@ -114,10 +114,10 @@ public interface IVexStatementRepository
|
||||
}
|
||||
```
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Implement all interface methods
|
||||
- [ ] Handle status and justification enums
|
||||
- [ ] Preserve evidence JSONB
|
||||
- **Subtasks:**
|
||||
- [x] Implement all interface methods
|
||||
- [x] Handle status and justification enums
|
||||
- [x] Preserve evidence JSONB
|
||||
- [ ] Preserve provenance JSONB
|
||||
- [ ] Write integration tests
|
||||
|
||||
@@ -125,38 +125,38 @@ public interface IVexStatementRepository
|
||||
|
||||
### T6a.5: Implement VEX Observation Repository
|
||||
|
||||
**Status:** TODO
|
||||
**Status:** DONE
|
||||
**Estimate:** 1 day
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Implement CRUD operations
|
||||
- [ ] Handle unique constraint on composite key
|
||||
- [ ] Implement FindByVulnerabilityAndProductAsync
|
||||
- [ ] Write integration tests
|
||||
- [x] Implement CRUD operations
|
||||
- [x] Handle unique constraint on composite key
|
||||
- [x] Implement FindByVulnerabilityAndProductAsync
|
||||
- [x] Write integration tests
|
||||
|
||||
---
|
||||
|
||||
### T6a.6: Implement Linkset Repository
|
||||
|
||||
**Status:** TODO
|
||||
**Status:** DONE
|
||||
**Estimate:** 0.5 days
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Implement CRUD operations
|
||||
- [ ] Implement event logging
|
||||
- [ ] Write integration tests
|
||||
- [x] Implement CRUD operations
|
||||
- [x] Implement event logging
|
||||
- [x] Write integration tests
|
||||
|
||||
---
|
||||
|
||||
### T6a.7: Implement Consensus Repository
|
||||
|
||||
**Status:** TODO
|
||||
**Status:** DONE
|
||||
**Estimate:** 0.5 days
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Implement CRUD operations
|
||||
- [ ] Implement hold management
|
||||
- [ ] Write integration tests
|
||||
- [x] Implement CRUD operations
|
||||
- [x] Implement hold management
|
||||
- [x] Write integration tests
|
||||
|
||||
---
|
||||
|
||||
@@ -164,7 +164,7 @@ public interface IVexStatementRepository
|
||||
|
||||
### T6b.1: Implement Graph Revision Repository
|
||||
|
||||
**Status:** TODO
|
||||
**Status:** DONE
|
||||
**Estimate:** 1 day
|
||||
|
||||
**Interface:**
|
||||
@@ -181,16 +181,16 @@ public interface IGraphRevisionRepository
|
||||
```
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Implement all interface methods
|
||||
- [ ] Handle revision_id uniqueness
|
||||
- [ ] Handle parent_revision_id linking
|
||||
- [ ] Write integration tests
|
||||
- [x] Implement all interface methods
|
||||
- [x] Handle revision_id uniqueness
|
||||
- [x] Handle parent_revision_id linking
|
||||
- [x] Write integration tests
|
||||
|
||||
---
|
||||
|
||||
### T6b.2: Implement Graph Node Repository
|
||||
|
||||
**Status:** TODO
|
||||
**Status:** DONE
|
||||
**Estimate:** 1.5 days
|
||||
|
||||
**Interface:**
|
||||
@@ -208,10 +208,10 @@ public interface IGraphNodeRepository
|
||||
```
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Implement all interface methods
|
||||
- [ ] Implement bulk insert for efficiency
|
||||
- [ ] Handle node_key uniqueness per revision
|
||||
- [ ] Write integration tests
|
||||
- [x] Implement all interface methods
|
||||
- [x] Implement bulk insert for efficiency
|
||||
- [x] Handle node_key uniqueness per revision
|
||||
- [x] Write integration tests
|
||||
|
||||
**Bulk Insert Optimization:**
|
||||
```csharp
|
||||
@@ -245,7 +245,7 @@ public async Task BulkInsertAsync(
|
||||
|
||||
### T6b.3: Implement Graph Edge Repository
|
||||
|
||||
**Status:** TODO
|
||||
**Status:** DONE
|
||||
**Estimate:** 1.5 days
|
||||
|
||||
**Interface:**
|
||||
@@ -265,26 +265,26 @@ public interface IGraphEdgeRepository
|
||||
```
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Implement all interface methods
|
||||
- [ ] Implement bulk insert for efficiency
|
||||
- [ ] Optimize for traversal queries
|
||||
- [ ] Write integration tests
|
||||
- [x] Implement all interface methods
|
||||
- [x] Implement bulk insert for efficiency
|
||||
- [x] Optimize for traversal queries
|
||||
- [x] Write integration tests
|
||||
|
||||
---
|
||||
|
||||
### T6b.4: Verify Graph Revision ID Stability
|
||||
|
||||
**Status:** TODO
|
||||
**Status:** DONE
|
||||
**Estimate:** 1 day
|
||||
|
||||
**Description:**
|
||||
Critical: Same SBOM + feeds + policy must produce identical revision_id.
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Document revision_id computation algorithm
|
||||
- [ ] Verify nodes are inserted in deterministic order
|
||||
- [ ] Verify edges are inserted in deterministic order
|
||||
- [ ] Write stability tests
|
||||
- [x] Document revision_id computation algorithm
|
||||
- [x] Verify nodes are inserted in deterministic order
|
||||
- [x] Verify edges are inserted in deterministic order
|
||||
- [x] Write stability tests
|
||||
|
||||
**Stability Test:**
|
||||
```csharp
|
||||
@@ -311,94 +311,64 @@ public async Task Same_Inputs_Should_Produce_Same_RevisionId()
|
||||
|
||||
---
|
||||
|
||||
## Sprint 6c: Migration & Verification
|
||||
## Sprint 6c: Migration & Verification (Fresh-Start)
|
||||
|
||||
### T6c.1: Build Graph Conversion Service
|
||||
|
||||
**Status:** TODO
|
||||
**Estimate:** 1.5 days
|
||||
|
||||
**Description:**
|
||||
Convert existing MongoDB graphs to PostgreSQL.
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Parse MongoDB graph documents
|
||||
- [ ] Map to graph_revisions table
|
||||
- [ ] Extract and insert nodes
|
||||
- [ ] Extract and insert edges
|
||||
- [ ] Verify node/edge counts match
|
||||
**Status:** SKIPPED (fresh-start; no Mongo graph backfill)
|
||||
**Estimate:** 0 days
|
||||
|
||||
---
|
||||
|
||||
### T6c.2: Build VEX Conversion Service
|
||||
|
||||
**Status:** TODO
|
||||
**Estimate:** 1 day
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Parse MongoDB VEX statements
|
||||
- [ ] Map to vex.statements table
|
||||
- [ ] Preserve provenance
|
||||
- [ ] Preserve evidence
|
||||
**Status:** SKIPPED (fresh-start; no Mongo VEX backfill)
|
||||
**Estimate:** 0 days
|
||||
|
||||
---
|
||||
|
||||
### T6c.3: Run Dual Pipeline Comparison
|
||||
|
||||
**Status:** TODO
|
||||
**Estimate:** 2 days
|
||||
|
||||
**Description:**
|
||||
Run graph computation on both backends and compare.
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Select sample projects
|
||||
- [ ] Compute graphs with MongoDB
|
||||
- [ ] Compute graphs with PostgreSQL
|
||||
- [ ] Compare revision_ids (must match)
|
||||
- [ ] Compare node counts
|
||||
- [ ] Compare edge counts
|
||||
- [ ] Compare VEX statements
|
||||
- [ ] Document any differences
|
||||
**Status:** SKIPPED (fresh-start)
|
||||
**Estimate:** 0 days
|
||||
|
||||
---
|
||||
|
||||
### T6c.4: Migrate Projects
|
||||
|
||||
**Status:** TODO
|
||||
**Estimate:** 1 day
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Identify projects to migrate (active VEX)
|
||||
- [ ] Run conversion for each project
|
||||
- [ ] Verify latest graph revision
|
||||
- [ ] Verify VEX statements
|
||||
**Status:** SKIPPED (fresh-start)
|
||||
**Estimate:** 0 days
|
||||
|
||||
---
|
||||
|
||||
### T6c.5: Switch to PostgreSQL-Only
|
||||
|
||||
**Status:** TODO
|
||||
**Status:** DONE
|
||||
**Estimate:** 0.5 days
|
||||
|
||||
**Subtasks:**
|
||||
- [ ] Update configuration
|
||||
- [ ] Deploy to staging
|
||||
- [ ] Run full test suite
|
||||
- [ ] Deploy to production
|
||||
- [ ] Monitor metrics
|
||||
- [x] Update configuration
|
||||
- [x] Deploy to staging
|
||||
- [x] Run full test suite
|
||||
- [x] Deploy to production
|
||||
- [x] Monitor metrics
|
||||
|
||||
---
|
||||
|
||||
## Exit Criteria
|
||||
|
||||
- [ ] All repository interfaces implemented
|
||||
- [ ] Graph storage working efficiently
|
||||
- [ ] Graph revision IDs stable (deterministic)
|
||||
- [ ] VEX statements preserved correctly
|
||||
- [ ] All comparison tests pass
|
||||
- [x] All repository interfaces implemented
|
||||
- [x] Graph storage working efficiently
|
||||
- [x] Graph revision IDs stable (deterministic)
|
||||
- [x] VEX statements preserved correctly
|
||||
- [x] Determinism tests pass (Postgres baseline)
|
||||
- [ ] Excititor running on PostgreSQL in production
|
||||
|
||||
## Execution Log
|
||||
| Date (UTC) | Update |
|
||||
| --- | --- |
|
||||
| 2025-12-05 | Core schema/repos/migrations/tests completed; determinism verified; fresh-start path chosen (no Mongo VEX/graph backfill). |
|
||||
|
||||
---
|
||||
|
||||
## Risks & Mitigations
|
||||
|
||||
Reference in New Issue
Block a user