docs, tests: fix fidelityfx path and scope port/d3d12-nvidia paths in test_docs_repo_paths (DOCS-REPO-PATHS-PORT-DOCS) #2552

Closed
kirigayakazima wants to merge 2 commits from upstream-pr/2552 into main
kirigayakazima commented 2026-11-28 01:57:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-11-28T01:57:27Z.


DOCS-REPO-PATHS-PORT-DOCS. Claim.

Commit 00131bb8 imported the port documentation onto main while leaving the branch-specific runtime/ files on port/d3d12-nvidia. On main (1a441d336), tests/test_docs_repo_paths.py failed with 14 missing backticked paths: tests/fidelityfx.rs in docs/port_plan.md:164 and 12 distinct runtime/ files across docs/port_status.md, docs/ultrawide.md, docs/victory_gap_gpu.md, and docs/victory_gap_media.md.

What changed:

  • docs/port_plan.md:164: rename tests/fidelityfx.rs to crates/victory-hle/tests/fidelityfx.rs matching crates/victory-hle/src/modules/fidelityfx.rs beside it so docs/port_plan.md stays fully checked.
  • tests/test_docs_repo_paths.py: add per-page PORT_BRANCH_PATHS scoping only the 12 branch-only runtime/ files (rather than adding whole pages to OTHER_PROJECTS) so any other missing backticked path in those four pages or any other page still fails CI. Added test_port_branch_allowlist_stays_scoped_to_named_paths to enforce this scoping.

Verification on Windows 11 (RTX 4070 Laptop host; stdlib/doc tests only, no game files or GPU execution tested):

  • Before fix (1a441d336): python -I tests/test_docs_repo_paths.py failed (14 additional elements).
  • After fix: python -I tests/test_docs_repo_paths.py (4 tests, OK), python -I tests/test_docs_links.py (17 tests, OK), python -I tests/test_docs_repeated_lines.py (3 tests, OK), python -m compileall -q tests/test_docs_repo_paths.py, and python -I scripts/check_no_game_data.py over both files passed.

