← Back to Pull requests

Skip manifests already found when scanning search paths #2033

Closed
unknown closed this pull request without merging on Sep 18, 2026 01:35 UTC
View on GitHub
unknown unknown commented on Sep 11, 2026 23:31 UTC
Author

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_FILES set to a folder plus two manifests inside that folder, vkEnumeratePhysicalDevices reports 9 devices where 5 exist, matching the log in the issue:

Original order:
      [0] pd10   [1] pd11   [2] pd00   [3] pd01
      [4] pd10   [5] pd11   [6] pd00   [7] pd01
      [8] pd0

Both call sites in add_data_files resolve to a full path before calling add_if_manifest_file, so comparing the resolved name catches the repeat. The existing copy_str_to_string_list_if_unique helper 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_files also serves layer discovery, so layers get the same protection. No existing test changes behaviour.

  • loader_get_fullpath does 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.

    Diff: 223 lines (+167 / -56) across 2 files Reviewer: Wint3rNight Review duration: 8764m
    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
    0.37
    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%
    56%
    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.324
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #2033"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 36.8% (MEDIUM) · Higher = larger blast radius
    36.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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 15.9% · Safe to merge
    15.9%