Create Omni/Pipeline/Core.hs and Omni/Pipeline/State.hs.
Core.hs: config and type definitions per DESIGN.md.
- PipelineConfig (root, baseBranch, concurrency, pollInterval, maxRetries, etc.)
- Phase (Dev | Verify | Integrate)
- RunRecord, RunStatus (Running | Success | Failure)
- ActiveDev (taskId, runId, workspace, startedAt, beforeSha)
- VerifyResult (Pass | Fail Text | Skip Text)
- IntegrateResult (Integrated Text | Conflict Text | VerifyFailed Text)
State.hs: pipeline_runs SQLite table and queries.
- initPipelineDb :: FilePath -> IO Connection
- recordRun :: Connection -> RunRecord -> IO Int64
- markRunFinished :: Connection -> Int64 -> RunStatus -> Maybe Double -> Maybe Text -> IO ()
- getRetryCount :: Connection -> Text -> Phase -> Int -> IO Int
- getCumulativeCost :: Connection -> Text -> IO Double
- getLastVerifyFailure :: Connection -> Text -> IO (Maybe Text)
- getActiveRuns :: Connection -> IO [RunRecord]
Include unit tests for the DB operations.
Verify: typecheck.sh Omni/Pipeline/Core.hs && typecheck.sh Omni/Pipeline/State.hs