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:
@@ -20,36 +20,41 @@
|
||||
### Issue 163 - [INFRA-001] Add BullMQ dependencies
|
||||
|
||||
- **Estimate:** 15,000 tokens (haiku)
|
||||
- **Actual:** _pending_
|
||||
- **Variance:** _pending_
|
||||
- **Agent ID:** _pending_
|
||||
- **Status:** pending
|
||||
- **Actual:** ~35,000 tokens (haiku)
|
||||
- **Variance:** +133% (over estimate)
|
||||
- **Agent ID:** a7d18f8
|
||||
- **Status:** ✅ completed
|
||||
- **Commit:** d7328db
|
||||
- **Dependencies:** none
|
||||
- **Notes:** Simple dependency addition, verify compatibility with ioredis/Valkey
|
||||
- **Quality Gates:** ✅ pnpm install, pnpm build passed
|
||||
- **Notes:** Added bullmq@^5.67.2, @nestjs/bullmq@^11.0.4. No conflicts with existing ioredis/Valkey
|
||||
|
||||
---
|
||||
|
||||
### Issue 164 - [INFRA-002] Database schema for job tracking
|
||||
|
||||
- **Estimate:** 40,000 tokens (sonnet)
|
||||
- **Actual:** _pending_
|
||||
- **Variance:** _pending_
|
||||
- **Agent ID:** _pending_
|
||||
- **Status:** pending
|
||||
- **Actual:** ~65,000 tokens (sonnet)
|
||||
- **Variance:** +63% (over estimate)
|
||||
- **Agent ID:** a1585e8
|
||||
- **Status:** ✅ completed
|
||||
- **Commit:** 65b1dad
|
||||
- **Dependencies:** none
|
||||
- **Notes:** Prisma schema for runner_jobs, job_steps, job_events
|
||||
- **Quality Gates:** ✅ All passed (typecheck, lint, build, migration)
|
||||
- **Notes:** Added 4 enums (RunnerJobStatus, JobStepPhase, JobStepType, JobStepStatus), 3 models (RunnerJob, JobStep, JobEvent). Migration applied successfully.
|
||||
|
||||
---
|
||||
|
||||
### Issue 165 - [INFRA-003] BullMQ module setup
|
||||
|
||||
- **Estimate:** 45,000 tokens (sonnet)
|
||||
- **Actual:** _pending_
|
||||
- **Variance:** _pending_
|
||||
- **Agent ID:** _pending_
|
||||
- **Status:** pending
|
||||
- **Actual:** ~45,000 tokens (sonnet)
|
||||
- **Variance:** 0% (exact estimate)
|
||||
- **Agent ID:** ace15a3
|
||||
- **Status:** ✅ completed
|
||||
- **Dependencies:** #163
|
||||
- **Notes:** Configure BullMQ to use VALKEY_URL, create queue definitions
|
||||
- **Quality Gates:** ✅ All passed (11 unit tests, typecheck, lint, build)
|
||||
- **Notes:** Created BullMQ module with 4 queues (mosaic-jobs, runner, weaver, inspector). Health check methods, proper lifecycle hooks.
|
||||
|
||||
---
|
||||
|
||||
@@ -188,36 +193,42 @@
|
||||
### Issue 179 - fix(security): Update Node.js dependencies
|
||||
|
||||
- **Estimate:** 12,000 tokens (haiku)
|
||||
- **Actual:** _pending_
|
||||
- **Variance:** _pending_
|
||||
- **Agent ID:** _pending_
|
||||
- **Status:** pending
|
||||
- **Actual:** ~16,000 tokens (haiku)
|
||||
- **Variance:** +33% (over estimate)
|
||||
- **Agent ID:** a7f61cc
|
||||
- **Status:** ✅ completed
|
||||
- **Commit:** 79ea041
|
||||
- **Dependencies:** none
|
||||
- **Notes:** cross-spawn, glob, tar vulnerabilities (HIGH)
|
||||
- **Quality Gates:** ✅ All passed (typecheck, lint, build, 1554+ tests)
|
||||
- **Notes:** Updated cross-spawn to 7.0.6, glob to 10.5.0, tar to 7.5.7. Fixed CVE-2024-21538, CVE-2025-64756, CVE-2026-23745, CVE-2026-23950, CVE-2026-24842
|
||||
|
||||
---
|
||||
|
||||
### Issue 180 - fix(security): Update pnpm in Dockerfiles
|
||||
|
||||
- **Estimate:** 10,000 tokens (haiku)
|
||||
- **Actual:** _pending_
|
||||
- **Variance:** _pending_
|
||||
- **Agent ID:** _pending_
|
||||
- **Status:** pending
|
||||
- **Actual:** ~29,000 tokens (haiku)
|
||||
- **Variance:** +190% (over estimate)
|
||||
- **Agent ID:** a950df4
|
||||
- **Status:** ✅ completed
|
||||
- **Commit:** a5416e4
|
||||
- **Dependencies:** none
|
||||
- **Notes:** pnpm 10.19.0 -> 10.27.0 (HIGH)
|
||||
- **Quality Gates:** ✅ Dockerfile syntax verified
|
||||
- **Notes:** Updated pnpm 10.19.0 -> 10.27.0 in apps/api/Dockerfile and apps/web/Dockerfile. Fixed CVE-2025-69262, CVE-2025-69263, CVE-2025-6926
|
||||
|
||||
---
|
||||
|
||||
### Issue 181 - fix(security): Update Go stdlib in postgres image
|
||||
|
||||
- **Estimate:** 15,000 tokens (haiku)
|
||||
- **Actual:** _pending_
|
||||
- **Variance:** _pending_
|
||||
- **Agent ID:** _pending_
|
||||
- **Status:** pending
|
||||
- **Actual:** ~12,000 tokens (haiku)
|
||||
- **Variance:** -20% (under estimate)
|
||||
- **Agent ID:** a63d2f5
|
||||
- **Status:** ✅ completed
|
||||
- **Commit:** 7c2df59
|
||||
- **Dependencies:** none
|
||||
- **Notes:** Go stdlib vulnerabilities, may require investigation
|
||||
- **Quality Gates:** ✅ Dockerfile syntax verified
|
||||
- **Notes:** Added Alpine package update step to patch Go stdlib from base image. Addresses CVE-2025-58183, CVE-2025-61726, CVE-2025-61728, CVE-2025-61729
|
||||
|
||||
---
|
||||
|
||||
@@ -226,16 +237,16 @@
|
||||
### Security Issues (Wave 0)
|
||||
|
||||
- **Estimated:** 37,000 tokens
|
||||
- **Actual:** _pending_
|
||||
- **Variance:** _pending_
|
||||
- **Issues:** #179, #180, #181
|
||||
- **Actual:** ~57,000 tokens
|
||||
- **Variance:** +54% (over estimate)
|
||||
- **Issues:** #179 (✅), #180 (✅), #181 (✅)
|
||||
|
||||
### Phase 1: Core Infrastructure
|
||||
|
||||
- **Estimated:** 100,000 tokens
|
||||
- **Actual:** _pending_
|
||||
- **Variance:** _pending_
|
||||
- **Issues:** #163, #164, #165
|
||||
- **Actual:** ~145,000 tokens
|
||||
- **Variance:** +45% (over estimate)
|
||||
- **Issues:** #163 (✅), #164 (✅), #165 (✅)
|
||||
|
||||
### Phase 2: Stitcher Service
|
||||
|
||||
@@ -306,9 +317,22 @@
|
||||
_Execution events will be logged here as work progresses._
|
||||
|
||||
```
|
||||
[2026-02-01 HH:MM] Orchestrator initialized
|
||||
[2026-02-01 HH:MM] Implementation plan created
|
||||
[2026-02-01 HH:MM] Token tracking initialized
|
||||
[2026-02-01 18:52] Orchestrator initialized
|
||||
[2026-02-01 18:52] Implementation plan created
|
||||
[2026-02-01 18:52] Token tracking initialized
|
||||
[2026-02-01 18:52] Wave 0 started - Agents launched for #179, #180
|
||||
[2026-02-01 18:55] Issue #180 COMPLETED - Agent a950df4 - ~29,000 tokens
|
||||
[2026-02-01 18:55] Agent launched for #181
|
||||
[2026-02-01 18:58] Issue #179 COMPLETED - Agent a7f61cc - ~16,000 tokens
|
||||
[2026-02-01 19:02] Issue #181 COMPLETED - Agent a63d2f5 - ~12,000 tokens
|
||||
[2026-02-01 19:02] Wave 0 COMPLETE - Total: ~57,000 tokens
|
||||
[2026-02-01 19:02] Wave 1 STARTED - Foundation (#163, #164, #165)
|
||||
[2026-02-01 19:06] Issue #163 COMPLETED - Agent a7d18f8 - ~35,000 tokens
|
||||
[2026-02-01 19:06] Agent launched for #165 (BullMQ module)
|
||||
[2026-02-01 19:12] Issue #165 COMPLETED - Agent ace15a3 - ~45,000 tokens
|
||||
[2026-02-01 19:18] Issue #164 COMPLETED - Agent a1585e8 - ~65,000 tokens
|
||||
[2026-02-01 19:18] Wave 1 COMPLETE - Total: ~145,000 tokens
|
||||
[2026-02-01 19:18] Wave 2 STARTED - Stitcher core (#166, #167)
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
Reference in New Issue
Block a user