Pipeline.hs: entry point, CLI, main loop

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

Description

Edit

Create Omni/Pipeline.hs - entry point, CLI, main loop.

This is the top-level module that wires everything together.

bild metadata: -- : out pipeline -- : dep aeson -- : dep optparse-applicative -- : dep sqlite-simple -- : dep async -- : dep stm

CLI (optparse-applicative):

  • pipeline run [options] -- start the pipeline
  • pipeline status [--json] -- show health summary
  • pipeline drain -- stop new work, finish in-flight

Main loop (per DESIGN.md): 1. INTEGRATE: for each Verified task, run integrateTask 2. VERIFY: for each InProgress task where agent finished, run verifyTask 3. HARVEST: poll agentd status for running dev agents 4. DEVELOP: for Open tasks up to concurrency limit, spawn dev agents 5. Sleep poll interval

Status command:

  • Query pipeline_runs for active runs, failures, costs
  • Query task DB for task counts by status
  • Output text or JSON

Startup recovery:

  • Call recoverStaleWorkspaces
  • Check for InProgress tasks with no active agentd run -> reset to Open

Tests: basic unit tests for prompt building, config parsing.

Verify: bild --test Omni/Pipeline.hs

Timeline (1)

🔄[human]Open → Done4 days ago