> ## 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.

# SDLC Enforce action

> Reference for the SDLC Enforce GitHub status check and sdlc-enforce CI action behavior.

**`SDLC Enforce`** is LaneSync's own GitHub status check. It is always required on protected branches alongside checks from your `sdlc.yaml`.

## What it does

The bootstrapped **`sdlc-enforce`** GitHub Action:

1. Runs on pull requests targeting protected branches
2. Evaluates SDLC policy (milestone linkage, branch rules, stage constraints)
3. Posts a commit status named **`SDLC Enforce`**
4. Fails the check when policy is violated — blocking merge via rulesets

```mermaid theme={null}
flowchart LR
  pr[Pull request opened]
  action[sdlc-enforce action]
  status["Status: SDLC Enforce"]
  ruleset[Rulesets block merge]

  pr --> action
  action --> status
  status --> ruleset
```

## Relationship to other checks

| Check source         | Configured in                 | Always required?                    |
| -------------------- | ----------------------------- | ----------------------------------- |
| `SDLC Enforce`       | LaneSync infrastructure       | **Yes**                             |
| CI workflow checks   | `sdlc.yaml` `required_checks` | Per stage                           |
| Other GitHub Actions | Your workflows                | Only if listed in `required_checks` |

<Note>
  `SDLC Enforce` is an infrastructure constant. It is not configured in `sdlc.yaml` and must not be removed from rulesets.
</Note>

## Bootstrapped workflow

LaneSync pushes CI templates during repo bootstrap. The enforce step is part of `.github/workflows/ci-*.yml`:

```yaml theme={null}
- name: SDLC Enforce
  uses: ./.github/actions/sdlc-enforce  # or published action ref
```

Template variables (`{{CI_CHECK_NAME}}`, `{{DEV_BRANCH}}`, etc.) are replaced during bootstrap.

## Failure scenarios

<AccordionGroup>
  <Accordion title="Check pending indefinitely">
    Workflow did not run — verify branch protection targets correct branches and workflow `on:` triggers include PR events.
  </Accordion>

  <Accordion title="Check fails on valid PR">
    Review action logs. Common causes: missing milestone link on issues, PR targets wrong branch, repo bootstrap incomplete.
  </Accordion>

  <Accordion title="Check missing from rulesets">
    Re-run bootstrap or push `sdlc.yaml` to trigger ruleset refresh. Full-tier app required for auto-rulesets.
  </Accordion>
</AccordionGroup>

## Development stage vs enforce action

These layers serve different purposes:

| Layer                          | Scope                                                      |
| ------------------------------ | ---------------------------------------------------------- |
| **SDLC Enforce**               | PR-level policy at merge time                              |
| **Development stage blocking** | Milestone progress — only `required_checks` failures block |

A PR can pass `SDLC Enforce` while the milestone remains in DEVELOPMENT due to open issues or failed CI checks listed in `sdlc.yaml`.

## Self-hosted

Self-hosted LaneSync instances use the same check name. Set `SDLC_API_URL` in repository variables so the action reaches your API. See [Enterprise security](/enterprise/security).

## Related

* [Enforcement](/concepts/enforcement)
* [Install the GitHub App](/guides/install-github-app)
