← Back to Pull requests

feat(image-updater): render run summary artifacts (AROSLSRE-2916) #8306

Closed
unknown closed this pull request without merging on Nov 28, 2026 00:01 UTC
View on GitHub
unknown unknown commented on Nov 27, 2026 16:08 UTC
Author

Jira: AROSLSRE-2916

What

image-updater summary turns the artifacts of a completed run into a self-contained HTML page, a JSON artifact and the pull request body.

| Artifact | Flag | Content |
|---|---|---|
| HTML card | --output | revision, base commit, branch, templatize source, generated time, run link, created pull request link, changed count, per-component old and new digests with tag and status |
| JSON | --json-output | the same report for later comparison |
| Pull request body | --body-output | markdown table with the changed components only; the page and JSON keep the full set |

  • Inputs: --updates is the JSON output of update --output-format json. --receipt is the receipt publish prints and supplies the created pull request link.

  • --receipt is optional, so the body can be prepared before publishing. --pull-request-url links an existing pull request when no receipt exists yet, and --job-url links the run.

  • At least one of --output, --json-output or --body-output is required. --revision is required by the page and the JSON report, and by nothing else: a body-only run takes just --updates and --body-output.

  • Each artifact is rendered in memory and replaced through a temporary file and rename, so a failed write leaves the previous artifact intact. Component names render through html/template, and a receipt without a pull request URL is refused.
  • Why

    At VERBOSITY=0 a completed run left only the updater result line and the Slack webhook response, so a four-minute run that changed eight files looked like a no-op. The step wiring in openshift/release consumes these artifacts under ${ARTIFACT_DIR}, and the card must link the digest pull request the run published.

    Command lifecycle

  • RawSummaryOptions holds the input paths, report metadata and destinations (internal/options/summary.go).

  • Validate rejects missing inputs and destinations before any file is read.

  • Complete reads and parses the update results and, when given, the publish receipt.

  • Run renders and writes the requested artifacts.

  • cmd/summary.go orchestrates Validate, Complete, Run; construction fails on a binding error.
  • Testing

  • go test -C tooling/image-updater ./...

  • Local rehearsal against real registries: nine components resolved anonymously in 37 s, then the command wrote a 2.3 KB page, a 3.3 KB JSON report and a 1.7 KB body; the page reported Components changed: 9 and linked the pull request.

  • Tests cover required inputs and destinations, malformed updates and receipt JSON, a receipt without a URL, body generation without a receipt, the pull request URL fallback, HTML escaping, the JSON round trip, changed-only body rows and atomic artifact replacement.
  • https://prow.ci.openshift.org/view/gs/test-platform-results-public/pr-logs/pull/openshift_release/89576/rehearse-89576-periodic-ci-Azure-ARO-HCP-main-image-updater-image-updater-tooling/2126380818661117952

    !image

    Diff: 388 lines (+291 / -97) across 4 files Reviewer: raelga Review duration: 473m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 388 lines diff across 4 files
    0.43
    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.357
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #8306"
    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: 43.1% (MEDIUM) · Higher = larger blast radius
    43.1%
    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: 17% · Safe to merge
    17%
    Repository