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

# Quality Gates Map

> Layered quality gate map aligned to first-principles ownership and runtime budgets.

## Canonical Policy

Primary policy source:

* `docs-guide/policies/infrastructure-principles.mdx`

This page is the operational map. Rule ownership and budgets are canonical in the policy file above.

## Gate Layers

### 1) Pre-commit (Local, Fast, Offline)

Entry:

* `.githooks/pre-commit`

Responsibilities:

* staged structure and style invariants
* staged unit/static checks (`tests/run-all.js --staged --skip-browser`)
* staged generated-artifact sync checks
* runtime budget enforcement (`<= 60s` default)
* staged selection should respect governed non-publishable V2 lanes once they are encoded in `.mintignore` and shared file-selection helpers

Out of scope:

* browser sweeps
* WCAG crawl/audit flows
* full/broad link sweeps
* codex issue-readiness governance

### 2) Pre-push (`codex/*` Governance)

Entry:

* `.githooks/pre-push`

Responsibilities:

* codex task-contract validation
* codex issue-readiness validation
* lock overlap validation
* stash-policy enforcement
* non-fast-forward push blocking by default

### 3) PR Changed-File CI (Blocking)

Entries:

* `.github/workflows/test-suite.yml`
* `tests/run-pr-checks.js`

Responsibilities:

* blocking changed-file checks for style/MDX/spelling/quality/links/imports
* docs navigation and script-doc checks
* codex contract + PR-body + issue-state checks

### 4) Full/Broad CI Sweeps (Blocking or Advisory by Workflow)

Primary entries:

* `.github/workflows/test-v2-pages.yml`
* `.github/workflows/openapi-reference-validation.yml`
* `.github/workflows/v2-external-link-audit.yml`
* `.github/workflows/broken-links.yml`

Responsibilities:

* browser/render integrity across route sets
* OpenAPI reference integrity
* broad link health and scheduled external checks

## Blocking Defaults

* `P0/P1` checks are blocking where they are owned.
* `P2` checks may be blocking or advisory based on rollout state.
* `P3` checks are advisory unless explicitly graduated.

## Source Files

* `.githooks/pre-commit`
* `.githooks/pre-push`
* `tests/run-all.js`
* `tests/run-pr-checks.js`
* `.github/workflows/test-suite.yml`
* `.github/workflows/test-v2-pages.yml`
* `.github/workflows/openapi-reference-validation.yml`
* `docs-guide/policies/infrastructure-principles.mdx`
* `docs-guide/policies/v2-folder-governance.mdx`

## V2 Lane Contract

Mint, tests, and audits should treat `_workspace/`, `x-deprecated/`, and `v2/x-archived/` as non-publishable lanes unless a tool is explicitly operating in maintainer inventory mode. Transitional legacy buckets such as `_contextData`, `_plans-and-research`, `x-resources`, and section-level `review.md` remain inventoried until move waves normalize them into the canonical lanes.
