# V2PipelineOrchestrator

**Kind:** Class

**Source:** [`atloria-monorepo/packages/doc-automation/src/v2/orchestrator.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/doc-automation/src/v2/orchestrator.ts#L350)

## Methods

| Method | Signature | Returns |
|---|---|---|
| `getStore` | `getStore()` | `StageResultStore` |
| `run` | `run(progressCallback: V2ProgressCallback)` | `Promise<V2PipelineResult>` |
| `cancel` | `cancel()` | `void` |

## Where it refuses work

- `V2PipelineOrchestrator` stops the work with `Error` when `!hasOpenAI` — “OpenAI provider selected but no API key provided (openaiApiKey or azureOpenaiApiKey)”.
- `V2PipelineOrchestrator` stops the work with `Error` when `!endpoint || !apiKey` — “Azure Responses provider selected but endpoint or apiKey not provided”.
- `V2PipelineOrchestrator` stops the work with `Error` when `!this.parseResult` — “Parse result not available”.
- `V2PipelineOrchestrator` stops the work with `Error` when `!this.chunkResult` — “Chunk result not available”.
- `V2PipelineOrchestrator` stops the work with `Error` when `!this.chunkResult || !this.featureResult` — “Chunk or feature result not available”.
- `V2PipelineOrchestrator` stops the work with `Error` when `!this.analysisResult` — “Analysis result not available”.

## When something fails

- `V2PipelineOrchestrator` handles failure in 44 places: it logs it and continues in 22, lets it reach the caller in 13, discards it silently in 5, and turns it into a return value in 4. A failure discarded silently leaves no trace for whoever debugs this later.
