statsig-python-core 0.19.3__tar.gz → 0.19.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (371) hide show
  1. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/Cargo.lock +7 -6
  2. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/Cargo.toml +1 -1
  3. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/PKG-INFO +1 -1
  4. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/py_src/statsig_python_core/error_boundary.py +5 -1
  5. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/py_src/statsig_python_core/statsig_types.py +87 -11
  6. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/pyo_utils.rs +15 -0
  7. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_get_dynamic_config.py +23 -0
  8. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_performance.py +36 -1
  9. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_statsig_user.py +3 -1
  10. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/Cargo.toml +1 -1
  11. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/cmab_evaluator.rs +4 -4
  12. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/evaluator.rs +7 -5
  13. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/hashing/hash_util.rs +36 -1
  14. statsig_python_core-0.19.4/statsig-rust/src/hashing/memo_sha_256.rs +196 -0
  15. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/sdk_event_emitter/event_emitter.rs +22 -1
  16. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/sdk_event_emitter/event_emitter_tests.rs +11 -0
  17. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/statsig_metadata.rs +1 -1
  18. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/hash_util_evaluation_hash_tests.rs +3 -6
  19. statsig_python_core-0.19.3/statsig-rust/src/hashing/memo_sha_256.rs +0 -84
  20. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/py_src/statsig_python_core/__init__.py +0 -0
  21. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/py_src/statsig_python_core/data_store.py +0 -0
  22. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/py_src/statsig_python_core/observability_client.py +0 -0
  23. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/py_src/statsig_python_core/output_logger_provider.py +0 -0
  24. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/py_src/statsig_python_core/persistent_storage.py +0 -0
  25. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/py_src/statsig_python_core/py.typed +0 -0
  26. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/py_src/statsig_python_core/requirements.txt +0 -0
  27. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/py_src/statsig_python_core/statsig.py +0 -0
  28. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/py_src/statsig_python_core/statsig_python_core.pyi +0 -0
  29. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/pyproject.toml +0 -0
  30. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-grpc/Cargo.toml +0 -0
  31. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-grpc/README.md +0 -0
  32. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-grpc/build.rs +0 -0
  33. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-grpc/src/lib.rs +0 -0
  34. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-grpc/src/mock_forward_proxy.rs +0 -0
  35. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-grpc/src/protos/statsig_forward_proxy.proto +0 -0
  36. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-grpc/src/statsig_forward_proxy.rs +0 -0
  37. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-grpc/src/statsig_grpc_client.rs +0 -0
  38. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-grpc/src/statsig_grpc_err.rs +0 -0
  39. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/.github/workflows/CI.yml +0 -0
  40. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/.gitignore +0 -0
  41. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/Cargo.toml +0 -0
  42. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/README.md +0 -0
  43. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/bin/stub_gen.rs +0 -0
  44. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/data_store_base_py.rs +0 -0
  45. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/interned_store_py.rs +0 -0
  46. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/lib.rs +0 -0
  47. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/observability_client_base_py.rs +0 -0
  48. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/output_logger_provider_base_py.rs +0 -0
  49. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/raw_evaluation_compat_py.rs +0 -0
  50. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/safe_gil.rs +0 -0
  51. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/statsig_base_py.rs +0 -0
  52. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/statsig_metadata_py.rs +0 -0
  53. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/statsig_options_py.rs +0 -0
  54. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/statsig_persistent_storage_override_adapter_py.rs +0 -0
  55. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/statsig_types_py.rs +0 -0
  56. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/statsig_user_py.rs +0 -0
  57. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/unit_id_py.rs +0 -0
  58. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/src/valid_primitives_py.rs +0 -0
  59. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/fork_runner.py +0 -0
  60. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/mock_output_logger.py +0 -0
  61. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/mock_scrapi.py +0 -0
  62. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/profile_util.py +0 -0
  63. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/shutdown_sub_proc.py +0 -0
  64. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_data_store.py +0 -0
  65. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_error_boundary.py +0 -0
  66. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_experiment_serialization.py +0 -0
  67. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_exposure_logging.py +0 -0
  68. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_feature_gate_serialization.py +0 -0
  69. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_forking.py +0 -0
  70. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_initialize_with_details.py +0 -0
  71. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_interned_store_preload.py +0 -0
  72. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_layer_param_exposure_sampling.py +0 -0
  73. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_layer_serialization.py +0 -0
  74. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_observability_client.py +0 -0
  75. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_output_logger_provider.py +0 -0
  76. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_override_adapter.py +0 -0
  77. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_sec_expo_as_primary.py +0 -0
  78. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_shared_statsig.py +0 -0
  79. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_shutdown.py +0 -0
  80. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_statsig.py +0 -0
  81. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_statsig_options.py +0 -0
  82. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_statsig_user_json_serialization.py +0 -0
  83. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_statsig_user_none_fields.py +0 -0
  84. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_statsig_user_pickle.py +0 -0
  85. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/test_user_exposure_e2e.py +0 -0
  86. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-pyo3/tests/utils.py +0 -0
  87. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/build.rs +0 -0
  88. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/resources/ip_supalite.table +0 -0
  89. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/resources/ua_parser_regex.yaml +0 -0
  90. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/resources/ua_parser_regex_lite.yaml +0 -0
  91. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/__tests__/interned_string_tests.rs +0 -0
  92. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/__tests__/mod.rs +0 -0
  93. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/__tests__/spec_store_tests.rs +0 -0
  94. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/compression/compression_helper.rs +0 -0
  95. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/compression/mod.rs +0 -0
  96. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/console_capture/console_capture_handler.rs +0 -0
  97. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/console_capture/console_capture_instances.rs +0 -0
  98. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/console_capture/console_capture_options.rs +0 -0
  99. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/console_capture/console_log_line_levels.rs +0 -0
  100. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/console_capture/mod.rs +0 -0
  101. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/data_store_interface.rs +0 -0
  102. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/dcs_str.rs +0 -0
  103. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/__tests__/dynamic_returnable_tests.rs +0 -0
  104. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/__tests__/mod.rs +0 -0
  105. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/__tests__/rkyv_value_tests.rs +0 -0
  106. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/comparisons/compare_arrays.rs +0 -0
  107. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/comparisons/compare_numbers.rs +0 -0
  108. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/comparisons/compare_str_with_regex.rs +0 -0
  109. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/comparisons/compare_strings_in_array.rs +0 -0
  110. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/comparisons/compare_time.rs +0 -0
  111. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/comparisons/compare_versions.rs +0 -0
  112. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/comparisons/mod.rs +0 -0
  113. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/country_lookup.rs +0 -0
  114. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/dynamic_returnable.rs +0 -0
  115. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/dynamic_string.rs +0 -0
  116. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/dynamic_value.rs +0 -0
  117. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/evaluation_details.rs +0 -0
  118. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/evaluation_types.rs +0 -0
  119. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/evaluation_types_initialize_v2.rs +0 -0
  120. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/evaluation_types_v2.rs +0 -0
  121. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/evaluator_context.rs +0 -0
  122. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/evaluator_result.rs +0 -0
  123. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/evaluator_value.rs +0 -0
  124. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/get_unit_id.rs +0 -0
  125. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/mod.rs +0 -0
  126. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/rkyv_value.rs +0 -0
  127. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/secondary_exposure_key.rs +0 -0
  128. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/user_agent_parsing/first_party_ua_parser.rs +0 -0
  129. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/user_agent_parsing/mod.rs +0 -0
  130. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/user_agent_parsing/statsig_uaparser/__tests__/mod.rs +0 -0
  131. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/user_agent_parsing/statsig_uaparser/__tests__/test_helpers.rs +0 -0
  132. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/user_agent_parsing/statsig_uaparser/__tests__/test_tokenizer.rs +0 -0
  133. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/user_agent_parsing/statsig_uaparser/__tests__/test_ua_parser_browser.rs +0 -0
  134. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/user_agent_parsing/statsig_uaparser/__tests__/test_ua_parser_os.rs +0 -0
  135. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/user_agent_parsing/statsig_uaparser/mod.rs +0 -0
  136. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/user_agent_parsing/statsig_uaparser/tokenizer.rs +0 -0
  137. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/user_agent_parsing/statsig_uaparser/ua_parser.rs +0 -0
  138. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/user_agent_parsing/statsig_uaparser/window_iter.rs +0 -0
  139. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/user_agent_parsing/third_party_ua_parser.rs +0 -0
  140. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/evaluation/user_agent_parsing/ua_parser.rs +0 -0
  141. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_emitter/statsig_event_emitter_tests.rs +0 -0
  142. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/event_logger.rs +0 -0
  143. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/event_logger_constants.rs +0 -0
  144. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/event_logger_ops_stats.rs +0 -0
  145. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/event_queue/batch.rs +0 -0
  146. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/event_queue/mod.rs +0 -0
  147. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/event_queue/queue.rs +0 -0
  148. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/event_queue/queued_config_expo.rs +0 -0
  149. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/event_queue/queued_event.rs +0 -0
  150. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/event_queue/queued_experiment_expo.rs +0 -0
  151. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/event_queue/queued_expo.rs +0 -0
  152. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/event_queue/queued_gate_expo.rs +0 -0
  153. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/event_queue/queued_layer_param_expo.rs +0 -0
  154. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/event_queue/queued_passthrough.rs +0 -0
  155. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/event_queue/queued_secondary_expo.rs +0 -0
  156. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/exposure_sampling.rs +0 -0
  157. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/exposure_utils.rs +0 -0
  158. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/flush_interval.rs +0 -0
  159. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/flush_type.rs +0 -0
  160. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/mod.rs +0 -0
  161. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/sec_expo_as_primary_experiment.rs +0 -0
  162. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/statsig_event.rs +0 -0
  163. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging/statsig_event_internal.rs +0 -0
  164. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging_adapter/event_logging_adapter_trait.rs +0 -0
  165. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging_adapter/log_event_payload.rs +0 -0
  166. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging_adapter/mod.rs +0 -0
  167. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging_adapter/statsig_http_event_logging_adapter.rs +0 -0
  168. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/event_logging_adapter/statsig_local_file_event_logging_adapter.rs +0 -0
  169. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/gcir/dynamic_configs_processor.rs +0 -0
  170. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/gcir/feature_gates_processor.rs +0 -0
  171. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/gcir/gcir_formatter.rs +0 -0
  172. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/gcir/gcir_options.rs +0 -0
  173. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/gcir/gcir_process_iter.rs +0 -0
  174. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/gcir/layer_configs_processor.rs +0 -0
  175. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/gcir/mod.rs +0 -0
  176. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/gcir/param_stores_processor.rs +0 -0
  177. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/gcir/stringify_sec_exposures.rs +0 -0
  178. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/gcir/target_app_id_utils.rs +0 -0
  179. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/global_configs.rs +0 -0
  180. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/hashing/ahash.rs +0 -0
  181. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/hashing/djb2.rs +0 -0
  182. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/hashing/mod.rs +0 -0
  183. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/id_lists_adapter/id_list.rs +0 -0
  184. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/id_lists_adapter/id_lists_adapter_trait.rs +0 -0
  185. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/id_lists_adapter/mod.rs +0 -0
  186. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/id_lists_adapter/statsig_http_id_lists_adapter.rs +0 -0
  187. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/init_details.rs +0 -0
  188. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/initialize_evaluations_response.rs +0 -0
  189. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/initialize_response.rs +0 -0
  190. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/initialize_v2_response.rs +0 -0
  191. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/instance_registry.rs +0 -0
  192. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/interned_string.rs +0 -0
  193. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/interned_values/__tests__/interned_store_eval_value_tests.rs +0 -0
  194. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/interned_values/__tests__/interned_store_returnable_tests.rs +0 -0
  195. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/interned_values/__tests__/interned_store_string_tests.rs +0 -0
  196. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/interned_values/__tests__/mod.rs +0 -0
  197. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/interned_values/interned_store.rs +0 -0
  198. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/interned_values/mod.rs +0 -0
  199. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/lib.rs +0 -0
  200. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/logging_utils.rs +0 -0
  201. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/macros.rs +0 -0
  202. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/networking/__tests__/mod.rs +0 -0
  203. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/networking/__tests__/response_data_tests.rs +0 -0
  204. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/networking/http_types.rs +0 -0
  205. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/networking/mod.rs +0 -0
  206. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/networking/network_client.rs +0 -0
  207. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/networking/network_error.rs +0 -0
  208. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/networking/providers/mod.rs +0 -0
  209. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/networking/providers/net_provider_global.rs +0 -0
  210. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/networking/providers/net_provider_noop.rs +0 -0
  211. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/networking/providers/net_provider_reqwest.rs +0 -0
  212. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/networking/proxy_config.rs +0 -0
  213. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/observability/console_capture_observer.rs +0 -0
  214. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/observability/diagnostics_observer.rs +0 -0
  215. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/observability/mod.rs +0 -0
  216. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/observability/observability_client_adapter.rs +0 -0
  217. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/observability/ops_stats.rs +0 -0
  218. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/observability/sdk_errors_observer.rs +0 -0
  219. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/output_logger.rs +0 -0
  220. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/override_adapter/mod.rs +0 -0
  221. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/override_adapter/override_adapter_trait.rs +0 -0
  222. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/override_adapter/statsig_local_override_adapter.rs +0 -0
  223. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/persistent_storage/__tests__/mod.rs +0 -0
  224. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/persistent_storage/__tests__/sticky_values_serialization_tests.rs +0 -0
  225. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/persistent_storage/mod.rs +0 -0
  226. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/persistent_storage/persistent_storage_trait.rs +0 -0
  227. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/persistent_storage/persistent_values_manager.rs +0 -0
  228. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/sdk_diagnostics/diagnostics.rs +0 -0
  229. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/sdk_diagnostics/diagnostics_utils.rs +0 -0
  230. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/sdk_diagnostics/marker.rs +0 -0
  231. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/sdk_diagnostics/mod.rs +0 -0
  232. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/sdk_event_emitter/event_types.rs +0 -0
  233. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/sdk_event_emitter/mod.rs +0 -0
  234. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/spec_store.rs +0 -0
  235. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_adapter/config_spec_background_sync_metrics.rs +0 -0
  236. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_adapter/mod.rs +0 -0
  237. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_adapter/response_format.rs +0 -0
  238. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_adapter/specs_adapter_trait.rs +0 -0
  239. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_adapter/statsig_bootstrap_specs_adapter.rs +0 -0
  240. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_adapter/statsig_customized_specs_adapter.rs +0 -0
  241. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_adapter/statsig_data_store_specs_adapter.rs +0 -0
  242. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_adapter/statsig_grpc_specs_adapter.rs +0 -0
  243. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_adapter/statsig_http_specs_adapter.rs +0 -0
  244. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_adapter/statsig_local_file_specs_adapter.rs +0 -0
  245. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_response/__tests__/mod.rs +0 -0
  246. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_response/__tests__/proto_specs_syncing_tests.rs +0 -0
  247. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_response/__tests__/proto_specs_unknown_tests.rs +0 -0
  248. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_response/__tests__/proto_specs_vs_json_tests.rs +0 -0
  249. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_response/__tests__/proto_stream_reader_tests.rs +0 -0
  250. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_response/cmab_types.rs +0 -0
  251. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_response/explicit_params.rs +0 -0
  252. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_response/mod.rs +0 -0
  253. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_response/param_store_types.rs +0 -0
  254. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_response/proto_specs.rs +0 -0
  255. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_response/proto_stream_reader.rs +0 -0
  256. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_response/spec_types.rs +0 -0
  257. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_response/specs_hash_map.rs +0 -0
  258. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/specs_response/statsig_config_specs.rs +0 -0
  259. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/statsig.rs +0 -0
  260. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/statsig_core_api_options.rs +0 -0
  261. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/statsig_err.rs +0 -0
  262. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/statsig_global.rs +0 -0
  263. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/statsig_options.rs +0 -0
  264. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/statsig_runtime.rs +0 -0
  265. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/statsig_type_factories.rs +0 -0
  266. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/statsig_types.rs +0 -0
  267. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/statsig_types_raw.rs +0 -0
  268. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/user/into_optional.rs +0 -0
  269. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/user/mod.rs +0 -0
  270. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/user/statsig_user.rs +0 -0
  271. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/user/statsig_user_builder.rs +0 -0
  272. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/user/statsig_user_internal.rs +0 -0
  273. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/user/statsig_user_loggable.rs +0 -0
  274. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/user/unit_id.rs +0 -0
  275. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/user/user_data.rs +0 -0
  276. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/src/utils/mod.rs +0 -0
  277. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/check_gate_tests.rs +0 -0
  278. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/customized_specs_adapter_tests.rs +0 -0
  279. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/big_number_dcs.json +0 -0
  280. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/check_gate_perf_dcs.json +0 -0
  281. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/company_id_list +0 -0
  282. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/dcs_error.json +0 -0
  283. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/dcs_missing_gates.json +0 -0
  284. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/dcs_non_case_sensitive.json +0 -0
  285. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/dcs_user_agent_versions.json +0 -0
  286. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/dcs_with_analytical_exposure_sampling.json +0 -0
  287. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/dcs_with_checksum.json +0 -0
  288. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/dcs_with_sampling.json +0 -0
  289. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/dcs_with_sdk_configs.json +0 -0
  290. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/demo_proj_dcs.json +0 -0
  291. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/demo_proj_dcs.pb.br +0 -0
  292. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/eval_proj_dcs.json +0 -0
  293. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/eval_proj_dcs.pb.br +0 -0
  294. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/get_id_lists.json +0 -0
  295. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/perf_proj_dcs.json +0 -0
  296. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/perf_proj_dcs.pb.br +0 -0
  297. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/shared_dict_dict_only.json +0 -0
  298. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/shared_dict_original_dcs.json +0 -0
  299. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/shared_dict_response_uncompressed.json +0 -0
  300. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/shared_dict_response_with_dict.json +0 -0
  301. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/shared_dict_response_without_dict.json +0 -0
  302. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/test_must_pass_user_agents.txt +0 -0
  303. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/test_user_agents.txt +0 -0
  304. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/ua_string_cases.json +0 -0
  305. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data/unknown_enum.pb.br +0 -0
  306. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data_store_bytes_adapter_tests.rs +0 -0
  307. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data_store_json_bytes_tests.rs +0 -0
  308. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data_store_json_only_no_bytes_methods_tests.rs +0 -0
  309. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data_store_lock_tests.rs +0 -0
  310. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/data_store_proto_bytes_tests.rs +0 -0
  311. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/direct_gcir_tests.rs +0 -0
  312. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/dynamic_string_tests.rs +0 -0
  313. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/dynamic_value_tests.rs +0 -0
  314. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/evaluation_details_tests.rs +0 -0
  315. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/evaluator_value_tests.rs +0 -0
  316. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/event_logger_failing_flush_tests.rs +0 -0
  317. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/event_logger_flush_tests.rs +0 -0
  318. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/event_logger_high_qps_tests.rs +0 -0
  319. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/event_logger_usage_tests.rs +0 -0
  320. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/expected_evaluation_tests.rs +0 -0
  321. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/exposure_sampling_key_tests.rs +0 -0
  322. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/exposure_tests.rs +0 -0
  323. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/flushing_tests.rs +0 -0
  324. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/gate_inversion_eval_tests.rs +0 -0
  325. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/gcir_tests.rs +0 -0
  326. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/global_configs_test.rs +0 -0
  327. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/grpc_specs_adapter_tests.rs +0 -0
  328. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/http_specs_adapter_tests.rs +0 -0
  329. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/initialize_timeout_test.rs +0 -0
  330. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/instance_registry_tests.rs +0 -0
  331. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/layer_serialization_tests.rs +0 -0
  332. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/list_methods_tests.rs +0 -0
  333. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/network_client_streaming_tests.rs +0 -0
  334. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/network_client_tests.rs +0 -0
  335. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/network_failure_tests.rs +0 -0
  336. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/observability_client_usage_tests.rs +0 -0
  337. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/output_logger_tests.rs +0 -0
  338. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/override_adapter_tests.rs +0 -0
  339. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/perf_tests.rs +0 -0
  340. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/proto_specs_usage_tests.rs +0 -0
  341. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/spec_store_lock_tests.rs +0 -0
  342. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/spec_types_tests.rs +0 -0
  343. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/statsig_disable_network_tests.rs +0 -0
  344. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/statsig_environment_tests.rs +0 -0
  345. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/statsig_event_emitter_usage_test.rs +0 -0
  346. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/statsig_global_tests.rs +0 -0
  347. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/statsig_local_file_event_logging_adapter_tests.rs +0 -0
  348. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/statsig_local_file_specs_adapter_tests.rs +0 -0
  349. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/statsig_options_tests.rs +0 -0
  350. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/statsig_shared_tests.rs +0 -0
  351. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/statsig_tests.rs +0 -0
  352. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/statsig_user_builder_tests.rs +0 -0
  353. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/statsig_user_field_accessor_tests.rs +0 -0
  354. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/statsig_user_internal_tests.rs +0 -0
  355. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/statsig_user_loggable_tests.rs +0 -0
  356. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/statsig_user_tests.rs +0 -0
  357. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/syncing_network_failure_tests.rs +0 -0
  358. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/typed_getters_tests.rs +0 -0
  359. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/ua_parser_util_test.rs +0 -0
  360. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/user_agent_tests_first_party.rs +0 -0
  361. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/user_json_tests.rs +0 -0
  362. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/utils/env_var_guard.rs +0 -0
  363. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/utils/helpers.rs +0 -0
  364. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/utils/mock_data_store.rs +0 -0
  365. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/utils/mock_event_logging_adapter.rs +0 -0
  366. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/utils/mock_log_provider.rs +0 -0
  367. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/utils/mock_observability_client.rs +0 -0
  368. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/utils/mock_scrapi.rs +0 -0
  369. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/utils/mock_specs_adapter.rs +0 -0
  370. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/utils/mock_specs_listener.rs +0 -0
  371. {statsig_python_core-0.19.3 → statsig_python_core-0.19.4}/statsig-rust/tests/utils/mod.rs +0 -0
