feat(#167): Implement Runner jobs CRUD and queue submission

Implements runner-jobs module for job lifecycle management and queue submission.

Changes:
- Created RunnerJobsModule with service, controller, and DTOs
- Implemented job creation with BullMQ queue submission
- Implemented job listing with filters (status, type, agentTaskId)
- Implemented job detail retrieval with steps and events
- Implemented cancel operation for pending/queued jobs
- Implemented retry operation for failed jobs
- Added comprehensive unit tests (24 tests, 100% coverage)
- Integrated with BullMQ for async job processing
- Integrated with Prisma for database operations
- Followed existing CRUD patterns from tasks/events modules

API Endpoints:
- POST /runner-jobs - Create and queue a new job
- GET /runner-jobs - List jobs (with filters)
- GET /runner-jobs/:id - Get job details
- POST /runner-jobs/:id/cancel - Cancel a running job
- POST /runner-jobs/:id/retry - Retry a failed job

Quality Gates:
- Typecheck:  PASSED
- Lint:  PASSED
- Build:  PASSED
- Tests:  PASSED (24/24 tests)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-01 21:09:03 -06:00
parent a2cd614e87
commit 7102b4a1d2
73 changed files with 2498 additions and 45 deletions

View File

@@ -52,7 +52,7 @@ Add Prisma schema for runner_jobs, job_steps, and job_events tables to support t
- [x] Test migration - all tables created successfully
- [x] Run quality gates (typecheck, lint, build - all passed)
- [x] Generate Prisma client
- [ ] Commit changes
- [x] Commit changes (commit: 65b1dad)
## Schema Observations from Existing Code