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

Closed
Andretuta wants to merge 1 commit from upstream-pr/167 into main
Andretuta commented 2026-11-24 02:33:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-24T02:33:54Z.


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.)
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5464998554 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/167). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T02:33:54Z. --- > 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.)
aslan2142 commented 2026-12-01 10:53:47 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T10:53:47Z.


Closing this carried-over draft (old-pr/9901): both fixes are already on main (docs/i18n/pt-PT/quickstart.md already dropped the removed tools/pc_checker.py reference, and tests/test_docs_cli_flags.py already lists the spirv-opt flags in FOREIGN and passes on main).

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7308881001 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/167#issuecomment-7308881001). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T10:53:47Z. --- Closing this carried-over draft (`old-pr/9901`): both fixes are already on `main` (`docs/i18n/pt-PT/quickstart.md` already dropped the removed `tools/pc_checker.py` reference, and `tests/test_docs_cli_flags.py` already lists the `spirv-opt` flags in `FOREIGN` and passes on `main`). *(AI-assisted review.)*

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!167
No description provided.