← Back to Pull requests

Read the whole release response in install.sh #139

Closed
unknown closed this pull request without merging on Nov 23, 2026 06:00 UTC
View on GitHub
unknown unknown commented on Nov 23, 2026 05:45 UTC
Author

What and why

scripts/install.sh printed curl: (23) Failure writing output to destination on a successful install (seen while installing 0.34.25 on WSL). The latest-tag lookup was curl ... | grep -m1 '"tag_name"'. grep exits at the first match, and when more of the API response arrives after that, curl fails writing it. Whether it happens depends on how the response is split on the network, so it shows up on some installs and not others.

Changes

  • scripts/install.sh: grep '"tag_name"' | head -n 1 instead of grep -m1, so grep reads the whole response and curl can write all of it. Same tag, same first-match semantics.

  • tests/install_sh.rs (new, unix only): runs the script with the real curl against a local server. A small curl wrapper on PATH rewrites the three GitHub URLs to the server and refuses any other URL. The release response puts tag_name near the top, as GitHub does, followed by a 1 MiB body, so the old pipeline fails every time.

  • CHANGELOG entry under Unreleased.
  • The README's curl | sh command fetches the script from main, so this reaches new installs on merge, without a release.

    Testing

  • New test fails on the old script with exactly curl: (23) Failure writing output to destination (the install itself still succeeds there), and passes with the fix. Revert proof with a patch file: red, then green again. Five repeated runs on the fix: all green.

  • Mutation: changing the cut field from 4 to 3 fails the test (the installed version no longer matches).

  • Against the real API (21 KB response), 10 runs of each pipeline: the old one did not hit the error in those runs, and the new one returned v0.34.25 all 10 times.

  • WSL: cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test --all (359 passed), node --test 'npm/*/.test.mjs' (10 passed), sh -n scripts/install.sh. shellcheck is not installed here, so it did not run.

  • M3 (macOS /bin/sh): result in a comment below.
  • Notes for reviewers

    AI disclosure: written with Claude Code; I reviewed and ran the checks above.

    ---

  • cargo test passes

  • cargo clippy --all-targets -- -D warnings is clean

  • cargo fmt applied

  • No emoji; code comments and docs are in English
  • Diff: 281 lines (+210 / -71) across 3 files Reviewer: youdie006 Review duration: 15m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 281 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%
    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.338
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #139"
    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: 39.7% (MEDIUM) · Higher = larger blast radius
    39.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: 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: 17.2% · Safe to merge
    17.2%