← Back to Pull requests

ci: mirror native issue priority to public labels #3901

Closed
unknown closed this pull request without merging on Nov 18, 2026 17:35 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 17:15 UTC
Author

Summary

Extend Issue Triage to mirror GitHub’s native Priority field in one public tier label.

Motivation / Context

Contributors can see the priority tier directly on public issues. Native Priority drives the mirror.

Fixes: #3900
Related: N/A

Type of Change

<!-- Check all that apply -->

  • Bug fix (non-breaking change that fixes an issue)

  • New feature (non-breaking change that adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to change)

  • Documentation update

  • Refactoring (no functional changes)

  • Build/CI/tooling
  • Component(s) Affected

  • CLI (cmd/aicr, pkg/cli)

  • API server (cmd/aicrd, pkg/server)

  • Recipe engine / data (pkg/recipe)

  • Bundler and deployers (pkg/bundler, pkg/component)

  • Collectors / snapshotter (pkg/collector, pkg/snapshotter)

  • Validator (pkg/validator)

  • Core libraries (pkg/errors, pkg/k8s)

  • Docs/examples (docs/, examples/)

  • Other: Issue Triage and PR Label Guard workflows
  • Implementation Notes

  • Map Urgent and High to priority/P0, Medium to priority/P1, and Low to priority/P2.

  • Read the current field for set, change, clear, and targeted manual resync. Serialize runs per issue.

  • Use additive label writes and remove obsolete mirrors. The PR guard scans all label pages.

  • Filter field_added and field_removed at the job because the pinned actionlint predates those activities.
  • Testing

    node --test .github/scripts/sync-priority-label.test.cjs .github/scripts/stale-issues.test.cjs
    actionlint -shellcheck= .github/workflows/triage.yaml .github/workflows/pr-label-guard.yaml
    unset GITLAB_TOKEN
    GOMAXPROCS=6 make qualify
    

    Full qualification and all 51 script tests passed. The pinned actionlint and yamllint passed. A read-only simulation used live Priority values from one open and one closed issue.

    Risk Assessment

    <!-- Select one and explain -->

  • Low — Isolated change, well-tested, easy to revert

  • Medium — Touches multiple components or has broader impact

  • High — Breaking change, affects critical paths, or complex rollout
  • The change publishes tier labels on AICR issues and makes additive label changes.

    Rollout notes: Verify a live Priority set, change, and clear after merge. Existing values need a one-time backfill. Label edits advance issue activity timestamps.

    Checklist

  • Tests pass locally (make test with -race)

  • Linter passes (make lint)

  • I did not skip/disable tests to make CI green

  • I added/updated tests for new functionality

  • I updated docs if user-facing behavior changed

  • Changes follow existing patterns in the codebase

  • Commits are signed off and cryptographically signed (git commit -s -S) — GPG signing info
  • Diff: 365 lines (+273 / -92) across 4 files Reviewer: lalitadithya Review duration: 20m
    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 · 365 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.353
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3901"
    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.7% (MEDIUM) · Higher = larger blast radius
    42.7%
    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.9% · Safe to merge
    16.9%
    Repository