[PR #709] [CLOSED] tools: restore the PC spec checker dropped by merge 6dece9231 (RT-RESTORE-6DECE-PC-CHECKER) #747

Closed
opened 2026-11-26 20:18:55 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/709
Author: @Mby159
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: restore/pc-checker-tool


📝 Commits (1)

  • 04cf40e tools: restore the PC spec checker dropped by 6dece9231 (RT-RESTORE-6DECE-PC-CHECKER)

📊 Changes

2 files changed (+1135 additions, -0 deletions)

View changed files

➕ tests/test_pc_checker.py (+158 -0)
➕ tools/pc_checker.py (+977 -0)

📄 Description

Claimed in the coordination issue as: RT-RESTORE-6DECE-PC-CHECKER

Depends on: none

What and why

Merge 6dece9231 ("Merge TreXito's unmerged PRs: translator fixes, fuzzers, CPU emulation, xapu/chad shims") left 35 paths out of main; the finding in the coordination issue lists them and names this pair as unclaimed: tools/pc_checker.py and tests/test_pc_checker.py. git grep pc_checker in today's main finds nothing, and the build is self-consistent, so the tool was dropped wholesale with the rest of that merge rather than replaced.

tools/pc_checker.py compares the machine's CPU, GPU and RAM with the community reference specs (Xbox Series X by default). It detects the hardware itself, scores each part against a rough relative table and prints a verdict: a tkinter window that a launcher can raise before it starts the title, --cli for the same text, --check for the verdict as the exit code (0 good, 1 weak, 2 unknown) and --json for a launcher to read. Standard library only; no game files, no GPU, no network.

This pull request puts the tool and its test back on top of current main. The file is the one that was in main's history at d2d9b2657 (blob 3298bba1, 40133 bytes; the test is blob 2c5e7b11, 6106 bytes), and it already carries the sys.stdout.reconfigure(errors="replace") guard that tests/test_tool_stdout_encoding.py asks every tool under tools/ to have, so it does not add to the failure that test currently reports on main.

Tested

  • python -I tests/test_pc_checker.py: 26 tests, OK, on main 21625bca8 with this pull request applied.
  • python -I tests/test_tool_startup.py (2 tests), tests/test_ci_registration.py (15), tests/test_cmake_translator_deps.py (5), tests/test_docs_repo_paths.py (3), tests/test_docs_links.py (16), tests/test_docs_table_rows.py, tests/test_docs_list_items.py, tests/test_docs_cli_flags.py, tests/test_docs_encoding.py: all OK with the tool added.
  • python -I scripts/check_no_game_data.py tools/pc_checker.py tests/test_pc_checker.py: exit 0.
  • python -m compileall -q tools tests: exit 0.

Hardware: Windows 11 x64 (10.0.29712), CPython 3.13. No game files, no GPU, no network. The hardware-detection path itself was not re-measured on a second machine: the tests cover the scoring and the verdict, and the detection code is left exactly as main's history had it.

AI-assisted: yes.

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (not applicable: no translator rule)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/709 **Author:** [@Mby159](https://github.com/Mby159) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `restore/pc-checker-tool` --- ### 📝 Commits (1) - [`04cf40e`](https://github.com/ubiquitarianism/leonida/commit/04cf40e6426257d78bad84b8559a0b52460c66d9) tools: restore the PC spec checker dropped by 6dece9231 (RT-RESTORE-6DECE-PC-CHECKER) ### 📊 Changes **2 files changed** (+1135 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `tests/test_pc_checker.py` (+158 -0) ➕ `tools/pc_checker.py` (+977 -0) </details> ### 📄 Description Claimed in the coordination issue as: RT-RESTORE-6DECE-PC-CHECKER Depends on: none ### What and why Merge `6dece9231` ("Merge TreXito's unmerged PRs: translator fixes, fuzzers, CPU emulation, xapu/chad shims") left 35 paths out of `main`; the finding in the coordination issue lists them and names this pair as unclaimed: `tools/pc_checker.py` and `tests/test_pc_checker.py`. `git grep pc_checker` in today's `main` finds nothing, and the build is self-consistent, so the tool was dropped wholesale with the rest of that merge rather than replaced. `tools/pc_checker.py` compares the machine's CPU, GPU and RAM with the community reference specs (Xbox Series X by default). It detects the hardware itself, scores each part against a rough relative table and prints a verdict: a tkinter window that a launcher can raise before it starts the title, `--cli` for the same text, `--check` for the verdict as the exit code (0 good, 1 weak, 2 unknown) and `--json` for a launcher to read. Standard library only; no game files, no GPU, no network. This pull request puts the tool and its test back on top of current `main`. The file is the one that was in `main`'s history at `d2d9b2657` (blob `3298bba1`, 40133 bytes; the test is blob `2c5e7b11`, 6106 bytes), and it already carries the `sys.stdout.reconfigure(errors="replace")` guard that `tests/test_tool_stdout_encoding.py` asks every tool under `tools/` to have, so it does not add to the failure that test currently reports on `main`. ### Tested - `python -I tests/test_pc_checker.py`: 26 tests, OK, on `main` `21625bca8` with this pull request applied. - `python -I tests/test_tool_startup.py` (2 tests), `tests/test_ci_registration.py` (15), `tests/test_cmake_translator_deps.py` (5), `tests/test_docs_repo_paths.py` (3), `tests/test_docs_links.py` (16), `tests/test_docs_table_rows.py`, `tests/test_docs_list_items.py`, `tests/test_docs_cli_flags.py`, `tests/test_docs_encoding.py`: all OK with the tool added. - `python -I scripts/check_no_game_data.py tools/pc_checker.py tests/test_pc_checker.py`: exit 0. - `python -m compileall -q tools tests`: exit 0. Hardware: Windows 11 x64 (10.0.29712), CPython 3.13. No game files, no GPU, no network. The hardware-detection path itself was not re-measured on a second machine: the tests cover the scoring and the verdict, and the detection code is left exactly as `main`'s history had it. AI-assisted: yes. ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (not applicable: no translator rule) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:18:55 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#747
No description provided.