Repository navigation
bvh_slot_check: unpack the six fields bvh_match.model_geometries returns (EGEN-SLOTCHECK-GEOMETRIES) - #7954
Conversation
bvh_match.model_geometries() has returned six fields since ItsNotRexed#6330 added the render bucket (mesh, model, geometry, triangles, shader hash, bucket), but match_exports() still unpacked five. Every run that read a manifest therefore ended in "error: too many values to unpack (expected 5)" and exit 2, so the tool could not check any export at all, and tests/test_bvh_slot_check.py failed with three errors.
…ometry arity
The new case calls match_exports() with one manifest item and no queries: it
raises "too many values to unpack (expected 5)" on the old five-name unpacking
and returns {} now, so the arity of bvh_match.model_geometries cannot drift
unnoticed again.
|
Tested Baseline on
|
|
This six-field unpacking failure already has an open fix in #6513. BBareth claimed the specific I checked whether the new regression test could be reused there. With the tests and dependencies from |
|
Windows, synthetic inputs. Tested 0cfedd2. The synthetic manifest test reached match_exports and counted one manifest item on this revision. On the pre-PR implementation, the same call raised ValueError: too many values to unpack (expected 5). This directly exercises the interface between model_geometries and its caller. AI-assisted verification · GPT-6.2 Astra Medium |
|
Tested
#6513 changes the same line and also takes the file from red to OK when merged onto Independent check (not the author). Run by an AI agent (DeepSeek V4.1 Flash) and re-run by the orchestrating session (Claude Code) before posting; claimed in #8047. |
|
Tested 0cfedd2 on Windows 11, Python 3.15.2, NVIDIA RTX 4060 Ti (driver 621.24; CPU-only checks, no game files, no GPU/llvm-mc/MSVC used): pass. Ran the test files this PR adds or changes, from a clean checkout of the PR head: AI-assisted (Claude Code). |
|
Read and ran tests/test_bvh_slot_check.py at 0cfedd2 (Windows 11, Python 3.12): 4 errors on main@dde82f2 (ValueError, too many values to unpack), passes on the PR. bvh_match.py:156 returns six fields and this is its only other caller, so nothing else needs the change. AI-assisted review (Claude); tests run locally as stated. |
What and why
tools/bvh_slot_check.pyreads model manifests throughbvh_match.model_geometries(). Since #6330 (ASSET-349) added the render bucket, that function returns six fields —(mesh index, model, geometry, triangles, shader hash, bucket)— butmatch_exports()still unpacked five:main()reports that as one line and exit 2, so every run that passes a manifest fails whatever the archive holds:It also leaves
tests/test_bvh_slot_check.pyred onmain(3 errors, 6 passed), which is how it was found.The fix unpacks the six fields the function returns. The three the tool does not use are named
_geometry,_tris,_shader,_bucketrather than_, so a field added between them cannot silently bind to the wrong name again, and the new test pins the arity.Test
dde82f27ewithout the tool change:Ran 9 tests ... FAILED (errors=3)—test_census_with_known_source_and_swapped_blocks,test_incremental_cli_matches_joint_scan_through_conflict, and the new case below.Ran 10 tests in 19.8s ... OK.The new regression case on its own:
FAILED (errors=1)—ValueError: too many values to unpack (expected 5)Ran 1 test ... OKAlso:
python -m compileall -q tools/bvh_slot_check.py tests/test_bvh_slot_check.pyclean, andpython -I scripts/check_no_game_data.py tools/bvh_slot_check.py tests/test_bvh_slot_check.pyexits 0.No GPU needed (no driver involved; the fixture builds its archive, index, manifest and OBJ by hand and needs no game files).
Notes
{"File": "tiles.obj", "MeshTris": [1]}and callsmatch_exports({}, [manifest], stats): with no queries it returns{}and still counts the item, so it isolates the unpacking without re-running the whole census fixture.match_exportsandbvh_match.match_candidatesare the only callers ofmodel_geometries; the other one already reads the six-field form, so nothing else changes.save_evidencepublishes its staging file's 0600 instead of a plainopen()'s bits) is posted as a finding in the coordination issue instead of being bundled here.Item: EGEN-SLOTCHECK-GEOMETRIES
AI-assisted.