Repository navigation
fix(windows): report the WMI error code and warn on an empty os_version - #111
Merged
Merged
Conversation
CreateWmiRequest failures now end with the HRESULT, and the code that ends the result enumeration is kept instead of being dropped. os_version warns when its Win32_OperatingSystem query returns nothing, with that code when reading the results failed. Logging only, no table output or control flow changes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Author
🦩 Flamingo Code Review✅ No findings on the current head. Advisory: findings do not block the merge. Review again. New commits are not reviewed until you ask:
Or comment Started 2026-10-05 17:41 UTC · updated 2026-10-05 17:43 UTC · workflow run |
denys-gif
approved these changes
Oct 5, 2026
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.
CU-86akqy70q
Change-Set: wmi-startup-diagnostics
Problem
On a Windows host where WMI is broken, orbit's startup host-info query (
system_info,os_version,osquery_info) comes back empty and orbit exits withget UUID: invalid number of rows from system info query: 0.os_versionis the table that returns no row, and osquery gives no usable reason for it:WmiRequest creation failed to connect to server).CreateWmiRequestdrops theNext()HRESULTand returns a successful request with zero results.os_versionthen returns empty without logging anything.So the cause could only be found with a live look at the machine.
Change
wmi.cppCreateWmiRequestHRESULTnow end with it, e.g.WmiRequest creation failed to connect to server: 0x800706ba. The three allocation failures have no code and are unchanged.wmi.cpp,wmi.hHRESULTthat ends theNext()loop is kept and exposed asgetEnumerationResult().os_version.cppWMI query on Win32_OperatingSystem failed while reading results: 0x...when the enumeration failed,... returned no resultsotherwise.Logging only: no table output and no control flow changes. The other WMI helpers (property getters,
ExecMethod) are deliberately left alone. They are not on this failure path, and every touched line is merge surface against upstream.The orbit side, which puts osqueryd's stderr into the startup error, is the sibling PR flamingo-stack/fleetmdm#232. Neither PR needs the other merged first.
Testing
🤖 Generated with Claude Code
Change set
flamingo-stack/wmi-startup-diagnostics: these pull requests are one change, reviewed together.Linked work
Linked by the
Depends-On/Change-Setlines in these descriptions; this block is maintained by the hub.