← Back to Pull requests

dev-desktop: make the get-all-crates refresh robust against index squashes and OOM #1307

Closed
unknown closed this pull request without merging on Nov 14, 2026 23:50 UTC
View on GitHub
unknown unknown commented on Nov 10, 2026 15:02 UTC
Author

Two fixes to refresh-crates.sh, the script behind the (still disabled) get-all-crates job on dev desktops.

Survive crates.io-index squashes

The crates.io-index repository is periodically squashed and force-pushed upstream. git pull --force then fails with "refusing to merge unrelated histories", breaking the job until someone removes
the clone by hand.

The script now fetches and hard-resets to origin/HEAD (plus git clean -fdx) instead of pulling. It also:

  • drops set -x to reduce journal noise

  • disables git credential prompts (GIT_TERMINAL_PROMPT=0)

  • calls get-all-crates by absolute path
  • Limit download concurrency (-j 4)

    The job was getting OOM-killed. get-all-crates keeps each downloaded crate in memory until it is written, and does not bound the number of pending writes (for_each_concurrent(None, …)). With the
    default of 50 concurrent requests, downloads outpace disk writes, and memory grows until MemoryMax is hit.

    Testing on a dev desktop showed only slight memory growth at -j 5, so this uses -j 4 for some headroom. The proper fix is bounding pending writes in get-all-crates itself; this is a stopgap until then:

  • https://github.com/dtolnay/get-all-crates/pull/15, or

  • https://github.com/dtolnay/get-all-crates/pull/14
  • Not in this PR

    The timer stays disabled. Before enabling it, I plan to do a supervised full run and to check disk space for /var/cache/all-crates on the desktops.

    alternatives


  • not sure if increasing EBS iops is an option?
  • Diff: 191 lines (+143 / -48) across 2 files Reviewer: Mark-Simulacrum Review duration: 6288m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 191 lines diff across 2 files
    0.36
    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.315
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1307"
    general weight: 0.35
    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: 35.9% (MEDIUM) · Higher = larger blast radius
    35.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: 14.2% · Safe to merge
    14.2%