5.3 KiB
Queue76 future-writer closure audit and four importer fixes
Reuse parent db56f9fb/65dfd733 actual70334 lookup and six signed-model proofs. No asset export, catalogue audit, lookup test rerun or content job was performed. Scope is tracked production ops/source and the explicit path copies reachable by their imports; frozen/private payloads are not newly classified.
Demonstrated import defect — fixed
Four production callers use native_sequence_hash immediately before wrapping/output:
| Script | Original helper call line |
|---|---|
| content-crmodels-20261127/build.py | 101 |
| content-detail-models-20261125/build9.py | 92 |
| content-gomodels-20261125/build_m2.py | 74 |
| content-sdrace-20261125/build_body.py | 39 |
Their original path setup points to wt-master-merge/ops, with additional external input/module directories. At audit time the master helper still used linear insertion (SHA in receipt), while the parent worktree contained the corrected cumulative-square helper. Therefore merely launching a script from the corrected checkout did not select its corrected helper.
Each script now loads ONLY m2_sequence_hash.py using importlib.util.spec_from_file_location and its own resolved repository ops directory. Other imports, input/output paths, converter arguments and data processing are untouched. Explicit loading also avoids a pre-existing sys.modules alias selecting another checkout. No parent helper or helper lookup tests changed.
python3 tests/m2_sequence_hash_import_paths_test.py executes actual script path-setup/helper-loader AST statements in fresh subprocesses; converter/store imports and subsequent build/data statements are excluded. Before: all4subcases fail because selected code filename is wt-master-merge/ops/m2_sequence_hash.py. After: all4pass with the owning checkout's file. Assertions compare path identity, not helper bytes, so concurrent master updates cannot turn the old importer into a passing control. The helper module is imported but no hash operation or asset build runs.
Other writer paths — evidence only, not blanket repair
- Core direct-copy converter: m2_equipment_convert.convert_equipment preserves raw[:44] in native header assembly (around392), including the source0x24 descriptor, rewrites the sequence records at426 and returns at618. It does not call the shared hash builder. Its CLI writes .md20 at738. A correct source1.12 direct-index table places each present animation at its initial native slot; this is NOT automatically a collision defect. Zero-size hash follows the parent's proved native linear fallback. Absent-ID termination and sequence/index validity still require the exact reader contract.
- Map/creature adapters: maps14-20261122/model_convert.py:20 and creature_display_compat.py:454 call that converter without the shared builder. The creature adapter additionally normalizes sequences, calls insert_stand and deduplicates tracks. These paths need reader validation at their final emission boundary; no bad asset is inferred here.
- Direct slot0 mutations: m2_equipment_convert.materialize_source_playable_default0 and m2_sequence_contract.insert_stand explicitly write lookup slot0 for an appended Stand under their preconditions. native_doodad_equivalence calls the latter. These are not alternative linear-probe hash constructors; ID0 starts at slot0. Their source-authority policies are outside this import fix.
- Cached-body wrappers: item build3/build4/helm6/sickle7/build8 and octo-drake build_model read existing .md20 and wrap it without shared-helper normalization. They can preserve a valid direct table or a previously generated bad table; path alone cannot classify payload validity.
- Container boundary: casc_asset_package.model_container validates model/dependency shape and packages MD21/SFID/TXID, but has no native sequence lookup validation. It is a common candidate validation boundary, not authorization to rewrite every input table.
- Historical replacement publication: content-animfix prep reads external replacement bytes listed in inputs/anim.json; its historical reason explicitly includes restoring singleton[0]. The prep does not construct a new collision table. Retained generated payloads must not be presumed refreshed by a helper source change. Peer owns existing81repairs.
- Producer/cache receipts: classic_to_forever.producer_pins map m2 lists equipment/format/track converter files; content_batch_jobs pins its selected tool plus declared inputs. If later routing adds the hash helper to these paths, include that dependency in producer/cache receipts. No such routing/pin change is made here.
No second tracked implementation of the open-addressed sequence-hash builder was found in the inspected production source. The known wrong implementation was the reachable master copy. Numeric skin_array(36) and texture lookup tables are different structures and are not counted as M2 header0x24 writers.
Closure status
Four helper consumers now choose their own source checkout. This does not certify every future writer or replayed artifact: the bypasses above still lack a common reader-contract validation gate. A later bounded unit can validate all authored IDs and required termination on emitted bodies, preserving already-valid direct/empty tables, with genuine failing evidence before any importer change. No client, install, publication, full suite or asset job occurred in this unit.