← Back to Pull requests

Refactor automatic container updates into script-driven matrix jobs #417

Closed
unknown closed this pull request without merging on May 26, 2026 18:56 UTC
View on GitHub
unknown unknown commented on May 26, 2026 16:27 UTC
Author

This updates the automatic container-update workflow to separate update detection from PR creation, so only projects with actual version changes proceed to update jobs. It also enforces a stable branch-per-project model so each app directory is managed on exactly one automation branch.

  • Script-driven update detection

  • - Added script/outdated-apps to check all updatable apps in one pass.
    - Added --json output mode that returns matrix-compatible JSON for outdated apps, or {} when none are outdated.
    - Added GitHub Actions annotation warnings (::warning::...) when an app check fails, so failures are visible in the Actions UI while continuing detection.

  • Matrix-based workflow orchestration

  • - Replaced per-app check_ and Update_ jobs with:
    - Find_outdated_apps job to compute outdated apps once.
    - Update_outdated_apps matrix job to create/update PRs only for apps returned by the detector.
    - Added a guard so update jobs do not run when detector output is {}.

  • Per-project branch ownership

  • - Standardized automated PR branch naming to update-automatically-<app> via PR_BRANCH_PREFIX + PR_BRANCH_NAME.
    - This prevents cross-project branch reuse and keeps each app subdirectory isolated to one branch lifecycle.

  • Workflow generation and trigger updates

  • - Implemented changes in script/generate-workflow-files and regenerated .github/workflows/update-automatically.yml.
    - Expanded push trigger patterns to include both update-automatically and update-automatically-*.
    - Upgraded the workflow checkout action in this flow to actions/checkout@v5.

  • Permissions hardening

  • - Added explicit least-privilege permissions:
    - detection job: contents: read
    - update job: contents: write, pull-requests: write

    Find_outdated_apps:
      outputs:
        apps: "${{ steps.outdated_apps.outputs.apps }}"
      steps:
        - uses: actions/checkout@v5
        - id: outdated_apps
          run: echo "apps=$(script/outdated-apps --json)" >> "$GITHUB_OUTPUT"
    
    Update_outdated_apps:
      needs: [Find_outdated_apps]
      if: "${{ needs.Find_outdated_apps.outputs.apps != '{}' }}"
      strategy:
        matrix: "${{ fromJSON(needs.Find_outdated_apps.outputs.apps).include }}"
      with:
        PR_BRANCH_PREFIX: update-automatically-
        PR_BRANCH_NAME: "${{ matrix.app }}"
    

    Diff: 293 lines (+219 / -74) across 3 files Reviewer: parkr Review duration: 148m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 293 lines diff across 3 files
    0.40
    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.340
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #417"
    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: 39.9% (MEDIUM) · Higher = larger blast radius
    39.9%
    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: 15.8% · Safe to merge
    15.8%