Repository navigation
Report the board model on Windows, not just the vendor - #243
Merged
BlivionIaG merged 2 commits intoSep 11, 2026
Merged
Conversation
The Windows motherboard command selects Manufacturer only, so the value is
a bare vendor - "ASUSTeK COMPUTER INC." on my machine. Linux already
returns board_vendor + board_name, so this is Windows being the odd one
out rather than a deliberate choice.
That costs twice over. The host cycle's title and large_text are both the
motherboard field, so the cycle shows a vendor name and nothing about the
actual hardware. And it's the string get_component_id matches against, so
only the vendor's own pattern can ever hit - the board-model patterns
already in motherboards.json are unreachable on Windows.
Include Product, matching the Linux shape. On my box:
before: 'ASUSTeK COMPUTER INC.'
after: 'ASUSTeK COMPUTER INC. PRIME B760-PLUS D4'
and a TUF board now resolves to the TUF app id instead of the generic ASUS
one. The vendor is still in the string, so anything that matched before
still matches - there's a test for both directions.
Not addressed here: the `host` field (BaseBoard Product on Windows) is
collected every snapshot but no cycle in fetchcord_conf.yml references it,
so it's a PowerShell call for nothing. Happy to either wire it up or drop
it in a follow-up, whichever you'd prefer.
Merged
Keeps both test classes: master's warn-once coverage and this branch's board identification tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WB6HG4WLukGEjhcq8FZJ7A
cursor Bot
pushed a commit
to nyannoying1337/FetchCord
that referenced
this pull request
Sep 11, 2026
Align with fetchcord#243 so the host cycle still gets a board-model string for id matching when NativeProvider wins over the PowerShell command. Co-authored-by: BlivionIaG <BlivionIaG@users.noreply.github.com>
cursor Bot
pushed a commit
that referenced
this pull request
Sep 11, 2026
* Read Windows system info natively instead of via PowerShell Follow-up to #245, where the stated goal was to use fastfetch where native is not implemented yet and keep it as the fallback. This starts that on Windows, and orders the providers accordingly. On Windows the CommandProvider shells out once per field. Each of those is a PowerShell start-up, and the fan-out across the command table dominates the time to first presence. Reading the same values from the registry costs a few milliseconds and needs nothing installed. Adds fetchers under fetch_cord/native/Windows/ for os, kernel, cpu, motherboard, host and mem, alongside the existing packages one. Each returns exactly what its PowerShell command returned, so the values stay interchangeable: os Microsoft Windows 11 Pro (Win32_OperatingSystem.Caption) kernel 10.0.26100 (Win32_OperatingSystem.Version) cpu Intel(R) Core(TM) i7-... (Win32_Processor.Name) motherboard ASUSTeK COMPUTER INC. (Win32_BaseBoard.Manufacturer) host PRIME B760-PLUS D4 (Win32_BaseBoard.Product) mem 12.40 GB / 31.92 GB (same format as the command) Providers are now ordered native, fastfetch, commands on every platform. That is safe because a native fetcher returns None when it is not confident rather than guessing - an unreadable registry key, or firmware boilerplate like "To Be Filled By O.E.M." - so Fetch.snapshot's existing gap-filling hands the field straight to fastfetch. Native coverage can then grow one field at a time without any platform losing detail it has today. Nothing changes on Linux or macOS, where no native fetchers exist yet. Two details worth knowing: - The registry's ProductName still reads "Windows 10 Pro" on Windows 11, so the build number decides the release and the name is corrected to match what WMI reports. - Firmware placeholders are reported as absent rather than shown. Also fixes native fetch() stringifying None into the literal "None", which was harmless while packages was the only fetcher. Tests fake the registry at the fetcher boundary, so all of them run on a non-Windows CI runner. One asserts the native path makes no subprocess calls, keeping "this adds no dependencies" verifiable rather than a claim. * Make the registry fake a real context manager fake_registry was annotated -> MagicMock but returned patch(...), which is a _patch object. Only used as a context manager, so make it one with @contextmanager and type it Iterator[MagicMock]. Caught by CI's "mypy fetch_cord tests" - the suite is type checked too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WB6HG4WLukGEjhcq8FZJ7A * Join board vendor and product in native motherboard fetch Align with #243 so the host cycle still gets a board-model string for id matching when NativeProvider wins over the PowerShell command. Co-authored-by: BlivionIaG <BlivionIaG@users.noreply.github.com> --------- Co-authored-by: nyannoying1337 <nikkumaruseru@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: BlivionIaG <BlivionIaG@users.noreply.github.com>
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.
From the Discord list - the "prefer board name when system product is vendor-only" item, adapted to how upstream actually collects this.
The Windows
motherboardcommand selectsManufactureronly, so the value is a bare vendor -ASUSTeK COMPUTER INC.on my machine. Linux already returnsboard_vendor+board_name, so this looks like Windows being the odd one out rather than a deliberate choice.That costs twice over:
hostcycle'stop_lineandapp_idare bothmotherboard, so the cycle's title andlarge_textare a vendor name and say nothing about the actual hardware.get_component_idmatches against, so only the vendor's own pattern can ever hit. The board-model patterns already sitting inmotherboards.json((?i)tuf,(?i)Z370XP SLI,(?i)H310M A 2.0, ...) are unreachable on Windows.Including
Productmatches the Linux shape:and a TUF board now resolves to the TUF app id instead of the generic ASUS one. The vendor is still in the string so anything that matched before still matches - there are tests for both directions. Given how much of the tracker is "Unknown motherboard", making more of the existing table reachable seemed worth it on its own.
Not addressed here: the
hostfield (BaseBoardProducton Windows) is collected every snapshot but no cycle infetchcord_conf.ymlreferences it, so it's a PowerShell call for nothing. Happy to either wire it up or drop it in a follow-up - whichever you'd prefer.