← Back to Pull requests

fix: wait for the variant of a dependency the build can install with #2931

Merged
Tobias-Fischer merged 2 files (235 lines) on Nov 11, 2026 14:32 UTC
View on GitHub
Tobias-Fischer Tobias-Fischer commented on Nov 10, 2026 01:25 UTC
Author

With several variants of a dependency planned (for example one per Python version), the build queue treated a consumer as ready as soon as any variant of its dependency was built. In a --parallel-builds run of a multi-Python recipe set, the Python 3.12 build of a package could then start as soon as only the Python 3.13 build of its dependency was done, and its host environment failed to solve.

Two changes in src/build_queue.rs:

1. Direct dependencies: when the plan has a variant of the dependency that agrees with the consumer's variant on their shared keys (platform keys excluded), the consumer waits for that variant instead of any built one. If no planned variant agrees, the behaviour is unchanged.
2. Run dependencies of a built dependency: the same check is applied while following the install closure, so each run dependency must be built in the variant that agrees with the package that depends on it. Before, the Python 3.14 build of app could start once mid (py3.14) was built, even though mid's run dependency lib was only built for 3.12 and 3.13.

Tests: three new build_queue tests: waits_for_the_dependency_variant_of_the_same_python, waits_for_the_same_python_variant_of_a_run_dependency, and noarch_consumer_takes_any_platform_variant, which checks that a noarch consumer still takes any platform variant. The first two fail without the fix. All 17 build_queue tests pass, and cargo fmt and clippy are clean.

Found while building RoboStack's ROS recipes (lyrical, osx-arm64) with two Python variants and --parallel-builds: 99 recipes, 191 outputs. Before the fix, the run stopped on solve errors after 16 and then 157 packages. With it, the run builds all 191 cleanly, with and without --no-build-id.

🤖 Claude (AI assistant), on behalf of @Tobias-Fischer

🤖 Generated with Claude Code

Diff: 235 lines (+176 / -59) across 2 files Reviewer: None requested Review duration: 2226m
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.49) × (1 − Review Confidence (0.44)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.49 · 235 lines diff across 2 files
0.49
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 10%
44%
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
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.327
No Reviewer Assigned no_reviewer_assigned
0.120
Real PR Conversation Timeline
1 comments
"Review active on #2931"
general weight: 0.35
Reviewers
None requested
Assignees
Tobias-Fischer Tobias-Fischer
Labels
risk: low confidence: 44.2% 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: 49.1% (MEDIUM) · Higher = larger blast radius
49.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: 44.2% · Lower = rushed or shallow review
44.2%
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.4% · Safe to merge
27.4%