← Back to Pull requests

Keep tool paths of generated files relative to the execution root #901

Closed
fmeum closed this pull request without merging on Oct 09, 2026 22:54 UTC
View on GitHub
fmeum fmeum commented on Sep 24, 2026 14:14 UTC
Author

_compute_tool_paths prefixes every relative tool path with the package of the cc_toolchain, which turns exec-cfg paths into non-existent ones. With apple_support 2.8.4, which Bazel@HEAD now bundles and thus selects by default on macOS, $(CC) expands to the nonsensical

external/apple_support++apple_cc_configure_extension+local_config_apple_cc/bazel-out/darwin_arm64-opt-exec-ST-<hash>/bin/external/apple_support+/crosstool/wrapped_clang

instead of

bazel-out/darwin_arm64-opt-exec-ST-<hash>/bin/external/apple_support+/crosstool/wrapped_clang

This PR keeps tool paths that start with the output directory as they are.

Diff: 154 lines (+150 / -4) across 4 files Reviewer: keith Review duration: 22120m
All Vouch review confidence checks passed
Residual risk 0.07 = Change Risk (0.38) × (1 − Review Confidence (0.81)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.38 · 154 lines diff across 4 files
0.38
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.71 · 4 substantive comment(s)
0.71
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
81%
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.302
Real PR Conversation Timeline
7 items
fmeum fmeum commented on code on Sep 24, 2026 14:51 UTC
Code Review
cc/cc_toolchain_config_lib.bzl:1
@@ -448,7 +448,9 @@ def tool_path(name, path):
     Args:
         name: Name of the tool.
         path: Location of the tool; Can be absolute path (in case of non hermetic
-            toolchain), or path relative to the cc_toolchain's package.
+            toolchain), path relative to the cc_toolchain's package, or the path of a file

            toolchain), a path relative to the cc_toolchain's package, or the path of a file

fmeum fmeum commented on code on Sep 24, 2026 14:52 UTC
Code Review
cc/cc_toolchain_config_lib.bzl:1
@@ -448,7 +448,9 @@ def tool_path(name, path):
     Args:
         name: Name of the tool.
         path: Location of the tool; Can be absolute path (in case of non hermetic
-            toolchain), or path relative to the cc_toolchain's package.
+            toolchain), a path relative to the cc_toolchain's package, or the path of a file
+            generated by the build as returned by `File.path`, e.g. of a compiler wrapper
+            built in the exec configuration.

            toolchain), a path relative to the cc_toolchain's package, or the path of a
            generated file.

keith keith approved these changes on Sep 24, 2026 16:25 UTC
Approved Reviewer

Approved these changes.

trybka trybka approved these changes on Sep 24, 2026 19:28 UTC
Approved Reviewer

Approved these changes.

meteorcloudy meteorcloudy commented on Oct 09, 2026 09:39 UTC
Contributor

Is this one imported? The internal CL is gone

lilygorsheneva lilygorsheneva commented on Oct 09, 2026 17:25 UTC
Contributor

It still exists internally, stuck on some tests that were misbehaving last week
.

Reviewers
Assignees
fmeum fmeum
Labels
risk: low confidence: 81.1% 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.6% (MEDIUM) · Higher = larger blast radius
37.6%
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: 81.1% · Lower = rushed or shallow review
81.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: 7.1% · Safe to merge
7.1%