@@ -2530,6 +2530,7 @@ checksum = "f04a7b61bf2db5495d6c0d2eb4b3f0f366864d47f2482834656e25d1b25fe290"
2530
2530
  dependencies = [
2531
2531
  "inventory",
2532
2532
  "libloading",
2533
+ "num-bigint",
2533
2534
  "regex-lite",
2534
2535
  "rustler_codegen",
2535
2536
  "serde",
@@ -2869,7 +2870,7 @@ dependencies = [
2869
2870
 
2870
2871
  [[package]]
2871
2872
  name = "sigstat-grpc"
2872
- version = "0.19.3"
2873
+ version = "0.19.4"
2873
2874
  dependencies = [
2874
2875
  "async-trait",
2875
2876
  "chrono",
@@ -2961,7 +2962,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
2961
2962
 
2962
2963
  [[package]]
2963
2964
  name = "statsig-node"
2964
- version = "0.19.3"
2965
+ version = "0.19.4"
2965
2966
  dependencies = [
2966
2967
  "async-trait",
2967
2968
  "napi",
@@ -2976,7 +2977,7 @@ dependencies = [
2976
2977
 
2977
2978
  [[package]]
2978
2979
  name = "statsig-pyo3"
2979
- version = "0.19.3"
2980
+ version = "0.19.4"
2980
2981
  dependencies = [
2981
2982
  "async-trait",
2982
2983
  "lazy_static",
@@ -2991,7 +2992,7 @@ dependencies = [
2991
2992
 
2992
2993
  [[package]]
2993
2994
  name = "statsig-rust"
2994
- version = "0.19.3"
2995
+ version = "0.19.4"
2995
2996
  dependencies = [
2996
2997
  "ahash",
2997
2998
  "arc-swap",
@@ -3041,7 +3042,7 @@ dependencies = [
3041
3042
 
3042
3043
  [[package]]
3043
3044
  name = "statsig_elixir"
3044
- version = "0.19.3"
3045
+ version = "0.19.4"
3045
3046
  dependencies = [
3046
3047
  "async-trait",
3047
3048
  "parking_lot",
@@ -3054,7 +3055,7 @@ dependencies = [
3054
3055
 
3055
3056
  [[package]]
3056
3057
  name = "statsig_ffi"
3057
- version = "0.19.3"
3058
+ version = "0.19.4"
3058
3059
  dependencies = [
3059
3060
  "async-trait",
3060
3061
  "cbindgen",
@@ -19,7 +19,7 @@ exclude = [
19
19
  [workspace.package]
20
20
  edition = "2021"
21
21
  license = "ISC"
22
- version = "0.19.3"
22
+ version = "0.19.4"
23
23
  homepage = "https://statsig.com/"
24
24
  authors = ["Statsig", "Daniel Loomb <daniel@statsig.com>"]
25
25
  readme = "README.md"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: statsig_python_core
3
- Version: 0.19.3
3
+ Version: 0.19.4
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -10,7 +10,11 @@ class ErrorBoundary:
10
10
 
11
11
  def create_wrapped(method_name, orig_method):
12
12
  def wrapped(*args, **kwargs):
13
- return ErrorBoundary._capture(method_name, lambda: orig_method(*args, **kwargs))
13
+ try:
14
+ return orig_method(*args, **kwargs)
15
+ except Exception as error:
16
+ ErrorBoundary._on_error(method_name, error)
17
+ return None
14
18
 
15
19
  wrapped._error_boundary_wrapped = True
16
20
  return wrapped
@@ -124,23 +124,91 @@ class BaseConfigEvaluation(BaseEvaluation):
124
124
  return self._get_typed(self.__tag, self.value, param_name, fallback)
125
125
 
126
126
  def get_string(self, param_name: str, fallback: str) -> str:
127
- return self._get_typed(self.__tag, self.value, param_name, fallback)
127
+ res = self.value.get(param_name, None)
128
+ if res is None:
129
+ return fallback
130
+
131
+ if fallback is None or isinstance(fallback, type(res)):
132
+ return res
133
+
134
+ _log_error(
135
+ self.__tag,
136
+ f"Type mismatch - '{self.name}.{param_name}'. Expected {type(fallback)}, got {type(res)}",
137
+ )
138
+ return fallback
128
139
 
129
140
  def get_integer(self, param_name: str, fallback: int) -> int:
130
- return self._get_typed(self.__tag, self.value, param_name, fallback)
141
+ res = self.value.get(param_name, None)
142
+ if res is None:
143
+ return fallback
144
+
145
+ if fallback is None or isinstance(fallback, type(res)):
146
+ return res
147
+
148
+ _log_error(
149
+ self.__tag,
150
+ f"Type mismatch - '{self.name}.{param_name}'. Expected {type(fallback)}, got {type(res)}",
151
+ )
152
+ return fallback
131
153
 
132
154
  def get_float(self, param_name: str, fallback: float) -> float:
133
155
  actual_fallback = float(fallback) if isinstance(fallback, int) else fallback
134
- return self._get_typed(self.__tag, self.value, param_name, actual_fallback)
156
+ res = self.value.get(param_name, None)
157
+ if res is None:
158
+ return actual_fallback
159
+
160
+ # Ints stored in Statsig (e.g. a value saved as `1` rather than `1.0`) are valid
161
+ # floats — coerce them. `bool` subclasses `int` in Python, so exclude it.
162
+ if isinstance(res, (int, float)) and not isinstance(res, bool):
163
+ return float(res)
164
+
165
+ _log_error(
166
+ self.__tag,
167
+ f"Type mismatch - '{self.name}.{param_name}'. Expected {type(actual_fallback)}, got {type(res)}",
168
+ )
169
+ return actual_fallback
135
170
 
136
171
  def get_bool(self, param_name: str, fallback: bool) -> bool:
137
- return self._get_typed(self.__tag, self.value, param_name, fallback)
172
+ res = self.value.get(param_name, None)
173
+ if res is None:
174
+ return fallback
175
+
176
+ if fallback is None or isinstance(fallback, type(res)):
177
+ return res
178
+
179
+ _log_error(
180
+ self.__tag,
181
+ f"Type mismatch - '{self.name}.{param_name}'. Expected {type(fallback)}, got {type(res)}",
182
+ )
183
+ return fallback
138
184
 
139
185
  def get_array(self, param_name: str, fallback: list) -> list:
140
- return self._get_typed(self.__tag, self.value, param_name, fallback)
186
+ res = self.value.get(param_name, None)
187
+ if res is None:
188
+ return fallback
189
+
190
+ if fallback is None or isinstance(fallback, type(res)):
191
+ return res
192
+
193
+ _log_error(
194
+ self.__tag,
195
+ f"Type mismatch - '{self.name}.{param_name}'. Expected {type(fallback)}, got {type(res)}",
196
+ )
197
+ return fallback
141
198
 
142
199
  def get_object(self, param_name: str, fallback: dict) -> dict:
143
- return self._get_typed(self.__tag, self.value, param_name, fallback)
200
+ res = self.value.get(param_name, None)
201
+ if res is None:
202
+ return fallback
203
+
204
+ if fallback is None or isinstance(fallback, type(res)):
205
+ return res
206
+
207
+ _log_error(
208
+ self.__tag,
209
+ f"Type mismatch - '{self.name}.{param_name}'. Expected {type(fallback)}, got {type(res)}",
210
+ )
211
+ return fallback
144
212
 
145
213
  def to_dict(self) -> dict:
146
214
  base_dict = super().to_dict()
@@ -223,13 +291,21 @@ class Layer(BaseEvaluation):
223
291
 
224
292
  def get_float(self, param_name: str, fallback: float) -> float:
225
293
  actual_fallback = float(fallback) if isinstance(fallback, int) else fallback
226
- return self._get_typed(
294
+ res = self.__value.get(param_name, None)
295
+ if res is None:
296
+ return actual_fallback
297
+
298
+ # Ints stored in Statsig (e.g. a value saved as `1` rather than `1.0`) are valid
299
+ # floats — coerce them. `bool` subclasses `int` in Python, so exclude it.
300
+ if isinstance(res, (int, float)) and not isinstance(res, bool):
301
+ self._log_layer_param_exposure(param_name)
302
+ return float(res)
303
+
304
+ _log_error(
227
305
  "Layer",
228
- self.__value,
229
- param_name,
230
- actual_fallback,
231
- self._log_layer_param_exposure,
306
+ f"Type mismatch - '{self.name}.{param_name}'. Expected {type(actual_fallback)}, got {type(res)}",
232
307
  )
308
+ return actual_fallback
233
309
 
234
310
  def get_bool(self, param_name: str, fallback: bool) -> bool:
235
311
  return self._get_typed(
@@ -260,6 +260,10 @@ fn py_any_ref_to_dynamic_value(value: &Bound<'_, PyAny>) -> Option<DynamicValue>
260
260
  return Some(DynamicValue::from(int));
261
261
  }
262
262
 
263
+ if let Some(float) = try_as_overflowing_int(value) {
264
+ return Some(DynamicValue::from(float));
265
+ }
266
+
263
267
  if let Some(list) = try_as_list(value) {
264
268
  return Some(DynamicValue::from(list));
265
269
  }
@@ -349,6 +353,17 @@ fn try_as_int<'py>(value: &'py Bound<'py, PyAny>) -> Option<i64> {
349
353
  Some(value)
350
354
  }
351
355
 
356
+ // Python ints have arbitrary precision; values above `i64::MAX` fail `try_as_int`. Fall
357
+ // back to f64 (lossy above 2^53) so the entry is preserved instead of dropped — matches
358
+ // the JS bridge, which always uses doubles. Only meaningful after `try_as_int`.
359
+ fn try_as_overflowing_int<'py>(value: &'py Bound<'py, PyAny>) -> Option<f64> {
360
+ if !PyInt::type_check(value) {
361
+ return None;
362
+ }
363
+
364
+ value.extract::<f64>().ok()
365
+ }
366
+
352
367
  fn try_as_float<'py>(value: &'py Bound<'py, PyAny>) -> Option<f64> {
353
368
  if !PyFloat::type_check(value) {
354
369
  return None;
@@ -61,6 +61,29 @@ def test_dynamic_config_get_methods(statsig_setup):
61
61
  assert "non_existent_key" not in config.value
62
62
 
63
63
 
64
+ def test_get_float_coerces_int_param(statsig_setup):
65
+ statsig = statsig_setup
66
+ config = statsig.get_dynamic_config(StatsigUser("my_user"), "big_number")
67
+
68
+ # `rar` is stored as an int (9999999999). get_float should coerce to float
69
+ # rather than returning the fallback. Mirrors the user-reported behavior where
70
+ # a Statsig param saved as `1` was being skipped by get_float(name, 0.99).
71
+ result = config.get_float("rar", 0.99)
72
+ assert result == 9999999999.0
73
+ assert isinstance(result, float)
74
+
75
+
76
+ def test_dynamic_config_typed_get_methods(statsig_setup):
77
+ statsig = statsig_setup
78
+ config = statsig.get_dynamic_config(StatsigUser("my_user"), "operating_system_config")
79
+
80
+ assert config.get_string("str", "fallback") == "hello"
81
+ assert config.get_integer("num", 0) == 13
82
+ assert config.get_bool("bool", False) is True
83
+ assert config.get_array("arr", []) == ["hi", "there"]
84
+ assert config.get_object("obj", {}) == {"a": "bc"}
85
+
86
+
64
87
  def test_dynamic_config_to_py_dict_round_trip_preserves_data(statsig_setup):
65
88
  statsig = statsig_setup
66
89
  user = StatsigUser("my_user")
@@ -1,4 +1,4 @@
1
- from statsig_python_core import Statsig, StatsigOptions, StatsigUser
1
+ from statsig_python_core import DynamicConfig, Statsig, StatsigOptions, StatsigUser
2
2
  from pytest_httpserver import HTTPServer
3
3
  import json
4
4
  from utils import get_test_data_resource
@@ -6,6 +6,28 @@ import pytest
6
6
  from profile_util import profile
7
7
 
8
8
  user = StatsigUser("a-user")
9
+ typed_config = DynamicConfig(
10
+ "typed_config",
11
+ {
12
+ "value": {
13
+ "a_string": "value",
14
+ "an_integer": 123,
15
+ "a_float": 1.5,
16
+ "a_bool": True,
17
+ "an_array": ["value"],
18
+ "an_object": {"key": "value"},
19
+ }
20
+ },
21
+ )
22
+
23
+ typed_config_accessor_cases = [
24
+ ("get_string", "a_string", "err"),
25
+ ("get_integer", "an_integer", 0),
26
+ ("get_float", "a_float", 0.0),
27
+ ("get_bool", "a_bool", False),
28
+ ("get_array", "an_array", []),
29
+ ("get_object", "an_object", {}),
30
+ ]
9
31
 
10
32
 
11
33
  @pytest.fixture
@@ -86,6 +108,19 @@ def test_get_dynamic_config_get_string_correctness(statsig_setup):
86
108
  assert value.startswith("TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGF")
87
109
 
88
110
 
111
+ @pytest.mark.parametrize("method_name,param_name,fallback", typed_config_accessor_cases)
112
+ def test_typed_config_accessors(method_name, param_name, fallback):
113
+ method = getattr(typed_config, method_name)
114
+
115
+ results = profile(lambda: method(param_name, fallback), iterations=10_000)
116
+
117
+ value = results["value"]
118
+ del results["value"]
119
+ print(json.dumps(results, indent=2))
120
+
121
+ assert value == typed_config.value[param_name]
122
+
123
+
89
124
  def test_get_experiment(statsig_setup):
90
125
  statsig, _baseline = statsig_setup
91
126
 
@@ -97,7 +97,9 @@ def test_various_custom_attr_types():
97
97
  assert custom["big_int"] == sys.maxsize
98
98
  assert isinstance(custom["big_int"], int)
99
99
  assert isinstance(custom["too_big_float"], float)
100
- assert custom.get("too_big_int") is None
100
+ # Python ints that overflow i64 are kept as f64 (lossy) rather than dropped.
101
+ assert isinstance(custom["too_big_int"], float)
102
+ assert custom["too_big_int"] == float(999999999999999999999999999999)
101
103
 
102
104
  assert isinstance(custom["arr"][0], bool)
103
105
  assert isinstance(custom["arr"][1], str)
@@ -40,7 +40,7 @@ serde_json = { version = "1.0.143", features = [
40
40
  ] }
41
41
  serde_with = "3.4.0"
42
42
  sha2 = "0.10.8"
43
- sigstat-grpc = { path = "../statsig-grpc", version = "0.19.3", optional = true }
43
+ sigstat-grpc = { path = "../statsig-grpc", version = "0.19.4", optional = true }
44
44
  simple_logger = { version = "5.0.0" }
45
45
  tempfile = "3.8.1"
46
46
  tokio = { version = "1.39.1", features = ["full"] }
@@ -62,9 +62,9 @@ pub fn get_cmab_ranked_list(ctx: &mut EvaluatorContext, name: &str) -> Vec<CMABR
62
62
  }
63
63
  };
64
64
 
65
+ let hashing = ctx.hashing;
65
66
  let unit_id = get_unit_id(ctx, &cmab.id_type);
66
- let input = format!("{}.{}", cmab.salt, unit_id);
67
- let user_hash = ctx.hashing.evaluation_hash(&input);
67
+ let user_hash = hashing.evaluation_hash_dot2(cmab.salt.as_str(), unit_id);
68
68
 
69
69
  let should_sample = match user_hash {
70
70
  Some(hash) => ((hash % 10000) as f64) < (cmab.sample_rate * 10000.0),
@@ -142,9 +142,9 @@ pub(crate) fn evaluate_cmab(
142
142
  ctx.result.version = Some(cmab.version);
143
143
  ctx.result.is_experiment_active = cmab.enabled;
144
144
 
145
+ let hashing = ctx.hashing;
145
146
  let unit_id = get_unit_id(ctx, &cmab.id_type);
146
- let input = format!("{}.{}", cmab.salt, unit_id);
147
- let user_hash = ctx.hashing.evaluation_hash(&input);
147
+ let user_hash = hashing.evaluation_hash_dot2(cmab.salt.as_str(), unit_id);
148
148
  let config = match &cmab.config {
149
149
  Some(config) => config,
150
150
  None => {
@@ -125,7 +125,7 @@ impl Evaluator {
125
125
  }
126
126
 
127
127
  if evaluate_config_delegate(ctx, rule)? {
128
- ctx.finalize_evaluation(spec, Some(rule));
128
+ ctx.finalize_evaluation(spec, None);
129
129
  return Ok(Recognition::Recognized);
130
130
  }
131
131
 
@@ -717,15 +717,16 @@ fn evaluate_pass_percentage(
717
717
  }
718
718
 
719
719
  let rule_salt = rule.salt.as_deref().unwrap_or(rule.id.as_str());
720
+ let hashing = ctx.hashing;
720
721
  let unit_id = get_unit_id(ctx, &rule.id_type);
721
- let input = format!("{spec_salt}.{rule_salt}.{unit_id}");
722
- match ctx.hashing.evaluation_hash(&input) {
722
+ match hashing.evaluation_hash_dot3(spec_salt.as_str(), rule_salt, unit_id) {
723
723
  Some(hash) => ((hash % 10000) as f64) < rule.pass_percentage * 100.0,
724
724
  None => false,
725
725
  }
726
726
  }
727
727
 
728
728
  fn get_hash_for_user_bucket(ctx: &mut EvaluatorContext, condition: &Condition) -> DynamicValue {
729
+ let hashing = ctx.hashing;
729
730
  let unit_id = get_unit_id(ctx, &condition.id_type);
730
731
 
731
732
  let mut salt = InternedString::empty_ref();
@@ -736,8 +737,9 @@ fn get_hash_for_user_bucket(ctx: &mut EvaluatorContext, condition: &Condition) -
736
737
  }
737
738
  }
738
739
 
739
- let input = format!("{salt}.{unit_id}");
740
- let hash = ctx.hashing.evaluation_hash(&input).unwrap_or(1);
740
+ let hash = hashing
741
+ .evaluation_hash_dot2(salt.as_str(), unit_id)
742
+ .unwrap_or(1);
741
743
  dyn_value!(hash % 1000)
742
744
  }
743
745
 
@@ -89,7 +89,42 @@ impl HashUtil {
89
89
  u64::from_be_bytes(hasher_bytes)
90
90
  }
91
91
 
92
- pub fn evaluation_hash(&self, input: &String) -> Option<u64> {
92
+ pub fn evaluation_hash(&self, input: &str) -> Option<u64> {
93
93
  self.sha_hasher.compute_hash(input)
94
94
  }
95
+
96
+ pub fn evaluation_hash_dot2(&self, a: &str, b: &str) -> Option<u64> {
97
+ self.sha_hasher.compute_hash_dot2(a, b)
98
+ }
99
+
100
+ pub fn evaluation_hash_dot3(&self, a: &str, b: &str, c: &str) -> Option<u64> {
101
+ self.sha_hasher.compute_hash_dot3(a, b, c)
102
+ }
103
+ }
104
+
105
+ #[cfg(test)]
106
+ mod tests {
107
+ use super::HashUtil;
108
+
109
+ #[test]
110
+ fn evaluation_hash_dot2_matches_formatted_input() {
111
+ let hashing = HashUtil::new();
112
+ let formatted = "salt.user";
113
+
114
+ assert_eq!(
115
+ hashing.evaluation_hash(formatted),
116
+ hashing.evaluation_hash_dot2("salt", "user")
117
+ );
118
+ }
119
+
120
+ #[test]
121
+ fn evaluation_hash_dot3_matches_formatted_input() {
122
+ let hashing = HashUtil::new();
123
+ let formatted = "spec.rule.user";
124
+
125
+ assert_eq!(
126
+ hashing.evaluation_hash(formatted),
127
+ hashing.evaluation_hash_dot3("spec", "rule", "user")
128
+ );
129
+ }
95
130
  }
@@ -0,0 +1,196 @@
1
+ use crate::log_e;
2
+ use ahash::AHasher;
3
+ use base64::prelude::BASE64_STANDARD;
4
+ use base64::Engine;
5
+ use parking_lot::Mutex;
6
+ use sha2::digest::Output;
7
+ use sha2::{Digest, Sha256};
8
+ use std::collections::HashMap;
9
+ use std::hash::{Hash, Hasher};
10
+ use std::time::Duration;
11
+
12
+ const MAX_CACHE_ENTRIES: usize = 10000;
13
+
14
+ struct MemoState {
15
+ sha_hasher: Sha256,
16
+ user_hash_cache: HashMap<u64, Vec<(EvaluationHashKey, u64)>>,
17
+ user_hash_cache_entries: usize,
18
+ }
19
+
20
+ enum EvaluationHashKey {
21
+ Raw(String),
22
+ Dot2(String, String),
23
+ Dot3(String, String, String),
24
+ }
25
+
26
+ enum EvaluationHashKeyRef<'a> {
27
+ Raw(&'a str),
28
+ Dot2(&'a str, &'a str),
29
+ Dot3(&'a str, &'a str, &'a str),
30
+ }
31
+
32
+ impl EvaluationHashKey {
33
+ fn matches(&self, other: &EvaluationHashKeyRef) -> bool {
34
+ match (self, other) {
35
+ (EvaluationHashKey::Raw(a), EvaluationHashKeyRef::Raw(b)) => a == b,
36
+ (EvaluationHashKey::Dot2(a1, a2), EvaluationHashKeyRef::Dot2(b1, b2)) => {
37
+ a1 == b1 && a2 == b2
38
+ }
39
+ (EvaluationHashKey::Dot3(a1, a2, a3), EvaluationHashKeyRef::Dot3(b1, b2, b3)) => {
40
+ a1 == b1 && a2 == b2 && a3 == b3
41
+ }
42
+ _ => false,
43
+ }
44
+ }
45
+ }
46
+
47
+ impl<'a> EvaluationHashKeyRef<'a> {
48
+ fn fast_hash(&self) -> u64 {
49
+ let mut hasher = AHasher::default();
50
+ std::mem::discriminant(self).hash(&mut hasher);
51
+ match self {
52
+ EvaluationHashKeyRef::Raw(a) => a.hash(&mut hasher),
53
+ EvaluationHashKeyRef::Dot2(a, b) => {
54
+ a.hash(&mut hasher);
55
+ b.hash(&mut hasher);
56
+ }
57
+ EvaluationHashKeyRef::Dot3(a, b, c) => {
58
+ a.hash(&mut hasher);
59
+ b.hash(&mut hasher);
60
+ c.hash(&mut hasher);
61
+ }
62
+ }
63
+ hasher.finish()
64
+ }
65
+
66
+ fn to_owned_key(&self) -> EvaluationHashKey {
67
+ match self {
68
+ EvaluationHashKeyRef::Raw(a) => EvaluationHashKey::Raw((*a).to_string()),
69
+ EvaluationHashKeyRef::Dot2(a, b) => {
70
+ EvaluationHashKey::Dot2((*a).to_string(), (*b).to_string())
71
+ }
72
+ EvaluationHashKeyRef::Dot3(a, b, c) => {
73
+ EvaluationHashKey::Dot3((*a).to_string(), (*b).to_string(), (*c).to_string())
74
+ }
75
+ }
76
+ }
77
+ }
78
+
79
+ const TAG: &str = stringify!(MemoSha256);
80
+ pub struct MemoSha256 {
81
+ inner: Mutex<MemoState>,
82
+ }
83
+
84
+ impl MemoSha256 {
85
+ pub fn new() -> Self {
86
+ Self {
87
+ inner: Mutex::new(MemoState {
88
+ sha_hasher: Sha256::new(),
89
+ user_hash_cache: HashMap::new(),
90
+ user_hash_cache_entries: 0,
91
+ }),
92
+ }
93
+ }
94
+
95
+ pub fn compute_hash(&self, input: &str) -> Option<u64> {
96
+ self.compute_hash_for_key(EvaluationHashKeyRef::Raw(input))
97
+ }
98
+
99
+ pub fn compute_hash_dot2(&self, a: &str, b: &str) -> Option<u64> {
100
+ self.compute_hash_for_key(EvaluationHashKeyRef::Dot2(a, b))
101
+ }
102
+
103
+ pub fn compute_hash_dot3(&self, a: &str, b: &str, c: &str) -> Option<u64> {
104
+ self.compute_hash_for_key(EvaluationHashKeyRef::Dot3(a, b, c))
105
+ }
106
+
107
+ fn compute_hash_for_key(&self, key: EvaluationHashKeyRef) -> Option<u64> {
108
+ let mut state = match self.inner.try_lock_for(Duration::from_secs(5)) {
109
+ Some(state) => state,
110
+ None => {
111
+ log_e!(
112
+ TAG,
113
+ "Failed to acquire lock for Sha256: Failed to lock inner"
114
+ );
115
+ return None;
116
+ }
117
+ };
118
+
119
+ let fast_hash = key.fast_hash();
120
+ if let Some(bucket) = state.user_hash_cache.get(&fast_hash) {
121
+ if let Some((_, value)) = bucket
122
+ .iter()
123
+ .find(|(cached_key, _)| cached_key.matches(&key))
124
+ {
125
+ return Some(*value);
126
+ }
127
+ }
128
+
129
+ if state.user_hash_cache_entries > MAX_CACHE_ENTRIES {
130
+ state.user_hash_cache.clear();
131
+ state.user_hash_cache_entries = 0;
132
+ }
133
+
134
+ let hash = self.compute_bytes_for_key(&mut state, &key);
135
+
136
+ match hash.split_at(size_of::<u64>()).0.try_into() {
137
+ Ok(bytes) => {
138
+ let u_bytes = u64::from_be_bytes(bytes);
139
+ state
140
+ .user_hash_cache
141
+ .entry(fast_hash)
142
+ .or_default()
143
+ .push((key.to_owned_key(), u_bytes));
144
+ state.user_hash_cache_entries += 1;
145
+ Some(u_bytes)
146
+ }
147
+ _ => None,
148
+ }
149
+ }
150
+
151
+ pub fn hash_string(&self, input: &str) -> String {
152
+ let mut state = match self.inner.try_lock_for(Duration::from_secs(5)) {
153
+ Some(state) => state,
154
+ None => {
155
+ log_e!(
156
+ TAG,
157
+ "Failed to acquire lock for Sha256: Failed to lock inner"
158
+ );
159
+ return "STATSIG_HASH_ERROR".to_string();
160
+ }
161
+ };
162
+
163
+ let hash = self.compute_bytes(&mut state, input);
164
+ BASE64_STANDARD.encode(hash)
165
+ }
166
+
167
+ fn compute_bytes(&self, state: &mut MemoState, input: &str) -> Output<Sha256> {
168
+ state.sha_hasher.update(input.as_bytes());
169
+ state.sha_hasher.finalize_reset()
170
+ }
171
+
172
+ fn compute_bytes_for_key(
173
+ &self,
174
+ state: &mut MemoState,
175
+ key: &EvaluationHashKeyRef,
176
+ ) -> Output<Sha256> {
177
+ match key {
178
+ EvaluationHashKeyRef::Raw(a) => {
179
+ state.sha_hasher.update(a.as_bytes());
180
+ }
181
+ EvaluationHashKeyRef::Dot2(a, b) => {
182
+ state.sha_hasher.update(a.as_bytes());
183
+ state.sha_hasher.update(b".");
184
+ state.sha_hasher.update(b.as_bytes());
185
+ }
186
+ EvaluationHashKeyRef::Dot3(a, b, c) => {
187
+ state.sha_hasher.update(a.as_bytes());
188
+ state.sha_hasher.update(b".");
189
+ state.sha_hasher.update(b.as_bytes());
190
+ state.sha_hasher.update(b".");
191
+ state.sha_hasher.update(c.as_bytes());
192
+ }
193
+ }
194
+ state.sha_hasher.finalize_reset()
195
+ }
196
+ }