docs(AGENTS): list port_ctl.py in Pillow/numpy tool exceptions (DOCS-AGENTS-PORT-CTL-DEP) #2551

Closed
kirigayakazima wants to merge 1 commit from upstream-pr/2551 into main
kirigayakazima commented 2026-11-28 01:56:25 +00:00 (Migrated from github.com)

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


DOCS-AGENTS-PORT-CTL-DEP. Claim.

scripts/port_ctl.py (added with the d3d12/ merge) imports PIL.Image inside shrink() with a standard-library fallback, so tests/test_docs_python_deps.py (test_agents_lists_the_tools_that_need_numpy_or_pillow) failed on main across check, stdlib-tests-linux, and macos-python.

This lists port_ctl.py alongside the other optional numpy/Pillow tools in AGENTS.md rather than weakening the AST import check.

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_python_deps.py failed with AssertionError: Lists differ: ['port_ctl.py'] != [].
  • After fix: python -I tests/test_docs_python_deps.py (3 tests, OK), python -I tests/test_docs_links.py (17 tests, OK), and python -I scripts/check_no_game_data.py AGENTS.md passed.

AI-assisted: Antigravity (Gemini).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5535578477 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2551). Originally posted by [kirigayakazima](https://github.com/kirigayakazima) on 2026-11-28T01:56:25Z. --- DOCS-AGENTS-PORT-CTL-DEP. [Claim](https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7231988112). `scripts/port_ctl.py` (added with the `d3d12/` merge) imports `PIL.Image` inside `shrink()` with a standard-library fallback, so `tests/test_docs_python_deps.py` (`test_agents_lists_the_tools_that_need_numpy_or_pillow`) failed on `main` across `check`, `stdlib-tests-linux`, and `macos-python`. This lists `port_ctl.py` alongside the other optional numpy/Pillow tools in `AGENTS.md` rather than weakening the AST import check. 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_python_deps.py` failed with `AssertionError: Lists differ: ['port_ctl.py'] != []`. - After fix: `python -I tests/test_docs_python_deps.py` (3 tests, OK), `python -I tests/test_docs_links.py` (17 tests, OK), and `python -I scripts/check_no_game_data.py AGENTS.md` passed. AI-assisted: Antigravity (Gemini).
zmasi commented 2026-11-28 03:02:31 +00:00 (Migrated from github.com)

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


#2551 | head 33dbf34abe (merged cleanly with main 02f71ccfe) | python -I tests/test_docs_python_deps.py | red on main: FAILED (failures=1) in 3 tests (['port_ctl.py'] != []) | green on PR+main: Ran 3 tests, OK | Windows 11, Python 3.12.10 | AI-assisted: yes

Diff reviewed (AGENTS.md only, adding port_ctl.py to the optional numpy/Pillow tools list). Also verified on merged PR+main: python -I tests/test_docs_links.py (17/17 OK), python -I tests/test_text_write_line_endings.py (3/3 OK), git diff --check, and scripts/check_no_game_data.py AGENTS.md (clean).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7232755387 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2551#issuecomment-7232755387). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T03:02:31Z. --- #2551 | head 33dbf34abe47f346078006250a55288a58165c95 (merged cleanly with main 02f71ccfe) | `python -I tests/test_docs_python_deps.py` | red on main: FAILED (failures=1) in 3 tests (`['port_ctl.py'] != []`) | green on PR+main: Ran 3 tests, OK | Windows 11, Python 3.12.10 | AI-assisted: yes Diff reviewed (`AGENTS.md` only, adding `port_ctl.py` to the optional numpy/Pillow tools list). Also verified on merged `PR+main`: `python -I tests/test_docs_links.py` (17/17 OK), `python -I tests/test_text_write_line_endings.py` (3/3 OK), `git diff --check`, and `scripts/check_no_game_data.py AGENTS.md` (clean).
aegish-zagi commented 2026-11-28 22:49:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aegish-zagi on 2026-11-28T22:49:18Z.

Review: COMMENTED


Independent review (Linux, Python 3.12.3, AI-assisted) against current main adfb3821a — this PR's situation has changed since the earlier verification (which ran against main 02f71ccfe):

  • The PR is now CONFLICTING / merge state DIRTY against current main.
  • Current main already lists port_ctl.py in the AGENTS.md exceptions (line ~129, landed via e890d0a10 "docs: fix inaccurate doc paths/flags/env vars"): main's wording calls it a "control" tool and its fallback clause says the last two tools "fall back to the standard library when numpy is absent".
  • I checked scripts/port_ctl.py on main: it imports Pillow (from PIL import Image, for the capture-copy path) and I found no numpy import — so the one residual delta in this PR is the fallback wording ("when numpy or Pillow is absent"), which is arguably more accurate for port_ctl itself.

Recommendation: rebase on current main; after the rebase the change reduces to that fallback-clause wording. If maintainers are fine with main's current sentence, this is superseded and can close; if the Pillow part of the fallback clause is wanted, a rebased one-line version is all that remains. No other files are touched and there is nothing else to fix in the change itself.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6100420620 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2551#pullrequestreview-6100420620). Originally posted by [aegish-zagi](https://github.com/aegish-zagi) on 2026-11-28T22:49:18Z. **Review:** COMMENTED --- Independent review (Linux, Python 3.12.3, AI-assisted) against current main adfb3821a — this PR's situation has changed since the earlier verification (which ran against main 02f71ccfe): - The PR is now CONFLICTING / merge state DIRTY against current main. - Current main already lists `port_ctl.py` in the AGENTS.md exceptions (line ~129, landed via e890d0a10 "docs: fix inaccurate doc paths/flags/env vars"): main's wording calls it a "control" tool and its fallback clause says the last two tools "fall back to the standard library when numpy is absent". - I checked `scripts/port_ctl.py` on main: it imports Pillow (`from PIL import Image`, for the capture-copy path) and I found no numpy import — so the one residual delta in this PR is the fallback wording ("when numpy or Pillow is absent"), which is arguably more accurate for port_ctl itself. Recommendation: rebase on current main; after the rebase the change reduces to that fallback-clause wording. If maintainers are fine with main's current sentence, this is superseded and can close; if the Pillow part of the fallback clause is wanted, a rebased one-line version is all that remains. No other files are touched and there is nothing else to fix in the change itself.

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!2551
No description provided.