Fix broadcast inference when combine_eltypesyieldsNumber(e.g.ifelse. with plain Bool mask) #3858
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.33) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 147 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.299
Real PR Conversation Timeline
1 comments
"Review active on #3858"
general
weight: 0.35
wsmoses
Fixes #3851.
Broadcasting through
AbstractReactantArrayStylecould fail whenBase.Broadcast.combine_eltypesreturned an abstractNumber(common forifelse.(mask, traced, plain)/ mixed branches). In_copy(src/TracedRArray.jl) we previously only probed by evaluating on first scalars forUnion{},Any, andTracedRNumber, then calledsimilar(..., Number, ...), which errored.Changes
src/TracedRArray.jl: in_copy, when the inferred eltype isNumber(in addition to the existing cases), infer a concrete eltype by probingfn(map(first_scalar, bc.args)...), reusing existing promotion behavior.test/core/bcast.jl: add regressions forifelse.with a plainBoolmask and mixed traced/plain branches (including cases where the first mask element isfalse).Testing
test/core/bcast.jl.Pkg.test()run completed in this branch; note: a pre-existingcore/qaExplicitImports “Qualified accesses via owners” failure was observed unrelated to these changes (reported separately contextually).Notes