← Back to Pull requests

Make the package JET-clean and run JET on all reported code #363

Open
unknown opened this pull request with 196 lines diff across 2 files
View on GitHub
unknown unknown commented on Oct 17, 2026 16:03 UTC
Author

I think I found a solution which is the best of both worlds from our discussion of the feature.

The JET workflow analyzed only FixedPointNumbers itself and printed an unrestricted report on the side, which is less efficient can be confusing as they differed. Reports from Base code reached through FixedPointNumbers are worth catching as well, so the workflow now runs test_package without target_modules and fails on any report. This helps to find regressions both in future FixedPointNumbers versions and in future Julia versions.

This required removing the three remaining causes of reports on Julia 1.10 and 1.13 when not limiting JET to FixedPointNumbers:

  • signed and unsigned for FixedPoint threw a MethodError only because rem has no method for a type argument. They now throw the MethodError explicitly. This enables JET to understand that this is on purpose (and humans who haven't read the comment).

  • isinteger reached the Fixed method of _floor through the generic _trunc for FixedPoint{<:Unsigned}, with an impossible Fixed{Union{}}, because Union{} is both Signed and Unsigned. Bounding that method by T <: Signed limits the overlap to Fixed{Union{}, f}, which has no values and now has its own method. _trunc stays unchanged.

  • rand! converted the array pointer with reinterpret, whose Base internals JET reports on Julia 1.10. The Ptr{T} constructor does the same conversion and is better style anyway.
  • Diff: 196 lines (+147 / -49) across 2 files Reviewer: PatrickHaecker Review duration: 36154m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 196 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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.344
    Diff Size diff_size
    0.316
    Real PR Conversation Timeline
    1 comments
    "Review active on #363"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 36.1% (MEDIUM) · Higher = larger blast radius
    36.1%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 19.2% · Safe to merge
    19.2%