← Back to Pull requests

fix(release): package the binary from the configured cargo target dir (#2317) #2451

Open
unknown opened this pull request with 203 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 19, 2026 22:36 UTC
Author

Summary


  • scripts/package_native_release.sh and scripts/capture_typed_activity_rail_e2e.sh built with cargo's configured target dir but read the binary from repo/target. With CARGO_TARGET_DIR or build.target-dir set, a stale binary there could ship under the new version.

  • Both scripts now pass --target-dir explicitly (CARGO_TARGET_DIR, else repo/target) and read the binary from that same path. The build path and the read path cannot diverge.

  • The packaging binary check no longer requires the binary inside the repository (a configured target dir can live outside it). It still rejects a missing file or a symlink.

  • Regression: native_release_archives_are_reproducible_for_unix_and_windows_targets now packages with CARGO_TARGET_DIR set, a stale binary in repo/target, and a fake cargo that writes where real cargo would. The bundle must hold the fresh build. The existing runs now clear an inherited CARGO_TARGET_DIR.
  • Validation


  • Manual fixture in Git Bash (fake cargo/rustc, stale repo/target binary, CARGO_TARGET_DIR elsewhere): old script shipped stale; new script shipped fresh build.

  • bash -n on both scripts: pass. shellcheck: not installed locally.

  • git diff --check: pass. cargo fmt --all -- --check: pass.

  • node scripts/agent-plan.mjs printed -Mode Full; no desktop/admin-game source changed, so I ran powershell -File scripts/check_native_pr.ps1 -Mode Rust: pass.

  • The new regression test is in a #![cfg(unix)] file, so it runs only in CI (CI Gate), not on the Windows host.
  • Fixes #2317

    🤖 Generated with Claude Code

    Diff: 203 lines (+152 / -51) across 2 files Reviewer: chatgpt-codex-connector[bot] Review duration: 4m
    All Vouch review confidence checks passed
    Residual risk 0.33 = Change Risk (0.59) × (1 − Review Confidence (0.44)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.59 · 203 lines diff across 2 files
    0.59
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 89% · Reviewer familiarity: 35%
    44%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.318
    Sensitive Paths sensitive_paths
    0.059
    Real PR Conversation Timeline
    1 comments
    "Review active on #2451"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 44.1% reviewed sensitive_module
    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: 59.5% (MEDIUM) · Higher = larger blast radius
    59.5%
    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: 44.1% · Lower = rushed or shallow review
    44.1%
    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: 33.2% · Safe to merge
    33.2%