← Back to Pull requests

fix(ci): validate baseline artifacts per reusable stage #8473

Closed
unknown closed this pull request without merging on Oct 01, 2026 07:06 UTC
View on GitHub
unknown unknown commented on Sep 24, 2026 14:46 UTC
Author

Summary

Evaluate baseline artifact availability independently for each unaffected stage.

Select a baseline when it contains the complete artifact requirements for at least one candidate stage, then classify every stage as reusable or rebuilding based on its own requirements.

This continues to run in dry-run mode and does not enable stage skipping.

Motivation

Baseline selection currently combines the requirements of all unaffected stages into one strict artifact list. A missing artifact for one stage therefore rejects the baseline for every stage.

For example:

  • compiler-runtime requirements are complete;

  • profiler-apps is missing rocprofiler-systems/generic.
  • The current behavior rejects the entire baseline, preventing compiler-runtime from being identified as reusable.

    The desired behavior is:

  • compiler-runtime → available for reuse;

  • profiler-apps → rebuild.
  • This supports the baseline-selection and artifact-validation work in #7420.

    Behavior change

    Before: all-or-nothing artifact validation

    Unaffected stages
    |
    +--> compiler-runtime
    | required: base/generic
    | result: PRESENT
    |
    +--> profiler-apps
    required: rocprofiler-sdk/generic
    rocprofiler-systems/generic
    result: rocprofiler-systems/generic MISSING
    |
    v
    Flatten every stage requirement into one list
    |
    v
    Require every artifact pair to be present
    |
    +--> one pair is missing
    |
    v
    Reject the entire baseline
    |
    +--> compiler-runtime -> rebuild
    +--> profiler-apps -> rebuild

    Even though compiler-runtime was complete, the incomplete profiler-apps
    requirements prevented the baseline from being selected.

    After: validate independently reusable stage groups

    Candidate baseline
    |
    v
    Compatibility, recency, and build-health gates
    |
    v
    Keep requirements grouped by stage
    |
    +--> compiler-runtime
    | required: base/generic
    | result: COMPLETE
    |
    +--> profiler-apps
    required: rocprofiler-sdk/generic
    rocprofiler-systems/generic
    result: INCOMPLETE
    |
    v
    Is at least one complete stage group available?
    |
    +--> No -> reject the baseline
    |
    +--> Yes -> select the baseline
    |
    v
    Classify each stage independently
    |
    +--> compiler-runtime -> available for reuse
    +--> profiler-apps -> rebuild

    Multi-platform behavior

    Linux requirements -> select and validate Linux baseline artifacts
    Windows requirements -> select and validate Windows baseline artifacts
    |
    v
    Did both platforms select the same run?
    |
    +--> No -> disable automatic reuse safely
    |
    +--> Yes -> continue
    |
    v
    Stage complete on every platform?
    |
    +--> Yes -> reusable
    +--> No -> rebuild

    Preserved safety behavior

  • Commit compatibility, recency, and build-health gates remain unchanged.

  • Artifact requirements continue to use topology metadata, platform restrictions,

  • artifact type, and concrete target expansion from #8383.
  • A baseline with no complete stage groups is rejected.

  • Existing callers using required_artifacts retain strict all-artifacts-required

  • behavior.
  • The change remains dry-run only and does not enable stage skipping.
  • Changes

  • Preserve artifact requirements as named per-stage groups.

  • Add grouped baseline selection that accepts a candidate when at least one complete stage requirement group is available.

  • Validate each candidate stage independently after selecting the baseline.

  • Preserve the existing strict behavior for callers using required_artifacts.

  • Exclude empty platform-specific stage groups from baseline selection.

  • Reuse the already selected per-platform baseline during artifact-level reporting instead of repeating baseline lookups.

  • Report complete and incomplete artifact groups in baseline-selection logs.

  • Replace commit-specific fallback messages with generic “no usable baseline” reporting, while keeping detailed rejection reasons in the candidate logs.

  • Add regression coverage for partial-stage availability and the selected-baseline artifact-level path.
  • The valid artifact requirements continue to be derived using the topology, platform restrictions, artifact type, and concrete target expansion added by #8383.

    Validation

    969 passed, 2 skipped, 1 warning, 80 subtests passed
    

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: ammallya Review duration: 9620m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    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.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #8473"
    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: 52% (MEDIUM) · Higher = larger blast radius
    52%
    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: 20.5% · Safe to merge
    20.5%
    Repository