← Back to Pull requests

Upgrade runner Rust installation to pinned rustup flow (Cargo >= 1.78) #29

Closed
unknown closed this pull request without merging on Sep 25, 2026 05:52 UTC
View on GitHub
unknown unknown commented on Sep 25, 2026 03:53 UTC
Author

Ubuntu apt provided an outdated Rust toolchain, leaving cargo below required versions in the runner image. This change replaces apt-based Rust installation with a pinned, checksum-verified rustup bootstrap and enforces cargo >= 1.78.0 at image build time.

  • Toolchain source and versioning

  • - Removed rustc/cargo installation from apt package list.
    - Added pinned build args:
    - RUSTUP_INIT_VERSION=1.28.2
    - RUST_TOOLCHAIN_VERSION=1.78.0

  • Supply-chain hardening

  • - Added architecture-specific rustup-init SHA256 pins for x86_64 and aarch64.
    - Download now verifies rustup-init against pinned hashes before execution.

  • Deterministic runtime behavior

  • - Added explicit architecture mapping with fail-fast on unsupported architectures.
    - Set CARGO_HOME / RUSTUP_HOME and exported cargo bin path via PATH.
    - Disabled rustup auto self-update to avoid post-build drift.

  • Build-time version gate

  • - Added strict version check using dpkg --compare-versions to guarantee cargo >= 1.78.0.

    ARG RUSTUP_INIT_VERSION="1.28.2" \
      RUST_TOOLCHAIN_VERSION="1.78.0"
    
    RUN case "$(arch)" in \
        x86_64) export RUSTUP_TARGET="x86_64-unknown-linux-gnu"; export RUSTUP_INIT_SHA256="${RUSTUP_INIT_SHA256_X86_64}" ;; \
        aarch64) export RUSTUP_TARGET="aarch64-unknown-linux-gnu"; export RUSTUP_INIT_SHA256="${RUSTUP_INIT_SHA256_AARCH64}" ;; \
        *) echo "unsupported rustup architecture: $(arch)" >&2; exit 1 ;; \
      esac \
      && curl -fsSL "${RUSTUP_BASE_URL}/rustup-init" -o /tmp/rustup-init \
      && printf '%s  %s\n' "${RUSTUP_INIT_SHA256}" "/tmp/rustup-init" | sha256sum -c - \
      && /tmp/rustup-init -y --profile minimal --default-toolchain "${RUST_TOOLCHAIN_VERSION}" --no-modify-path \
      && dpkg --compare-versions "$(cargo --version | awk '{print $2}')" ge "1.78.0"
    

    Diff: 229 lines (+171 / -58) across 2 files Reviewer: parkr Review duration: 119m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.37) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 229 lines diff across 2 files
    0.37
    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%
    56%
    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.325
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #29"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 37.0% (MEDIUM) · Higher = larger blast radius
    37.0%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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% · Safe to merge
    16%