Skip manifests already found when scanning search paths #2033
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.37) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 223 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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
Diff Size
diff_size
0.324
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2033"
general
weight: 0.35
Wint3rNight
Duplicate elimination runs on the search path strings, so it does not catch the case where one path names a directory and another names a file inside that directory. The two strings differ, but the directory scan and the explicit file path resolve to the same manifest, so the driver is loaded twice and its physical devices are reported twice.
With
VK_DRIVER_FILESset to a folder plus two manifests inside that folder,vkEnumeratePhysicalDevicesreports 9 devices where 5 exist, matching the log in the issue:Both call sites in
add_data_filesresolve to a full path before callingadd_if_manifest_file, so comparing the resolved name catches the repeat. The existingcopy_str_to_string_list_if_uniquehelper already does exactly this.This is only visible with Vulkan 1.1 or newer, because GPDP2 gates the Linux physical device sort. The existing env var tests run at 1.0, which is why CI never caught it.
Added
EnvVarICDOverrideSetup.DirAndFileOverlapDoesNotDuplicate, which fails on main with 9 devices and passes with the fix. Full suite is 703/703.Two notes:
add_data_filesalso serves layer discovery, so layers get the same protection. No existing test changes behaviour.loader_get_fullpathdoes not canonicalise symlinks or..segments, so two different spellings of the same file are still not detected. That is outside what this issue reports and I have left it alone.The issue also suggests running these env var cases at both 1.0 and 1.1, since much loader logic depends on GPDP2. That is a broader testing change and I have kept it out of this PR, but happy to follow up if useful.