[INFRA-013] End-to-end test harness #175

Closed
opened 2026-02-01 07:25:38 +00:00 by jason.woltje · 0 comments
Owner

Summary

Create end-to-end test harness for the Mosaic Component Architecture.

Test Scenarios

Happy Path

  1. Create job via API
  2. Job enters queue
  3. Worker picks up job
  4. Steps execute with events
  5. Quality gates run
  6. Job completes
  7. Events persisted to PostgreSQL

Error Handling

  1. Job fails during execution
  2. Quality gate fails
  3. Job is cancelled
  4. Worker crashes and job is retried

Chat Integration

  1. Command sent via Discord
  2. Job thread created
  3. Updates appear in thread
  4. Completion notification sent

Tasks

  • Create apps/api/test/e2e/infrastructure/ directory
  • Implement happy path test
  • Implement error handling tests
  • Implement chat integration tests (mocked Discord)
  • Add CI workflow for e2e tests

Files to Create

  • apps/api/test/e2e/infrastructure/job-lifecycle.e2e-spec.ts
  • apps/api/test/e2e/infrastructure/error-handling.e2e-spec.ts
  • apps/api/test/e2e/infrastructure/chat-integration.e2e-spec.ts

Acceptance Criteria

  • All test scenarios pass
  • Tests run in CI
  • Coverage of critical paths
## Summary Create end-to-end test harness for the Mosaic Component Architecture. ## Test Scenarios ### Happy Path 1. Create job via API 2. Job enters queue 3. Worker picks up job 4. Steps execute with events 5. Quality gates run 6. Job completes 7. Events persisted to PostgreSQL ### Error Handling 1. Job fails during execution 2. Quality gate fails 3. Job is cancelled 4. Worker crashes and job is retried ### Chat Integration 1. Command sent via Discord 2. Job thread created 3. Updates appear in thread 4. Completion notification sent ## Tasks - [ ] Create apps/api/test/e2e/infrastructure/ directory - [ ] Implement happy path test - [ ] Implement error handling tests - [ ] Implement chat integration tests (mocked Discord) - [ ] Add CI workflow for e2e tests ## Files to Create - apps/api/test/e2e/infrastructure/job-lifecycle.e2e-spec.ts - apps/api/test/e2e/infrastructure/error-handling.e2e-spec.ts - apps/api/test/e2e/infrastructure/chat-integration.e2e-spec.ts ## Acceptance Criteria - All test scenarios pass - Tests run in CI - Coverage of critical paths ## Related - Epic: #162 - Depends on: All Phase 1-4 issues
jason.woltje added this to the M4.2-Infrastructure (0.0.4) milestone 2026-02-01 07:25:38 +00:00
jason.woltje added the testingp0phase-5 labels 2026-02-01 07:25:38 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#175