← Back to Pull requests

loader: apply settings device configurations to device groups #2011

Closed
unknown closed this pull request without merging on Aug 20, 2026 22:26 UTC
View on GitHub
unknown unknown commented on Aug 14, 2026 21:36 UTC
Author

Fixes #1915.

The settings file's device_configurations list decides which VkPhysicalDevices an app gets to see, but only vkEnumeratePhysicalDevices was honouring it. vkEnumeratePhysicalDeviceGroups didn't look at the settings at all, so an app could still get at a hidden device through a group — which is what makes the validation layer fall over in the issue.

So a group containing an excluded device now gets dropped. It calls loader_apply_settings_device_configurations rather than redoing the deviceUUID/driverUUID/driverVersion matching, so the two paths can't drift apart.

Two calls I made that are worth a second opinion:

I drop the whole group instead of removing the hidden device from it. The devices in a group are physically linked, so a group with a member missing doesn't really describe the hardware anymore. Easy to switch if you'd rather strip.

I also changed phys_dev_group_count_term to count the groups actually written. The copy loop already skips groups with physicalDeviceCount == 0, but the count included them, and new_phys_dev_groups is calloc'd — so a skipped group left a NULL that the memcpy at the end would read. Nothing sets that count to zero today so it was unreachable, but this change makes it reachable.

The count query is still an upper bound, same as the plain path does. Getting it exact would mean fetching every group's contents during a count-only call, which seemed like a bad trade.

One log message got reworded, since it named vkEnumeratePhysicalDevices and the group path calls it now too.

Tests cover a hidden singleton group, a partially hidden group, settings that match nothing, and no settings file at all. Suite's green at 693/693.

Diff: 214 lines (+160 / -54) across 2 files Reviewer: Wint3rNight Review duration: 8689m
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.60) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.60 · 214 lines diff across 2 files
0.60
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.321
Shallow Review Depth shallow_review_depth
0.289
Sensitive Paths sensitive_paths
0.060
Real PR Conversation Timeline
1 comments
"Review active on #2011"
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: 59.8% (MEDIUM) · Higher = larger blast radius
59.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: 23.6% · Safe to merge
23.6%