bdo-toolkit 1.0.11__tar.gz → 1.0.13__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. {bdo_toolkit-1.0.11/src/bdo_toolkit.egg-info → bdo_toolkit-1.0.13}/PKG-INFO +1 -1
  2. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_version.py +1 -1
  3. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_detail_learning.py +66 -32
  4. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_discovery.py +95 -30
  5. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13/src/bdo_toolkit.egg-info}/PKG-INFO +1 -1
  6. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_solare_details.py +7 -6
  7. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_solare_learning.py +42 -0
  8. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_solare_learning_adversarial.py +83 -3
  9. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_solare_replay.py +82 -0
  10. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/LICENSE +0 -0
  11. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/README.md +0 -0
  12. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/pyproject.toml +0 -0
  13. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/setup.cfg +0 -0
  14. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/__init__.py +0 -0
  15. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_async_sessions.py +0 -0
  16. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_async_utils.py +0 -0
  17. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/__init__.py +0 -0
  18. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/_constants.py +0 -0
  19. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/_formatting.py +0 -0
  20. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/_records.py +0 -0
  21. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/analysis.py +0 -0
  22. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/capture.py +0 -0
  23. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/companions.py +0 -0
  24. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/live.py +0 -0
  25. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/models.py +0 -0
  26. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/observations.py +0 -0
  27. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/persistence.py +0 -0
  28. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/progress.py +0 -0
  29. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/validation.py +0 -0
  30. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_calibration/workflow.py +0 -0
  31. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_capture_backend.py +0 -0
  32. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_capture_options.py +0 -0
  33. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_capture_runtime.py +0 -0
  34. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_deposit_origin.py +0 -0
  35. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_engine.py +0 -0
  36. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_framing.py +0 -0
  37. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/__init__.py +0 -0
  38. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/_constants.py +0 -0
  39. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/_records.py +0 -0
  40. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/assembly.py +0 -0
  41. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/formatting.py +0 -0
  42. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/inventory.py +0 -0
  43. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/models.py +0 -0
  44. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/session.py +0 -0
  45. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_item_state/storage.py +0 -0
  46. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_observation_session.py +0 -0
  47. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_origin/__init__.py +0 -0
  48. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_origin/discovery.py +0 -0
  49. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_origin/manual.py +0 -0
  50. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_origin/models.py +0 -0
  51. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_origin/tracker.py +0 -0
  52. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_profile_io.py +0 -0
  53. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_profile_runtime.py +0 -0
  54. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_protocol.py +0 -0
  55. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_reassembly.py +0 -0
  56. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_record_geometry.py +0 -0
  57. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_specs.py +0 -0
  58. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_storage_destination_validation.py +0 -0
  59. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_storage_hydration.py +0 -0
  60. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/_tracked_capture.py +0 -0
  61. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/__init__.py +0 -0
  62. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/_calibration_models.py +0 -0
  63. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/_capture.py +0 -0
  64. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/_discovery.py +0 -0
  65. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/_profile.py +0 -0
  66. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/_validation.py +0 -0
  67. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/async_session.py +0 -0
  68. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/calibration.py +0 -0
  69. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/models.py +0 -0
  70. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/replay.py +0 -0
  71. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/agris/session.py +0 -0
  72. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/calibration.py +0 -0
  73. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/capture.py +0 -0
  74. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/capture_diagnosis.py +0 -0
  75. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/character_state.py +0 -0
  76. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/cli.py +0 -0
  77. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/diagnostics.py +0 -0
  78. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/events.py +0 -0
  79. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/filters.py +0 -0
  80. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/grind/__init__.py +0 -0
  81. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/grind/_pipeline.py +0 -0
  82. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/grind/models.py +0 -0
  83. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/grind/session.py +0 -0
  84. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/item_state.py +0 -0
  85. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/origin_learning.py +0 -0
  86. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/profiles.py +0 -0
  87. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/py.typed +0 -0
  88. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/raw/__init__.py +0 -0
  89. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/raw/_collector.py +0 -0
  90. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/raw/models.py +0 -0
  91. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/raw/replay.py +0 -0
  92. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/raw/session.py +0 -0
  93. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/remote_profiles.py +0 -0
  94. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/__init__.py +0 -0
  95. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_constants.py +0 -0
  96. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_details.py +0 -0
  97. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_live_tracker.py +0 -0
  98. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_replay_capture.py +0 -0
  99. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_result.py +0 -0
  100. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_scanner.py +0 -0
  101. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/_validation.py +0 -0
  102. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/async_session.py +0 -0
  103. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/models.py +0 -0
  104. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/replay.py +0 -0
  105. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/solare/session.py +0 -0
  106. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/writers.py +0 -0
  107. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/xp/__init__.py +0 -0
  108. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/xp/_tracker.py +0 -0
  109. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/xp/models.py +0 -0
  110. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/xp/profile.py +0 -0
  111. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/xp/replay.py +0 -0
  112. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit/xp/session.py +0 -0
  113. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit.egg-info/SOURCES.txt +0 -0
  114. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit.egg-info/dependency_links.txt +0 -0
  115. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit.egg-info/entry_points.txt +0 -0
  116. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit.egg-info/requires.txt +0 -0
  117. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/src/bdo_toolkit.egg-info/top_level.txt +0 -0
  118. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_agris_async.py +0 -0
  119. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_agris_cli.py +0 -0
  120. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_agris_discovery.py +0 -0
  121. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_agris_evidence.py +0 -0
  122. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_agris_models.py +0 -0
  123. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_agris_profiles.py +0 -0
  124. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_agris_replay.py +0 -0
  125. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_agris_session.py +0 -0
  126. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_async_sessions.py +0 -0
  127. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_calibration.py +0 -0
  128. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_calibration_conveniences.py +0 -0
  129. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_calibration_lifecycle.py +0 -0
  130. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_calibration_persistence.py +0 -0
  131. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_calibration_progress.py +0 -0
  132. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_calibration_retention.py +0 -0
  133. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_capture_backend.py +0 -0
  134. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_capture_diagnosis.py +0 -0
  135. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_capture_replay.py +0 -0
  136. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_capture_runtime.py +0 -0
  137. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_character_state.py +0 -0
  138. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_cli.py +0 -0
  139. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_decoder_diagnostics.py +0 -0
  140. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_deposit_origin.py +0 -0
  141. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_direction.py +0 -0
  142. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_dynamic_storage_calibration_matrix.py +0 -0
  143. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_engine.py +0 -0
  144. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_examples_and_writers.py +0 -0
  145. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_explicit_profile.py +0 -0
  146. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_fixture_catalog.py +0 -0
  147. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_fixture_regressions.py +0 -0
  148. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_framing.py +0 -0
  149. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_grind.py +0 -0
  150. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_initial_load_storage.py +0 -0
  151. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_inventory_snapshots.py +0 -0
  152. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_item_state.py +0 -0
  153. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_live_capture_session.py +0 -0
  154. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_origin_learning.py +0 -0
  155. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_package_layout.py +0 -0
  156. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_profile_validation.py +0 -0
  157. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_raw.py +0 -0
  158. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_reassembly.py +0 -0
  159. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_remote_profiles.py +0 -0
  160. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_solare_api.py +0 -0
  161. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_solare_equipment.py +0 -0
  162. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_solare_real_captures.py +0 -0
  163. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_solare_session.py +0 -0
  164. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_storage_destination_validation.py +0 -0
  165. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_storage_events.py +0 -0
  166. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_storage_hydration_tracker.py +0 -0
  167. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_storage_unknown_destination_calibration.py +0 -0
  168. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_toolkit_api.py +0 -0
  169. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_xp.py +0 -0
  170. {bdo_toolkit-1.0.11 → bdo_toolkit-1.0.13}/tests/test_xp_profiles.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bdo-toolkit
