← Back to Pull requests

fix(CORE-2062): read the PR's current labels in the label actions #159

Closed
unknown closed this pull request without merging on Nov 22, 2026 08:31 UTC
View on GitHub
unknown unknown commented on Nov 15, 2026 11:55 UTC
Author

What this PR does / why we need it:


Linear: CORE-2062 · Parent: CORE-2061
Merge order: ci-core (this PR) → odigos-io/odigos core-2063 PR

resolve-build-labels and resolve-kubernetes-test-versions now read the PR's labels from the API when the job runs, instead of from the event payload. A workflow re-run replays the original event, so with the payload a label added after the run started was ignored. With this change, re-running the latest run is enough to apply a label change.

Callers can then stop starting new runs on labeled/unlabeled. With cancel-in-progress concurrency, label events that arrive together (a bot that opens a PR and labels it) start runs that cancel each other in no fixed order. When the newest run is the one cancelled, GitHub shows that workflow's required check as "Expected" and the PR can't merge. This happened on odigos-io/odigos#6430.

  • New optional github-token input, defaulting to the job token (needs pull-requests: read, which every current caller already grants).

  • If the API read fails, the actions use the event's labels and log a warning, so behavior is never worse than before.

  • Outside PR events (merge_group) nothing changes.

  • The step summary says where the labels came from. The READMEs describe re-running instead of labeled/unlabeled triggers.

  • Labels are now handled as a JSON array, so a label name containing a comma no longer splits into fragments.
  • Risks: callers on a runner without gh fall back to the event's labels with a warning. The odigos and ebpf-java-instrumentation callers use Depot runners, which include it.

    Proof

    A temporary workflow on odigos-io/odigos#6437 called both actions from this branch. Attempt 1 ran when the PR opened with no labels. build: arm and test-k8s/1.29 were added afterwards, and attempt 2 re-ran the same event, whose payload still had no labels.

    Attempt 1: PR opened with no labels: amd64 only, Kubernetes 1.32 only.
    <img width="700" alt="Attempt 1 job summary: platforms linux/amd64, versions 1.32" src="https://github.com/user-attachments/assets/23f848e8-fad2-40d6-a742-71e87c11c082" />

    Attempt 2: re-run after adding build: arm and test-k8s/1.29: both platforms, and 1.29 from its label.
    <img width="700" alt="Attempt 2 job summary: platforms linux/amd64,linux/arm64, versions 1.32 and 1.29" src="https://github.com/user-attachments/assets/d8cf9aef-740f-4838-a3ad-5c9ca3ab7d35" />

    Changelog entry: Does this PR introduce a user-facing bug fix, feature, dependency update, or breaking change??


    ``release-note
    NONE
    ``

    🤖 Generated with Claude Code

    Diff: 356 lines (+267 / -89) across 4 files Reviewer: damemi Review duration: 9876m
    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 · 356 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.352
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #159"
    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: 42.5% (MEDIUM) · Higher = larger blast radius
    42.5%
    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: 16.8% · Safe to merge
    16.8%