bdo-toolkit 1.1.2__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.2/src/bdo_toolkit.egg-info → bdo_toolkit-1.1.3}/PKG-INFO +1 -1
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_version.py +1 -1
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_constants.py +4 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_detail_learning.py +54 -35
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_details.py +5 -13
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_discovery.py +1 -3
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_short_board.py +66 -29
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3/src/bdo_toolkit.egg-info}/PKG-INFO +1 -1
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_solare_details.py +10 -10
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_solare_learning.py +1 -1
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_solare_learning_adversarial.py +11 -3
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_solare_replay.py +44 -10
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/LICENSE +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/README.md +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/pyproject.toml +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/setup.cfg +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/__init__.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_async_sessions.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_async_utils.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/__init__.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/_constants.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/_formatting.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/_records.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/analysis.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/capture.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/companions.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/live.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/models.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/observations.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/persistence.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/progress.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/validation.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_calibration/workflow.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_capture_backend.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_capture_options.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_capture_runtime.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_deposit_origin.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_engine.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_framing.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/__init__.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/_constants.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/_records.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/assembly.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/character_discovery.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/character_models.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/character_profile.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/character_slots.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/character_witnesses.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/characters.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/formatting.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/inventory.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/models.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/session.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_item_state/storage.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_observation_session.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_origin/__init__.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_origin/discovery.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_origin/manual.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_origin/models.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_origin/tracker.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_profile_io.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_profile_runtime.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_protocol.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_reassembly.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_record_geometry.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_specs.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_storage_destination_validation.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_storage_hydration.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/_tracked_capture.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/__init__.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/_calibration_models.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/_capture.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/_discovery.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/_profile.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/_validation.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/async_session.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/calibration.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/models.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/replay.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/agris/session.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/calibration.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/capture.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/capture_diagnosis.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/character_calibration.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/character_state.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/cli.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/diagnostics.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/events.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/filters.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/grind/__init__.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/grind/_pipeline.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/grind/models.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/grind/session.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/item_state.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/origin_learning.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/profiles.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/py.typed +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/raw/__init__.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/raw/_collector.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/raw/models.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/raw/replay.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/raw/session.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/remote_profiles.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/__init__.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_live_tracker.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_replay_capture.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_result.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_scanner.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/_validation.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/async_session.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/models.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/replay.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/solare/session.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/writers.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/xp/__init__.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/xp/_tracker.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/xp/models.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/xp/profile.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/xp/replay.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit/xp/session.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit.egg-info/SOURCES.txt +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit.egg-info/dependency_links.txt +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit.egg-info/entry_points.txt +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit.egg-info/requires.txt +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/src/bdo_toolkit.egg-info/top_level.txt +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_agris_async.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_agris_cli.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_agris_discovery.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_agris_evidence.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_agris_models.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_agris_profiles.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_agris_replay.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_agris_session.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_async_sessions.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_calibration.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_calibration_conveniences.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_calibration_lifecycle.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_calibration_persistence.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_calibration_progress.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_calibration_retention.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_capture_backend.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_capture_diagnosis.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_capture_replay.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_capture_runtime.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_character_calibration.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_character_loadouts.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_character_state.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_cli.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_decoder_diagnostics.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_deposit_origin.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_direction.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_dynamic_storage_calibration_matrix.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_engine.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_examples_and_writers.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_explicit_profile.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_fixture_catalog.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_fixture_regressions.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_framing.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_grind.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_initial_load_storage.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_inventory_snapshots.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_item_state.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_live_capture_session.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_origin_learning.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_package_layout.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_profile_validation.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_raw.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_reassembly.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_remote_profiles.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_solare_api.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_solare_equipment.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_solare_history.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_solare_real_captures.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_solare_session.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_storage_destination_validation.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_storage_events.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_storage_hydration_tracker.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_storage_unknown_destination_calibration.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_toolkit_api.py +0 -0
- {bdo_toolkit-1.1.2 → bdo_toolkit-1.1.3}/tests/test_xp.py +0 -0
- {bdo_toolkit-1.1.2 → 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,
|
|
@@ -209,6 +210,7 @@ def _learn_overall_class_offset(
|
|
|
209
210
|
|
|
210
211
|
def _learn_spec_offset(
|
|
211
212
|
rows: Sequence[bytes],
|
|
213
|
+
class_offset: int,
|
|
212
214
|
occupancies: Sequence[int],
|
|
213
215
|
) -> Optional[int]:
|
|
214
216
|
candidates: list[int] = []
|
|
@@ -220,7 +222,7 @@ def _learn_spec_offset(
|
|
|
220
222
|
for slot in range(_CLASS_SLOT_COUNT):
|
|
221
223
|
code = row[offset + slot]
|
|
222
224
|
if slot < occupied:
|
|
223
|
-
if
|
|
225
|
+
if not valid_occupied_specialization(row[class_offset + slot], code):
|
|
224
226
|
valid = False
|
|
225
227
|
break
|
|
226
228
|
observed_occupied.add(code)
|
|
@@ -237,6 +239,7 @@ def _learn_spec_offset(
|
|
|
237
239
|
|
|
238
240
|
|
|
239
241
|
def _elo_candidates(records: _RecordTable) -> tuple[int, ...]:
|
|
242
|
+
minimum = 0 if records.family.short_record_locations else 1
|
|
240
243
|
sample = _sample_ordinals(len(records.rows))
|
|
241
244
|
prefiltered: list[int] = []
|
|
242
245
|
for offset in range(records.record_end - 3):
|
|
@@ -244,7 +247,8 @@ def _elo_candidates(records: _RecordTable) -> tuple[int, ...]:
|
|
|
244
247
|
_u32le(records.rows[ordinal], offset) for ordinal in sample
|
|
245
248
|
)
|
|
246
249
|
if (
|
|
247
|
-
|
|
250
|
+
sample_values[0] == 0
|
|
251
|
+
or not all(minimum <= value <= _MAX_LEARNED_ELO for value in sample_values)
|
|
248
252
|
or not all(
|
|
249
253
|
left >= right
|
|
250
254
|
for left, right in zip(sample_values, sample_values[1:])
|
|
@@ -259,7 +263,7 @@ def _elo_candidates(records: _RecordTable) -> tuple[int, ...]:
|
|
|
259
263
|
for offset in prefiltered:
|
|
260
264
|
values = tuple(_u32le(row, offset) for row in records.rows)
|
|
261
265
|
if (
|
|
262
|
-
all(
|
|
266
|
+
all(minimum <= value <= _MAX_LEARNED_ELO for value in values)
|
|
263
267
|
and all(left >= right for left, right in zip(values, values[1:]))
|
|
264
268
|
and len(set(values)) >= _MIN_ELO_DISTINCT
|
|
265
269
|
):
|
|
@@ -509,8 +513,8 @@ def _anchored_zero_outcome_offsets(
|
|
|
509
513
|
if learned_class is None:
|
|
510
514
|
return ()
|
|
511
515
|
class_field = learned_class[0]
|
|
512
|
-
spec = _learn_spec_offset(rows, occupancies)
|
|
513
|
-
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)
|
|
514
518
|
elos = _elo_candidates(records)
|
|
515
519
|
if spec is None or len(history) != 1 or len(elos) != 1:
|
|
516
520
|
return ()
|
|
@@ -666,10 +670,15 @@ def _history_candidates(
|
|
|
666
670
|
matches_offset: int,
|
|
667
671
|
*, independent_counters: bool = False,
|
|
668
672
|
) -> tuple[int, ...]:
|
|
673
|
+
if independent_counters:
|
|
674
|
+
strict = _history_candidates(rows, occupancies, matches_offset)
|
|
675
|
+
if strict:
|
|
676
|
+
return strict
|
|
669
677
|
required = _CLASS_SLOT_COUNT * _HISTORY_SLOT_SIZE
|
|
670
678
|
sample = _sample_ordinals(len(rows), occupancies)
|
|
671
679
|
|
|
672
680
|
def valid_for(offset: int, ordinals: Sequence[int]) -> bool:
|
|
681
|
+
malformed = 0
|
|
673
682
|
for ordinal in ordinals:
|
|
674
683
|
row = rows[ordinal]
|
|
675
684
|
occupied = occupancies[ordinal]
|
|
@@ -678,6 +687,13 @@ def _history_candidates(
|
|
|
678
687
|
decoded = _decode_history_region(
|
|
679
688
|
row[start : start + _HISTORY_SLOT_SIZE]
|
|
680
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
|
|
681
697
|
if decoded is None:
|
|
682
698
|
return False
|
|
683
699
|
raw, codes = decoded
|
|
@@ -827,7 +843,7 @@ def _counter_geometry_check(
|
|
|
827
843
|
if counters is None:
|
|
828
844
|
return None
|
|
829
845
|
source_matches, source_outcomes = counters
|
|
830
|
-
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:
|
|
831
847
|
return None
|
|
832
848
|
by_name = {name: i for i, name in enumerate(source.names)}
|
|
833
849
|
|
|
@@ -864,7 +880,7 @@ def _learn_performance_offsets(
|
|
|
864
880
|
companion: Optional[tuple[_RecordTable, _PerformanceOffsets]] = None,
|
|
865
881
|
counter_check: Optional[Callable[[int, tuple[int, int, int]], bool]] = None,
|
|
866
882
|
) -> Optional[_PerformanceOffsets]:
|
|
867
|
-
spec_offset = _learn_spec_offset(records.rows, occupancies)
|
|
883
|
+
spec_offset = _learn_spec_offset(records.rows, class_offset, occupancies)
|
|
868
884
|
if spec_offset is None:
|
|
869
885
|
return None
|
|
870
886
|
|
|
@@ -896,7 +912,7 @@ def _validate_performance_candidate(
|
|
|
896
912
|
*,
|
|
897
913
|
companion: Optional[tuple[_RecordTable, _PerformanceOffsets]] = None,
|
|
898
914
|
) -> Optional[_PerformanceOffsets]:
|
|
899
|
-
independent =
|
|
915
|
+
independent = companion is not None
|
|
900
916
|
histories = _history_candidates(
|
|
901
917
|
records.rows,
|
|
902
918
|
occupancies,
|
|
@@ -914,20 +930,11 @@ def _validate_performance_candidate(
|
|
|
914
930
|
history_offset,
|
|
915
931
|
)
|
|
916
932
|
if oriented is None and companion is not None:
|
|
917
|
-
#
|
|
918
|
-
# labels. Recent UI history may cover a different set of matches;
|
|
919
|
-
# preserve valid raw windows without treating them as counter totals.
|
|
920
|
-
# Ordinary full-board inference retains its original history checks.
|
|
933
|
+
# Orient the independently balanced counters using shared player slots.
|
|
921
934
|
supported = tuple(
|
|
922
|
-
|
|
923
|
-
tuple((a, b, c) for a, b, c in itertools.permutations(outcome_offsets)) if independent else
|
|
924
|
-
_history_outcome_candidates(
|
|
925
|
-
records.rows, occupancies, matches_offset, outcome_offsets,
|
|
926
|
-
history_offset, minimum_discriminators=0,
|
|
927
|
-
)
|
|
928
|
-
)
|
|
935
|
+
(w, d, l) for w, d, l in itertools.permutations(outcome_offsets)
|
|
929
936
|
if _companion_outcomes_agree(
|
|
930
|
-
records, class_offset, occupancies, matches_offset,
|
|
937
|
+
records, class_offset, occupancies, matches_offset, (w, d, l),
|
|
931
938
|
companion[0], companion[1],
|
|
932
939
|
)
|
|
933
940
|
)
|
|
@@ -1147,12 +1154,12 @@ def _ranges_overlap(left: int, right: int, size: int = 4) -> bool:
|
|
|
1147
1154
|
return left < right + size and right < left + size
|
|
1148
1155
|
|
|
1149
1156
|
|
|
1150
|
-
def
|
|
1157
|
+
def _aggregate_zero_proof(
|
|
1151
1158
|
records: _RecordTable,
|
|
1152
1159
|
performance: _PerformanceOffsets,
|
|
1153
1160
|
companion: Optional[_RecordTable],
|
|
1154
|
-
) -> tuple[int,
|
|
1155
|
-
"""
|
|
1161
|
+
) -> Optional[tuple[int, Optional[int]]]:
|
|
1162
|
+
"""Return the zero address and any required adjacent lifetime-counter address.
|
|
1156
1163
|
|
|
1157
1164
|
Historical headers carry a 62-byte name, a 101-byte recent-history block,
|
|
1158
1165
|
and an eight-byte identity shared with the class response. Identity matches
|
|
@@ -1160,15 +1167,15 @@ def _aggregate_zero_offsets(
|
|
|
1160
1167
|
No absolute era-specific offsets or arbitrary runs of zeroes are used.
|
|
1161
1168
|
"""
|
|
1162
1169
|
if companion is None or companion.family.class_offset is None:
|
|
1163
|
-
return
|
|
1170
|
+
return None
|
|
1164
1171
|
elos = _elo_candidates(records)
|
|
1165
1172
|
rich_elos = _elo_candidates(companion)
|
|
1166
1173
|
if len(elos) != 1 or len(rich_elos) != 1:
|
|
1167
|
-
return
|
|
1174
|
+
return None
|
|
1168
1175
|
boundary = performance.class_offset
|
|
1169
1176
|
rich_boundary = companion.family.class_offset
|
|
1170
1177
|
if max(boundary, rich_boundary) > 512:
|
|
1171
|
-
return
|
|
1178
|
+
return None
|
|
1172
1179
|
fields = [(records.family.name_offset, 62),
|
|
1173
1180
|
(records.family.rank_offset, 4), (elos[0], 4)]
|
|
1174
1181
|
rich_fields = [(companion.family.name_offset, 62),
|
|
@@ -1194,13 +1201,13 @@ def _aggregate_zero_offsets(
|
|
|
1194
1201
|
if valid:
|
|
1195
1202
|
histories.append(offset)
|
|
1196
1203
|
if len(histories) != 1:
|
|
1197
|
-
return
|
|
1204
|
+
return None
|
|
1198
1205
|
fields.append((histories[0], _HISTORY_SLOT_SIZE))
|
|
1199
1206
|
lookup = dict(zip(companion.names, companion.rows))
|
|
1200
1207
|
pairs = [(row, lookup[name]) for name, row in zip(records.names, records.rows)
|
|
1201
1208
|
if name in lookup]
|
|
1202
1209
|
if len(pairs) < 20:
|
|
1203
|
-
return
|
|
1210
|
+
return None
|
|
1204
1211
|
identities = []
|
|
1205
1212
|
for offset in range(5, boundary - 7):
|
|
1206
1213
|
if not free(offset, 8, fields):
|
|
@@ -1223,7 +1230,16 @@ def _aggregate_zero_offsets(
|
|
|
1223
1230
|
proofs.add((identity, other, start + size))
|
|
1224
1231
|
# Shifted identity aliases are possible when high bytes are zero. Only a
|
|
1225
1232
|
# unique identity/boundary proof can authorize the zero counter.
|
|
1226
|
-
|
|
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
|
|
1227
1243
|
|
|
1228
1244
|
|
|
1229
1245
|
def _aggregate_candidates(
|
|
@@ -1256,11 +1272,11 @@ def _aggregate_candidates(
|
|
|
1256
1272
|
):
|
|
1257
1273
|
return None
|
|
1258
1274
|
|
|
1259
|
-
|
|
1275
|
+
zero_proof = _aggregate_zero_proof(records, performance, companion)
|
|
1260
1276
|
# A proven header counter limits the search before applying fan-out bounds.
|
|
1261
1277
|
# Name/rank bytes are independently owned fields, including name padding;
|
|
1262
1278
|
# numeric-looking UTF-16 bytes cannot be competing lifetime counters.
|
|
1263
|
-
scan_end = performance.class_offset if
|
|
1279
|
+
scan_end = performance.class_offset if zero_proof else records.record_end
|
|
1264
1280
|
forbidden = ((records.family.name_offset, 62), (records.family.rank_offset, 4))
|
|
1265
1281
|
by_vector: dict[tuple[int, ...], list[int]] = {}
|
|
1266
1282
|
for offset in range(scan_end - 3):
|
|
@@ -1284,8 +1300,8 @@ def _aggregate_candidates(
|
|
|
1284
1300
|
if len(by_vector) > _MAX_AGGREGATE_VECTORS:
|
|
1285
1301
|
return None
|
|
1286
1302
|
|
|
1287
|
-
if
|
|
1288
|
-
by_vector[(0,) * len(records.rows)] =
|
|
1303
|
+
if zero_proof:
|
|
1304
|
+
by_vector[(0,) * len(records.rows)] = [zero_proof[0]]
|
|
1289
1305
|
vectors = tuple(by_vector)
|
|
1290
1306
|
subset_lookup: dict[tuple[int, ...], list[tuple[int, ...]]] = {}
|
|
1291
1307
|
for vector in vectors:
|
|
@@ -1334,6 +1350,9 @@ def _aggregate_candidates(
|
|
|
1334
1350
|
right_offset,
|
|
1335
1351
|
third_offset,
|
|
1336
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
|
|
1337
1356
|
if len(set(offsets)) != 3:
|
|
1338
1357
|
continue
|
|
1339
1358
|
ordered = sorted(offsets)
|
|
@@ -1619,7 +1638,7 @@ def _decode_learned_rich(learned: _LearnedTable) -> Optional[SolareDetailDecode]
|
|
|
1619
1638
|
)
|
|
1620
1639
|
if elo is not None:
|
|
1621
1640
|
if (
|
|
1622
|
-
not 0
|
|
1641
|
+
not 0 <= elo <= _MAX_LEARNED_ELO
|
|
1623
1642
|
or (previous_elo is not None and previous_elo < elo)
|
|
1624
1643
|
):
|
|
1625
1644
|
return None
|
|
@@ -1693,7 +1712,7 @@ def _decode_learned_overall(
|
|
|
1693
1712
|
)
|
|
1694
1713
|
if elo is not None:
|
|
1695
1714
|
if (
|
|
1696
|
-
not 0
|
|
1715
|
+
not 0 <= elo <= _MAX_LEARNED_ELO
|
|
1697
1716
|
or (previous_elo is not None and previous_elo < elo)
|
|
1698
1717
|
):
|
|
1699
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(
|
|
@@ -49,6 +49,7 @@ def _family(
|
|
|
49
49
|
DiscoveredSolareFamily,
|
|
50
50
|
SimpleNamespace(
|
|
51
51
|
role=role,
|
|
52
|
+
short_record_locations=(),
|
|
52
53
|
frame_length=row_size + 4,
|
|
53
54
|
record_stride=4,
|
|
54
55
|
name_offset=120,
|
|
@@ -594,6 +595,14 @@ def test_all_zero_draws_do_not_establish_a_unique_outcome_layout() -> None:
|
|
|
594
595
|
assert learning._balanced_counter_solution(rows, performance.occupancies) is None
|
|
595
596
|
|
|
596
597
|
|
|
598
|
+
@pytest.mark.parametrize("second_class, expected", [(3, 3), (6, None)])
|
|
599
|
+
def test_zero_specialization_requires_wukong_in_the_same_slot(second_class, expected):
|
|
600
|
+
# Wukong and Scholar both display Ascension. Only Wukong has a proven zero.
|
|
601
|
+
row = bytes((12, second_class, 101, 2, 0, 3))
|
|
602
|
+
assert learning._learn_spec_offset((row,), 0, (2,)) == expected
|
|
603
|
+
assert learning._learn_spec_offset((row + row[3:],), 0, (2,)) is None
|
|
604
|
+
|
|
605
|
+
|
|
597
606
|
def _zero_draw_tail() -> tuple[learning._RecordTable, tuple[int, ...]]:
|
|
598
607
|
# Independent synthetic geometry, not copied from a captured layout.
|
|
599
608
|
rows = []
|
|
@@ -1088,8 +1097,7 @@ def test_short_fallback_preserves_unrelated_recent_history_with_independent_coun
|
|
|
1088
1097
|
target, _CLASS_OFFSET, occupied, _SPEC_OFFSET, _MATCHES_OFFSET,
|
|
1089
1098
|
(_WINS_OFFSET, _DRAWS_OFFSET, _LOSSES_OFFSET), companion=other,
|
|
1090
1099
|
)
|
|
1091
|
-
|
|
1092
|
-
assert infer((companion, known)) is None
|
|
1100
|
+
assert infer((companion, known)) is not None
|
|
1093
1101
|
target.family.short_record_locations = ((None, 0),)
|
|
1094
1102
|
assert infer(None) is None
|
|
1095
1103
|
assert infer((companion, known)) is not None
|
|
@@ -1098,4 +1106,4 @@ def test_short_fallback_preserves_unrelated_recent_history_with_independent_coun
|
|
|
1098
1106
|
malformed = bytearray(target.rows[-1])
|
|
1099
1107
|
malformed[_HISTORY_OFFSET:_HISTORY_OFFSET+101] = b"2,2" + bytes(98)
|
|
1100
1108
|
target = replace(target, rows=target.rows[:-1] + (bytes(malformed),))
|
|
1101
|
-
assert infer((companion, known)) is None
|
|
1109
|
+
assert infer((companion, known)) is not None
|