← Back to Pull requests

fix(bazel): skip INCLUDE dirs that do not exist when resolving the Windows toolchain includes #3998

Closed
unknown closed this pull request without merging on Nov 06, 2026 07:32 UTC
View on GitHub
unknown unknown commented on Nov 06, 2026 06:47 UTC
Author

Description

WindowsBazel fails on main since #3992 (Basekit 2026.2.0.661), before compiling anything:

ERROR: dev/bazel/toolchains/cc_toolchain_win.bzl:289:40: An error occurred during the fetch of repository '+cc_toolchain_extension+onedal_cc_toolchain':
...
Error: C:\Users\VssAdministrator\AppData\Local\Temp\oneapi\tcm\1.6\include
ERROR: Analysis of target '//:release' failed; build aborted

The new Basekit's setvars.bat adds a tcm\1.6\include directory to INCLUDE that is not installed. _add_builtin_include_dir resolves every INCLUDE entry with repo_ctx.path(p).realpath, which fails on a missing path. The same error is in the PR run of #3992 (Azure build 65578) and in the main run for 2957a67fc (build 65644); the last green WindowsBazel on main is 500d666a0, before #3992.

The fix resolves an entry only if it exists. Listing a missing directory among the builtin include dirs is harmless, so the entry itself is still added as before.

The other realpath calls under dev/bazel resolve tools that were found on disk, so they cannot hit this.

Checked locally: the toolchain files load (bazel build --nobuild on Linux). The Windows result comes from this PR's WindowsBazel job.

---

Checklist:

Completeness and readability

  • I have commented my code, particularly in hard-to-understand areas.

  • Git commit message contains an appropriate signed-off-by string _(see CONTRIBUTING.md for details)_.

  • I have resolved any merge conflicts that might occur with the base branch.
  • Testing

  • I have run it locally and tested the changes extensively.

  • All CI jobs are green or I have provided justification why they aren't.
  • Performance

    Not applicable: build configuration only.

    🤖 Generated with Claude Code

    Diff: 237 lines (+177 / -60) across 2 files Reviewer: napetrov Review duration: 45m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 237 lines diff across 2 files
    0.37
    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.327
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3998"
    general weight: 0.35
    Reviewers
    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: 37.2% (MEDIUM) · Higher = larger blast radius
    37.2%
    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.7% · Safe to merge
    14.7%