bdo-toolkit 1.1.1__tar.gz → 1.1.3__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.
- {bdo_toolkit-1.1.1/src/bdo_toolkit.egg-info → bdo_toolkit-1.1.3}/PKG-INFO +1 -1
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_version.py +1 -1
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_constants.py +4 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_detail_learning.py +66 -44
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_details.py +5 -13
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_discovery.py +1 -3
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_short_board.py +66 -29
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3/src/bdo_toolkit.egg-info}/PKG-INFO +1 -1
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_solare_details.py +10 -10
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_solare_learning.py +1 -1
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_solare_learning_adversarial.py +27 -5
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_solare_replay.py +44 -10
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/LICENSE +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/README.md +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/pyproject.toml +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/setup.cfg +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/__init__.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_async_sessions.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_async_utils.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/__init__.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/_constants.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/_formatting.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/_records.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/analysis.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/capture.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/companions.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/live.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/models.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/observations.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/persistence.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/progress.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/validation.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/workflow.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_capture_backend.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_capture_options.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_capture_runtime.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_deposit_origin.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_engine.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_framing.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/__init__.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/_constants.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/_records.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/assembly.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/character_discovery.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/character_models.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/character_profile.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/character_slots.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/character_witnesses.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/characters.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/formatting.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/inventory.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/models.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/session.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/storage.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_observation_session.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_origin/__init__.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_origin/discovery.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_origin/manual.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_origin/models.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_origin/tracker.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_profile_io.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_profile_runtime.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_protocol.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_reassembly.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_record_geometry.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_specs.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_storage_destination_validation.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_storage_hydration.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_tracked_capture.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/__init__.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/_calibration_models.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/_capture.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/_discovery.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/_profile.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/_validation.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/async_session.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/calibration.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/models.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/replay.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/session.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/calibration.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/capture.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/capture_diagnosis.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/character_calibration.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/character_state.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/cli.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/diagnostics.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/events.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/filters.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/grind/__init__.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/grind/_pipeline.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/grind/models.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/grind/session.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/item_state.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/origin_learning.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/profiles.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/py.typed +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/raw/__init__.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/raw/_collector.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/raw/models.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/raw/replay.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/raw/session.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/remote_profiles.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/__init__.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_live_tracker.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_replay_capture.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_result.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_scanner.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_validation.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/async_session.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/models.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/replay.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/session.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/writers.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/xp/__init__.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/xp/_tracker.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/xp/models.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/xp/profile.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/xp/replay.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit/xp/session.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit.egg-info/SOURCES.txt +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit.egg-info/dependency_links.txt +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit.egg-info/entry_points.txt +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit.egg-info/requires.txt +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/src/bdo_toolkit.egg-info/top_level.txt +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_agris_async.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_agris_cli.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_agris_discovery.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_agris_evidence.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_agris_models.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_agris_profiles.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_agris_replay.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_agris_session.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_async_sessions.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_calibration.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_calibration_conveniences.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_calibration_lifecycle.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_calibration_persistence.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_calibration_progress.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_calibration_retention.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_capture_backend.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_capture_diagnosis.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_capture_replay.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_capture_runtime.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_character_calibration.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_character_loadouts.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_character_state.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_cli.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_decoder_diagnostics.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_deposit_origin.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_direction.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_dynamic_storage_calibration_matrix.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_engine.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_examples_and_writers.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_explicit_profile.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_fixture_catalog.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_fixture_regressions.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_framing.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_grind.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_initial_load_storage.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_inventory_snapshots.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_item_state.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_live_capture_session.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_origin_learning.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_package_layout.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_profile_validation.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_raw.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_reassembly.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_remote_profiles.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_solare_api.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_solare_equipment.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_solare_history.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_solare_real_captures.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_solare_session.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_storage_destination_validation.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_storage_events.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_storage_hydration_tracker.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_storage_unknown_destination_calibration.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_toolkit_api.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_xp.py +0 -0
- {bdo_toolkit-1.1.1 → bdo_toolkit-1.1.3}/tests/test_xp_profiles.py +0 -0
|
@@ -102,6 +102,10 @@ ADVANCED_SPEC_BY_CLASS: dict[int, str] = {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
|
|
105
|
+
def valid_occupied_specialization(class_code: int, code: int) -> bool:
|
|
106
|
+
return code in (1, 2) or (code == 0 and class_code == 3) # Wukong
|
|
107
|
+
|
|
108
|
+
|
|
105
109
|
def class_name(code: int) -> Optional[str]:
|
|
106
110
|
if code == EMPTY_CLASS_CODE:
|
|
107
111
|
return None
|
|
@@ -25,6 +25,7 @@ from ._constants import (
|
|
|
25
25
|
EMPTY_SPEC_CODE,
|
|
26
26
|
SOLARE_RICH_RECORD_COUNTS,
|
|
27
27
|
class_name,
|
|
28
|
+
valid_occupied_specialization,
|
|
28
29
|
)
|
|
29
30
|
from ._details import (
|
|
30
31
|
_ADDON_SLOT_SIZE,
|
|
@@ -70,7 +71,8 @@ _MAX_AGGREGATE_VECTORS = 256
|
|
|
70
71
|
_MAX_LEARNED_RECORD_END = 32 * 1024
|
|
71
72
|
_MIN_HISTORY_DISCRIMINATORS = 5
|
|
72
73
|
_PREFILTER_ROWS = 32
|
|
73
|
-
|
|
74
|
+
_MAX_WHOLE_ZERO_REGION = 15
|
|
75
|
+
_MAX_ZERO_PLACEMENT_REGION = 16
|
|
74
76
|
|
|
75
77
|
|
|
76
78
|
@dataclass(frozen=True)
|
|
@@ -208,6 +210,7 @@ def _learn_overall_class_offset(
|
|
|
208
210
|
|
|
209
211
|
def _learn_spec_offset(
|
|
210
212
|
rows: Sequence[bytes],
|
|
213
|
+
class_offset: int,
|
|
211
214
|
occupancies: Sequence[int],
|
|
212
215
|
) -> Optional[int]:
|
|
213
216
|
candidates: list[int] = []
|
|
@@ -219,7 +222,7 @@ def _learn_spec_offset(
|
|
|
219
222
|
for slot in range(_CLASS_SLOT_COUNT):
|
|
220
223
|
code = row[offset + slot]
|
|
221
224
|
if slot < occupied:
|
|
222
|
-
if
|
|
225
|
+
if not valid_occupied_specialization(row[class_offset + slot], code):
|
|
223
226
|
valid = False
|
|
224
227
|
break
|
|
225
228
|
observed_occupied.add(code)
|
|
@@ -236,6 +239,7 @@ def _learn_spec_offset(
|
|
|
236
239
|
|
|
237
240
|
|
|
238
241
|
def _elo_candidates(records: _RecordTable) -> tuple[int, ...]:
|
|
242
|
+
minimum = 0 if records.family.short_record_locations else 1
|
|
239
243
|
sample = _sample_ordinals(len(records.rows))
|
|
240
244
|
prefiltered: list[int] = []
|
|
241
245
|
for offset in range(records.record_end - 3):
|
|
@@ -243,7 +247,8 @@ def _elo_candidates(records: _RecordTable) -> tuple[int, ...]:
|
|
|
243
247
|
_u32le(records.rows[ordinal], offset) for ordinal in sample
|
|
244
248
|
)
|
|
245
249
|
if (
|
|
246
|
-
|
|
250
|
+
sample_values[0] == 0
|
|
251
|
+
or not all(minimum <= value <= _MAX_LEARNED_ELO for value in sample_values)
|
|
247
252
|
or not all(
|
|
248
253
|
left >= right
|
|
249
254
|
for left, right in zip(sample_values, sample_values[1:])
|
|
@@ -258,7 +263,7 @@ def _elo_candidates(records: _RecordTable) -> tuple[int, ...]:
|
|
|
258
263
|
for offset in prefiltered:
|
|
259
264
|
values = tuple(_u32le(row, offset) for row in records.rows)
|
|
260
265
|
if (
|
|
261
|
-
all(
|
|
266
|
+
all(minimum <= value <= _MAX_LEARNED_ELO for value in values)
|
|
262
267
|
and all(left >= right for left, right in zip(values, values[1:]))
|
|
263
268
|
and len(set(values)) >= _MIN_ELO_DISTINCT
|
|
264
269
|
):
|
|
@@ -489,8 +494,8 @@ def _anchored_zero_outcome_offsets(
|
|
|
489
494
|
one bounded 12..15-byte zero region may remain. Shorter unassigned gaps
|
|
490
495
|
cannot contain a complete three-counter array. Every complete placement
|
|
491
496
|
in a fully zero region decodes the same vector. Otherwise require a unique
|
|
492
|
-
bounded region and exactly one all-zero array placement.
|
|
493
|
-
zero region is promoted.
|
|
497
|
+
bounded region of at most 16 bytes and exactly one all-zero array placement.
|
|
498
|
+
No arbitrary zero region is promoted.
|
|
494
499
|
Distinct container proofs and conflicting counter solutions still reject.
|
|
495
500
|
"""
|
|
496
501
|
complementary = tuple(
|
|
@@ -508,8 +513,8 @@ def _anchored_zero_outcome_offsets(
|
|
|
508
513
|
if learned_class is None:
|
|
509
514
|
return ()
|
|
510
515
|
class_field = learned_class[0]
|
|
511
|
-
spec = _learn_spec_offset(rows, occupancies)
|
|
512
|
-
history = _history_candidates(rows, occupancies, matches_offset)
|
|
516
|
+
spec = _learn_spec_offset(rows, class_field, occupancies)
|
|
517
|
+
history = _history_candidates(rows, occupancies, matches_offset, independent_counters=True)
|
|
513
518
|
elos = _elo_candidates(records)
|
|
514
519
|
if spec is None or len(history) != 1 or len(elos) != 1:
|
|
515
520
|
return ()
|
|
@@ -533,7 +538,7 @@ def _anchored_zero_outcome_offsets(
|
|
|
533
538
|
if elos[0] >= class_field:
|
|
534
539
|
fixed.append((elos[0], 4))
|
|
535
540
|
proofs: set[tuple[int, ...]] = set()
|
|
536
|
-
|
|
541
|
+
placement_containers: set[tuple[int, int]] = set()
|
|
537
542
|
for first_offset, second_offset in complementary:
|
|
538
543
|
intervals = sorted(fixed + [(first_offset, 12), (second_offset, 12)])
|
|
539
544
|
cursor = class_field
|
|
@@ -553,22 +558,24 @@ def _anchored_zero_outcome_offsets(
|
|
|
553
558
|
wide = [(start, size) for start, size in gaps if size >= 12]
|
|
554
559
|
# Unknown bytes smaller than a full array cannot compete with its
|
|
555
560
|
# container. Larger gaps still require the unique bounded proof below.
|
|
556
|
-
if len(wide) != 1 or wide[0][1] >
|
|
561
|
+
if len(wide) != 1 or wide[0][1] > _MAX_ZERO_PLACEMENT_REGION:
|
|
557
562
|
continue
|
|
558
563
|
start, size = wide[0]
|
|
559
|
-
if
|
|
564
|
+
if size <= _MAX_WHOLE_ZERO_REGION and all(
|
|
565
|
+
row[start:start + size] == bytes(size) for row in rows
|
|
566
|
+
):
|
|
560
567
|
proofs.add(tuple(range(start, start + size - 12 + 1)))
|
|
561
568
|
if len(proofs) > 1:
|
|
562
569
|
return ()
|
|
563
570
|
else:
|
|
564
|
-
|
|
571
|
+
placement_containers.add((start, size))
|
|
565
572
|
if proofs:
|
|
566
573
|
return next(iter(proofs))
|
|
567
574
|
# Only after ordinary whole-container proof fails: the complementary
|
|
568
575
|
# counters require zero in every slot. Adjacent bytes have no meaning.
|
|
569
|
-
if len(
|
|
576
|
+
if len(placement_containers) != 1:
|
|
570
577
|
return ()
|
|
571
|
-
start, size =
|
|
578
|
+
start, size = placement_containers.pop()
|
|
572
579
|
placements = tuple(
|
|
573
580
|
offset for offset in range(start, start + size - 12 + 1)
|
|
574
581
|
if all(row[offset:offset + 12] == bytes(12) for row in rows)
|
|
@@ -663,10 +670,15 @@ def _history_candidates(
|
|
|
663
670
|
matches_offset: int,
|
|
664
671
|
*, independent_counters: bool = False,
|
|
665
672
|
) -> tuple[int, ...]:
|
|
673
|
+
if independent_counters:
|
|
674
|
+
strict = _history_candidates(rows, occupancies, matches_offset)
|
|
675
|
+
if strict:
|
|
676
|
+
return strict
|
|
666
677
|
required = _CLASS_SLOT_COUNT * _HISTORY_SLOT_SIZE
|
|
667
678
|
sample = _sample_ordinals(len(rows), occupancies)
|
|
668
679
|
|
|
669
680
|
def valid_for(offset: int, ordinals: Sequence[int]) -> bool:
|
|
681
|
+
malformed = 0
|
|
670
682
|
for ordinal in ordinals:
|
|
671
683
|
row = rows[ordinal]
|
|
672
684
|
occupied = occupancies[ordinal]
|
|
@@ -675,6 +687,13 @@ def _history_candidates(
|
|
|
675
687
|
decoded = _decode_history_region(
|
|
676
688
|
row[start : start + _HISTORY_SLOT_SIZE]
|
|
677
689
|
)
|
|
690
|
+
if slot < occupied and independent_counters and (
|
|
691
|
+
decoded is None or not decoded[0] or _history_outcome_counts(decoded[1]) is None
|
|
692
|
+
):
|
|
693
|
+
malformed += 1
|
|
694
|
+
if malformed > 1 or len(rows) < 20:
|
|
695
|
+
return False
|
|
696
|
+
continue
|
|
678
697
|
if decoded is None:
|
|
679
698
|
return False
|
|
680
699
|
raw, codes = decoded
|
|
@@ -824,7 +843,7 @@ def _counter_geometry_check(
|
|
|
824
843
|
if counters is None:
|
|
825
844
|
return None
|
|
826
845
|
source_matches, source_outcomes = counters
|
|
827
|
-
if len(_history_candidates(source.rows, source_occupancies, source_matches)) != 1:
|
|
846
|
+
if len(_history_candidates(source.rows, source_occupancies, source_matches, independent_counters=True)) != 1:
|
|
828
847
|
return None
|
|
829
848
|
by_name = {name: i for i, name in enumerate(source.names)}
|
|
830
849
|
|
|
@@ -861,7 +880,7 @@ def _learn_performance_offsets(
|
|
|
861
880
|
companion: Optional[tuple[_RecordTable, _PerformanceOffsets]] = None,
|
|
862
881
|
counter_check: Optional[Callable[[int, tuple[int, int, int]], bool]] = None,
|
|
863
882
|
) -> Optional[_PerformanceOffsets]:
|
|
864
|
-
spec_offset = _learn_spec_offset(records.rows, occupancies)
|
|
883
|
+
spec_offset = _learn_spec_offset(records.rows, class_offset, occupancies)
|
|
865
884
|
if spec_offset is None:
|
|
866
885
|
return None
|
|
867
886
|
|
|
@@ -893,7 +912,7 @@ def _validate_performance_candidate(
|
|
|
893
912
|
*,
|
|
894
913
|
companion: Optional[tuple[_RecordTable, _PerformanceOffsets]] = None,
|
|
895
914
|
) -> Optional[_PerformanceOffsets]:
|
|
896
|
-
independent =
|
|
915
|
+
independent = companion is not None
|
|
897
916
|
histories = _history_candidates(
|
|
898
917
|
records.rows,
|
|
899
918
|
occupancies,
|
|
@@ -911,20 +930,11 @@ def _validate_performance_candidate(
|
|
|
911
930
|
history_offset,
|
|
912
931
|
)
|
|
913
932
|
if oriented is None and companion is not None:
|
|
914
|
-
#
|
|
915
|
-
# labels. Recent UI history may cover a different set of matches;
|
|
916
|
-
# preserve valid raw windows without treating them as counter totals.
|
|
917
|
-
# Ordinary full-board inference retains its original history checks.
|
|
933
|
+
# Orient the independently balanced counters using shared player slots.
|
|
918
934
|
supported = tuple(
|
|
919
|
-
|
|
920
|
-
tuple((a, b, c) for a, b, c in itertools.permutations(outcome_offsets)) if independent else
|
|
921
|
-
_history_outcome_candidates(
|
|
922
|
-
records.rows, occupancies, matches_offset, outcome_offsets,
|
|
923
|
-
history_offset, minimum_discriminators=0,
|
|
924
|
-
)
|
|
925
|
-
)
|
|
935
|
+
(w, d, l) for w, d, l in itertools.permutations(outcome_offsets)
|
|
926
936
|
if _companion_outcomes_agree(
|
|
927
|
-
records, class_offset, occupancies, matches_offset,
|
|
937
|
+
records, class_offset, occupancies, matches_offset, (w, d, l),
|
|
928
938
|
companion[0], companion[1],
|
|
929
939
|
)
|
|
930
940
|
)
|
|
@@ -1144,12 +1154,12 @@ def _ranges_overlap(left: int, right: int, size: int = 4) -> bool:
|
|
|
1144
1154
|
return left < right + size and right < left + size
|
|
1145
1155
|
|
|
1146
1156
|
|
|
1147
|
-
def
|
|
1157
|
+
def _aggregate_zero_proof(
|
|
1148
1158
|
records: _RecordTable,
|
|
1149
1159
|
performance: _PerformanceOffsets,
|
|
1150
1160
|
companion: Optional[_RecordTable],
|
|
1151
|
-
) -> tuple[int,
|
|
1152
|
-
"""
|
|
1161
|
+
) -> Optional[tuple[int, Optional[int]]]:
|
|
1162
|
+
"""Return the zero address and any required adjacent lifetime-counter address.
|
|
1153
1163
|
|
|
1154
1164
|
Historical headers carry a 62-byte name, a 101-byte recent-history block,
|
|
1155
1165
|
and an eight-byte identity shared with the class response. Identity matches
|
|
@@ -1157,15 +1167,15 @@ def _aggregate_zero_offsets(
|
|
|
1157
1167
|
No absolute era-specific offsets or arbitrary runs of zeroes are used.
|
|
1158
1168
|
"""
|
|
1159
1169
|
if companion is None or companion.family.class_offset is None:
|
|
1160
|
-
return
|
|
1170
|
+
return None
|
|
1161
1171
|
elos = _elo_candidates(records)
|
|
1162
1172
|
rich_elos = _elo_candidates(companion)
|
|
1163
1173
|
if len(elos) != 1 or len(rich_elos) != 1:
|
|
1164
|
-
return
|
|
1174
|
+
return None
|
|
1165
1175
|
boundary = performance.class_offset
|
|
1166
1176
|
rich_boundary = companion.family.class_offset
|
|
1167
1177
|
if max(boundary, rich_boundary) > 512:
|
|
1168
|
-
return
|
|
1178
|
+
return None
|
|
1169
1179
|
fields = [(records.family.name_offset, 62),
|
|
1170
1180
|
(records.family.rank_offset, 4), (elos[0], 4)]
|
|
1171
1181
|
rich_fields = [(companion.family.name_offset, 62),
|
|
@@ -1191,13 +1201,13 @@ def _aggregate_zero_offsets(
|
|
|
1191
1201
|
if valid:
|
|
1192
1202
|
histories.append(offset)
|
|
1193
1203
|
if len(histories) != 1:
|
|
1194
|
-
return
|
|
1204
|
+
return None
|
|
1195
1205
|
fields.append((histories[0], _HISTORY_SLOT_SIZE))
|
|
1196
1206
|
lookup = dict(zip(companion.names, companion.rows))
|
|
1197
1207
|
pairs = [(row, lookup[name]) for name, row in zip(records.names, records.rows)
|
|
1198
1208
|
if name in lookup]
|
|
1199
1209
|
if len(pairs) < 20:
|
|
1200
|
-
return
|
|
1210
|
+
return None
|
|
1201
1211
|
identities = []
|
|
1202
1212
|
for offset in range(5, boundary - 7):
|
|
1203
1213
|
if not free(offset, 8, fields):
|
|
@@ -1220,7 +1230,16 @@ def _aggregate_zero_offsets(
|
|
|
1220
1230
|
proofs.add((identity, other, start + size))
|
|
1221
1231
|
# Shifted identity aliases are possible when high bytes are zero. Only a
|
|
1222
1232
|
# unique identity/boundary proof can authorize the zero counter.
|
|
1223
|
-
|
|
1233
|
+
if not proofs and len(identities) == 1 and companion.family.short_record_locations:
|
|
1234
|
+
# A bounded pair of words between the name and the shared identity.
|
|
1235
|
+
# The active neighbor must itself be verified as a lifetime counter.
|
|
1236
|
+
start = records.family.name_offset + 62
|
|
1237
|
+
if identities[0][0] == start + 8 and free(start, 8, fields):
|
|
1238
|
+
words = (start, start + 4)
|
|
1239
|
+
zero = [pos for pos in words if all(_u32le(row, pos) == 0 for row in records.rows)]
|
|
1240
|
+
if len(zero) == 1:
|
|
1241
|
+
return zero[0], next(pos for pos in words if pos != zero[0])
|
|
1242
|
+
return (next(iter(proofs))[2], None) if len(proofs) == 1 else None
|
|
1224
1243
|
|
|
1225
1244
|
|
|
1226
1245
|
def _aggregate_candidates(
|
|
@@ -1253,11 +1272,11 @@ def _aggregate_candidates(
|
|
|
1253
1272
|
):
|
|
1254
1273
|
return None
|
|
1255
1274
|
|
|
1256
|
-
|
|
1275
|
+
zero_proof = _aggregate_zero_proof(records, performance, companion)
|
|
1257
1276
|
# A proven header counter limits the search before applying fan-out bounds.
|
|
1258
1277
|
# Name/rank bytes are independently owned fields, including name padding;
|
|
1259
1278
|
# numeric-looking UTF-16 bytes cannot be competing lifetime counters.
|
|
1260
|
-
scan_end = performance.class_offset if
|
|
1279
|
+
scan_end = performance.class_offset if zero_proof else records.record_end
|
|
1261
1280
|
forbidden = ((records.family.name_offset, 62), (records.family.rank_offset, 4))
|
|
1262
1281
|
by_vector: dict[tuple[int, ...], list[int]] = {}
|
|
1263
1282
|
for offset in range(scan_end - 3):
|
|
@@ -1281,8 +1300,8 @@ def _aggregate_candidates(
|
|
|
1281
1300
|
if len(by_vector) > _MAX_AGGREGATE_VECTORS:
|
|
1282
1301
|
return None
|
|
1283
1302
|
|
|
1284
|
-
if
|
|
1285
|
-
by_vector[(0,) * len(records.rows)] =
|
|
1303
|
+
if zero_proof:
|
|
1304
|
+
by_vector[(0,) * len(records.rows)] = [zero_proof[0]]
|
|
1286
1305
|
vectors = tuple(by_vector)
|
|
1287
1306
|
subset_lookup: dict[tuple[int, ...], list[tuple[int, ...]]] = {}
|
|
1288
1307
|
for vector in vectors:
|
|
@@ -1331,6 +1350,9 @@ def _aggregate_candidates(
|
|
|
1331
1350
|
right_offset,
|
|
1332
1351
|
third_offset,
|
|
1333
1352
|
)
|
|
1353
|
+
if (zero_proof and zero_proof[0] in offsets
|
|
1354
|
+
and zero_proof[1] is not None and zero_proof[1] not in offsets):
|
|
1355
|
+
continue
|
|
1334
1356
|
if len(set(offsets)) != 3:
|
|
1335
1357
|
continue
|
|
1336
1358
|
ordered = sorted(offsets)
|
|
@@ -1616,7 +1638,7 @@ def _decode_learned_rich(learned: _LearnedTable) -> Optional[SolareDetailDecode]
|
|
|
1616
1638
|
)
|
|
1617
1639
|
if elo is not None:
|
|
1618
1640
|
if (
|
|
1619
|
-
not 0
|
|
1641
|
+
not 0 <= elo <= _MAX_LEARNED_ELO
|
|
1620
1642
|
or (previous_elo is not None and previous_elo < elo)
|
|
1621
1643
|
):
|
|
1622
1644
|
return None
|
|
@@ -1690,7 +1712,7 @@ def _decode_learned_overall(
|
|
|
1690
1712
|
)
|
|
1691
1713
|
if elo is not None:
|
|
1692
1714
|
if (
|
|
1693
|
-
not 0
|
|
1715
|
+
not 0 <= elo <= _MAX_LEARNED_ELO
|
|
1694
1716
|
or (previous_elo is not None and previous_elo < elo)
|
|
1695
1717
|
):
|
|
1696
1718
|
return None
|
|
@@ -27,6 +27,7 @@ from ._constants import (
|
|
|
27
27
|
EMPTY_SPEC_CODE,
|
|
28
28
|
SOLARE_RICH_RECORD_COUNTS,
|
|
29
29
|
class_name,
|
|
30
|
+
valid_occupied_specialization,
|
|
30
31
|
)
|
|
31
32
|
from ._discovery import (
|
|
32
33
|
DiscoveredSolareFamily,
|
|
@@ -317,7 +318,7 @@ def _decode_history_region(region: bytes) -> Optional[tuple[str, tuple[int, ...]
|
|
|
317
318
|
|
|
318
319
|
|
|
319
320
|
def _specialization(class_code: int, code: int) -> SolareSpecialization:
|
|
320
|
-
if code
|
|
321
|
+
if code in (0, 1):
|
|
321
322
|
return SolareSpecialization(
|
|
322
323
|
code=code,
|
|
323
324
|
branch="advanced",
|
|
@@ -519,9 +520,9 @@ def _decode_performance_slots(
|
|
|
519
520
|
history_start = base + layout.history_offset + slot * _HISTORY_SLOT_SIZE
|
|
520
521
|
history_region = bytes(data[history_start : history_start + _HISTORY_SLOT_SIZE])
|
|
521
522
|
history = _decode_history_region(history_region)
|
|
522
|
-
if history is None:
|
|
523
|
+
if history is None and class_code == EMPTY_CLASS_CODE:
|
|
523
524
|
return None
|
|
524
|
-
history_raw, history_codes = history
|
|
525
|
+
history_raw, history_codes = history or (None, ())
|
|
525
526
|
|
|
526
527
|
is_empty = class_code == EMPTY_CLASS_CODE
|
|
527
528
|
if is_empty:
|
|
@@ -539,23 +540,14 @@ def _decode_performance_slots(
|
|
|
539
540
|
seen_empty
|
|
540
541
|
or display_name is None
|
|
541
542
|
or class_code in occupied_codes
|
|
542
|
-
or
|
|
543
|
+
or not valid_occupied_specialization(class_code, spec_code)
|
|
543
544
|
or not 0 < slot_matches <= _MAX_PLAUSIBLE_MATCHES
|
|
544
545
|
or any(
|
|
545
546
|
value > slot_matches for value in (slot_wins, slot_draws, slot_losses)
|
|
546
547
|
)
|
|
547
548
|
or slot_wins + slot_draws + slot_losses != slot_matches
|
|
548
|
-
or not history_raw
|
|
549
549
|
):
|
|
550
550
|
return None
|
|
551
|
-
if -1 in history_codes:
|
|
552
|
-
# Signed histories have observed pair semantics. Keep legacy binary
|
|
553
|
-
# registered decoding unchanged, but never publish a contradictory draw.
|
|
554
|
-
recent = _history_outcome_counts(history_codes)
|
|
555
|
-
if recent is None or not _history_matches_outcomes(
|
|
556
|
-
recent, slot_matches, slot_wins, slot_draws, slot_losses,
|
|
557
|
-
):
|
|
558
|
-
return None
|
|
559
551
|
occupied_codes.add(class_code)
|
|
560
552
|
|
|
561
553
|
gear_loadout_raw: Optional[SolareRawSection] = None
|
|
@@ -1142,15 +1142,13 @@ def discover_solare(
|
|
|
1142
1142
|
following = group[end + 1]
|
|
1143
1143
|
if _u32le(following.message, rich.rank_offset) != 1:
|
|
1144
1144
|
rich = None
|
|
1145
|
-
elif
|
|
1145
|
+
elif any(
|
|
1146
1146
|
frame.context.flow == rich.flow
|
|
1147
1147
|
and frame.context.flow_generation == rich.flow_generation
|
|
1148
1148
|
and frame.opcode == rich.opcode
|
|
1149
1149
|
and _stream_offset(frame) == rich.last_stream_end
|
|
1150
1150
|
and frame.length == rich.frame_length - rich.record_stride
|
|
1151
1151
|
and len(frame.message) > rich.rank_offset + 4
|
|
1152
|
-
and frame.message[5] == 0
|
|
1153
|
-
and frame.message[10:12] == b"\x01\x00"
|
|
1154
1152
|
and _u32le(frame.message, rich.rank_offset) > rich.ranks[-1]
|
|
1155
1153
|
for frame in (*unique_frames, *_boundary_frames)
|
|
1156
1154
|
):
|
|
@@ -18,9 +18,6 @@ def discover_short_board(
|
|
|
18
18
|
frames: Sequence[BDOFrame], boundaries: Sequence[BDOFrame], *,
|
|
19
19
|
allow_trailing_overall: bool,
|
|
20
20
|
) -> Optional[tuple[DiscoveredSolareFamily, DiscoveredSolareFamily]]:
|
|
21
|
-
# October JP evidence: 17-byte envelope, start flag at payload byte zero,
|
|
22
|
-
# uint16 row count at byte 10. These are reviewed envelope semantics, not
|
|
23
|
-
# opcode, region, player, class or total-row-count exceptions.
|
|
24
21
|
all_frames = sorted({id(f): f for f in (*frames, *boundaries)}.values(),
|
|
25
22
|
key=lambda f: f.index)
|
|
26
23
|
ordinals = {id(f): i for i, f in enumerate(all_frames)}
|
|
@@ -28,54 +25,74 @@ def discover_short_board(
|
|
|
28
25
|
for f in all_frames:
|
|
29
26
|
if f.flag == 0 and f.stream_sequence is not None:
|
|
30
27
|
groups[(f.context.flow, f.context.flow_generation)].append(f)
|
|
28
|
+
selected = None
|
|
31
29
|
for stream in groups.values():
|
|
32
30
|
stream.sort(key=_stream_offset)
|
|
33
31
|
for start, first in enumerate(stream):
|
|
34
|
-
if
|
|
35
|
-
and first.message[10:12] == b'\x02\x00'):
|
|
32
|
+
if len(first.message) != first.length or not 8192 <= first.length <= 32768:
|
|
36
33
|
continue
|
|
37
|
-
|
|
38
|
-
if remainder or stride <= 0:
|
|
34
|
+
if start and _family_key(stream[start - 1]) == _family_key(first):
|
|
39
35
|
continue
|
|
40
36
|
pairs = [first]
|
|
41
|
-
terminal = None
|
|
42
|
-
end_index = start
|
|
43
37
|
previous = first
|
|
38
|
+
terminal = None
|
|
44
39
|
for end_index in range(start + 1, min(len(stream), start + 512)):
|
|
45
40
|
f = stream[end_index]
|
|
46
|
-
if _stream_offset(f) != _stream_end(previous):
|
|
41
|
+
if _stream_offset(f) != _stream_end(previous) or len(f.message) != f.length:
|
|
47
42
|
break
|
|
48
43
|
previous = f
|
|
49
44
|
if f.opcode != first.opcode:
|
|
50
|
-
# Complete, bounded interleaved control frames are allowed.
|
|
51
45
|
if f.length >= 8192:
|
|
52
46
|
break
|
|
53
47
|
continue
|
|
54
|
-
if f.length
|
|
55
|
-
break
|
|
56
|
-
count = int.from_bytes(f.message[10:12], 'little')
|
|
57
|
-
if count == 2 and f.length == first.length:
|
|
58
|
-
pairs.append(f)
|
|
59
|
-
elif count in (0, 1) and f.length == 17 + count * stride:
|
|
48
|
+
if f.length != first.length:
|
|
60
49
|
terminal = f
|
|
61
50
|
break
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
51
|
+
pairs.append(f)
|
|
52
|
+
if terminal is None or len(pairs) * 2 < DISCOVERY_MIN_RICH_RECORDS - 1:
|
|
53
|
+
continue
|
|
54
|
+
ranked = _discover_ranked_family(_family_key(first), pairs, ordinals)
|
|
55
|
+
if ranked is None:
|
|
56
|
+
continue
|
|
57
|
+
stride = ranked.record_stride
|
|
58
|
+
envelope = first.length - 2 * stride
|
|
59
|
+
if not 7 <= envelope <= 32 or terminal.length not in (envelope, envelope + stride):
|
|
60
|
+
continue
|
|
61
|
+
tail_count = int(terminal.length != envelope)
|
|
62
|
+
if ranked.name_offset < envelope or ranked.rank_offset < envelope:
|
|
63
|
+
continue
|
|
64
|
+
if not any(
|
|
65
|
+
all(f.message[pos:pos+2] == b'\x02\x00' for f in pairs)
|
|
66
|
+
and int.from_bytes(terminal.message[pos:pos+2], 'little') == tail_count
|
|
67
|
+
for pos in range(5, envelope - 1)
|
|
68
|
+
):
|
|
69
|
+
continue
|
|
70
|
+
if not any(first.message[pos] == 1 and terminal.message[pos] == 0
|
|
71
|
+
and all(f.message[pos] == 0 for f in pairs[1:])
|
|
72
|
+
for pos in range(5, envelope)):
|
|
65
73
|
continue
|
|
66
|
-
tail_count = int.from_bytes(terminal.message[10:12], 'little')
|
|
67
74
|
count = 2 * len(pairs) + tail_count
|
|
68
75
|
if not DISCOVERY_MIN_RICH_RECORDS <= count < max(map(len, SOLARE_CLASS_ROSTERS)) * 20:
|
|
69
76
|
continue
|
|
77
|
+
boundary = terminal
|
|
78
|
+
while end_index + 1 < len(stream):
|
|
79
|
+
control = stream[end_index + 1]
|
|
80
|
+
if (control.length >= 8192 or control.opcode == first.opcode
|
|
81
|
+
or control.length != len(control.message)
|
|
82
|
+
or _stream_end(boundary) != _stream_offset(control)):
|
|
83
|
+
break
|
|
84
|
+
end_index += 1
|
|
85
|
+
boundary = control
|
|
70
86
|
overall_frames = stream[end_index + 1:end_index + 51]
|
|
87
|
+
if len(overall_frames) != 50:
|
|
88
|
+
continue
|
|
71
89
|
if any(_stream_end(a) != _stream_offset(b)
|
|
72
|
-
for a, b in zip([
|
|
90
|
+
for a, b in zip([boundary, *overall_frames], overall_frames)):
|
|
73
91
|
continue
|
|
74
92
|
key = _family_key(overall_frames[0])
|
|
75
|
-
if
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if ranked is None or ranked.record_stride != stride:
|
|
93
|
+
if key[2] == first.opcode or any(
|
|
94
|
+
len(f.message) != f.length or _family_key(f) != key for f in overall_frames
|
|
95
|
+
):
|
|
79
96
|
continue
|
|
80
97
|
locations = tuple((f, base) for f in pairs for base in (0, stride))
|
|
81
98
|
names, ranks = ranked.names, ranked.ranks
|
|
@@ -88,7 +105,7 @@ def discover_short_board(
|
|
|
88
105
|
names += (name,)
|
|
89
106
|
ranks += (rank,)
|
|
90
107
|
candidates = []
|
|
91
|
-
for offset in range(
|
|
108
|
+
for offset in range(envelope, min(512, stride)):
|
|
92
109
|
codes = tuple(f.message[base + offset] for f, base in locations)
|
|
93
110
|
counts = Counter(codes)
|
|
94
111
|
if (any(set(counts) == set(roster) for roster in SOLARE_CLASS_ROSTERS)
|
|
@@ -112,5 +129,25 @@ def discover_short_board(
|
|
|
112
129
|
if (overall is not None
|
|
113
130
|
and _overall_generation_is_closed(group, overall_frames, overall,
|
|
114
131
|
allow_trailing_overall=allow_trailing_overall)):
|
|
115
|
-
|
|
116
|
-
|
|
132
|
+
if selected is not None:
|
|
133
|
+
# Two distinct complete response pairs in the supplied window.
|
|
134
|
+
return None
|
|
135
|
+
if not _verified_short_details(rich, overall):
|
|
136
|
+
continue
|
|
137
|
+
selected = (rich, overall)
|
|
138
|
+
return selected
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def _verified_short_details(rich: DiscoveredSolareFamily, overall: DiscoveredSolareFamily) -> bool:
|
|
142
|
+
"""Corroborate inferred envelope geometry with both complete detail tables."""
|
|
143
|
+
from ._detail_learning import decode_equipment_table, learn_unknown_solare_details
|
|
144
|
+
|
|
145
|
+
players, leaders = learn_unknown_solare_details(
|
|
146
|
+
rich.frames, rich, overall.frames, overall,
|
|
147
|
+
learn_rich=True, learn_overall=True, retain_raw_extensions=False,
|
|
148
|
+
)
|
|
149
|
+
required = {"elo", "performance"}
|
|
150
|
+
return (players is not None and leaders is not None
|
|
151
|
+
and required <= players.capabilities and required <= leaders.capabilities
|
|
152
|
+
and decode_equipment_table(rich.frames, rich, players.players, gear_offset=None) is not None
|
|
153
|
+
and decode_equipment_table(overall.frames, overall, leaders.entries, gear_offset=None) is not None)
|
|
@@ -22,7 +22,7 @@ _FLOW = FlowKey("198.51.100.10", 8889, "192.0.2.25", 50000)
|
|
|
22
22
|
@pytest.mark.parametrize('role', ('rich', 'overall'))
|
|
23
23
|
@pytest.mark.parametrize('matches', (5, 81))
|
|
24
24
|
@pytest.mark.parametrize('damage', (None, 'draw_as_loss', 'unknown_pair', 'odd_signed'))
|
|
25
|
-
def
|
|
25
|
+
def test_registered_history_preserves_counters_and_isolates_malformed_fields(role, matches, damage):
|
|
26
26
|
layout = _REPRESENTATIVE_LAYOUT
|
|
27
27
|
synthetic = _synthetic_snapshot(layout)
|
|
28
28
|
frames = synthetic.rich_frames if role == 'rich' else synthetic.overall_frames
|
|
@@ -40,20 +40,17 @@ def test_registered_history_accepts_observed_draw_and_rejects_contradictions(rol
|
|
|
40
40
|
changed = (replace(frames[0],message=bytes(message)), *frames[1:])
|
|
41
41
|
if role == 'rich':
|
|
42
42
|
decoded = decode_solare_details(changed,synthetic.rich)
|
|
43
|
-
|
|
44
|
-
assert decoded is None
|
|
45
|
-
return
|
|
43
|
+
assert decoded is not None
|
|
46
44
|
entries = decoded.players
|
|
47
45
|
else:
|
|
48
46
|
decoded = decode_solare_overall_details(changed,synthetic.overall)
|
|
49
47
|
assert decoded is not None and 'aggregate_performance' in decoded.capabilities
|
|
50
|
-
|
|
51
|
-
assert 'performance' not in decoded.capabilities
|
|
52
|
-
return
|
|
48
|
+
assert 'performance' in decoded.capabilities
|
|
53
49
|
entries = decoded.entries
|
|
54
50
|
performance = entries[0].classes_played[0]
|
|
55
|
-
|
|
56
|
-
assert performance.
|
|
51
|
+
malformed = damage in ("unknown_pair", "odd_signed")
|
|
52
|
+
assert performance.recent_results_wire_text == (None if malformed else wire)
|
|
53
|
+
assert performance.recent_results_raw[-2:] == (() if malformed else (-1, 0))
|
|
57
54
|
assert (performance.matches,performance.wins,performance.draws,performance.losses) == (matches,wins,draws,losses)
|
|
58
55
|
|
|
59
56
|
|
|
@@ -899,7 +896,8 @@ def test_overall_aggregate_requires_its_lightweight_slot_match_summary() -> None
|
|
|
899
896
|
("offset_name", "value", "performance_survives"),
|
|
900
897
|
(
|
|
901
898
|
("overall_specialization", b"\xff", False),
|
|
902
|
-
("
|
|
899
|
+
("overall_specialization", b"\x00", False),
|
|
900
|
+
("overall_history", b"!", True),
|
|
903
901
|
("overall_gear", b"\xff", True),
|
|
904
902
|
("overall_addons", b"\xff", True),
|
|
905
903
|
),
|
|
@@ -929,6 +927,8 @@ def test_overall_aggregate_is_independent_of_deeper_and_opaque_fields(
|
|
|
929
927
|
assert "aggregate_performance" in result.capabilities
|
|
930
928
|
assert all(entry.total_matches is not None for entry in result.entries)
|
|
931
929
|
assert ("performance" in result.capabilities) is performance_survives
|
|
930
|
+
if offset_name == "overall_history":
|
|
931
|
+
assert result.entries[0].classes_played[0].recent_results_raw == ()
|
|
932
932
|
if performance_survives:
|
|
933
933
|
assert "raw_extensions" in result.capabilities
|
|
934
934
|
else:
|
|
@@ -240,7 +240,7 @@ def _elo_record_table(
|
|
|
240
240
|
) -> learning_module._RecordTable:
|
|
241
241
|
family = cast(
|
|
242
242
|
DiscoveredSolareFamily,
|
|
243
|
-
SimpleNamespace(frame_length=8, record_stride=4),
|
|
243
|
+
SimpleNamespace(frame_length=8, record_stride=4, short_record_locations=()),
|
|
244
244
|
)
|
|
245
245
|
names = tuple(f"Player{ordinal}" for ordinal in range(len(values)))
|
|
246
246
|
return learning_module._RecordTable(
|