Skip to content

navmesh_cell_fit: scan literal --common carve directories - #7455

Open
Daazd wants to merge 1 commit into
ItsNotRexed:mainfrom
Daazd:daazd/fix-cellfit-literal-common
Open

Daazd wants to merge 1 commit into
ItsNotRexed:mainfrom
Daazd:daazd/fix-cellfit-literal-common

Conversation

@Daazd

@Daazd Daazd commented Nov 23, 2026

Copy link
Copy Markdown

Claimed in the coordination issue as: CELLFIT-LITERAL-COMMON.

What and why

navmesh_cell_fit.py --common "common [v1]" interpreted the directory name as a glob. With a sibling named common v, it read that sibling's documents and reported the wrong cell-size counts and model hashes; without a matching sibling it silently reported zero documents.

Escape the directory before appending the existing *.bin pattern. Add synthetic regressions for bracketed carve and parent directories, a matching sibling with different data, and the ordinary flat .bin selection. The new test file avoids the pending changes to tests/test_navmesh_cell_fit.py in #5703, #5982 and #6490. This change has no PR dependencies.

Tested

Linux, Python 3.12.3. CPU-only synthetic XML; no GPU or game files used.

AI-assisted: yes, OpenAI Codex.

Checklist

  • No game data, keys or decryption, including in logs or reports quoted here.
  • No shader-translator rule changed; the contract-table requirement does not apply.

@dcastell1

Copy link
Copy Markdown
Contributor

Code read + CPU tests, dab50c0: pass (tests/test_navmesh_cell_fit_paths.py → 3 passed, 2 subtests).

@Daazd
Daazd marked this pull request as ready for review November 23, 2026 16:52
@morodirule

Copy link
Copy Markdown

Tested dab50c0 on Arch Linux, Python 3.14.10, CPU only: pass — tests/test_navmesh_cell_fit_paths.py (new file) 3/3 OK, pre-existing test_navmesh_cell_fit.py 4/4 OK. Negative control: the new file against the merge-base's tools/navmesh_cell_fit.py fails 3/3, so it discriminates. No game files, no GPU. AI-assisted.

@rscriptsfivem

Copy link
Copy Markdown

Independent Windows 11 check at dab50c0 (Python 3.14.5): pass. Both Python suites passed (7 tests total). I also ran the full CLI on synthetic input with a common [v1] directory and a common v sibling containing different data. With relative, absolute, and Windows extended-length (\\?\) paths, the parent e7664001 reported the sibling’s cell size (0.03125), while this PR reported the requested directory’s cell size (0.0625). The JSON file matched stdout in every run. No game files or GPU. AI-assisted (Codex).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants