refactor: extract subpackages_for_output into rattler_build_core #2955
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.41) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.41 · 189 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.314
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #2955"
general
weight: 0.35
wolfv
<!-- Your own words here. -->
Expose this logic as a function to be consumed by pixi-build-rattler-build.
---
<details>
<summary>AI-generated details (Claude Opus 5.5)</summary>
Moves the code in
get_build_outputthat fillsBuildConfiguration::subpackagesinto a publicrattler_build_core::subpackages_for_output(&IndexSet<DiscoveredOutput>, index). No behaviour change: it returns the non-skipped outputs up to and includingindexin topological order, overlaid with the variant-matched exact pins of that output, exactly as the loop did before.Motivation: pixi-build-rattler-build constructs its own
BuildConfigurationinconda/build_v1and currently passes an emptysubpackagesmap, which breakspin_subpackagein outputs that inherit from a staging output (prefix-dev/pixi#7557). With this helper, the backend can call the same function as the CLI instead of copying the logic (prefix-dev/pixi#7559), so the two can't drift apart.Verification:
cargo fmt --checkandcargo clippy -p rattler-build -p rattler_build_core --all-targets -- -D warningsare clean.test_simple.pyandtest_staging.pythat cover pins, siblings, variants, staging and ordering pass (53 passed, 3 skipped), includingtest_sibling_exact_pin_uses_matching_variantandtest_missing_pin_subpackage.cargo test --libfor both crates passes exceptsystem_tools::tests::test_system_tool, which needspatchelfonPATHand fails the same way onmainlocally.</details>