f9a9873341
Implements Phase 3 of v0.1 Foundation:
- internal/model/job.go: Job + Task models with status state machines
- internal/store/migrations/0002_jobs_tasks.sql: jobs + tasks tables with FK
- internal/store/job_task_repo.go: JobRepo + TaskRepo with CRUD and lifecycle updates
- internal/jobspec/spec.go: HCL parser using hashicorp/hcl/v2 hclsimple
- internal/jobspec/spec_test.go: 4 tests for parser
- internal/engine/executor.go: parallel task executor using os/exec with Go 1.25
WaitDelay for clean process shutdown
- internal/cli/job.go: orca job {run,list,stop,logs} wired to executor
- testdata/hello.hcl, testdata/fail.hcl: smoke test fixtures
Verified: job run executes commands, captures stdout/stderr, persists state,
job stop transitions status, job logs displays captured output. All tests
pass with -race.
---ci---
project: orca
phase: 3
milestone: v0.1
status: execute
req_covered:
- REQ-004
- REQ-006
- REQ-009
- REQ-018
- REQ-020
- REQ-021
---/ci---
8 lines
106 B
HCL
8 lines
106 B
HCL
job "failing-job" {
|
|
}
|
|
|
|
task "fail" {
|
|
command = "/bin/sh"
|
|
args = ["-c", "echo oops 1>&2; exit 1"]
|
|
}
|