Add Prisma schema for runner jobs, job steps, and job events to support the autonomous runner infrastructure (M4.2). Enums added: - RunnerJobStatus: PENDING, QUEUED, RUNNING, COMPLETED, FAILED, CANCELLED - JobStepPhase: SETUP, EXECUTION, VALIDATION, CLEANUP - JobStepType: COMMAND, AI_ACTION, GATE, ARTIFACT - JobStepStatus: PENDING, RUNNING, COMPLETED, FAILED, SKIPPED Models added: - RunnerJob: Top-level job tracking linked to workspace and agent_tasks - JobStep: Granular step tracking within jobs with phase organization - JobEvent: Immutable event sourcing audit log for jobs and steps Foreign key relationships: - runner_jobs → workspaces (workspace_id, CASCADE) - runner_jobs → agent_tasks (agent_task_id, SET NULL) - job_steps → runner_jobs (job_id, CASCADE) - job_events → runner_jobs (job_id, CASCADE) - job_events → job_steps (step_id, CASCADE) Indexes added for performance on workspace_id, status, priority, timestamp. Migration: 20260201205935_add_job_tracking Quality gates passed: typecheck, lint, build Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
37 KiB
37 KiB