← Back to Pull requests

ci(e2e): validate expired-resource cleanup coverage for slot subscriptions (AROSLSRE-2945) #8357

Open
unknown opened this pull request with 263 lines diff across 3 files
View on GitHub
unknown unknown commented on Dec 01, 2026 22:08 UTC
Author

Jira: AROSLSRE-2945

What

Adds cleanup-coverage, a test module command that fails when a managed subscriptions.e2e entry in test/e2e-config/e2e-slots.yaml has no delete-expired-*-resource-groups job with the expected cluster profile in the openshift/release periodic cleanup configuration.

It ships with unit tests and a make -C test validate-cleanup-coverage target.

Why

The periodic cleanup config needs one job per subscription and nothing verified that a newly onboarded slot subscription got one. Stage-01 accumulated an expired resource group for over a week in November 2026 because of that gap (AROSLSRE-2595). The check names the missing subscription and the expected VAULT_SECRET_PROFILE, so the fix is the exact job block to add.

Testing

  • go test ./util/cleanupcoverage/ covers a covered subscription, a missing job, a wrong profile, an unmanaged skip, a subscription reached through two pools, an unknown environment, config parsing, and file/URL loading including a 404.

  • go run ./test/cmd/cleanup-coverage against openshift/release main prints cleanup coverage OK: 20 managed subscriptions across 5 environments (3 unmanaged subscriptions skipped).

  • Failure path: removing the Stage-01 CUSTOMER_SUBSCRIPTION from a local copy fails with environment "stg" subscription "ARO HCP E2E Hosted Clusters - Stage - 01 (MCA Sponsorship)" has no delete-expired resource-groups job (expected VAULT_SECRET_PROFILE "stg-rh").

  • go vet and gofmt are clean on the new packages.
  • Special notes for your reviewer

  • Pools with slot_assets.e2e_identities.provisioning: unmanaged are skipped; their subscriptions are owned outside ARO-HCP. That covers Hypershift Managed Azure and the Test Tenant ARO HCP E2E.

  • Enforcement lands in openshift/release as a Prow presubmit (cleanup-coverage, run_if_changed on the slot catalog and dev-ci config) plus a daily periodic for reverse drift. That PR lands after this one so the command exists on main.
  • Diff: 263 lines (+197 / -66) across 3 files Reviewer: redhat-chai-bot Review duration: 197m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.39) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 263 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.334
    Real PR Conversation Timeline
    1 comments
    "Review active on #8357"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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.3% (MEDIUM) · Higher = larger blast radius
    39.3%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 20.9% · Safe to merge
    20.9%
    Repository