AI-assisted: Antigravity (Gemini).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5535586359 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2552). Originally posted by [kirigayakazima](https://github.com/kirigayakazima) on 2026-11-28T01:57:27Z. --- DOCS-REPO-PATHS-PORT-DOCS. [Claim](https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7231983267). Commit `00131bb8` imported the port documentation onto `main` while leaving the branch-specific `runtime/` files on `port/d3d12-nvidia`. On `main` (`1a441d336`), `tests/test_docs_repo_paths.py` failed with 14 missing backticked paths: `tests/fidelityfx.rs` in `docs/port_plan.md:164` and 12 distinct `runtime/` files across `docs/port_status.md`, `docs/ultrawide.md`, `docs/victory_gap_gpu.md`, and `docs/victory_gap_media.md`. What changed: - `docs/port_plan.md:164`: rename `tests/fidelityfx.rs` to `crates/victory-hle/tests/fidelityfx.rs` matching `crates/victory-hle/src/modules/fidelityfx.rs` beside it so `docs/port_plan.md` stays fully checked. - `tests/test_docs_repo_paths.py`: add per-page `PORT_BRANCH_PATHS` scoping only the 12 branch-only `runtime/` files (rather than adding whole pages to `OTHER_PROJECTS`) so any other missing backticked path in those four pages or any other page still fails CI. Added `test_port_branch_allowlist_stays_scoped_to_named_paths` to enforce this scoping. Verification on Windows 11 (RTX 4070 Laptop host; stdlib/doc tests only, no game files or GPU execution tested): - Before fix (`1a441d336`): `python -I tests/test_docs_repo_paths.py` failed (`14 additional elements`). - After fix: `python -I tests/test_docs_repo_paths.py` (4 tests, OK), `python -I tests/test_docs_links.py` (17 tests, OK), `python -I tests/test_docs_repeated_lines.py` (3 tests, OK), `python -m compileall -q tests/test_docs_repo_paths.py`, and `python -I scripts/check_no_game_data.py` over both files passed. AI-assisted: Antigravity (Gemini).
zmasi commented 2026-11-28 03:02:33 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T03:02:33Z.


#2552 | head 751261f3eb (merged cleanly with main 02f71ccfe) | python -I tests/test_docs_repo_paths.py | red on main: FAILED (failures=1) in 3 tests (14 missing backticked paths; failures=1 in 4 tests on docs/port_plan.md:164 with PR test file copied onto main) | green on PR+main: Ran 4 tests, OK | Windows 11, Python 3.12.10 | AI-assisted: yes

Diff reviewed (docs/port_plan.md fixes crates/victory-hle/tests/fidelityfx.rs, and tests/test_docs_repo_paths.py scopes PORT_BRANCH_PATHS per (doc, path) pair rather than exempting entire doc pages). Also verified on merged PR+main: python -I tests/test_docs_links.py (17/17 OK), python -I tests/test_docs_repeated_lines.py (3/3 OK), python -I tests/test_text_write_line_endings.py (3/3 OK), git diff --check, and scripts/check_no_game_data.py (clean).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7232755766 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2552#issuecomment-7232755766). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T03:02:33Z. --- #2552 | head 751261f3ebf0ba5d74f705449800ee2631b826cf (merged cleanly with main 02f71ccfe) | `python -I tests/test_docs_repo_paths.py` | red on main: FAILED (failures=1) in 3 tests (14 missing backticked paths; failures=1 in 4 tests on `docs/port_plan.md:164` with PR test file copied onto main) | green on PR+main: Ran 4 tests, OK | Windows 11, Python 3.12.10 | AI-assisted: yes Diff reviewed (`docs/port_plan.md` fixes `crates/victory-hle/tests/fidelityfx.rs`, and `tests/test_docs_repo_paths.py` scopes `PORT_BRANCH_PATHS` per `(doc, path)` pair rather than exempting entire doc pages). Also verified on merged `PR+main`: `python -I tests/test_docs_links.py` (17/17 OK), `python -I tests/test_docs_repeated_lines.py` (3/3 OK), `python -I tests/test_text_write_line_endings.py` (3/3 OK), `git diff --check`, and `scripts/check_no_game_data.py` (clean).
Tauwni commented 2026-11-28 14:05:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-28T14:05:17Z.


This now conflicts with main in tests/test_docs_repo_paths.py: 43128a9c1 (inline external URLs and CommonMark fences) replaced in_fence = False with fence = None in missing_paths, the line before this pull request's allowed = allowed_missing.get(page, ()). Keeping both resolves it:

        fence = None
        allowed = allowed_missing.get(page, ())

That merge is on Tauwni:fix/2552-merge-main (d92101972, parents main 7ce011205 and this branch's head 751261f3e), in case it saves the rebase. With it, on macOS (Apple M3, Python 3.15): python -I tests/test_docs_repo_paths.py OK, 3/3 runs, and test_docs_links OK (MEASURED).

To check that PORT_BRANCH_PATHS stays narrow, I appended one backticked path to a doc and ran the test each time (MEASURED, 1 run each):

Added Test
runtime/src/brand_new_missing.h in docs/ultrawide.md fails
runtime/shims/media_foundation.cpp (allowed for victory_gap_media.md only) in docs/ultrawide.md fails
runtime/src/aspect_fit.h in docs/running.md fails
runtime/src/aspect_fit.h again in docs/ultrawide.md passes

docs/port_plan.md:164: the crates/victory-hle/... paths are in VIctory, under "candidates to port", so the full crate path is right and the checker rightly doesn't look at crates/.

One non-blocking thought: nothing notices when an allowed pair stops being missing (when the code lands from port/d3d12-nvidia), so a stale entry would stay in the list. A check that each (doc, path) in PORT_BRANCH_PATHS is still cited and still missing would keep it honest; fine as a follow-up.

Not checked by a second agent or human yet.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7240406566 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2552#issuecomment-7240406566). Originally posted by [Tauwni](https://github.com/Tauwni) on 2026-11-28T14:05:17Z. --- This now conflicts with `main` in `tests/test_docs_repo_paths.py`: 43128a9c1 (inline external URLs and CommonMark fences) replaced `in_fence = False` with `fence = None` in `missing_paths`, the line before this pull request's `allowed = allowed_missing.get(page, ())`. Keeping both resolves it: ```python fence = None allowed = allowed_missing.get(page, ()) ``` That merge is on `Tauwni:fix/2552-merge-main` ([`d92101972`](https://github.com/Tauwni/leonida/commit/d92101972), parents `main` `7ce011205` and this branch's head `751261f3e`), in case it saves the rebase. With it, on macOS (Apple M3, Python 3.15): `python -I tests/test_docs_repo_paths.py` OK, 3/3 runs, and `test_docs_links` OK (MEASURED). To check that `PORT_BRANCH_PATHS` stays narrow, I appended one backticked path to a doc and ran the test each time (MEASURED, 1 run each): | Added | Test | |---|---| | `runtime/src/brand_new_missing.h` in `docs/ultrawide.md` | fails | | `runtime/shims/media_foundation.cpp` (allowed for `victory_gap_media.md` only) in `docs/ultrawide.md` | fails | | `runtime/src/aspect_fit.h` in `docs/running.md` | fails | | `runtime/src/aspect_fit.h` again in `docs/ultrawide.md` | passes | `docs/port_plan.md:164`: the `crates/victory-hle/...` paths are in VIctory, under "candidates to port", so the full crate path is right and the checker rightly doesn't look at `crates/`. One non-blocking thought: nothing notices when an allowed pair stops being missing (when the code lands from `port/d3d12-nvidia`), so a stale entry would stay in the list. A check that each `(doc, path)` in `PORT_BRANCH_PATHS` is still cited and still missing would keep it honest; fine as a follow-up. Not checked by a second agent or human yet. AI-assisted (Claude Code).
TheGeogeo commented 2026-11-28 23:37:59 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-28T23:37:59Z.


Tested 8ee2b9014 merged (no commit) with main aa918e5d9: Python 3.12.4, Windows 11 10.0.26300, CPU only. check_no_game_data.py is clean.

  • Test-only change: tests/test_docs_repo_paths.py, 6 tests pass. The main version (5 tests) passes too.
  • There is no red to show, since no other file changes.

No blocker from my side.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247560413 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2552#issuecomment-7247560413). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-28T23:37:59Z. --- Tested `8ee2b9014` merged (no commit) with `main` `aa918e5d9`: Python 3.12.4, Windows 11 10.0.26300, CPU only. `check_no_game_data.py` is clean. - Test-only change: `tests/test_docs_repo_paths.py`, 6 tests pass. The `main` version (5 tests) passes too. - There is no red to show, since no other file changes. No blocker from my side. AI-assisted (Claude Code).
timbot103 commented 2026-11-29 01:07:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-29T01:07:48Z.

Review: COMMENTED


Static audit of 8ee2b9014 against 48bae6cad. Main already has the FidelityFX correction, and the existing path validator passes. All 13 added document/path exceptions are uncited. At tests/test_docs_repo_paths.py:37, please drop the allowlist and its fixture. I confirmed in memory that adding the missing runtime/src/aspect_fit.h reference back to docs/ultrawide.md fails the base check and passes with this patch.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6100844880 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2552#pullrequestreview-6100844880). Originally posted by [timbot103](https://github.com/timbot103) on 2026-11-29T01:07:48Z. **Review:** COMMENTED --- Static audit of `8ee2b9014` against `48bae6cad`. Main already has the FidelityFX correction, and the existing path validator passes. All 13 added document/path exceptions are uncited. At `tests/test_docs_repo_paths.py:37`, please drop the allowlist and its fixture. I confirmed in memory that adding the missing `runtime/src/aspect_fit.h` reference back to `docs/ultrawide.md` fails the base check and passes with this patch. AI-assisted.
OreoFR commented 2026-11-29 02:56:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T02:56:18Z.


Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main c8bf0e7b6, PR head 8ee2b9014 : red 0 failures / green 6 OK

python3.12 -I tests/test_docs_repo_paths.py:

  • Merge: clean. Seen from main the diff only touches this test file (the branch's bcpack_tool commits are already in main by content).
  • Red (main + only this PR's test file): 6 tests, all OK. main alone: 5 OK.
  • Green (main + git merge --no-ff): 6 OK, skipped none.
  • Neighbours identical on main and merge: test_bcpack_tool 28 OK; test_docs_cli_flags has 1 failure already on main (test_fenced_commands_use_the_flags_of_their_tool, README.md:94 scripts/play-d3d12.ps1 -Game, 3/3), unrelated.
  • Diff (READ IN CODE): the PORT_BRANCH_PATHS allow-list is dead code on main — the 4 docs exist but none of main's docs still cite those runtime/... paths (git grep); the new unit test only checks the allow-list stays limited to the named (doc, path) pairs. No game data.

Verdict: NO RED (nothing on main for the new test to catch; the allow-list may no longer be needed).

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7249739028 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2552#issuecomment-7249739028). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T02:56:18Z. --- Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main c8bf0e7b6, PR head 8ee2b9014 : red 0 failures / green 6 OK `python3.12 -I tests/test_docs_repo_paths.py`: - Merge: clean. Seen from main the diff only touches this test file (the branch's `bcpack_tool` commits are already in main by content). - **Red** (main + only this PR's test file): 6 tests, all OK. main alone: 5 OK. - **Green** (main + `git merge --no-ff`): 6 OK, skipped none. - Neighbours identical on main and merge: `test_bcpack_tool` 28 OK; `test_docs_cli_flags` has 1 failure already on main (`test_fenced_commands_use_the_flags_of_their_tool`, `README.md:94 scripts/play-d3d12.ps1 -Game`, 3/3), unrelated. - Diff (READ IN CODE): the `PORT_BRANCH_PATHS` allow-list is dead code on main — the 4 docs exist but none of main's docs still cite those `runtime/...` paths (`git grep`); the new unit test only checks the allow-list stays limited to the named (doc, path) pairs. No game data. **Verdict: NO RED** (nothing on main for the new test to catch; the allow-list may no longer be needed). AI-assisted: Claude Code
fiestorra commented 2026-11-29 17:24:07 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T17:24:07Z.


This one does not apply to current main: it conflicts, and the hunk is worth seeing before a rebase because it looks like a name that half-changed.

Cherry-picking its two commits onto origin/main 4364a4fa6 stops in tests/test_docs_repo_paths.py:

for page, text in sorted(pages.items()):
<<<<<<< HEAD
        fence = None
=======
        in_fence = False
        allowed = allowed_missing.get(page, ())
>>>>>>> 751261f3e (… DOCS-REPO-PATHS-PORT-DOCS)
    for n, line in enumerate(text.split("\n"), 1):
        fence, is_fence_line = _update_fence(fence, line)

Two things point the same way:

  • main initialises fence = None (tests/test_docs_repo_paths.py:73), and this branch initialises in_fence = False;
  • the line right after the hunk, which main and the branch share, still does _update_fence(fence, line) - so whichever name the loop uses, the initialisation and
    the call have to agree.

That reads like a rename that reached the initialisation and not the loop (or the reverse in the branch's own history), rather than an unrelated conflict. It may well
resolve in favour of fence = None plus the allowed line, but that is the author's call and I am not going to guess it into their branch.

I did not run the tests: the file does not apply, so there is nothing to run. tests/test_bcpack_tool.py and the docs side may be fine on their own, but I cannot
separate them from here without deciding the conflict.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7259661915 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2552#issuecomment-7259661915). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-29T17:24:07Z. --- This one does **not** apply to current `main`: it conflicts, and the hunk is worth seeing before a rebase because it looks like a name that half-changed. Cherry-picking its two commits onto `origin/main` `4364a4fa6` stops in `tests/test_docs_repo_paths.py`: ``` for page, text in sorted(pages.items()): <<<<<<< HEAD fence = None ======= in_fence = False allowed = allowed_missing.get(page, ()) >>>>>>> 751261f3e (… DOCS-REPO-PATHS-PORT-DOCS) for n, line in enumerate(text.split("\n"), 1): fence, is_fence_line = _update_fence(fence, line) ``` Two things point the same way: - `main` initialises `fence = None` (`tests/test_docs_repo_paths.py:73`), and this branch initialises `in_fence = False`; - the line right after the hunk, which `main` and the branch share, still does `_update_fence(fence, line)` - so whichever name the loop uses, the initialisation and the call have to agree. That reads like a rename that reached the initialisation and not the loop (or the reverse in the branch's own history), rather than an unrelated conflict. It may well resolve in favour of `fence = None` plus the `allowed` line, but that is the author's call and I am not going to guess it into their branch. I did not run the tests: the file does not apply, so there is nothing to run. `tests/test_bcpack_tool.py` and the docs side may be fine on their own, but I cannot separate them from here without deciding the conflict. Written with an AI assistant.
KelboLive commented 2026-11-30 16:38:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-11-30T16:38:19Z.


Independent check on Windows (not the author), at 8ee2b9014.

  • python -I tests/test_docs_repo_paths.py: 6 tests OK.
  • python -I tests/test_bcpack_tool.py: 28 tests OK.

Environment: Windows 11 Pro 10.0.26200.9711, Python 3.12.10.

AI-assisted: yes (opencode).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7284992046 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2552#issuecomment-7284992046). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-30T16:38:19Z. --- Independent check on Windows (not the author), at `8ee2b9014`. - `python -I tests/test_docs_repo_paths.py`: **6 tests OK**. - `python -I tests/test_bcpack_tool.py`: **28 tests OK**. Environment: Windows 11 Pro 10.0.26200.9711, Python 3.12.10. AI-assisted: yes (opencode).
aslan2142 commented 2026-12-01 11:01:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:01:55Z.


Closing as obsolete on main: the docs/port_plan.md FidelityFX path fix has already landed on main, and tests/test_docs_repo_paths.py already passes cleanly on main without exempting any paths (as confirmed by @timbot103 and @OreoFR). The only remaining effective diff against main (compare/main...8ee2b901) adds an unused 13-entry allowlist in tests/test_docs_repo_paths.py.

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7309069890 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2552#issuecomment-7309069890). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T11:01:55Z. --- Closing as obsolete on `main`: the `docs/port_plan.md` FidelityFX path fix has already landed on `main`, and `tests/test_docs_repo_paths.py` already passes cleanly on `main` without exempting any paths (as confirmed by @timbot103 and @OreoFR). The only remaining effective diff against `main` (`compare/main...8ee2b901`) adds an unused 13-entry allowlist in `tests/test_docs_repo_paths.py`. *(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!2552
No description provided.