← Back to Pull requests

Fix nullability of Network browse results handler arguments #889

Open
unknown opened this pull request with 143 lines diff across 1 files
View on GitHub
unknown unknown commented on Nov 05, 2026 21:15 UTC
Author

nw_browser_browse_results_changed_handler_t sits inside NW_ASSUME_NONNULL_BEGIN, so objc2-network typed its old and new results as NonNull<NWBrowseResult>. Network passes NULL as the old result when a service appears and as the new result when it disappears, which is why nw_browse_result_get_changes takes both as _Nullable.

I saw it with a Bonjour listener and browser on macOS 26.7.1, iOS 26.6.2 and iPadOS 26.6.2, where every added and removed result handed the closure a NULL NonNull. I reported the header's annotation to Apple as FB25452730.

The translation config had no way to change the nullability of a block typedef's parameters, so typedef.<name>.arguments.<index> now takes the same overrides as function arguments, and the Network config uses it for the two results. The handler now takes *mut NWBrowseResult for both. The regenerated file is on the upstream/network-browse-result-nullability branch of my objc2-generated fork.

This fixes the nullability half only. The typedef still cannot be built from a closure, since its trailing C bool is not EncodeArgument, the limitation discussed in #752.

Diff: 143 lines (+107 / -36) across 1 files Reviewer: madsmtm Review duration: 24370m
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.33) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 143 lines diff across 1 files
0.33
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.297
Real PR Conversation Timeline
1 comments
"Review active on #889"
general weight: 0.35
Reviewers
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: 32.7% (LOW) · Higher = larger blast radius
32.7%
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: 17.4% · Safe to merge
17.4%
Repository