← Back to Pull requests

Adopt typed throws in parameterized test infrastructure. #2059

Open
grynspan opened this pull request with 31 lines diff across 4 files
View on GitHub
grynspan grynspan commented on Nov 20, 2026 15:29 UTC
Author

This PR adopts typed throws in CustomTestArgumentEncodable, Test.Case, and Test.Case.Generator. Some of the adoption is just auditing (throws(any Error)) as we do need to erase the error type when storing the test function body.

I didn't modify the CustomTestArgumentEncodable protocol itself as that is public API.

I didn't make changes to parts of Runner that deal with parameterized tests; I'll handle Runner in a separate PR.

Checklist:

  • Code and documentation should follow the style of the Style Guide.

  • If public symbols are renamed or modified, DocC references should be updated.
  • Diff: 31 lines (+16 / -15) across 4 files Reviewer: harlanhaskins Review duration: 16187m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.51) × (1 − Review Confidence (0.48)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.51 · 31 lines diff across 4 files
    0.51
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.00 · 1 substantive comment(s)
    0.00
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    48%
    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.350
    Diff Size diff_size
    0.207
    Sensitive Paths sensitive_paths
    0.051
    Real PR Conversation Timeline
    2 items
    harlanhaskins harlanhaskins approved these changes on Nov 20, 2026 15:31 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    grynspan grynspan
    Labels
    risk: low confidence: 48.5% reviewed sensitive_module
    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: 51.3% (MEDIUM) · Higher = larger blast radius
    51.3%
    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: 48.5% · Lower = rushed or shallow review
    48.5%
    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: 26.4% · Safe to merge
    26.4%