← Back to Pull requests

Migration of Batch 3 of tests to rules_testing #4445

Closed
unknown closed this pull request without merging on Nov 20, 2026 23:26 UTC
View on GitHub
unknown unknown commented on Nov 19, 2026 01:17 UTC
Author

Migrates the next batch of 5 Starlark test suites from @bazel_skylib//lib:unittest.bzl (analysistest) to @rules_testing:

  • //test/unit/aliases:aliases_test.bzl: Replaces analysistest.make and _assert_extern with analysis_test, test_suite, util.helper_target, and env.expect.that_action(...).argv().contains_predicate(matching.str_startswith(...)).

  • //test/unit/check_runfiles:check_runfiles_test.bzl: Splits the lib, bin, dylib, and static runfile checks into per-test analysis_test functions under test_suite using env.expect.that_collection(...), while keeping the shared libbar.so and cc_lib target names so the mangled solib exclusion check remains intact.

  • //test/unit/windows_stdlib:windows_stdlib_test.bzl: Converts both pure Starlark toolchain flag tests from analysistest.make (with a dummy filegroup) to unit_test + test_suite, using that_collection(...).contains_exactly(...).in_order() and that_str(...).contains(...).

  • //test/unit/link_deps:link_deps_test.bzl (+ BUILD.bazel): Replaces analysistest.make with an analysis_test macro (target = ":main_lib") asserting via has_provider(CcInfo) and that_collection(...).

  • //test/rustdoc_runfiles:runfiles_test.bzl (+ BUILD.bazel): Replaces analysistest.make with an analysis_test macro (target = ":runtime_data_test"), relying on transitive target incompatibility propagation from :runtime_data_test rather than duplicating target_compatible_with on the test target.
  • Diff: 191 lines (+143 / -48) across 2 files Reviewer: UebelAndre Review duration: 2768m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.59) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.59 · 191 lines diff across 2 files
    0.59
    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.315
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.059
    Real PR Conversation Timeline
    1 comments
    "Review active on #4445"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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.1% (MEDIUM) · Higher = larger blast radius
    59.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: 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: 25.6% · Safe to merge
    25.6%