Pipeline Core.hs + State.hs: types and DB layer

t-603.2·WorkTask·
·
·
·Omni/Pipeline.hs
Parent:t-603·Created4 days ago·Updated4 days ago

Description

Edit

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

Timeline (2)

🔄[human]Open → InProgress4 days ago
🔄[human]InProgress → Done4 days ago