← Back to Pull requests

Enforce API contract checks #780

Closed
unknown closed this pull request without merging on Nov 18, 2026 15:23 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 15:13 UTC
Author

Summary

Switches both CRD contract jobs in .github/workflows/api-contract.yml from report to enforce mode:

  • crd-contract (CRD compatibility vs baseline v0.3.17): breaking CRD changes (removed CRDs/API versions, served or storage-version changes, removed fields, newly required fields, type/enum/default changes) now fail the check instead of only being annotated.

  • crd-contract-coverage: CRD manifests not matched by the checked globs now fail the check.
  • The workflow header comment is updated to document the new mode and to point at moving baseline-refs forward as the path for agreed intentional breaks. docs/api-contract-checks.md is updated to match (enforce wording, and the local-run section now explains the --report-only flag as a local-only convenience).

    Context

    Part of the API contract testing initiative (RHOAIENG-100662), companion to opendatahub-io/model-registry#1959. The report-mode rollout in this repository is complete — no findings on recent PRs — and the provider and consumers have agreed on the policy, which is the documented switch condition in the workflow header.

    🤖 Generated with Claude Code

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Documentation
    Clarified that API compatibility findings fail pull-request checks, and that local report-only checks do not match CI enforcement.
    Documented how to handle intentional compatibility breaks by updating the agreed baseline.
    Chores
    * CI now enforces API compatibility checks instead of reporting findings without failing checks.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 220 lines (+165 / -55) across 2 files Reviewer: pboyd Review duration: 10m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 220 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.323
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #780"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.8% (MEDIUM) · Higher = larger blast radius
    36.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.5% · Safe to merge
    14.5%