Repository navigation
meshlet_page: ask report_paths for the report-path guard - #2639
Conversation
|
Verified on This is the third of the five siblings I have checked ( Nothing in this one needs a decision of its own. Written with an AI assistant. |
|
VERIFY-2639 — PASS
|
|
Verified the two siblings that carry more than the tuple edit, because they add an import bootstrap and that is the part that can break a tool at startup. #2639 ( ROOT = os.path.dirname(os.path.abspath(__file__))
if ROOT not in sys.path:
sys.path.insert(0, ROOT)which the smaller three do not need. That matters because these tools are run as scripts ( #2639, applied to So the bootstrap works: the tool imports the shared helper when started directly, and the test suite is unchanged. What I also checked, since it is the risk in a move like this: I compared all five private What I did not do: run the tools against real archives. Written with an AI assistant. |
|
Heads-up: this branch now conflicts on one line, and the conflict has a mechanical fix. main merged a sibling of this pull request (#2637, What main has now: SHARED = ("anim_index", "awc_manifest", "bink_index", "gamedata_index", "gamedata_xml", "gen_d3d12_stubs",
"glb_inspect", "navmesh_index", "rpf_probe", "tile_probe", "world_index", "world_lights_paths",
"world_names")What this branch needs: insert "meshlet_page" in its alphabetical place in that tuple, and keep the rest of the branch unchanged. Everything else in the diff applies cleanly - the tuple line is the only conflict. Note on ordering, since it is easy to get wrong on a rebase: the tuple is alphabetical, and "meshlet_page" goes between the entries that bracket it. A rebase that appends it at the end would still pass the test but would break the file's convention and the next sibling's merge. Why I am commenting: I verify open pull requests against current main by applying them in a scratch worktree and building their test targets. This one went from "replays cleanly" to "conflicts" between 09:20 and 10:36 today, and the cause was #2637 landing - not anything in this branch. Written with an AI assistant. |
|
Independent check on Windows at \644bcb54a: \python -I tests/test_report_paths.py\ — 26 tests OK (9.9 s). \meshlet_page\ is now covered by the shared report-path guard. Windows 11 26200.9711, Python 3.12.10. AI-assisted: yes (opencode). |
The reviewers' red test: with this entry on main, test_switched_tools_import_the_helper_and_define_no_copy fails with "'from report_paths import same_report_path' not found"; with this branch it passes.
644bcb5 to
e9b2529
Compare
|
Rebased onto Verified on the new head:
No behaviour change beyond the shared helper. Ready to merge: |
|
Rebased onto New head: Measured on that head, standard library only, Windows, Python 3.14, no game data: @fiestorra @aegish-zagi @KelboLive — your checks are on The diff is unchanged in substance: same two commits, same |
|
Verified on Windows at your new head Cherry-picked onto So the local guard this removes is not dead code that the tuple test happens to tolerate - the test reaches the path it replaces and fails when the old code is put back. That is the control I would want on a refactor whose whole claim is "the same answer, from one place". Your rebase also holds: the tree applies without the What I did not test: anything that needs a real AI-assisted: yes - DeepSeek v4.1 (flash) applied the head and ran both arms on the machine above. Written with an AI assistant. |
|
Merging. Head AI-assisted (Claude Code). |
Claimed in the coordination issue as: MESHLET-PAGE-SHARED-REPORT-PATH
What and why
tools/meshlet_page.pyrefuses a report path that would overwrite an input or an existing report through its ownsame_output_path. That answer is wrong in a case-insensitive APFS volume and in a case-sensitive Windows directory. The private function becomes an alias ofreport_paths.same_report_path; the file also gets theROOT/sys.path.insertblock (python -Ikeeps only the script's folder on the path, and the helper lives intools/), aspe_inspect.pyandworld_census.pyalready do.The tool also joins
SHAREDintests/test_report_paths.py, so the no-private-copy test guards the change.Tested
python -I tests/test_meshlet_page.py— OKpython -I tests/test_report_paths.py— OK (1 skipped: the macOS-only case), withmeshlet_pageinSHAREDpython -I tests/test_report_path_case.py— OK (1 skipped, same)python -I tools/meshlet_page.py --help— cleanSynthetic pages in a temporary folder; no game data.
GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly.