← Back to Pull requests

Adopt the Rust build standard #13

Open
unknown opened this pull request with 332 lines diff across 4 files
View on GitHub
unknown unknown commented on Oct 02, 2026 05:32 UTC
Author

Summary

Adopts the Rust build standard (concordat rule rust-build-defaults): the
parallel rustc frontend and the mold linker on Linux, as defaults in
.cargo/config.toml, composed into the Makefile recipes that assign
RUSTFLAGS.

Changes

  • .cargo/config.toml carries the standard's flags. Cargo selects one

  • rustflags source rather than merging them, so each source repeats the flags.
  • The Makefile composes them (STANDARD_RUSTFLAGS) into every development

  • recipe that assigns RUSTFLAGS, keeping the caller's own value; release
    builds assign an empty RUSTFLAGS, and coverage stays off the flags.
    BUILD_HOST_OS defaults to the real host and lets the tests read the Linux
    and non-Linux compositions.
  • CI installs mold through setup-rust's install-mold input (and the

  • mutation workflow's), and each coverage step assigns RUSTFLAGS explicitly.
  • Cranelift is not adopted: the crate has no tests to measure it with, so the estate's rule (adopt only where the full suite passes) cannot be met; the new developers' guide records the exception.

  • A build-standard contract test reads the configuration sources, the commands

  • make -n prints and the setup-rust steps, and is proved by mutation (every
    mutation of the configuration, the flag definition, the recipes and the
    readers fails a test).

    Evidence

    make check-fmt, make test, make lint and make markdownlint exit 0, and the concordat rule reports the repository compliant.

    Summary by Sourcery

    Adopt the Rust build standard across development tooling while explicitly keeping release and coverage builds on their platform defaults.

    Enhancements:

  • Adopt the Rust build standard by enabling parallel rustc builds and the mold linker on Linux for development, test, lint, and typecheck workflows while preserving platform defaults for release and coverage builds.

  • Document the build-standard conventions and the deliberate Cranelift exception for contributors.
  • Build:

  • Add repository-wide Cargo defaults and Makefile flag composition for the standardized development builds, including preservation of caller-provided RUSTFLAGS.
  • CI:

  • Install mold in CI through setup-rust and explicitly isolate coverage and release workflows from the development flags.
  • Documentation:

  • Add a developers' guide explaining the build standard, its exclusions, platform behavior, and Cranelift exception.
  • Tests:

  • Add configuration, Makefile, CI, coverage, and release contract tests, including mutation-tested validation of the build-standard sources and consumers.
  • Chores:

  • Add rstest as a development dependency for the build-standard contract tests.
  • Diff: 332 lines (+249 / -83) across 4 files Reviewer: chatgpt-codex-connector[bot] Review duration: 5m
    All Vouch review confidence checks passed
    Residual risk 0.28 = Change Risk (0.42) × (1 − Review Confidence (0.34)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 332 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 66% · Reviewer familiarity: 35%
    34%
    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.347
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #13"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 34.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: 42.1% (MEDIUM) · Higher = larger blast radius
    42.1%
    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: 34.5% · Lower = rushed or shallow review
    34.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: 27.6% · Safe to merge
    27.6%