nte-exporter/tests
goober 3c8834e98f feat: capture and export gear, cartridges and loadouts
Adds a third export alongside pull history and achievements: the cartridges,
modules, character levels and equipped console boards the game sends at login.

Shaped as added files plus a handful of one-line calls, so this repo can keep
merging upstream:

- decoder/gear.py: self-contained bit-level decoder over a list of datagrams.
- export/gear_export.py: the nte-gear-export envelope.
- live_capture/gear_collector.py: UDP flow accumulation, the mid-capture
  decode, the fallback scan, the console line and the export file.

Gear is reported during the capture rather than only at the stop. The burst
arrives in a rush and then stops, so "this flow went quiet" is the only
mid-stream marker available; a flow is retried only once it has grown, since
decoding per packet would be quadratic in flow size.

Flows are tried largest first and the first one that decodes wins - picking
the single biggest was wrong, history traffic can outweigh a short login
burst.

Verified against a live capture: 817 items (310 cartridges, 507 modules),
20 characters, 13 loadouts, every bucket matching the in-game counts exactly.
26 synthetic tests, no real capture used as a fixture; 149 total.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 11:38:27 +03:00
..
fixtures Resolve vehicle livery mappings from matching illustration assets 2026-08-19 13:27:47 +01:00
__init__.py Improve test suite 2026-07-15 17:30:19 +01:00
support.py Added server detection 2026-07-16 01:34:38 +01:00
test_achievement.py Add achievement export support 2026-08-19 13:00:09 +01:00
test_arc_decoding.py Canonicalize reward IDs during case-insensitive mapping 2026-08-19 13:10:33 +01:00
test_capture_backends.py Improve test suite 2026-07-15 17:30:19 +01:00
test_capture_diagnostics.py Add capture diagnostics and replay fixtures 2026-07-16 00:12:02 +01:00
test_export_contract.py feat: capture and export gear, cartridges and loadouts 2026-08-21 11:38:27 +03:00
test_gear_decoding.py feat: capture and export gear, cartridges and loadouts 2026-08-21 11:38:27 +03:00
test_live_session.py Improve test suite 2026-07-15 17:30:19 +01:00
test_mapping_update.py Resolve vehicle livery mappings from matching illustration assets 2026-08-19 13:27:47 +01:00
test_mappings_and_updates.py Expand achievement exports with progress and metadata 2026-08-19 12:32:16 +01:00
test_mystery_box_decoding.py Canonicalize reward IDs during case-insensitive mapping 2026-08-19 13:10:33 +01:00
test_network_fixture.py Improve test suite 2026-07-15 17:30:19 +01:00
test_protocol_decoding.py Improve test suite 2026-07-15 17:30:19 +01:00
test_structured_protocol.py Canonicalize reward IDs during case-insensitive mapping 2026-08-19 13:10:33 +01:00
test_uid_compatibility.py Reconcile page-split timestamps for ten-pull transactions 2026-07-30 17:10:33 +01:00