Skip to content

feat: quality gate — threshold-based pass/fail for CI (#205)#227

Merged
ajianaz merged 2 commits into
developfrom
feat/v0.5-quality-gate
Jun 8, 2026
Merged

feat: quality gate — threshold-based pass/fail for CI (#205)#227
ajianaz merged 2 commits into
developfrom
feat/v0.5-quality-gate

Conversation

@ajianaz

@ajianaz ajianaz commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements configurable quality gate for CI enforcement. Closes #205 (partial).

New

  • src/engine/quality_gate.rs — gate evaluation logic (558 lines)
  • Config via .cora.yaml under quality_gate section
  • 12 unit tests covering all scenarios

Config Example

quality_gate:
  enabled: true
  thresholds:
    max_critical: 0
    max_security: 0
  categories:
    performance:
      action: warn
      max_findings: 5

Output

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  QUALITY GATE RESULT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Status:   ❌ FAILED
  Findings: 2 critical, 1 major, 4 minor, 0 info

  Threshold Checks:
  ✅ max_critical          → 2 found   ❌ EXCEEDED
  ✅ max_security          → 0 found   ✅ OK
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Test Results

  • 398 tests passed (12 new quality_gate tests)
  • Release build OK

ajianaz added 2 commits June 8, 2026 15:44
Implements configurable quality gate that evaluates review findings
against thresholds to produce a definitive PASS/FAIL result.

Features:
- Global thresholds: max_critical, max_major, max_minor, max_security
- Per-category overrides: block, warn, ignore actions
- Terminal-formatted gate output with status table
- Exit code 2 (blocked) on gate failure
- Config via .cora.yaml under quality_gate section
- 12 unit tests covering all gate scenarios

Example .cora.yaml:
  quality_gate:
    enabled: true
    thresholds:
      max_critical: 0
      max_security: 0
    categories:
      performance:
        action: warn
        max_findings: 5

Closes #205 (partial — baseline support deferred)
@ajianaz ajianaz merged commit ba1feff into develop Jun 8, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: quality gate — threshold-based pass/fail for CI enforcement

1 participant