← Back to Pull requests

WIP [jnigen] Tighten up integration testing #3844

Open
unknown opened this pull request with 169 lines diff across 2 files
View on GitHub
unknown unknown commented on Dec 03, 2026 00:16 UTC
Author

While working on https://github.com/dart-lang/native/issues/3842, we found a bunch of holes in JNIgen's integration testing. Once they're fixed I'll be able to repro this bug on CI, by flipping org.gradle.parallel=true in the maven examples (not doing so in this PR since it'd turn the CI red).

  • Support stacked PRs in jnigen.yaml

  • Run pub get in every jnigen example (shouldn't be needed once we migrate jnigen to the workspace)

  • Remove leftover gradle stub from pkgs/jnigen/example/maven_libs/example/android/app/build.gradle.kts

  • Set addGradleSources: true in some of the examples. This is required to repro the bug, but for now just adds doc comments etc to the generated bindings. This exposed some other bugs:

  • - A bug in apisummarizer, where in some cases Gradle's sources could cause javadoc to enter "modular mode" and fail. Updated apisummarizer with a fix and a test.
    - android_sdk_tools.dart was deleting the groovy gradle stub but not the kotlin gradle stub (which is why it was leftover in the maven_libs example)
    - Fix some bugs in the gradle stubs themselves related to how the source artifacts were being located and filtered.
  • regenerated_examples_test.dart:

  • - It was silently ignoring failed gradle runs (a historical relic). Updated it to fail the test
    - Reuse existing comparePaths util, instead of calling git diff

    Diff: 169 lines (+126 / -43) across 2 files Reviewer: liamappelbe Review duration: 354m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.35) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.35 · 169 lines diff across 2 files
    0.35
    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%
    42%
    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.307
    Real PR Conversation Timeline
    1 comments
    "Review active on #3844"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% 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: 35.2% (MEDIUM) · Higher = larger blast radius
    35.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: 43.0% · Lower = rushed or shallow review
    43.0%
    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: 20.1% · Safe to merge
    20.1%