← Back to Pull requests

Use Starlark tuples for C++ object-file groups #814

Closed
dzbarsky closed this pull request without merging on Sep 23, 2026 09:35 UTC
View on GitHub
dzbarsky dzbarsky commented on Jul 31, 2026 18:06 UTC
Author

Store private _ObjectFileGroupInfo.object_files collections as immutable Starlark tuples instead of Java-backed _cc_internal.freeze lists. Tuple iteration preserves object order, generated-directory expansion, and whole-archive grouping while removing the module's remaining cc_internal dependency.

Validation: buildifier -mode=check and 30 passing link-variable and Linux, macOS, and Windows toolchain-feature analysis tests.

Diff: 7 lines (+3 / -4) across 1 files Reviewer: lilygorsheneva Review duration: 77248m
All Vouch review confidence checks passed
Residual risk 0.03 = Change Risk (0.15) × (1 − Review Confidence (0.82)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.15 · 7 lines diff across 1 files
0.15
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.71 · 3 substantive comment(s)
0.71
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
82%
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.124
Real PR Conversation Timeline
5 items
trybka trybka commented on Jul 31, 2026 18:43 UTC
Contributor

@lberki can you take a quick look at this one? I know you added some of these freezes.
IIRC it was for mutability which the tuple should address, but just wanted to get another pair of 👀 .

lilygorsheneva lilygorsheneva commented on Jul 31, 2026 23:01 UTC
Contributor

Ran some benchmarks on this and https://github.com/bazelbuild/rules_cc/pull/809. Effects range from negligible to 0.05% increases in Post-Analysis JVM Heap Memory (nothing that should trip alerts).

lberki lberki commented on Aug 03, 2026 10:30 UTC
Contributor

From my POV, this works; all I care about is that these values are immutable, and a frozen list and a tuple both are good enough for the job. I guess lists fit the use case "philosophically" more, since the arity of a tuple is part of its type and with this change, you are effectively introducing a field whose type is a tuple of unknown arity.

That said, it's appealing to remove the cc_internal dependency. @pzembrod , which approach do you prefer?

lilygorsheneva lilygorsheneva approved these changes on Sep 07, 2026 15:54 UTC
Approved Reviewer

going to send to pzembrod for review internally, if he won't look at it here

Assignees
dzbarsky dzbarsky
Labels
risk: low confidence: 82.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: 15.4% (LOW) · Higher = larger blast radius
15.4%
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: 82.1% · Lower = rushed or shallow review
82.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: 2.8% · Safe to merge
2.8%