bdo-toolkit 1.0.10__tar.gz → 1.0.11__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.0.10/src/bdo_toolkit.egg-info → bdo_toolkit-1.0.11}/PKG-INFO +1 -1
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_version.py +1 -1
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/solare/_detail_learning.py +97 -1
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11/src/bdo_toolkit.egg-info}/PKG-INFO +1 -1
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_solare_learning.py +46 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_solare_learning_adversarial.py +71 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_solare_real_captures.py +5 -2
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/LICENSE +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/README.md +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/pyproject.toml +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/setup.cfg +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/__init__.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_async_sessions.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_async_utils.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_calibration/__init__.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_calibration/_constants.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_calibration/_formatting.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_calibration/_records.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_calibration/analysis.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_calibration/capture.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_calibration/companions.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_calibration/live.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_calibration/models.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_calibration/observations.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_calibration/persistence.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_calibration/progress.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_calibration/validation.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_calibration/workflow.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_capture_backend.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_capture_options.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_capture_runtime.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_deposit_origin.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_engine.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_framing.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_item_state/__init__.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_item_state/_constants.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_item_state/_records.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_item_state/assembly.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_item_state/formatting.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_item_state/inventory.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_item_state/models.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_item_state/session.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_item_state/storage.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_observation_session.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_origin/__init__.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_origin/discovery.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_origin/manual.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_origin/models.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_origin/tracker.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_profile_io.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_profile_runtime.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_protocol.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_reassembly.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_record_geometry.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_specs.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_storage_destination_validation.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_storage_hydration.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_tracked_capture.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/agris/__init__.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/agris/_calibration_models.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/agris/_capture.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/agris/_discovery.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/agris/_profile.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/agris/_validation.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/agris/async_session.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/agris/calibration.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/agris/models.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/agris/replay.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/agris/session.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/calibration.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/capture.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/capture_diagnosis.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/character_state.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/cli.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/diagnostics.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/events.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/filters.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/grind/__init__.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/grind/_pipeline.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/grind/models.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/grind/session.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/item_state.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/origin_learning.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/profiles.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/py.typed +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/raw/__init__.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/raw/_collector.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/raw/models.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/raw/replay.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/raw/session.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/remote_profiles.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/solare/__init__.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/solare/_constants.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/solare/_details.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/solare/_discovery.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/solare/_live_tracker.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/solare/_replay_capture.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/solare/_result.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/solare/_scanner.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/solare/_validation.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/solare/async_session.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/solare/models.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/solare/replay.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/solare/session.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/writers.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/xp/__init__.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/xp/_tracker.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/xp/models.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/xp/profile.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/xp/replay.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/xp/session.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit.egg-info/SOURCES.txt +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit.egg-info/dependency_links.txt +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit.egg-info/entry_points.txt +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit.egg-info/requires.txt +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit.egg-info/top_level.txt +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_agris_async.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_agris_cli.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_agris_discovery.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_agris_evidence.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_agris_models.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_agris_profiles.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_agris_replay.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_agris_session.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_async_sessions.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_calibration.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_calibration_conveniences.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_calibration_lifecycle.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_calibration_persistence.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_calibration_progress.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_calibration_retention.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_capture_backend.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_capture_diagnosis.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_capture_replay.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_capture_runtime.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_character_state.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_cli.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_decoder_diagnostics.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_deposit_origin.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_direction.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_dynamic_storage_calibration_matrix.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_engine.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_examples_and_writers.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_explicit_profile.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_fixture_catalog.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_fixture_regressions.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_framing.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_grind.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_initial_load_storage.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_inventory_snapshots.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_item_state.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_live_capture_session.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_origin_learning.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_package_layout.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_profile_validation.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_raw.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_reassembly.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_remote_profiles.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_solare_api.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_solare_details.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_solare_equipment.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_solare_replay.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_solare_session.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_storage_destination_validation.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_storage_events.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_storage_hydration_tracker.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_storage_unknown_destination_calibration.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_toolkit_api.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_xp.py +0 -0
- {bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_xp_profiles.py +0 -0
|
@@ -1015,9 +1015,90 @@ def _ranges_overlap(left: int, right: int, size: int = 4) -> bool:
|
|
|
1015
1015
|
return left < right + size and right < left + size
|
|
1016
1016
|
|
|
1017
1017
|
|
|
1018
|
+
def _aggregate_zero_offsets(
|
|
1019
|
+
records: _RecordTable,
|
|
1020
|
+
performance: _PerformanceOffsets,
|
|
1021
|
+
companion: Optional[_RecordTable],
|
|
1022
|
+
) -> tuple[int, ...]:
|
|
1023
|
+
"""Prove zero counters in four-byte gaps between independent header fields.
|
|
1024
|
+
|
|
1025
|
+
Historical headers carry a 62-byte name, a 101-byte recent-history block,
|
|
1026
|
+
and an eight-byte identity shared with the class response. Identity matches
|
|
1027
|
+
must be unique across both headers, not guessed from a small numeric value.
|
|
1028
|
+
No absolute era-specific offsets or arbitrary runs of zeroes are used.
|
|
1029
|
+
"""
|
|
1030
|
+
if companion is None or companion.family.class_offset is None:
|
|
1031
|
+
return ()
|
|
1032
|
+
elos = _elo_candidates(records)
|
|
1033
|
+
rich_elos = _elo_candidates(companion)
|
|
1034
|
+
if len(elos) != 1 or len(rich_elos) != 1:
|
|
1035
|
+
return ()
|
|
1036
|
+
boundary = performance.class_offset
|
|
1037
|
+
rich_boundary = companion.family.class_offset
|
|
1038
|
+
if max(boundary, rich_boundary) > 512:
|
|
1039
|
+
return ()
|
|
1040
|
+
fields = [(records.family.name_offset, 62),
|
|
1041
|
+
(records.family.rank_offset, 4), (elos[0], 4)]
|
|
1042
|
+
rich_fields = [(companion.family.name_offset, 62),
|
|
1043
|
+
(companion.family.rank_offset, 4), (rich_elos[0], 4)]
|
|
1044
|
+
|
|
1045
|
+
def free(start: int, size: int, blocks: Sequence[tuple[int, int]]) -> bool:
|
|
1046
|
+
return all(start + size <= base or base + width <= start
|
|
1047
|
+
for base, width in blocks)
|
|
1048
|
+
|
|
1049
|
+
# Header history is distinct from the three per-class history blocks.
|
|
1050
|
+
histories = []
|
|
1051
|
+
for offset in range(5, boundary - _HISTORY_SLOT_SIZE + 1):
|
|
1052
|
+
if not free(offset, _HISTORY_SLOT_SIZE, fields):
|
|
1053
|
+
continue
|
|
1054
|
+
valid = True
|
|
1055
|
+
for row, occupied in zip(records.rows, performance.occupancies):
|
|
1056
|
+
decoded = _decode_history_region(row[offset:offset + _HISTORY_SLOT_SIZE])
|
|
1057
|
+
matches = sum(_u32le(row, performance.matches_offset + slot * 4)
|
|
1058
|
+
for slot in range(occupied))
|
|
1059
|
+
if decoded is None or not decoded[0] or len(decoded[1]) != 2 * min(matches, 5):
|
|
1060
|
+
valid = False
|
|
1061
|
+
break
|
|
1062
|
+
if valid:
|
|
1063
|
+
histories.append(offset)
|
|
1064
|
+
if len(histories) != 1:
|
|
1065
|
+
return ()
|
|
1066
|
+
fields.append((histories[0], _HISTORY_SLOT_SIZE))
|
|
1067
|
+
lookup = dict(zip(companion.names, companion.rows))
|
|
1068
|
+
pairs = [(row, lookup[name]) for name, row in zip(records.names, records.rows)
|
|
1069
|
+
if name in lookup]
|
|
1070
|
+
if len(pairs) < 20:
|
|
1071
|
+
return ()
|
|
1072
|
+
identities = []
|
|
1073
|
+
for offset in range(5, boundary - 7):
|
|
1074
|
+
if not free(offset, 8, fields):
|
|
1075
|
+
continue
|
|
1076
|
+
values = tuple(row[offset:offset + 8] for row, _ in pairs)
|
|
1077
|
+
all_values = tuple(row[offset:offset + 8] for row in records.rows)
|
|
1078
|
+
if len(set(all_values)) != len(all_values) or any(not any(v) for v in all_values):
|
|
1079
|
+
continue
|
|
1080
|
+
for other in range(5, rich_boundary - 7):
|
|
1081
|
+
if free(other, 8, rich_fields) and all(
|
|
1082
|
+
value == row[other:other + 8] for value, (_, row) in zip(values, pairs)
|
|
1083
|
+
):
|
|
1084
|
+
identities.append((offset, other))
|
|
1085
|
+
proofs = set()
|
|
1086
|
+
for identity, other in identities:
|
|
1087
|
+
ordered = sorted(fields + [(identity, 8)])
|
|
1088
|
+
for (start, size), (end, _) in zip(ordered, ordered[1:]):
|
|
1089
|
+
if (end - start - size == 4
|
|
1090
|
+
and all(not any(row[start + size:end]) for row in records.rows)):
|
|
1091
|
+
proofs.add((identity, other, start + size))
|
|
1092
|
+
# Shifted identity aliases are possible when high bytes are zero. Only a
|
|
1093
|
+
# unique identity/boundary proof can authorize the zero counter.
|
|
1094
|
+
return (next(iter(proofs))[2],) if len(proofs) == 1 else ()
|
|
1095
|
+
|
|
1096
|
+
|
|
1018
1097
|
def _aggregate_candidates(
|
|
1019
1098
|
records: _RecordTable,
|
|
1020
1099
|
performance: _PerformanceOffsets,
|
|
1100
|
+
*,
|
|
1101
|
+
companion: Optional[_RecordTable] = None,
|
|
1021
1102
|
) -> Optional[tuple[int, int, int]]:
|
|
1022
1103
|
protected = (
|
|
1023
1104
|
performance.matches_offset,
|
|
@@ -1062,6 +1143,17 @@ def _aggregate_candidates(
|
|
|
1062
1143
|
if len(by_vector) > _MAX_AGGREGATE_VECTORS:
|
|
1063
1144
|
return None
|
|
1064
1145
|
|
|
1146
|
+
zero_offsets = _aggregate_zero_offsets(records, performance, companion)
|
|
1147
|
+
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
|
+
by_vector[(0,) * len(records.rows)] = list(zero_offsets)
|
|
1065
1157
|
vectors = tuple(by_vector)
|
|
1066
1158
|
subset_lookup: dict[tuple[int, ...], list[tuple[int, ...]]] = {}
|
|
1067
1159
|
for vector in vectors:
|
|
@@ -1184,8 +1276,12 @@ def _orient_aggregate(
|
|
|
1184
1276
|
def _learn_aggregate(
|
|
1185
1277
|
records: _RecordTable,
|
|
1186
1278
|
performance: _PerformanceOffsets,
|
|
1279
|
+
*,
|
|
1280
|
+
companion: Optional[_RecordTable] = None,
|
|
1187
1281
|
) -> Optional[_AggregateOffsets]:
|
|
1188
1282
|
candidates = _aggregate_candidates(records, performance)
|
|
1283
|
+
if candidates is None and companion is not None:
|
|
1284
|
+
candidates = _aggregate_candidates(records, performance, companion=companion)
|
|
1189
1285
|
if candidates is None:
|
|
1190
1286
|
return None
|
|
1191
1287
|
return _orient_aggregate(records, performance, candidates)
|
|
@@ -1633,7 +1729,7 @@ def learn_unknown_solare_details(
|
|
|
1633
1729
|
overall_elo if learn_overall else None,
|
|
1634
1730
|
overall_performance,
|
|
1635
1731
|
aggregate=(
|
|
1636
|
-
_learn_aggregate(overall_records, overall_performance)
|
|
1732
|
+
_learn_aggregate(overall_records, overall_performance, companion=rich_records)
|
|
1637
1733
|
if learn_overall and overall_performance is not None
|
|
1638
1734
|
else None
|
|
1639
1735
|
),
|
|
@@ -454,6 +454,14 @@ def test_historical_rediscovery_without_low_match_history(path):
|
|
|
454
454
|
result = replay_solare(path)
|
|
455
455
|
assert result.complete and result.evidence.health.capture_is_clean
|
|
456
456
|
assert excluded > 0
|
|
457
|
+
if ("aggregate_performance" in baseline.snapshot.overall_capabilities
|
|
458
|
+
and not path.name.startswith("leaderboard-agent--")):
|
|
459
|
+
assert "aggregate_performance" in result.snapshot.overall_capabilities
|
|
460
|
+
assert any(p.total_draws for p in baseline.snapshot.overall_top_100)
|
|
461
|
+
assert [(p.name, p.total_wins, p.total_draws, p.total_losses)
|
|
462
|
+
for p in result.snapshot.overall_top_100] == [
|
|
463
|
+
(p.name, p.total_wins, p.total_draws, p.total_losses)
|
|
464
|
+
for p in baseline.snapshot.overall_top_100]
|
|
457
465
|
for before, after, caps in (
|
|
458
466
|
(baseline.snapshot.players, result.snapshot.players, result.snapshot.class_table_capabilities),
|
|
459
467
|
(baseline.snapshot.overall_top_100, result.snapshot.overall_top_100, result.snapshot.overall_capabilities),
|
|
@@ -473,3 +481,41 @@ def test_historical_rediscovery_without_low_match_history(path):
|
|
|
473
481
|
assert len(player.classes_played) == len(expected.classes_played)
|
|
474
482
|
for a, b in zip(player.classes_played, expected.classes_played):
|
|
475
483
|
assert (a.slot, a.player_class.code, a.matches, a.wins, a.draws, a.losses) == (b.slot, b.player_class.code, b.matches, b.wins, b.draws, b.losses)
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
def test_historical_aggregate_draw_field_rediscovered_when_zeroed():
|
|
487
|
+
path = optional_fixture_path("solare--leaderboard-complete-post-patch--92d835cbe9")
|
|
488
|
+
if not path.is_file():
|
|
489
|
+
pytest.skip("private Solare capture is not installed")
|
|
490
|
+
captured = []
|
|
491
|
+
extract = learning_module._extract_records
|
|
492
|
+
def collect(*args, **kwargs):
|
|
493
|
+
table = extract(*args, **kwargs)
|
|
494
|
+
if table is not None:
|
|
495
|
+
captured.append(table)
|
|
496
|
+
return table
|
|
497
|
+
with patch.object(details_module, "_RICH_DETAIL_LAYOUTS", ()), \
|
|
498
|
+
patch.object(details_module, "_OVERALL_DETAIL_LAYOUTS", ()), \
|
|
499
|
+
patch.object(learning_module, "_extract_records", collect):
|
|
500
|
+
baseline = replay_solare(path)
|
|
501
|
+
overall = next(t for t in captured if len(t.rows) == 100)
|
|
502
|
+
rich = next(t for t in captured if len(t.rows) > 100)
|
|
503
|
+
class_offset, occupied = learning_module._learn_overall_class_offset(overall)
|
|
504
|
+
perf = learning_module._learn_performance_offsets(overall, class_offset, occupied)
|
|
505
|
+
known = learning_module._learn_aggregate(overall, perf)
|
|
506
|
+
assert known is not None
|
|
507
|
+
assert any(p.total_draws for p in baseline.snapshot.overall_top_100)
|
|
508
|
+
rows = []
|
|
509
|
+
for source in overall.rows:
|
|
510
|
+
row = bytearray(source)
|
|
511
|
+
# Counterfactual only: turn draws into losses, preserving match totals.
|
|
512
|
+
for draw, loss in [(known.draws_offset, known.losses_offset)] + [
|
|
513
|
+
(perf.draws_offset + slot * 4, perf.losses_offset + slot * 4)
|
|
514
|
+
for slot in range(3)
|
|
515
|
+
]:
|
|
516
|
+
total = learning_module._u32le(row, draw) + learning_module._u32le(row, loss)
|
|
517
|
+
row[loss:loss + 4] = total.to_bytes(4, "little")
|
|
518
|
+
row[draw:draw + 4] = bytes(4)
|
|
519
|
+
rows.append(bytes(row))
|
|
520
|
+
changed = replace(overall, rows=tuple(rows))
|
|
521
|
+
assert learning_module._learn_aggregate(changed, perf, companion=rich) == known
|
|
@@ -821,3 +821,74 @@ def test_full_performance_discovery_when_every_player_is_experienced():
|
|
|
821
821
|
def test_match_search_still_rejects_candidate_overflow():
|
|
822
822
|
row = b"".join(value.to_bytes(4, "little") + bytes(8) for value in range(1, 20))
|
|
823
823
|
assert learning._matches_candidates((row,), (1,)) == ()
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
def _zero_aggregate_tables(shift=0):
|
|
827
|
+
rows, rich_rows = [], []
|
|
828
|
+
occupied = (1,) * 29 + (3,)
|
|
829
|
+
for i, n in enumerate(occupied):
|
|
830
|
+
row, rich = bytearray(1000 + shift), bytearray(300 + shift)
|
|
831
|
+
name = f"Player{i:03d}".encode("utf-16-le")
|
|
832
|
+
row[40 + shift:40 + shift + len(name)] = name
|
|
833
|
+
rich[60 + shift:60 + shift + len(name)] = name
|
|
834
|
+
identity = (900000 + i * 71).to_bytes(8, "little")
|
|
835
|
+
row[28 + shift:36 + shift] = identity
|
|
836
|
+
rich[40 + shift:48 + shift] = identity
|
|
837
|
+
rich[39 + shift] = 255
|
|
838
|
+
wins, losses = 0, 0
|
|
839
|
+
for slot in range(n):
|
|
840
|
+
w, loss = (60 + i, 40) if slot == 0 else (3, 2)
|
|
841
|
+
wins += w
|
|
842
|
+
losses += loss
|
|
843
|
+
for off, val in ((300, w + loss), (312, w), (336, loss)):
|
|
844
|
+
start = off + shift + slot * 4
|
|
845
|
+
row[start:start + 4] = val.to_bytes(4, "little")
|
|
846
|
+
for off, val in ((20, 3000 - i), (36, losses + (3 if n == 3 else 0)),
|
|
847
|
+
(205, wins + (1 if n == 3 else 0)), (209, i + 1)):
|
|
848
|
+
row[off + shift:off + shift + 4] = val.to_bytes(4, "little")
|
|
849
|
+
for off, val in ((130, i + 1), (150, 3000 - i)):
|
|
850
|
+
rich[off + shift:off + shift + 4] = val.to_bytes(4, "little")
|
|
851
|
+
history = b"0,0,1,1,0,1,1,0,0,0"
|
|
852
|
+
row[102 + shift:102 + shift + len(history)] = history
|
|
853
|
+
rows.append(bytes(row))
|
|
854
|
+
rich_rows.append(bytes(rich))
|
|
855
|
+
table, companion = _table(tuple(rows)), _table(tuple(rich_rows), role="rich")
|
|
856
|
+
table.family.name_offset, table.family.rank_offset = 40 + shift, 209 + shift
|
|
857
|
+
companion.family.name_offset, companion.family.rank_offset = 60 + shift, 130 + shift
|
|
858
|
+
companion.family.class_offset = 170 + shift
|
|
859
|
+
perf = learning._PerformanceOffsets(213 + shift, 216 + shift, 300 + shift,
|
|
860
|
+
312 + shift, 324 + shift, 336 + shift, 360 + shift, occupied)
|
|
861
|
+
return table, companion, perf
|
|
862
|
+
|
|
863
|
+
|
|
864
|
+
@pytest.mark.parametrize("shift", (0, 17, 49))
|
|
865
|
+
def test_zero_aggregate_discovery_follows_shifted_header_fields(shift):
|
|
866
|
+
table, companion, perf = _zero_aggregate_tables(shift)
|
|
867
|
+
assert learning._learn_aggregate(table, perf, companion=companion) == (
|
|
868
|
+
learning._AggregateOffsets(205 + shift, 24 + shift, 36 + shift))
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
@pytest.mark.parametrize("damage", ("identity", "history", "zero", "total", "no_excess", "few_shared", "ambiguous_identity"))
|
|
872
|
+
def test_zero_aggregate_requires_independent_header_and_counter_proof(damage):
|
|
873
|
+
table, companion, perf = _zero_aggregate_tables()
|
|
874
|
+
rows = list(table.rows)
|
|
875
|
+
row = bytearray(rows[-1])
|
|
876
|
+
if damage == "few_shared":
|
|
877
|
+
companion = replace(companion, names=companion.names[:19], rows=companion.rows[:19])
|
|
878
|
+
elif damage == "ambiguous_identity":
|
|
879
|
+
copies = []
|
|
880
|
+
for source in companion.rows:
|
|
881
|
+
changed = bytearray(source)
|
|
882
|
+
changed[20:28] = changed[40:48]
|
|
883
|
+
copies.append(bytes(changed))
|
|
884
|
+
companion = replace(companion, rows=tuple(copies))
|
|
885
|
+
elif damage == "no_excess":
|
|
886
|
+
row[205:209] = (95).to_bytes(4, "little")
|
|
887
|
+
row[36:40] = (44).to_bytes(4, "little")
|
|
888
|
+
elif damage == "total":
|
|
889
|
+
row[205:209] = bytes(4)
|
|
890
|
+
else:
|
|
891
|
+
row[{"identity": 28, "history": 102, "zero": 24, "total": 205}[damage]] ^= 255
|
|
892
|
+
rows[-1] = bytes(row)
|
|
893
|
+
assert learning._learn_aggregate(replace(table, rows=tuple(rows)), perf,
|
|
894
|
+
companion=companion) is None
|
|
@@ -774,7 +774,7 @@ def test_agent_roster_capture_learns_elo_and_zero_draw_performance(retain_raw: b
|
|
|
774
774
|
assert len(snapshot.overall_top_100) == 100
|
|
775
775
|
assert len(snapshot.class_leaderboard(35)) == 20
|
|
776
776
|
assert snapshot.class_table_capabilities == frozenset({"rankings", "elo", "performance", "equipment"})
|
|
777
|
-
assert snapshot.overall_capabilities == frozenset({"rankings", "elo", "performance", "equipment"})
|
|
777
|
+
assert snapshot.overall_capabilities == frozenset({"rankings", "elo", "performance", "equipment", "aggregate_performance"})
|
|
778
778
|
rich = {p.name: p for p in snapshot.players}
|
|
779
779
|
assert all(entry.elo == rich[entry.name].elo for entry in snapshot.overall_top_100)
|
|
780
780
|
assert all(p.elo is not None and p.classes_played for p in snapshot.players)
|
|
@@ -786,7 +786,10 @@ def test_agent_roster_capture_learns_elo_and_zero_draw_performance(retain_raw: b
|
|
|
786
786
|
assert slot.gear_loadout_raw is None
|
|
787
787
|
for entry in snapshot.overall_top_100:
|
|
788
788
|
assert entry.classes_played == rich[entry.name].classes_played
|
|
789
|
-
assert all(entry.total_wins is None
|
|
789
|
+
assert all(entry.total_wins is not None and entry.total_draws == 0
|
|
790
|
+
and entry.total_losses is not None for entry in snapshot.overall_top_100)
|
|
791
|
+
assert any(entry.total_matches > sum(c.matches for c in entry.classes_played)
|
|
792
|
+
for entry in snapshot.overall_top_100)
|
|
790
793
|
assert sum(len(p.classes_played) for p in snapshot.players) == 722
|
|
791
794
|
assert sum(len(p.classes_played) for p in snapshot.overall_top_100) == 114
|
|
792
795
|
equipment = snapshot.players[0].classes_played[0].equipment
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/src/bdo_toolkit/_storage_destination_validation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bdo_toolkit-1.0.10 → bdo_toolkit-1.0.11}/tests/test_storage_unknown_destination_calibration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|