docs: update pt-PT quickstart pc checker and whitelist foreign CLI flags #167

Open
github-bot wants to merge 1 commit from github-bot/gh-167 into main AGit
Owner

@⁠Andretuta on GitHub · 2026-11-24 02:33 UTC · original
ubiquitarianism:old-pr/9901 → main · +9 −6 · 2 files · 1 commits · draft

Carried over from old PR 9901 by neoisg8 in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9901, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
This branch conflicts with the current main and needs a rebase.
neoisg8: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Claimed in the coordination issue: https://github.com/ProjectLeonida/Leonida/issues/9677

Depends on: none.

What and why

tests/test_docs_cli_flags.py was failing on main (e56d97950):

FAIL: test_docs_name_existing_flags
AssertionError: Lists differ: [('docs/embedded_shaders.md:372', '--ssa-rewrite'), ... ('docs/i18n/pt-PT/quickstart.md:45', '--profile'), ('docs/i18n/pt-PT/quickstart.md:46', '--profile')] != []

FAIL: test_fenced_commands_use_the_flags_of_their_tool
AssertionError: Lists differ: [('docs/testing.md:318', 'scripts/bench_wave64.py', '--prefix')] != [] : fenced commands using a flag their script lacks: docs/testing.md:318 scripts/bench_wave64.py --prefix
  1. Commit 5125a01f0 removed tools/pc_checker.py and updated README.md to point to the web-based checker, but docs/i18n/pt-PT/quickstart.md still referenced pc_checker.py and --profile 1/--profile 2. This updates the Portuguese quickstart to match README.md.
  2. docs/testing.md:318 invokes scripts/bench_wave64.py with $(brew --prefix llvm)/bin/llvm-mc, causing the test runner to interpret --prefix as a flag to bench_wave64.py.
  3. docs/embedded_shaders.md:372 quotes external spirv-opt passes (--ssa-rewrite, --eliminate-dead-code-aggressive, --cfg-cleanup, --eliminate-dead-branches, --merge-blocks, --merge-return, --scalar-replacement).
  4. This adds --prefix and the spirv-opt passes to FOREIGN in tests/test_docs_cli_flags.py, which is dedicated to third-party tool flags quoted in documentation.

Tested

  • Windows 11 Pro 26100, Python 3.12.10, CPU only, no GPU, no game files.
  • Negative controls on main (e56d97950):
    python -I tests/test_docs_cli_flags.py -> FAILED (failures=2).
  • Positive controls on fix/docs-cli-flags-foreign-and-i18n (efa3f3176):
    python -I tests/test_docs_cli_flags.py -> Ran 4 tests in 24.853s - OK.
  • Hygiene checks:
    python -I scripts/check_no_game_data.py docs/i18n/pt-PT/quickstart.md tests/test_docs_cli_flags.py: clean.
    git diff --check origin/main: clean.

AI-assisted: yes.

Checklist

  • 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: docs-only change.)
**@⁠Andretuta** on GitHub · 2026-11-24 02:33 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/167) `ubiquitarianism:old-pr/9901` → `main` · +9 −6 · 2 files · 1 commits · draft > Carried over from **old PR 9901** by `neoisg8` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9901`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > This branch conflicts with the current `main` and needs a rebase. > `neoisg8`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Claimed in the coordination issue: https://github.com/ProjectLeonida/Leonida/issues/9677 Depends on: none. ### What and why `tests/test_docs_cli_flags.py` was failing on `main` (`e56d97950`): ```text FAIL: test_docs_name_existing_flags AssertionError: Lists differ: [('docs/embedded_shaders.md:372', '--ssa-rewrite'), ... ('docs/i18n/pt-PT/quickstart.md:45', '--profile'), ('docs/i18n/pt-PT/quickstart.md:46', '--profile')] != [] FAIL: test_fenced_commands_use_the_flags_of_their_tool AssertionError: Lists differ: [('docs/testing.md:318', 'scripts/bench_wave64.py', '--prefix')] != [] : fenced commands using a flag their script lacks: docs/testing.md:318 scripts/bench_wave64.py --prefix ``` 1. Commit `5125a01f0` removed `tools/pc_checker.py` and updated `README.md` to point to the web-based checker, but `docs/i18n/pt-PT/quickstart.md` still referenced `pc_checker.py` and `--profile 1`/`--profile 2`. This updates the Portuguese quickstart to match `README.md`. 2. `docs/testing.md:318` invokes `scripts/bench_wave64.py` with `$(brew --prefix llvm)/bin/llvm-mc`, causing the test runner to interpret `--prefix` as a flag to `bench_wave64.py`. 3. `docs/embedded_shaders.md:372` quotes external `spirv-opt` passes (`--ssa-rewrite`, `--eliminate-dead-code-aggressive`, `--cfg-cleanup`, `--eliminate-dead-branches`, `--merge-blocks`, `--merge-return`, `--scalar-replacement`). 4. This adds `--prefix` and the `spirv-opt` passes to `FOREIGN` in `tests/test_docs_cli_flags.py`, which is dedicated to third-party tool flags quoted in documentation. ### Tested - Windows 11 Pro 26100, Python 3.12.10, CPU only, no GPU, no game files. - Negative controls on `main` (`e56d97950`): `python -I tests/test_docs_cli_flags.py` -> `FAILED (failures=2)`. - Positive controls on `fix/docs-cli-flags-foreign-and-i18n` (`efa3f3176`): `python -I tests/test_docs_cli_flags.py` -> `Ran 4 tests in 24.853s - OK`. - Hygiene checks: `python -I scripts/check_no_game_data.py docs/i18n/pt-PT/quickstart.md tests/test_docs_cli_flags.py`: clean. `git diff --check origin/main`: clean. AI-assisted: yes. ### Checklist - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (Not applicable: docs-only change.)
Commit 5125a01f0 removed tools/pc_checker.py and pointed README.md to
Can I Run Leonida, but docs/i18n/pt-PT/quickstart.md still referenced the removed
tool and its --profile flag. Update pt-PT quickstart to match.
Add brew (--prefix) and spirv-opt optimization passes quoted in docs/embedded_shaders.md
(--ssa-rewrite, --eliminate-dead-code-aggressive, --cfg-cleanup, --eliminate-dead-branches,
--merge-blocks, --merge-return, --scalar-replacement) to FOREIGN in
tests/test_docs_cli_flags.py.

Fixes tests/test_docs_cli_flags.py failures on main:
- test_docs_name_existing_flags
- test_fenced_commands_use_the_flags_of_their_tool

AI-assisted: yes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:47:12 +00:00
This pull request has changes conflicting with the target branch.
  • docs/i18n/pt-PT/quickstart.md
  • tests/test_docs_cli_flags.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/167/head:github-bot/gh-167'
git switch 'github-bot/gh-167'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-167'
git switch 'github-bot/gh-167'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-167'
git switch 'github-bot/gh-167'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-167'
git switch 'main'
git merge --squash 'github-bot/gh-167'
git switch 'main'
git merge --ff-only 'github-bot/gh-167'
git switch 'main'
git merge 'github-bot/gh-167'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.