← Back to Pull requests

AUTOSCALE-896: Add OpenShift agentic SDLC context files #101

Closed
unknown closed this pull request without merging on Sep 01, 2026 16:33 UTC
View on GitHub
unknown unknown commented on Aug 27, 2026 15:32 UTC
Author

The OpenShift engineering org is standardizing on a set of files so that human
contributors and AI agents can work effectively in our repos. This adds the
required artifacts for custom-metrics-autoscaler-operator, following the
autoscaling team's implementation guide and the two repos that went first,
openshift/kedacore-keda#65 and openshift/kedacore-http-add-on#9.

Changes

  • AGENTS.md (new) — repository map, the reconciliation and CSV-generation architecture, 16 common pitfalls, human-in-the-loop triggers, and a paired-changes table.

  • CONTRIBUTING_OPENSHIFT.md (new) — downstream commit and PR conventions, the Prow workflow with this repo's actual CI job list, test expectations, generated-file reference, and a make target quick reference.

  • .coderabbit.yaml (new) — CodeRabbit config with team defaults plus 13 path-specific instruction blocks tailored to this repo's layout.

  • README.md — prepends a product-focused OpenShift/CMA section (what CMA is, how the operator/operand/HTTP Add-on fit together, links to product docs, CI, and Konflux pipelines). The upstream README below it is unchanged.
  • Note on file naming

    The working document lists this repo as standalone, which would mean
    CONTRIBUTING.md and a rewritten README.md. In practice this repo is a
    downstream fork of kedacore/keda-olm-operator:
    it has an upstream remote, its history uses UPSTREAM: <carry|drop|PR#>:
    prefixes throughout, and the cma-verify-history job enforces them.

    So these files use the downstream-fork treatment instead — CONTRIBUTING_OPENSHIFT.md
    rather than CONTRIBUTING.md, and the upstream README.md content is left intact
    with our section prepended. Worth correcting the repo inventory in the working
    document, since the same question likely applies to the other operator repos.

    One fix worth propagating

    The guide's .coderabbit.yaml example nests knowledge_base under reviews:.
    Validating against CodeRabbit's live schema.v2.json
    shows knowledge_base is a top-level key, so nested it is silently ignored.
    It is at the top level here. The configs merged in openshift/kedacore-keda#65 and
    openshift/kedacore-http-add-on#9 copied the guide verbatim and probably need the
    same one-line dedent.

    Highlight from AGENTS.md

    The detail I would most want a new contributor or agent to know:
    resources/resources_handler.go locates the operand manifests with
    runtime.Caller(0), so they are read from disk at their compile-time source
    path — there is no go:embed, despite looking like there should be. That is why
    Dockerfile stages them at /workspace/resources/ and why Dockerfile.ci does
    ln -s /resources /src/cma-operator/app/resources instead of copying them
    somewhere convenient. Moving that directory or changing a builder WORKDIR
    produces an operator that works under make run and panics in the container.

    Verification

    Docs-only change, no functional code touched.

  • .coderabbit.yaml validated against CodeRabbit's live JSON schema (passes)

  • All relative links resolve; every referenced make target exists in the Makefile

  • README TOC verified against doctoc's slug algorithm, so the pre-commit hook is a no-op

  • hack/cma-verify-history.sh passes

  • Trailing-whitespace, CRLF, end-of-file, and language-matters pre-commit equivalents all clean
  • E2Es are not meaningful for a documentation change and will likely need /override.

    Checklist

  • Commits are signed with Developer Certificate of Origin (DCO)
  • Tracked in AUTOSCALE-896 rather than a GitHub issue.

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

    Summary by CodeRabbit

    Documentation
    Added an overview of the Custom Metrics Autoscaler Operator for OpenShift, including its architecture and key components.
    Added contribution guidelines covering development workflows, review requirements, testing, coding standards, and common commands.
    Added project guidance for repository structure, architecture, downstream maintenance, and known pitfalls.
    Added links and navigation for user and developer documentation.
    Chores
    * Added automated review configuration with tailored path exclusions, review guidance, security checks, and code-quality tools.

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

    Diff: 563 lines (+422 / -141) across 7 files Reviewer: joelsmith Review duration: 7260m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 563 lines diff across 7 files
    0.50
    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.379
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #101"
    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: 49.7% (MEDIUM) · Higher = larger blast radius
    49.7%
    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: 19.6% · Safe to merge
    19.6%