Repository navigation
Conversation
…b4cf5), preset inheritance, and cull_drawable chains
Kam471
left a comment
There was a problem hiding this comment.
Ran this at 739b66fa3 on Windows 11: pytest tests/test_ped_catalogues.py -q -> 15 passed, 13 subtests passed; git diff --check clean.
The new tools/ped_catalogues.py decodes authored ped outfit kits by ID (kit layout, selection semantics, the per-slot pieces) and docs/ped_catalogues.md records the field names and counts; the 961-line test suite covers the synthetic kit tables, the catalogue joins and the malformed rows. I cannot re-read the export here, so the game-side counts are as reported; the tool's synthetic cases pass. No blocking issue.
|
Independent check — pass (CPU only, synthetic catalogues, no game files). Environment: Windows 11, CPython 3.15.2.
AI-assisted (Devin). |
|
Independent Windows consumer check at Eight kit CLI runs across plain and zlib-wrapped 0DRP and PSIN preserved the expected depth-first order from two roots with shared dependencies. Repeated preset/state tuples appeared once, distinct states survived, and each field inherited the nearest nonzero ID for its state. Six inspect/census/resolve control comparisons matched the base byte for byte. For later manifest joins, the 16-digit lowercase hashes retained leading zeroes and matched uppercase |
|
Reviewed 7f36e0b (CPU, Linux, Python 3.13): no defects found
|
|
Tested 7f36e0b merged with main 561b65a on Linux (WSL2) Python 3.12.16: pass tests/test_ped_catalogues.py: 17 run, 17 passed, 0 failed. Other test files importing ped_catalogues: none besides this one; tests/test_docs_*.py (11 files): all OK. |
|
Tested
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. |
isfcrctfs
left a comment
There was a problem hiding this comment.
Read the three files on top of #4187 (c46e7148..7f36e0b2): python3.12 -I tests/test_ped_catalogues.py 17/17, and the test_docs_* files present at this head (7) OK. Negative control: with only tools/ped_catalogues.py reverted to c46e7148, four tests fail and eleven error (argument command: invalid choice: 'kit'), so the new tests are pinned to the command.
The kit path is correct as far as I can check it. _typed_array_window's header read stays in bounds for all three callers, because each array span is validated against the block it points into before the rows are used; count == 0 returns an empty span and decode_ptr(0) is only reached for empty arrays, so an empty kit is () rather than an error. DFS order, first-visit dedupe of (preset_id, state_id), nested-kit cycle handling, the nearest-nonzero merge across the parent chain, and the errors for duplicate kit/preset/state and kit-vs-preset overlap all match docs/ped_catalogues.md, and rooted mode leaves the inspect/census warnings and state counts unchanged (the state-array test asserts both sides of that split).
Two nits: build_kit_blocks hardcodes the two kit/member structure hashes instead of pc.KIT_STRUCT_HASH/pc.KIT_MEMBER_STRUCT_HASH, so the fixture will not follow a rename; and the "Resolve one outfit kit" doc page does not say that a kit's member array and the selected preset's state array must be complete (count within capacity, inside the block), which kit makes fatal while inspect only warns - the tests record that difference, the page does not.
AI-assisted.
Depends on: #4187
ASSET-411 coordination claim · Review the three files changed on top of #4187
python -I tools/ped_catalogues.py kit <catalogue> --id <ID> --jsonreports the presets and states selected by one outfit in a standalone 0DRP or PSIN catalogue. It follows both root kit buckets, expands nested kits in authored order and emits each selected(preset_id, state_id)once. It resolves the drawable, albedo, normal and extra hashes independently from the nearest preset defining that field for the selected state.Cycles and missing references produce warnings. Ambiguous definitions and invalid array bounds produce an error. The existing
inspect,censusandresolvecommands retain their behavior. The upstream comparison currently includes #4187 because its code is still under review.Verification
python3 -I tests/test_ped_catalogues.pypassed all 15 tests, including synthetic 0DRP and PSIN fixtures. The cases cover nested order, repeated members, two states of one preset, per-field inheritance, missing references, cycles and invalid array bounds.AI-assisted implementation and validation. CPU-only Python tests on Linux. GPU and driver are inapplicable to this parser.
Pre-merge verification
Kit resolution now reports inheritance cycles for the selected members. A separate preset cycle or a depth limit reached by the catalogue statistics pass previously blocked an unrelated, fully resolved kit. Both 0DRP and PSIN regressions pass. Selected cycles and structural warnings still surface, and the catalogue-wide reports keep their existing diagnostics.