Skip to content

Policy Gates

BRYAN DAVID WHITE edited this page Feb 20, 2026 · 2 revisions

Policy Gates

Four CI gates that enforce coherence automatically on every PR.

Workflow: .github/workflows/coherence-gates.yml (live since v0.2.0) Spec: actions/POLICY_LOGIC.md


Gate Overview

flowchart TD
    PR[PR Opened] --> M{Major PR?}
    M -->|Yes| G1{DLR linked?}
    M -->|No| G2
    G1 -->|Yes| G2
    G1 -->|No| BLOCK1[Block]

    G2{Assumptions<br/>expired?}
    G2 -->|Current| G3
    G2 -->|Expiring| WARN[Warn]
    G2 -->|Expired| BLOCK2[Block]
    WARN --> G3

    G3{Canon changed<br/>without changelog?}
    G3 -->|No / changelog updated| G4
    G3 -->|Yes| BLOCK3[Block]

    G4{Drift format<br/>valid?}
    G4 -->|Yes / no drift| OK[Pass]
    G4 -->|Missing sections| ADVISE[Warn]
    ADVISE --> OK

    style BLOCK1 fill:#c0392b,color:#fff
    style BLOCK2 fill:#c0392b,color:#fff
    style BLOCK3 fill:#c0392b,color:#fff
    style WARN fill:#f39c12,color:#000
    style ADVISE fill:#f39c12,color:#000
    style OK fill:#27ae60,color:#fff
Loading

Gate 1: Major PR Requires DLR

Blocks merge if a Major PRs has no DLR linked in the PR body.

  • Scans PR body for coherence/decisions/DLR-\d{4}.md
  • Verifies the file exists in the branch

Gate 2: Assumption Expiry

  • Warning — assumption expires within 14 days
  • Block — assumption has expired and status: active
  • Override — add label assumption-waiver (with justification comment)

Gate 3: Canon Changelog Required

Blocks merge if any file in coherence/canon/ is changed but changelog.md is not.

Gate 4: Drift Signal Format

Warns (non-blocking) if a new DRIFT-*.md file is missing required sections: Severity, What Drifted, Evidence, Affected, Status.


How It Works

The workflow triggers on pull_request events (opened, synchronize, labeled, unlabeled).

  1. All 4 gates run as steps in a single job
  2. Each gate sets a status output: pass, fail, warn, or skip
  3. A final Summary Comment step posts (or updates) a consolidated table on the PR

Summary Comment Example

Status Gate Details
DLR Required Not a major PR — DLR not required.
Assumption Expiry 2 active assumptions, all current.
Canon Changelog No canon files changed.
Drift Format No new drift signals added.

See Also

  • Major PRs — what triggers Gate 1
  • IntelOps — assumptions that trigger Gate 2
  • FranOps — canon that triggers Gate 3
  • DriftOps — drift format that triggers Gate 4

Clone this wiki locally