Compute the mask penalty score in a single pass #720
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 226 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.325
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #720"
general
weight: 0.35
g4lb
Summary
ModuleMatrix.Score()read the matrix in four passes. It used about 80% of the time ofGenerateQrCode.Now
Scorereads each module one time. For each column, oneintkeeps the run length and the last 11 modules. On targets withHAS_SPAN, the scratch array comes fromArrayPool<int>.The selected masks do not change. A differential test compared old and new code in 1.15M checks, including the renderer output. All results were the same.
Apple M2 Max (ARM64), BenchmarkDotNet. I did not measure x64.
| Benchmark (ECC L unless shown) | net8.0 | net10.0 | Allocated (net10.0) |
|---|---:|---:|---:|
| Version 1 (21×21) | −4% | −23% | no change |
| Version 1, ECC H | −16% | −22% | no change |
| Version 2 | no change | −29% | no change |
| Version 4 | −28% | −57% | no change |
| Version 10 | −40% | −45% | no change |
| Version 40 (177×177) | −40% | −44% | no change |
| Version 40, ECC H | −44% | −48% | no change |
| URL, 126 characters | −35% | −47% | no change |
| 2,600 characters | −34% | −39% | no change |
Test plan
Tests pass on net8.0 and net10.0 (673). I use macOS, so I skipped the 31 GDI+ tests. The build has no new warnings.
dotnet format --verify-no-changespasses.<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Improvements
Standard QR code generation evaluates masking patterns more efficiently while retaining the existing scoring criteria, so the resulting selection behavior remains consistent.
* On supported platforms, QR generation reuses temporary memory during standard mask evaluation, reducing allocation overhead. Micro QR code scoring continues to use its existing approach.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->