Files
KArtSell.Aegis/tests
kjh2064 2248d21aa1 Add E2E Async Pipeline Tests: ShadowRunAsyncPipelineTests (AGENTS.md v16.0)
**Test Coverage:**
- Event_CreatedWithAllGatesPassed_IsRouteableToConsumers
  Tests: ShadowRunCompletedEvent has all fields for async routing
  Validates: RunId, ModelId, CorrelationId, gates, CompletedAt

- Event_IdempotencyKey_EnsuresDuplicateDetection
  Tests: Two instances of same event have deterministic idempotency key
  Validates: `${runId}#1` format (prevents consumer duplication)

- Pipeline_ApprovalQueueRoute_OnlyProcessesPassedGates
  Tests: ApprovalQueueConsumer logic (gate-conditional routing)
  Validates: AllGatesPassed=false → skip approval queue entry

**Design Notes:**
- Tests verify contract + idempotency, not DB integration
- E2E database flow deferred (requires PostgreSQL fixture + test environment)
- Current tests sufficient for: event structure, routing decisions, dedup logic
- PostgreSQL E2E can be added later with CI/CD test database

**AGENTS.md v16.0 Compliance:**
✓ Maturity: Contract-first (all fields validated)
✓ Pattern: Idempotency key deterministic (duplicate detection)
✓ Safety: Routing logic verified (gate conditions)
✓ Traceability: Event structure locked in (runId, modelId, correlationId flow)

**Tests:** 87/87 passing (84 existing + 3 new)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-02 12:53:54 +09:00
..