← Back to Pull requests

half: Improve tests using special values migrated to harness #2758

Closed
unknown closed this pull request without merging on Sep 08, 2026 16:25 UTC
View on GitHub
unknown unknown commented on Jul 29, 2026 09:01 UTC
Author

This PR improves the half-float storage conformance tests by leveraging targeted special values (edge cases) and centralizing the dataset generation in the test harness:

Centralize Special Values: Migrated the floating-point and integer special value datasets (specialValuesFloat, specialValuesDouble) and their generator helper functions from the conversions conformance suite into the centralized test harness (test_common/harness). This makes these edge-case datasets globally accessible for other conformance tests.
Thread-safe Initialization: Refactored the initialization of the special value datasets to use C++11 thread-safe static local initialization. This removes the need for explicit locking via std::recursive_mutex and associated includes.

  • Enhance Half-Float Storage Tests: Updated the reference loops in Test_vStoreHalf.cpp (vStoreHalf and vStoreaHalf tests) to use the migrated special values. Instead of using a slow sequential bit-pattern loop, the tests now seed blocks with targeted edge cases (NaNs, infinities, subnormals) before padding with random data.
  • Ref #2723

    Diff: 141 lines (+105 / -36) across 1 files Reviewer: shajder Review duration: 59483m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.56) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.56 · 141 lines diff across 1 files
    0.56
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    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.296
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.056
    Real PR Conversation Timeline
    1 comments
    "Review active on #2758"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.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: 55.8% (MEDIUM) · Higher = larger blast radius
    55.8%
    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: 60.5% · Lower = rushed or shallow review
    60.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: 22.1% · Safe to merge
    22.1%