Repository navigation
Conversation
… and recover an empty Windows inventory detectGPUs ran once at start and gated DXGI adapters by the LUIDs under HKLM\SOFTWARE\Microsoft\DirectX\*\AdapterLuid. At boot that registry still holds the previous boot's LUIDs (it is rewritten tens of seconds after the worker starts), so the gate dropped every physical adapter and the node reported no GPUs until a restart. Two changes: the gate is stale-safe (when it would drop every non-software, non-virtual adapter it is skipped and logged), and the Windows inventory re-detects off the stats tick — every 10 s while empty, every 60 s once known, republishing only when the adapter set changed — through the GPUInventory recovery seam the Darwin build already uses. Tests: a fake registry map with stale LUIDs keeps every adapter; an empty first detection recovers on the next loop pass and the recovered adapter picks up its PDH stats by LUID key. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Daniel Martinez <[email protected]>
dmmdea
force-pushed
the
up/node-info-stale-luid-gate
branch
from
September 29, 2026 20:48
78e0a18 to
1099b67
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A Windows node can publish
"GPUs": []for hours after boot.detectGPUs()runs once at startup and gates DXGI adapters by the LUIDs underHKLM\SOFTWARE\Microsoft\DirectX\*\AdapterLuid. At boot that registry still carries the previous boot's LUIDs (measured: rewritten about 36 s after node-info started), so the RDP-clone gate (the fix in #68) drops every physical adapter, and nothing ever re-detects. Anyone starting the app at logon hits this on every Windows node.What changed (
services/nvpair-node-info):gpu_windows.go: the candidate enumeration is split from a pureselectPhysicalAdapters. When the registry gate would drop every candidate it is treated as stale: all candidates are kept and one warning is logged. The RDP-clone case, where the gate keeps a subset, is unchanged.stats_windows.go: an injectabledetect; a goroutine re-detects every 10 s while the inventory is empty, then every 60 s, and publishes through the existingGPUInventoryrecovery seam (the Darwin build already uses it) only when the set of stats keys changed. The 1 s stats tick never waits on it.stats.go: comment update forGPUInventory.Release intent
Changelog title
Windows nodes keep every GPU when the DirectX registry is stale at boot
Changelog body
Bumps
Scope
Included: the Windows GPU inventory path in
services/nvpair-node-info(stale-registry gate, background re-detect loop, README, tests). Excluded: Linux and Darwin collectors, the wire format, andservices/versions.json/CHANGELOG.md(bot-owned).Validation
Rebased on
develop; one signed-off commit.cd services/nvpair-node-info && go vet ./... && go test ./... -count=1on Windows: pass. This includes the Windows-only tests that CI's ubuntu job never runs:TestSelectPhysicalAdapters(5 cases),TestWindowsCollectorRecoversEmptyGPUInventory,TestWindowsCollectorRepublishesChangedGPUInventory.GOOS=linux go vet ./...inservices/nvpair-node-info: pass.node scripts/spdx-headers.mjs: 0 missing.Risk
Low. Windows inventory path only; the gate's clone-removal behaviour is preserved whenever it keeps at least one adapter. The re-detect goroutine runs off the stats tick and never blocks it.
Checklist
git commit -s), certifying the Developer Certificate of Origin.services/versions.jsonis written by automation — do not edit it by hand.