3
- Version: 1.0.11
3
+ Version: 1.0.13
4
4
  Summary: Passive, read-only BDO packet parsing toolkit for app developers.
5
5
  Author: bdo-toolkit contributors
6
6
  License-Expression: MIT
@@ -1,3 +1,3 @@
1
1
  """Single source of truth for the BDO Toolkit release version."""
2
2
 
3
- __version__ = "1.0.11"
3
+ __version__ = "1.0.13"
@@ -68,6 +68,8 @@ _MAX_AGGREGATE_VECTORS = 256
68
68
  _MAX_LEARNED_RECORD_END = 32 * 1024
69
69
  _MIN_HISTORY_DISCRIMINATORS = 5
70
70
  _PREFILTER_ROWS = 32
71
+ _MAX_UNASSIGNED_FIELD_BYTES = 4
72
+ _MAX_ZERO_OUTCOME_PADDING = 3
71
73
 
72
74
 
73
75
  @dataclass(frozen=True)
@@ -92,6 +94,9 @@ class _PerformanceOffsets:
92
94
  losses_offset: int
93
95
  history_offset: int
94
96
  occupancies: tuple[int, ...]
97
+ # Alternative positions in one bounded zero region. The representative
98
+ # offset is only a reader position; it does not establish an exact address.
99
+ zero_outcome_candidates: tuple[int, ...] = ()
95
100
 
96
101
 
97
102
  @dataclass(frozen=True)
