Jon Chery
|
b25e074e1d
|
feat(P04): audit log + persistence hardening
Implements Phase 4 of v0.1 Foundation:
- internal/store/migrations/0003_audit_log.sql: audit_log table with indexes
- internal/store/audit_repo.go: AuditRepo (Append + List)
- internal/store/audit_repo_test.go: 2 tests for audit persistence
- internal/engine/audit.go: Audit wrapper that persists to SQLite AND logs via slog
- internal/cli/audit.go: orca audit list command (text + JSON)
- Registry now records every join/leave/forget with actor/action/resource/result
Verified: audit entries persist across restarts, JSON output includes metadata,
node operations emit audit records. All tests pass with -race.
---ci---
project: orca
phase: 4
milestone: v0.1
status: execute
req_covered:
- REQ-005
- REQ-006
- REQ-008
- REQ-017
- REQ-018
---/ci---
|
2026-06-03 12:48:31 +00:00 |
|
Jon Chery
|
f9a9873341
|
feat(P03): task execution engine with HCL specs, jobs, tasks, WaitDelay
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---
|
2026-06-03 12:45:20 +00:00 |
|
Jon Chery
|
9580f347c6
|
feat(P02): node management with SQLite-backed registry
Implements Phase 2 of v0.1 Foundation:
- internal/model/node.go: Node struct with state machine (pending/ready/left)
- internal/store/store.go: SQLite open with WAL + foreign_keys pragmas
- internal/store/migrate.go: embedded SQL migration runner
- internal/store/migrations/0001_nodes.sql: nodes table schema
- internal/store/node_repo.go: CRUD operations for nodes
- internal/store/node_repo_test.go: 4 tests covering insert/get/list/update/delete
- internal/engine/registry.go: in-memory wrapper with slog audit logging
- internal/cli/node.go: orca node {join,leave,list} wired to registry
Verified: node join/list/leave work end-to-end, JSON output, slog audit logs,
state persists in SQLite, all tests pass with -race.
---ci---
project: orca
phase: 2
milestone: v0.1
status: execute
req_covered:
- REQ-002
- REQ-005
- REQ-008
- REQ-012
- REQ-017
- REQ-018
---/ci---
|
2026-06-03 12:38:46 +00:00 |
|