← Back to Pull requests

Add a `map!` method for a `Tuple` source #63528

Open
albertomercurio opened this pull request with 68 lines diff across 3 files
View on GitHub
albertomercurio albertomercurio commented on Oct 01, 2026 23:19 UTC
Author

The docstring of map! says map!(function, destination, collection...), but a Tuple collection was a MethodError, while map accepts it.

The new method uses foldl, which is unrolled for a Tuple, so it does not allocate when the elements have different types. It has the semantics of the array method: results are written in order, f is called once per element written, it stops at the end of dest, and the rest of dest is untouched.

Only the one-source case is added: the N-source map_n! cannot accept a Tuple as is, since LinearIndices(x) treats it as an array size.

Closes #63526

Diff: 68 lines (+68 / -0) across 3 files Reviewer: adienes Review duration: 93289m
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.38) × (1 − Review Confidence (0.62)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.38 · 68 lines diff across 3 files
0.38
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.35 · 1 substantive comment(s)
0.35
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
61%
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.253
Real PR Conversation Timeline
2 items
adienes adienes requested changes on Oct 02, 2026 00:01 UTC
Changes Requested Reviewer

I think map! needs broader fixes that should just make it work with any iterable. also note that this function only defines two-arg map!(_, _) but it's supposed to work with varargs.

Reviewers
Assignees
albertomercurio albertomercurio
Labels
risk: low confidence: 61.8% 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: 38.2% (MEDIUM) · Higher = larger blast radius
38.2%
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: 61.8% · Lower = rushed or shallow review
61.8%
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: 14.6% · Safe to merge
14.6%