← Back to Pull requests

:seedling: Read experimental checks from their definitions in the MCP catalog #5421

Closed
unknown closed this pull request without merging on Nov 18, 2026 10:50 UTC
View on GitHub
unknown unknown commented on Nov 05, 2026 19:24 UTC
Author

What kind of change does this PR introduce?

Internal refactor. The MCP catalog maintains its own list of experimental checks, duplicating the experimental flags on the check definitions.

  • PR title follows the guidelines defined in our pull request documentation
  • What is the current behavior?

    Webhooks and SBOM are marked experimental on their definitions in internal/checkdef, and the catalog copies them into a hand-maintained map. A test detects disagreement, but adding or promoting an experimental check still requires updating both places.

    What is the new behavior (if this is a feature change)?

    The checks package exposes IsExperimental(name), which reads the flag from the registered check definitions, the same source GetAll() filters on. The catalog's experimental metadata uses it, and its map is removed. checks/write.md no longer tells authors to edit the catalog.

    Check selection and catalog output stay the same. In particular, an empty but present SCORECARD_EXPERIMENTAL still enables experimental checks; the catalog's experimental flag remains independent of that environment variable.

  • Tests for the changes have been added (for bug fixes/features)
  • Which issue(s) this PR fixes

    Fixes #5406

    Special notes for your reviewer

    Rebased onto main after the check-definition refactor (4fac1b8d), which moved the experimental flag onto definitions and replaced checks/all_checks_test.go with checks/registry_test.go. The second commit derives IsExperimental from the definitions instead of a separate map, and adds TestIsExperimental to registry_test.go; TestGetAllExperimental already covers the SCORECARD_EXPERIMENTAL cases. TestExperimentalChecksMatch still checks the catalog against GetAllWithExperimental() minus GetAll().

    After the rebase: go test ./checks/... ./cmd/internal/mcp/... passes, and golangci-lint v2.15.0 reports 0 issues on ./checks/ and ./cmd/internal/mcp/catalog/.

    The catalog now imports checks. It calls only the classification accessor, not a scan or remote API. Full-repository integration tests have not been run locally.

    Does this PR introduce a user-facing change?

    ``release-note
    NONE
    ``

    Diff: 287 lines (+215 / -72) across 3 files Reviewer: justaugustus Review duration: 18205m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 287 lines diff across 3 files
    0.40
    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.339
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5421"
    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: 39.8% (MEDIUM) · Higher = larger blast radius
    39.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: 15.7% · Safe to merge
    15.7%
    Repository