> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lanesync.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Release pipeline

> Entry and exit conditions for each LaneSync stage — PLANNING through DEPLOYED.

Every GitHub milestone tracked by LaneSync progresses through a **fixed sequence** of stages. The backend state machine evaluates live GitHub data to determine the current stage and whether gates are blocking.

## Pipeline overview

```
PLANNING → DEVELOPMENT → TESTING → EVIDENCING → DEPLOYMENT → DEPLOYED
```

<Frame>
  <img src="https://mintcdn.com/lanesync-cd339c34/6Jf2SH7VdRtFE3Ke/images/pipeline-flow.png?fit=max&auto=format&n=6Jf2SH7VdRtFE3Ke&q=85&s=0e1a2be1292e024622e431fd2361871d" alt="LaneSync five-stage release pipeline" width="2816" height="1536" data-path="images/pipeline-flow.png" />
</Frame>

## Stage gates

### PLANNING

**Purpose:** Ensure release scope is defined and owned before development begins.

| Entry                       | Exit (advance to DEVELOPMENT)       |
| --------------------------- | ----------------------------------- |
| Milestone created in GitHub | All milestone issues have assignees |

**Blocking items:** Unassigned issues appear as blocking in stage details.

**Config (`sdlc.yaml`):**

```yaml theme={null}
planning:
  require_milestone: true
  require_issues_assigned: true
```

***

### DEVELOPMENT

**Purpose:** Build and integrate on the trunk branch with CI enforcement.

| Entry                   | Exit (advance to TESTING)                                                              |
| ----------------------- | -------------------------------------------------------------------------------------- |
| All planning gates pass | All milestone issues closed via merged PRs; required checks pass on development branch |

**Blocking items:**

* Open milestone issues
* Required CI checks in `failure` or `pending` state (only checks listed in `sdlc.yaml` `required_checks`)

**Config:**

```yaml theme={null}
development:
  branch: main
  deploy_target: dev
  required_checks:
    - CI — Build & Test   # must match GitHub Actions job name exactly
```

<Warning>
  Development stage blocking applies only to checks listed in `required_checks` **and** with a failure conclusion. Non-required workflow runs are never marked blocking.
</Warning>

***

### TESTING

**Purpose:** Validate the release candidate on a release branch or trunk.

| Entry                  | Exit (advance to EVIDENCING)                                                            |
| ---------------------- | --------------------------------------------------------------------------------------- |
| Development gates pass | Release branch exists (release-branch mode); all required checks pass on release branch |

**Blocking items:**

* Missing release branch (when `branch_pattern` is configured)
* Failed or pending required checks on the release branch

**Config:**

```yaml theme={null}
testing:
  branch_pattern: "release/*"
  deploy_target: staging
  required_checks:
    - CI — Build & Test
```

LaneSync supports **trunk-based** releases (no release branch) and **release-branch** workflows. Configure during the repo setup wizard.

***

### EVIDENCING

**Purpose:** Collect and approve quality evidence before production promotion.

| Entry              | Exit (advance to DEPLOYMENT)                                            |
| ------------------ | ----------------------------------------------------------------------- |
| Testing gates pass | Required artifacts uploaded; evidence PR approved by required reviewers |

**Blocking items:**

* Missing required artifacts
* Evidence PR not approved

**Config:**

```yaml theme={null}
evidencing:
  required_artifacts:
    - test-results
  required_reviewers:
    min_approvals: 1
    teams:
      - engineering-leads
```

***

### DEPLOYMENT

**Purpose:** Controlled promotion to production.

| Entry                 | Exit (advance to DEPLOYED)     |
| --------------------- | ------------------------------ |
| Evidencing gates pass | Production deployment recorded |

**Config:**

```yaml theme={null}
deployment:
  target: production
  promotion: manual
  requires_evidence_approval: true
```

The deploy gate API (`GET /api/milestones/check?version=&repo=`) requires CI authentication (OIDC or API key) and returns `can_deploy: true` only when the milestone is in DEPLOYMENT and all prior gates pass for the authenticated tenant.

***

### DEPLOYED

**Purpose:** Terminal state — release is live in production.

No further gates. The milestone remains visible in the dashboard for audit and quality comparison with future releases.

## How stage is computed

LaneSync does **not** let users manually set stages. On every sync (webhook or background job):

1. Fetch milestone issues, PRs, and workflow runs from GitHub
2. Load `sdlc.yaml` (live from GitHub for stage-details; cached in DB for sync)
3. Evaluate gate conditions in order
4. Record stage transitions with timestamps for audit

See [Enforcement](/concepts/enforcement) for how violations are blocked at merge time.