@@ -474,9 +479,10 @@ def _anchored_zero_outcome_offsets(
474
479
 
475
480
  Require two complementary active outcomes and independently validated
476
481
  text-array boundaries. Across the tail from class codes to record end,
477
- exactly one 12-byte gap may remain; other gaps are at most three bytes
478
- of patch padding. No arbitrary zero region is promoted to an outcome.
479
- The normal solution search still rejects multiple interpretations.
482
+ one bounded 12..15-byte zero region may remain; other unassigned fields
483
+ are at most four bytes. Enumerate every position in that region: all must
484
+ decode the same zero vector. No arbitrary zero region is promoted.
485
+ Distinct container proofs and conflicting counter solutions still reject.
480
486
  """
481
487
  complementary = tuple(
482
488
  (first_offset, second_offset)
@@ -517,7 +523,7 @@ def _anchored_zero_outcome_offsets(
517
523
  ]
518
524
  if elos[0] >= class_field:
519
525
  fixed.append((elos[0], 4))
520
- candidates: set[int] = set()
526
+ proofs: set[tuple[int, ...]] = set()
521
527
  for first_offset, second_offset in complementary:
522
528
  intervals = sorted(fixed + [(first_offset, 12), (second_offset, 12)])
523
529
  cursor = class_field
@@ -534,13 +540,17 @@ def _anchored_zero_outcome_offsets(
534
540
  continue
535
541
  if cursor < records.record_end:
536
542
  gaps.append((cursor, records.record_end - cursor))
537
- wide = [(start, size) for start, size in gaps if size > 3]
538
- if len(wide) != 1 or wide[0][1] != 12:
543
+ wide = [(start, size) for start, size in gaps if size >= 12]
544
+ if (len(wide) != 1 or wide[0][1] > 12 + _MAX_ZERO_OUTCOME_PADDING
545
+ or any(_MAX_UNASSIGNED_FIELD_BYTES < size < 12
546
+ for _, size in gaps)):
539
547
  continue
540
- offset = wide[0][0]
541
- if all(row[offset:offset + 12] == bytes(12) for row in rows):
542
- candidates.add(offset)
543
- return tuple(sorted(candidates))
548
+ start, size = wide[0]
549
+ if all(row[start:start + size] == bytes(size) for row in rows):
550
+ proofs.add(tuple(range(start, start + size - 12 + 1)))
551
+ if len(proofs) > 1:
552
+ return ()
553
+ return next(iter(proofs)) if proofs else ()
544
554
 
545
555
 
546
556
  def _balanced_counter_solution(
@@ -575,7 +585,9 @@ def _balanced_counter_solution(
575
585
  records, occupancies, matches_offset, matches, outcomes,
576
586
  )
577
587
  outcomes += tuple(
578
- (offset, (0,) * len(matches)) for offset in zero_offsets
588
+ # All placements in the proved container have identical values.
589
+ # Keep one reader position, preserving alternatives below.
590
+ (offset, (0,) * len(matches)) for offset in zero_offsets[:1]
579
591
  )
580
592
  by_vector: dict[tuple[int, ...], list[int]] = {}
581
593
  for offset, vector in outcomes:
@@ -829,6 +841,16 @@ def _learn_performance_offsets(
829
841
  if oriented is None:
830
842
  return None
831
843
  wins_offset, draws_offset, losses_offset = oriented
844
+ active = tuple(
845
+ (offset, vector) for offset in outcome_offsets
846
+ if any(vector := _counter_vector(records.rows, offset))
847
+ )
848
+ zero_candidates = (
849
+ _anchored_zero_outcome_offsets(
850
+ records, occupancies, matches_offset,
851
+ _counter_vector(records.rows, matches_offset), active,
852
+ ) if len(active) == 2 else ()
853
+ )
832
854
  return _PerformanceOffsets(
833
855
  class_offset=class_offset,
834
856
  spec_offset=spec_offset,
@@ -838,6 +860,7 @@ def _learn_performance_offsets(
838
860
  losses_offset=losses_offset,
839
861
  history_offset=history_offset,
840
862
  occupancies=occupancies,
863
+ zero_outcome_candidates=zero_candidates if len(zero_candidates) > 1 else (),
841
864
  )
842
865
 
843
866
 
@@ -882,9 +905,10 @@ def _raw_base_candidates(
882
905
  candidates: list[int] = []
883
906
  required_end = _CLASS_SLOT_COUNT * slot_size
884
907
  offsets: Sequence[int] = range(len(first) - required_end + 1)
885
- if allow_empty_slots:
886
- # A blank first player cannot seed discovery. Gather text witnesses
887
- # from every record, then validate the entire table at each boundary.
908
+ use_text_witnesses = allow_empty_slots or value_count == 126
909
+ if use_text_witnesses:
910
+ # Blank addons or a CSV-like preceding binary byte can hide one witness.
911
+ # Gather witnesses across records and slots, then validate each boundary.
888
912
  pattern = rb"(?<![0-9,])[0-9]+(?:,[0-9]+){" + str(value_count - 1).encode() + rb"}\x00"
889
913
  witnessed = {
890
914
  match.start() - slot * slot_size
@@ -895,10 +919,10 @@ def _raw_base_candidates(
895
919
  }
896
920
  offsets = sorted(witnessed)
897
921
  for offset in offsets:
898
- if allow_empty_slots:
899
- # Addon boundary evidence permits zero to six complete pairs.
900
- # Validate every occupied block, including its zero padding; a
901
- # population percentage must not decide whether partial lists fit.
922
+ if allow_empty_slots or value_count == 126:
923
+ # Gear must satisfy its typed slot grammar; addons permit zero to
924
+ # six complete pairs. Validate every occupied block and its padding;
925
+ # a population percentage must not decide whether partial lists fit.
902
926
  valid_blocks = True
903
927
  for row, occupied in zip(rows, occupancies):
904
928
  for slot in range(occupied):
@@ -907,7 +931,12 @@ def _raw_base_candidates(
907
931
  if len(block) != slot_size:
908
932
  valid_blocks = False
909
933
  break
910
- if not any(block):
934
+ if not any(block) and allow_empty_slots:
935
+ continue
936
+ if value_count == 126:
937
+ if _parse_equipment(block) is None:
938
+ valid_blocks = False
939
+ break
911
940
  continue
912
941
  # The candidate fixes this block's boundary. A byte in the
913
942
  # preceding binary field must not extend its CSV text.
@@ -925,7 +954,10 @@ def _raw_base_candidates(
925
954
  if len(candidates) > 1:
926
955
  return ()
927
956
  continue
928
- first_shape = _csv_integer_count(first, offset)
957
+ first_shape = (
958
+ _csv_integer_count(first[offset:offset + slot_size], 0)
959
+ if use_text_witnesses else _csv_integer_count(first, offset)
960
+ )
929
961
  if not allow_empty_slots and (
930
962
  first_shape is None
931
963
  or first_shape[0] != value_count
@@ -934,7 +966,7 @@ def _raw_base_candidates(
934
966
  continue
935
967
  valid = True
936
968
  for row in rows:
937
- shape = _csv_integer_count(row, offset)
969
+ shape = _csv_integer_count(row[offset:offset + slot_size], 0)
938
970
  if allow_empty_slots and not any(row[offset : offset + slot_size]):
939
971
  continue
940
972
  if (
@@ -967,7 +999,7 @@ def _raw_base_candidates(
967
999
  if allow_empty_slots and not any(row[start:start + slot_size]):
968
1000
  matching += 1
969
1001
  continue
970
- shape = _csv_integer_count(row, start)
1002
+ shape = _csv_integer_count(row[start:start + slot_size], 0)
971
1003
  if (
972
1004
  shape is not None
973
1005
  and shape[0] == value_count
@@ -1124,8 +1156,17 @@ def _aggregate_candidates(
1124
1156
  ):
1125
1157
  return None
1126
1158
 
1159
+ zero_offsets = _aggregate_zero_offsets(records, performance, companion)
1160
+ # A proven header counter limits the search before applying fan-out bounds.
1161
+ # Name/rank bytes are independently owned fields, including name padding;
1162
+ # numeric-looking UTF-16 bytes cannot be competing lifetime counters.
1163
+ scan_end = performance.class_offset if zero_offsets else records.record_end
1164
+ forbidden = ((records.family.name_offset, 62), (records.family.rank_offset, 4))
1127
1165
  by_vector: dict[tuple[int, ...], list[int]] = {}
1128
- for offset in range(records.record_end - 3):
1166
+ for offset in range(scan_end - 3):
1167
+ if any(offset < start + size and start < offset + 4
1168
+ for start, size in forbidden):
1169
+ continue
1129
1170
  if any(
1130
1171
  _ranges_overlap(offset, base + slot * 4)
1131
1172
  for base in protected
@@ -1143,16 +1184,7 @@ def _aggregate_candidates(
1143
1184
  if len(by_vector) > _MAX_AGGREGATE_VECTORS:
1144
1185
  return None
1145
1186
 
1146
- zero_offsets = _aggregate_zero_offsets(records, performance, companion)
1147
1187
  if zero_offsets:
1148
- # This proof describes header counters. Do not let numeric bytes in
1149
- # equipment/addon/history payloads compete as aggregate fields.
1150
- by_vector = {
1151
- vector: header_offsets
1152
- for vector, offsets in by_vector.items()
1153
- if (header_offsets := [offset for offset in offsets
1154
- if offset + 4 <= performance.class_offset])
1155
- }
1156
1188
  by_vector[(0,) * len(records.rows)] = list(zero_offsets)
1157
1189
  vectors = tuple(by_vector)
1158
1190
  subset_lookup: dict[tuple[int, ...], list[tuple[int, ...]]] = {}
@@ -1388,6 +1420,8 @@ def _layout_id(
1388
1420
  )
1389
1421
  ),
1390
1422
  )
1423
+ if performance is not None and performance.zero_outcome_candidates:
1424
+ fields += (("equivalent-zero-outcome-offsets", performance.zero_outcome_candidates),)
1391
1425
  digest = hashlib.sha256(repr(fields).encode("ascii")).hexdigest()[:16]
1392
1426
  return f"solare-{role}-ephemeral-v1-{digest}"
1393
1427
 
@@ -3,6 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import hashlib
6
+ import unicodedata
6
7
  from collections import Counter, OrderedDict, defaultdict
7
8
  from dataclasses import dataclass, field
8
9
  from typing import DefaultDict, Iterable, Optional, Sequence, cast
@@ -148,24 +149,70 @@ class _NamePair:
148
149
 
149
150
 
150
151
  def _is_player_identifier_codepoint(code: int) -> bool:
151
- # Korean captures use precomposed Hangul syllables in the same UTF-16LE
152
- # fields. Keep the accepted alphabet bounded rather than accepting arbitrary
153
- # Unicode text from binary fields during structural discovery.
154
- return code in PLAYER_NAME_BYTES or 0xAC00 <= code <= 0xD7A3
152
+ if code in PLAYER_NAME_BYTES or 0xAC00 <= code <= 0xD7A3:
153
+ return True
154
+ # Assigned letters/marks/numbers in the requested scripts, not entire
155
+ # Unicode blocks (which also include punctuation and unassigned values).
156
+ if (0x0E00 <= code <= 0x0E7F # Thai
157
+ or 0x3040 <= code <= 0x30FF # Hiragana / Katakana
158
+ or 0x31F0 <= code <= 0x31FF # Katakana phonetic extensions
159
+ or 0xFF66 <= code <= 0xFF9F # Halfwidth Katakana
160
+ or 0x1AFF0 <= code <= 0x1AFFF # Kana Extended-B
161
+ or 0x1B000 <= code <= 0x1B16F): # Supplement / Extended-A / Small Kana
162
+ return unicodedata.category(chr(code))[0] in "LMN"
163
+ if code in (0x3005, 0x3006, 0x3007) or 0x3031 <= code <= 0x3035:
164
+ return True # Ideographic and kana iteration/letter marks.
165
+ if (0x3400 <= code <= 0x9FFF or 0xF900 <= code <= 0xFAFF
166
+ or 0x20000 <= code <= 0x3FFFF):
167
+ # Han is shared by Japanese Kanji and both Chinese writing systems.
168
+ return unicodedata.name(chr(code), "").startswith(
169
+ ("CJK UNIFIED IDEOGRAPH-", "CJK COMPATIBILITY IDEOGRAPH-"))
170
+ if 0xFE00 <= code <= 0xFE0F or 0xE0100 <= code <= 0xE01EF:
171
+ return True # Preserve ideographic variation sequences verbatim.
172
+ return False
173
+
174
+
175
+ def _identifier_scalar(data: bytes, position: int) -> Optional[tuple[int, int]]:
176
+ """Read one strict UTF-16 scalar and its byte width within the field."""
177
+ if position < 0 or position + 1 >= len(data):
178
+ return None
179
+ code = data[position] | data[position + 1] << 8
180
+ if 0xD800 <= code <= 0xDBFF:
181
+ if position + 3 >= len(data):
182
+ return None
183
+ low = data[position + 2] | data[position + 3] << 8
184
+ if not 0xDC00 <= low <= 0xDFFF:
185
+ return None
186
+ return 0x10000 + ((code - 0xD800) << 10) + low - 0xDC00, 4
187
+ return None if 0xDC00 <= code <= 0xDFFF else (code, 2)
155
188
 
156
189
 
157
190
  def _read_player_identifier(data: bytes, offset: int, max_chars: int = 32) -> str:
158
191
  if offset < 0:
159
192
  return ""
160
- for index in range(max_chars):
161
- position = offset + index * 2
162
- if position + 1 >= len(data):
193
+ position = offset
194
+ limit = offset + max_chars * 2
195
+ previous_code = 0
196
+ while position + 1 < limit:
197
+ scalar = _identifier_scalar(data, position)
198
+ if scalar is None:
199
+ return ""
200
+ code, width = scalar
201
+ if position + width > limit:
163
202
  return ""
164
- code = data[position] | data[position + 1] << 8
165
203
  if code == 0:
166
204
  return data[offset:position].decode("utf-16-le")
167
205
  if not _is_player_identifier_codepoint(code):
168
206
  return ""
207
+ if position == offset and unicodedata.category(chr(code)).startswith("M"):
208
+ return ""
209
+ if (0xFE00 <= code <= 0xFE0F or 0xE0100 <= code <= 0xE01EF) and not (
210
+ unicodedata.name(chr(previous_code), "").startswith(
211
+ ("CJK UNIFIED IDEOGRAPH-", "CJK COMPATIBILITY IDEOGRAPH-"))
212
+ ):
213
+ return ""
214
+ previous_code = code
215
+ position += width
169
216
  return ""
170
217
 
171
218
 
@@ -174,13 +221,14 @@ def _identifier_starts_here(data: bytes, offset: int) -> bool:
174
221
 
175
222
  if not _read_player_identifier(data, offset):
176
223
  return False
177
- if (
178
- offset >= 2
179
- and _is_player_identifier_codepoint(
180
- data[offset - 2] | data[offset - 1] << 8
181
- )
182
- ):
183
- return False
224
+ if offset >= 2:
225
+ previous = data[offset - 2] | data[offset - 1] << 8
226
+ if 0xDC00 <= previous <= 0xDFFF and offset >= 4:
227
+ scalar = _identifier_scalar(data, offset - 4)
228
+ if scalar is not None:
229
+ previous = scalar[0]
230
+ if _is_player_identifier_codepoint(previous):
231
+ return False
184
232
  return True
185
233
 
186
234
 
@@ -190,13 +238,19 @@ def _candidate_name_pairs(frames: Sequence[BDOFrame]) -> list[_NamePair]:
190
238
  first = frames[0].message
191
239
  columns: list[tuple[int, tuple[str, ...]]] = []
192
240
  for offset in range(BDO_HEADER_SIZE, len(first) - 1):
193
- if not _identifier_starts_here(first, offset):
241
+ if not _read_player_identifier(first, offset):
194
242
  continue
195
243
  values = tuple(
196
244
  _read_player_identifier(frame.message, offset) for frame in frames
197
245
  )
198
246
  if not all(values) or len(set(values)) != len(values):
199
247
  continue
248
+ # A preceding binary word can coincidentally encode a supported Han
249
+ # character. Establish the column boundary using the whole response,
250
+ # rather than rejecting it solely on the first record's preceding word.
251
+ # A suffix of a genuine name has a supported predecessor in every row.
252
+ if not any(_identifier_starts_here(frame.message, offset) for frame in frames):
253
+ continue
200
254
  columns.append((offset, values))
201
255
 
202
256
  pairs: list[_NamePair] = []
@@ -601,29 +655,40 @@ def _discover_menu_context(
601
655
  columns: list[tuple[int, tuple[str, ...]]] = []
602
656
  first = frames[0].message
603
657
  for offset in range(BDO_HEADER_SIZE, len(first) - 1):
604
- # Most byte offsets cannot begin a UTF-16LE player identifier. Reject
605
- # those from the first frame before reading the same offset from all 24
606
- # frames; this keeps menu-context probing cheap on unrelated traffic.
607
- if not _identifier_starts_here(first, offset):
658
+ # Reject non-text offsets cheaply, then prove the column boundary
659
+ # across records so neighboring binary words cannot suppress it.
660
+ if not _read_player_identifier(first, offset):
608
661
  continue
609
662
  values = tuple(
610
663
  _read_player_identifier(frame.message, offset) for frame in frames
611
664
  )
612
665
  if not all(values) or len(set(values)) < 12:
613
666
  continue
667
+ if not any(_identifier_starts_here(frame.message, offset) for frame in frames):
668
+ continue
614
669
  columns.append((offset, values))
615
670
 
616
- collapsed: list[tuple[int, tuple[str, ...]]] = []
617
- for offset, values in columns:
618
- if collapsed and offset - collapsed[-1][0] <= 64:
619
- continue
620
- collapsed.append((offset, values))
621
- if len(collapsed) != 5:
671
+ groups: list[list[tuple[int, tuple[str, ...]]]] = []
672
+ for column in columns:
673
+ if not groups or column[0] - groups[-1][0][0] > 64:
674
+ groups.append([])
675
+ groups[-1].append(column)
676
+ if len(groups) != 5:
622
677
  return None
623
- offsets = [offset for offset, _values in collapsed]
624
- strides = [right - left for left, right in zip(offsets, offsets[1:])]
625
- if len(set(strides)) != 1:
678
+ # Wider scripts can make a one-byte-shifted UTF-16 alias look like text.
679
+ # Select the unique evenly spaced five-column grid, not the first alias.
680
+ grids: list[tuple[int, ...]] = []
681
+ lookups = [dict(group) for group in groups]
682
+ for first_offset in lookups[0]:
683
+ for second_offset in lookups[1]:
684
+ stride = second_offset - first_offset
685
+ offsets = tuple(first_offset + index * stride for index in range(5))
686
+ if all(offset in group for offset, group in zip(offsets, lookups)):
687
+ grids.append(offsets)
688
+ if len(grids) != 1:
626
689
  return None
690
+ offsets = grids[0]
691
+ collapsed = [(offset, group[offset]) for offset, group in zip(offsets, lookups)]
627
692
  all_names = [name for _offset, values in collapsed for name in values]
628
693
  if not 40 <= len(set(all_names)) <= len(all_names):
629
694
  return None
@@ -634,7 +699,7 @@ def _discover_menu_context(
634
699
  frame_length=frame_length,
635
700
  frame_count=len(frames),
636
701
  player_slots_per_frame=len(collapsed),
637
- record_stride=strides[0],
702
+ record_stride=offsets[1] - offsets[0],
638
703
  unique_names=len(set(all_names)),
639
704
  flow_generation=flow_generation,
640
705
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bdo-toolkit
3
- Version: 1.0.11
3
+ Version: 1.0.13
4
4
  Summary: Passive, read-only BDO packet parsing toolkit for app developers.
5
5
  Author: bdo-toolkit contributors
6
6
  License-Expression: MIT
@@ -443,18 +443,19 @@ def _synthetic_snapshot(
443
443
 
444
444
 
445
445
  @pytest.mark.parametrize("layout", _LAYOUTS, ids=lambda item: item.layout_id)
446
- def test_registered_details_preserve_korean_names_and_performance(layout: _Layout) -> None:
447
- synthetic = _synthetic_snapshot(layout, name_prefix="\uac00\ub098")
446
+ @pytest.mark.parametrize("prefix", ("\uac00\ub098", "ผู้กล้า", "かなカナ漢", "简体汉字", "繁體漢字", "𠮷"))
447
+ def test_registered_details_preserve_asian_names_and_performance(layout: _Layout, prefix: str) -> None:
448
+ synthetic = _synthetic_snapshot(layout, name_prefix=prefix)
448
449
  rich = decode_solare_details(synthetic.rich_frames, synthetic.rich)
449
450
  overall = decode_solare_overall_details(synthetic.overall_frames, synthetic.overall)
450
451
  assert rich is not None
451
452
  assert overall is not None
452
- assert rich.players[0].name == "\uac00\ub0980001"
453
- assert rich.players[-1].name == "\uac00\ub0980620"
453
+ assert rich.players[0].name == prefix + "0001"
454
+ assert rich.players[-1].name == prefix + "0620"
454
455
  assert rich.players[0].elo == 9999
455
456
  assert rich.players[0].classes_played[0].matches == 101
456
- assert overall.entries[0].name == "\uac00\ub0980001"
457
- assert overall.entries[-1].name == "\uac00\ub0980100"
457
+ assert overall.entries[0].name == prefix + "0001"
458
+ assert overall.entries[-1].name == prefix + "0100"
458
459
  assert "performance" in overall.capabilities
459
460
  assert overall.entries[0].classes_played[0].wins == 120
460
461
 
@@ -51,6 +51,9 @@ _JULY_30_UNKNOWN_LAYOUT_CAPTURE = (
51
51
  optional_fixture_path('solare--leaderboard-complete-unregistered--dfeb623bda')
52
52
  )
53
53
 
54
+ _KR_OCTOBER_21_CAPTURE = optional_fixture_path(
55
+ 'solare--leaderboard-complete-kr-post-patch--9731c37014')
56
+
54
57
  _LEARNED_CAPABILITIES = frozenset(
55
58
  {"rankings", "elo", "performance", "raw_extensions", "equipment"}
56
59
  )
@@ -65,6 +68,45 @@ class _ReplayPair:
65
68
  learned: SolareCaptureResult
66
69
 
67
70
 
71
+ def test_kr_capture_recovers_equivalent_zero_outcomes_and_direct_aggregates() -> None:
72
+ if not _KR_OCTOBER_21_CAPTURE.is_file():
73
+ pytest.skip("private October 21 KR capture is not installed")
74
+ original = learning_module._learn_performance_offsets
75
+ alternatives = []
76
+
77
+ def observe(*args, **kwargs):
78
+ learned = original(*args, **kwargs)
79
+ if learned is not None and len(args[0].rows) == 100:
80
+ alternatives.append(learned.zero_outcome_candidates)
81
+ return learned
82
+
83
+ with patch.object(learning_module, '_learn_performance_offsets', observe):
84
+ result = replay_solare(_KR_OCTOBER_21_CAPTURE, retain_raw_extensions=True)
85
+ assert result.complete and result.snapshot is not None
86
+ assert result.evidence.health.capture_is_clean
87
+ assert result.evidence.exact_cross_check == 100
88
+ snapshot = result.snapshot
89
+ assert len(snapshot.players) == 640 and len(snapshot.overall_top_100) == 100
90
+ assert snapshot.class_table_capabilities == _LEARNED_CAPABILITIES
91
+ assert snapshot.overall_capabilities == _LEARNED_OVERALL_CAPABILITIES
92
+ assert (8068, 8069, 8070) in alternatives
93
+ by_name = {p.name: p for p in snapshot.players}
94
+ for overall in snapshot.overall_top_100:
95
+ rich = by_name[overall.name]
96
+ assert overall.global_rank == rich.global_rank and overall.elo == rich.elo
97
+ assert len(overall.classes_played) == len(rich.classes_played)
98
+ for a, b in zip(overall.classes_played, rich.classes_played):
99
+ assert (a.player_class, a.matches, a.wins, a.draws, a.losses, a.equipment) == (
100
+ b.player_class, b.matches, b.wins, b.draws, b.losses, b.equipment)
101
+ assert a.record_is_balanced and a.draws == 0
102
+ assert a.equipment is not None and len(a.equipment) == 14
103
+ # The direct overall totals include activity beyond the three exposed slots.
104
+ capped = snapshot.overall_top_100[47]
105
+ assert capped.global_rank == 48 and len(capped.classes_played) == 3
106
+ assert (capped.total_wins, capped.total_draws, capped.total_losses, capped.total_matches) == (26, 0, 4, 30)
107
+ assert sum(p.matches for p in capped.classes_played) == 28
108
+
109
+
68
110
  def test_july_30_unknown_layout_learns_complete_snapshot() -> None:
69
111
  """An installed unseen-geometry capture learns every supported detail."""
70
112
 
@@ -122,7 +122,8 @@ def _performance_rows(
122
122
  rows: list[bytes] = []
123
123
  occupancies = (1,) * 6 + (2,) * 6 + (3,) * 6
124
124
  duplicate_counter_offsets = (76, 88, 116, 128)
125
- duplicate_aggregate_offsets = (136, 140, 144)
125
+ # A genuine competing field, outside the independently known name block.
126
+ duplicate_aggregate_offsets = (810, 814, 818)
126
127
 
127
128
  for ordinal, occupied in enumerate(occupancies):
128
129
  row = bytearray(b"\xFE" * _ROW_SIZE)
@@ -303,6 +304,13 @@ def _csv(values: tuple[int, ...]) -> bytes:
303
304
  return ",".join(str(value) for value in values).encode("ascii")
304
305
 
305
306
 
307
+ def _gear_text() -> bytes:
308
+ return _csv(tuple(
309
+ value for slot in (0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 27, 29)
310
+ for value in (slot, 740603, 0, 15252, 15252, 0, 0, 0, 0)
311
+ ))
312
+
313
+
306
314
  def _raw_rows(
307
315
  *,
308
316
  duplicate: bool = False,
@@ -314,7 +322,7 @@ def _raw_rows(
314
322
  duplicate_addons_base = 14_300
315
323
  row_size = 16_000
316
324
  occupancies = (1,) * 20 + (2,) * 2 + (3,) * 2
317
- gear_text = _csv(tuple(10 + index % 90 for index in range(126)))
325
+ gear_text = _gear_text()
318
326
  addon_text = _csv(tuple(10 + index for index in range(12)))
319
327
  rows: list[bytes] = []
320
328
 
@@ -610,7 +618,7 @@ def _zero_draw_tail() -> tuple[learning._RecordTable, tuple[int, ...]]:
610
618
  addons = b",".join([b"1"] * 12)
611
619
  start = 361 + slot * 501
612
620
  row[start:start + len(addons)] = addons
613
- gear = b",".join([b"10"] * 126)
621
+ gear = _gear_text()
614
622
  start = 1864 + slot * 2001
615
623
  row[start:start + len(gear)] = gear
616
624
  rows.append(bytes(row))
@@ -628,6 +636,52 @@ def test_zero_draws_require_unique_surrounding_field_boundaries() -> None:
628
636
  performance.draws_offset, performance.losses_offset) == (15, 27, 7867, 39)
629
637
 
630
638
 
639
+ @pytest.mark.parametrize("padding", (1, 2, 3))
640
+ def test_zero_outcomes_retain_every_equivalent_position(padding):
641
+ records, occupancies = _zero_draw_tail()
642
+ records.family.frame_length += padding
643
+ records = replace(records, rows=tuple(row + bytes(padding) for row in records.rows))
644
+ performance = learning._learn_performance_offsets(records, 12, occupancies)
645
+ assert performance is not None
646
+ assert performance.draws_offset == 7867 # Representative reader position.
647
+ assert performance.zero_outcome_candidates == tuple(range(7867, 7868 + padding))
648
+ assert all(row[offset:offset + 12] == bytes(12)
649
+ for row in records.rows for offset in performance.zero_outcome_candidates)
650
+ # The ephemeral ID records the alternative proof, not an exact address claim.
651
+ assert learning._layout_id("rich", records, 51, performance) != learning._layout_id(
652
+ "rich", records, 51, replace(performance, zero_outcome_candidates=()))
653
+
654
+
655
+ def test_zero_outcomes_allow_one_separate_unassigned_word_and_binary_gear_prefix():
656
+ records, occupancies = _zero_draw_tail()
657
+ records.family.frame_length += 6
658
+ rows = tuple(row[:1864] + b"\0\0\0\x33" + row[1864:] + bytes(2)
659
+ for row in records.rows)
660
+ performance = learning._learn_performance_offsets(replace(records, rows=rows), 12, occupancies)
661
+ assert performance is not None
662
+ assert performance.zero_outcome_candidates == (7871, 7872, 7873)
663
+
664
+
665
+ @pytest.mark.parametrize("damage", ("large_tail", "nonzero_before", "nonzero_after", "other_wide_gap", "extra_word"))
666
+ def test_zero_outcome_equivalence_rejects_unproved_containers(damage):
667
+ records, occupancies = _zero_draw_tail()
668
+ rows = [row + bytes(2) for row in records.rows]
669
+ extra = 2
670
+ if damage == "large_tail":
671
+ rows = [row + bytes(2) for row in rows]
672
+ extra += 2
673
+ elif damage in ("nonzero_before", "nonzero_after"):
674
+ row = bytearray(rows[0])
675
+ row[7867 if damage == "nonzero_before" else -1] = 1
676
+ rows[0] = bytes(row)
677
+ else:
678
+ size = 12 if damage == "other_wide_gap" else 5
679
+ rows = [row[:1864] + bytes(size) + row[1864:] for row in rows]
680
+ extra += size
681
+ records.family.frame_length += extra
682
+ assert learning._learn_performance_offsets(replace(records, rows=tuple(rows)), 12, occupancies) is None
683
+
684
+
631
685
  @pytest.mark.parametrize("damage", ("extra_gap", "nonzero_draw", "broken_gear", "broken_addons", "broken_history", "unbalanced"))
632
686
  def test_zero_draw_boundary_proof_rejects_missing_evidence(damage: str) -> None:
633
687
  records, occupancies = _zero_draw_tail()
@@ -729,6 +783,32 @@ def test_addon_boundary_validation_ignores_preceding_binary_byte(preceding, coun
729
783
  ) == (361,)
730
784
 
731
785
 
786
+ @pytest.mark.parametrize("preceding", (ord("0"), ord("3"), ord("9"), ord(",")))
787
+ def test_equipment_boundary_uses_typed_blocks_when_every_primary_has_binary_prefix(preceding):
788
+ records, performance = _raw_rows()
789
+ rows = []
790
+ for original in records.rows:
791
+ row = bytearray(original)
792
+ row[99] = preceding
793
+ rows.append(bytes(row))
794
+ assert learning._raw_base_candidates(
795
+ rows, performance.occupancies, value_count=126, slot_size=2001,
796
+ minimum_text_length=300, maximum_text_length=500,
797
+ ) == (100,)
798
+
799
+
800
+ def test_aggregate_candidates_exclude_the_independent_name_field():
801
+ records, performance = _performance_rows(include_aggregate=True)
802
+ rows = []
803
+ for original in records.rows:
804
+ row = bytearray(original)
805
+ for source, alias in zip((100, 104, 108), (136, 140, 144)):
806
+ row[alias:alias + 4] = row[source:source + 4]
807
+ rows.append(bytes(row))
808
+ assert learning._learn_aggregate(replace(records, rows=tuple(rows)), performance) == (
809
+ learning._AggregateOffsets(100, 104, 108))
810
+
811
+
732
812
  def test_blank_addon_requires_entire_slot_to_be_zero():
733
813
  records, occupancies = _zero_draw_tail()
734
814
  row = bytearray(records.rows[0])