← Back to Pull requests

OCPCRT-640: refresh child-bug PRs when a parent bug transitions to VERIFIED #817

Closed
unknown closed this pull request without merging on Sep 16, 2026 19:51 UTC
View on GitHub
unknown unknown commented on Sep 15, 2026 23:07 UTC
Author

Requested and assisted by machine424 via Slack.

What

When the release-controller Jira verifier transitions a bug from ON_QA to VERIFIED, also post /jira refresh on the open PRs of any child (clone) bugs that are still carrying the jira/invalid-bug label.

Why

Backport (release-) bug PRs must satisfy a "waterfall" dependency: the jira-lifecycle-plugin marks them jira/invalid-bug until the parent (higher-version) bug reaches a valid state (VERIFIED, RELEASE PENDING, or one of the CLOSED () states). That validation is GitHub-event-driven — it only re-evaluates on PR create / title edit. When the parent bug becomes valid after the child PR was opened, nothing re-triggers the check, so the child PR stays blocked until someone manually comments /jira refresh.

VERIFIED is the first state that satisfies the dependency, and the release-controller is the component that performs that transition — so it is the natural, event-accurate place to nudge the affected child PRs.

Tracked by OCPCRT-640.

How

  • New best-effort helper refreshChildPRs(issue) in pkg/jira/jira.go, invoked right after a successful ON_QA → VERIFIED transition in VerifyIssues().

  • It walks the bug's issue links using Blocks and Depend link types (mirroring the jira-lifecycle-plugin dependency resolution), resolves their linked GitHub PRs via Jira remote links, and — only for open PRs in the openshift and openshift-eng orgs that still carry the jira/invalid-bug label — posts /jira refresh.

  • Uses direct CreateComment (no dedup overhead — VERIFIED fires once per bug). Failures are logged and never block parent verification.
  • Known limitation

    This fires only when the release-controller itself transitions a bug to VERIFIED. Bugs verified externally (e.g. via /verified later → manual QA) are not covered — that would require Jira webhooks or periodic polling.

    Testing

  • TestRefreshChildPRs (table-driven, fakejira/fakegithub): Blocks link, Depend link, no children, missing label, org allow-list, openshift-eng org, multiple mixed links, unrecognized link type, error handling (9 sub-tests).

  • go build ./..., go test ./pkg/jira/..., gofmt, go vet all clean.
  • ---
    AI-generated. Review for accuracy.

    Diff: 309 lines (+231 / -78) across 3 files Reviewer: machine424 Review duration: 1243m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 309 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%
    56%
    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.343
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #817"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 40.2% (MEDIUM) · Higher = larger blast radius
    40.2%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 17.4% · Safe to merge
    17.4%