jextract/jni: Support async closures (#834) #913
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.39) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 133 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.293
Real PR Conversation Timeline
1 comments
"Review active on #913"
general
weight: 0.35
amanmaurya92
Resolves #834.
Previously, async closures passed from Java to Swift were not supported in JNI mode. Passing an async closure either failed to translate or incorrectly matched synchronous functional interfaces like
RunnableorFunction.This adds JNI support for
@escaping (...) async -> Tclosures:Exclude async closures from matching synchronous
KnownJavaFunctionalInterfaces.Generate synthetic
@FunctionalInterfacewrappers whoseapplymethod returnsCompletableFuture<T>(orSimpleCompletableFuturein legacy future mode).Add
JavaCompletableFutureandJavaSimpleCompletableFutureinSwiftJavawith@JavaMethod public func get() throws -> JavaObject?to match JVM method descriptors during reflection.Lower async closure invocations in the Swift thunk to await
future$?.get()and unbox the result viaT.fromJavaObject.JNIClosureTestsand real JVM runtime execution tests (void, primitive types, background completion, and exception propagation) inSwiftJavaExtractJNISampleApp.