[INFRA-006] Job steps tracking #168

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

Summary

Implement job-steps module for granular step tracking within jobs.

Step Phases

  • SETUP: Clone repo, create worktree, install deps
  • EXECUTION: Read requirements, analyze code, implement, write tests
  • VALIDATION: Lint gate, typecheck gate, test gate, coverage gate
  • CLEANUP: Stage, commit, push, create PR

Step Types

  • COMMAND: Shell command execution
  • AI_ACTION: AI agent action
  • GATE: Quality gate check
  • ARTIFACT: File/output creation

API Endpoints

  • GET /runner-jobs/:jobId/steps - List steps for a job
  • GET /runner-jobs/:jobId/steps/:stepId - Get step details
  • Internal: Create/update step status (service-to-service)

Tasks

  • Create apps/api/src/job-steps/job-steps.module.ts
  • Create apps/api/src/job-steps/job-steps.service.ts
  • Create apps/api/src/job-steps/job-steps.controller.ts
  • Implement step creation and status updates
  • Track token usage per step
  • Calculate step duration

Files to Create

  • apps/api/src/job-steps/job-steps.module.ts
  • apps/api/src/job-steps/job-steps.service.ts
  • apps/api/src/job-steps/job-steps.controller.ts
  • apps/api/src/job-steps/dto/

Acceptance Criteria

  • Steps can be created for a job
  • Step status transitions are tracked
  • Token usage is recorded
  • Duration is calculated on completion
## Summary Implement job-steps module for granular step tracking within jobs. ## Step Phases - SETUP: Clone repo, create worktree, install deps - EXECUTION: Read requirements, analyze code, implement, write tests - VALIDATION: Lint gate, typecheck gate, test gate, coverage gate - CLEANUP: Stage, commit, push, create PR ## Step Types - COMMAND: Shell command execution - AI_ACTION: AI agent action - GATE: Quality gate check - ARTIFACT: File/output creation ## API Endpoints - GET /runner-jobs/:jobId/steps - List steps for a job - GET /runner-jobs/:jobId/steps/:stepId - Get step details - Internal: Create/update step status (service-to-service) ## Tasks - [ ] Create apps/api/src/job-steps/job-steps.module.ts - [ ] Create apps/api/src/job-steps/job-steps.service.ts - [ ] Create apps/api/src/job-steps/job-steps.controller.ts - [ ] Implement step creation and status updates - [ ] Track token usage per step - [ ] Calculate step duration ## Files to Create - apps/api/src/job-steps/job-steps.module.ts - apps/api/src/job-steps/job-steps.service.ts - apps/api/src/job-steps/job-steps.controller.ts - apps/api/src/job-steps/dto/ ## Acceptance Criteria - Steps can be created for a job - Step status transitions are tracked - Token usage is recorded - Duration is calculated on completion ## Related - Epic: #162 - Depends on: #164 (schema)
jason.woltje added this to the M4.2-Infrastructure (0.0.4) milestone 2026-02-01 07:24:34 +00:00
jason.woltje added the phase-2apip0api labels 2026-02-01 07:24:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#168