ab-analysis-kit 0.6.4__tar.gz → 0.8.0__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 (192) hide show
  1. {ab_analysis_kit-0.6.4/ab_analysis_kit.egg-info → ab_analysis_kit-0.8.0}/PKG-INFO +32 -6
  2. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/README.md +31 -5
  3. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0/ab_analysis_kit.egg-info}/PKG-INFO +32 -6
  4. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/ab_analysis_kit.egg-info/SOURCES.txt +10 -0
  5. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/__init__.py +1 -1
  6. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/_output.py +60 -0
  7. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/rules/cli.md +24 -0
  8. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/rules/experiments.md +14 -1
  9. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/rules/methods.md +76 -5
  10. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/rules/overview.md +12 -4
  11. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/rules/project.md +61 -13
  12. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/rules/validate.md +3 -2
  13. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/skills/abk-new-experiment/SKILL.md +2 -1
  14. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/commands/plan.py +109 -6
  15. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/commands/run.py +137 -26
  16. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/commands/validate.py +54 -9
  17. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/main.py +22 -0
  18. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/config/experiment_config.py +111 -2
  19. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/config/profile.py +21 -5
  20. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/config/project_config.py +37 -3
  21. ab_analysis_kit-0.8.0/abkit/config/signals.py +20 -0
  22. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/config/validator.py +33 -2
  23. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/core/period_planner.py +21 -3
  24. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/internal_tables/_experiments.py +15 -0
  25. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/internal_tables/_maintenance.py +7 -1
  26. ab_analysis_kit-0.8.0/abkit/database/internal_tables/_notify_states.py +145 -0
  27. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/internal_tables/_results.py +47 -0
  28. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/internal_tables/manager.py +2 -0
  29. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/tables.py +63 -0
  30. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/notify/__init__.py +16 -4
  31. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/notify/base.py +146 -5
  32. ab_analysis_kit-0.8.0/abkit/notify/cooldown.py +124 -0
  33. ab_analysis_kit-0.8.0/abkit/notify/discord.py +137 -0
  34. ab_analysis_kit-0.8.0/abkit/notify/dispatch.py +717 -0
  35. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/notify/email.py +46 -18
  36. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/notify/factory.py +20 -0
  37. ab_analysis_kit-0.8.0/abkit/notify/googlechat.py +147 -0
  38. ab_analysis_kit-0.8.0/abkit/notify/ntfy.py +167 -0
  39. ab_analysis_kit-0.8.0/abkit/notify/teams.py +184 -0
  40. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/notify/telegram.py +28 -15
  41. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/notify/webhook.py +20 -12
  42. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/pipeline/_types.py +27 -0
  43. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/pipeline/analyze.py +69 -15
  44. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/pipeline/driver.py +41 -7
  45. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/pipeline/readout.py +268 -37
  46. ab_analysis_kit-0.8.0/abkit/reporting/assets/report.js +151 -0
  47. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/reporting/builder.py +28 -12
  48. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/__init__.py +6 -0
  49. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/base.py +79 -0
  50. ab_analysis_kit-0.8.0/abkit/stats/correction.py +306 -0
  51. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/effects.py +16 -8
  52. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/exceptions.py +12 -0
  53. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/parametric/cuped_ttest.py +22 -16
  54. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/parametric/paired_cuped_ttest.py +10 -6
  55. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/parametric/paired_ttest.py +27 -18
  56. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/parametric/ratio_delta.py +25 -16
  57. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/parametric/ttest.py +19 -15
  58. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/parametric/ztest.py +128 -8
  59. ab_analysis_kit-0.8.0/abkit/stats/proportion_score.py +344 -0
  60. ab_analysis_kit-0.8.0/abkit/stats/relative_interval.py +336 -0
  61. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/sequential/__init__.py +12 -2
  62. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/sequential/apply.py +9 -2
  63. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/sequential/confidence_sequence.py +50 -3
  64. ab_analysis_kit-0.8.0/abkit/tuning/assets/explore.js +177 -0
  65. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/tuning/config_writer.py +16 -0
  66. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/tuning/overview.py +12 -7
  67. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/tuning/payload.py +22 -1
  68. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/tuning/recompute.py +86 -11
  69. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/tuning/session.py +19 -1
  70. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/validate/family.py +2 -2
  71. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/validate/runner.py +49 -2
  72. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/validate/scoring.py +74 -17
  73. ab_analysis_kit-0.6.4/abkit/reporting/assets/report.js +0 -151
  74. ab_analysis_kit-0.6.4/abkit/stats/correction.py +0 -161
  75. ab_analysis_kit-0.6.4/abkit/tuning/assets/explore.js +0 -177
  76. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/LICENSE +0 -0
  77. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/MANIFEST.in +0 -0
  78. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/ab_analysis_kit.egg-info/dependency_links.txt +0 -0
  79. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/ab_analysis_kit.egg-info/entry_points.txt +0 -0
  80. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/ab_analysis_kit.egg-info/requires.txt +0 -0
  81. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/ab_analysis_kit.egg-info/top_level.txt +0 -0
  82. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/__init__.py +0 -0
  83. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/CLAUDE.section.md +0 -0
  84. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/rules/explore.md +0 -0
  85. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/rules/metrics.md +0 -0
  86. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/rules/plan.md +0 -0
  87. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/skills/abk-explore/SKILL.md +0 -0
  88. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/skills/abk-feedback/SKILL.md +0 -0
  89. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/skills/abk-new-metric/SKILL.md +0 -0
  90. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/skills/abk-plan/SKILL.md +0 -0
  91. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/skills/abk-setup-project/SKILL.md +0 -0
  92. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/assets/claude/skills/abk-validate/SKILL.md +0 -0
  93. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/commands/__init__.py +0 -0
  94. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/commands/_context.py +0 -0
  95. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/commands/clean.py +0 -0
  96. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/commands/dashboard.py +0 -0
  97. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/commands/explore.py +0 -0
  98. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/commands/init.py +0 -0
  99. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/commands/init_claude.py +0 -0
  100. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/commands/test_report.py +0 -0
  101. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/commands/unlock.py +0 -0
  102. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/cli/commands/verify_incremental.py +0 -0
  103. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/compute/__init__.py +0 -0
  104. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/compute/incremental_backend.py +0 -0
  105. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/compute/recompute_backend.py +0 -0
  106. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/compute/reconcile.py +0 -0
  107. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/config/__init__.py +0 -0
  108. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/config/discovery.py +0 -0
  109. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/config/method_config.py +0 -0
  110. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/config/metric_config.py +0 -0
  111. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/core/__init__.py +0 -0
  112. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/core/exposure_counting.py +0 -0
  113. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/core/interval.py +0 -0
  114. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/core/models.py +0 -0
  115. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/__init__.py +0 -0
  116. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/_sql_manager.py +0 -0
  117. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/clickhouse_manager.py +0 -0
  118. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/internal_tables/__init__.py +0 -0
  119. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/internal_tables/_aa_runs.py +0 -0
  120. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/internal_tables/_base.py +0 -0
  121. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/internal_tables/_exposures.py +0 -0
  122. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/internal_tables/_schema.py +0 -0
  123. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/internal_tables/_tasks.py +0 -0
  124. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/internal_tables/_unit_state.py +0 -0
  125. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/manager.py +0 -0
  126. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/mysql_manager.py +0 -0
  127. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/database/postgres_manager.py +0 -0
  128. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/loaders/__init__.py +0 -0
  129. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/loaders/exposure_copy.py +0 -0
  130. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/loaders/exposure_loader.py +0 -0
  131. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/loaders/exposure_source.py +0 -0
  132. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/loaders/metric_loader.py +0 -0
  133. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/loaders/query_template.py +0 -0
  134. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/loaders/state_loader.py +0 -0
  135. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/loaders/templates/abkit_assignment.jinja +0 -0
  136. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/notify/branding.py +0 -0
  137. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/notify/mattermost.py +0 -0
  138. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/notify/mock.py +0 -0
  139. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/notify/slack.py +0 -0
  140. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/pipeline/__init__.py +0 -0
  141. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/pipeline/enrich.py +0 -0
  142. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/pipeline/state.py +0 -0
  143. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/planning/__init__.py +0 -0
  144. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/planning/sizing.py +0 -0
  145. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/reporting/__init__.py +0 -0
  146. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/reporting/calibration.py +0 -0
  147. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/reporting/html_report.py +0 -0
  148. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/accumulate.py +0 -0
  149. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/bootstrap/__init__.py +0 -0
  150. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/bootstrap/applier.py +0 -0
  151. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/bootstrap/bootstrap.py +0 -0
  152. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/bootstrap/ci.py +0 -0
  153. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/bootstrap/engine.py +0 -0
  154. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/bootstrap/paired_bootstrap.py +0 -0
  155. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/bootstrap/paired_post_normed_bootstrap.py +0 -0
  156. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/bootstrap/poisson_bootstrap.py +0 -0
  157. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/bootstrap/post_normed_bootstrap.py +0 -0
  158. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/factory.py +0 -0
  159. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/parametric/__init__.py +0 -0
  160. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/power.py +0 -0
  161. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/registry.py +0 -0
  162. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/result.py +0 -0
  163. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/rng.py +0 -0
  164. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/samples.py +0 -0
  165. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/sequential/mixture.py +0 -0
  166. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/stats/srm.py +0 -0
  167. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/tuning/__init__.py +0 -0
  168. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/tuning/assets/dashboard.js +0 -0
  169. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/tuning/config_files.py +0 -0
  170. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/tuning/dashboard_server.py +0 -0
  171. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/tuning/html.py +0 -0
  172. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/tuning/jobs.py +0 -0
  173. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/tuning/server.py +0 -0
  174. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/utils/__init__.py +0 -0
  175. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/utils/datetime_utils.py +0 -0
  176. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/utils/env_interpolation.py +0 -0
  177. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/utils/json_utils.py +0 -0
  178. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/utils/warn_scope.py +0 -0
  179. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/validate/__init__.py +0 -0
  180. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/validate/_types.py +0 -0
  181. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/validate/inject.py +0 -0
  182. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/validate/load.py +0 -0
  183. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/validate/panel.py +0 -0
  184. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/validate/persistence.py +0 -0
  185. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/validate/resample.py +0 -0
  186. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/validate/result.py +0 -0
  187. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/validate/run_id.py +0 -0
  188. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/abkit/validate/vector_resample.py +0 -0
  189. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/pyproject.toml +0 -0
  190. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/requirements.txt +0 -0
  191. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/setup.cfg +0 -0
  192. {ab_analysis_kit-0.6.4 → ab_analysis_kit-0.8.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ab-analysis-kit
3
- Version: 0.6.4
3
+ Version: 0.8.0
4
4
  Summary: A/B experiment analysis as declarative YAML + SQL
5
5
  Author: ab-analysis-kit authors
6
6
  License: MIT
@@ -76,8 +76,32 @@ stabilization chart), writes them to a clean warehouse table any BI can read, an
76
76
  gives you a local cockpit to tune the analysis and a harness to prove your method is
77
77
  actually calibrated.
78
78
 
79
- > **Status: `0.6.4` (Alpha) — the latest on PyPI**
80
- > (milestones **M1–M11** shipped — M11 added **`abk dashboard`**, the
79
+ > **Status: `0.8.0` (Alpha) — the latest on PyPI**
80
+ > (milestones **M1–M13** shipped — M13 is the **versioned statistics**
81
+ > milestone: five opt-in options that each buy power or fix an interval, with
82
+ > **no default moved** — a project that changes nothing reproduces `0.7.0` row
83
+ > for row. `correction: holm` is uniformly more powerful than one-step
84
+ > Bonferroni at the same family error rate; `contrasts: vs_control` declares the
85
+ > family you actually decide on, so the divisor is `g−1` instead of `C(g,2)`
86
+ > (≈ +10 points of power at four arms) and the treatment-vs-treatment pairs stop
87
+ > being computed; `guardrail_correction: none` takes a guardrail out of the
88
+ > screening budget entirely; `interval: score` gives proportions an interval
89
+ > that is the inversion of the z-test printed beside it (no more "significant"
90
+ > next to a CI covering zero, and a real answer on empty cells); and
91
+ > `interval: fieller` does the same for the relative lift of the five
92
+ > mean-based methods — the delta interval it replaces has nominal *two-sided*
93
+ > coverage with lopsided tails (1.7% / 3.3% against 2.5% each), and every abkit
94
+ > verdict is a one-sided claim. `abk validate` gained the one column that can
95
+ > tell those two apart: the share of false positives falling **below** zero.
96
+ > M12 wired **notifications**: `abk run
97
+ > --notify` and `abk validate --notify` push what a run just decided to nine
98
+ > channel types (Slack, Telegram, email, webhook, Mattermost, Discord, Teams,
99
+ > Google Chat, ntfy), as six routable signals — the readout verdict, a verdict
100
+ > flip, a failed sample-ratio gate, a pipeline error, a slipped schedule, and an
101
+ > A/A cell that broke its false-positive budget. Nothing is recomputed for a
102
+ > message, so it cannot disagree with the report; a repeat run over unchanged
103
+ > data is silent; and no channel failure can change an exit code. M11 added
104
+ > **`abk dashboard`**, the
81
105
  > project-level cockpit: one row per experiment with its headline verdict,
82
106
  > effect + CI, p/α and a sparkline of the cumulative series, plus buttons that
83
107
  > spawn real `abk` subprocesses (Run — for the whole experiment or one metric —
@@ -107,9 +131,11 @@ pip install ab-analysis-kit # Python 3.10+; add a DB extra for real dat
107
131
  pip install "ab-analysis-kit[clickhouse]" # or [postgres] / [mysql] / [all-db]
108
132
  ```
109
133
 
110
- (`pip install ab-analysis-kit` gets `0.6.4` — `abk dashboard` with its YAML editor,
111
- `abk ui`, CUPED-aware `abk plan` sizing, `abk plan --from-history` and the
112
- discoverable additive read path all included.)
134
+ (`pip install ab-analysis-kit` gets `0.8.0` — the opt-in M13 statistics (Holm,
135
+ the declared contrast set, the score and Fieller intervals, the A/A sign
136
+ column), opt-in notifications across nine channels, `abk dashboard` with its
137
+ YAML editor, `abk ui`, CUPED-aware `abk plan` sizing, `abk plan --from-history`
138
+ and the discoverable additive read path all included.)
113
139
 
114
140
  `abk --version` and `abk --help` work with no database driver; you can even lint a
115
141
  config (`abk run --steps validate`) with no database at all. See the
@@ -11,8 +11,32 @@ stabilization chart), writes them to a clean warehouse table any BI can read, an
11
11
  gives you a local cockpit to tune the analysis and a harness to prove your method is
12
12
  actually calibrated.
13
13
 
14
- > **Status: `0.6.4` (Alpha) — the latest on PyPI**
15
- > (milestones **M1–M11** shipped — M11 added **`abk dashboard`**, the
14
+ > **Status: `0.8.0` (Alpha) — the latest on PyPI**
15
+ > (milestones **M1–M13** shipped — M13 is the **versioned statistics**
16
+ > milestone: five opt-in options that each buy power or fix an interval, with
17
+ > **no default moved** — a project that changes nothing reproduces `0.7.0` row
18
+ > for row. `correction: holm` is uniformly more powerful than one-step
19
+ > Bonferroni at the same family error rate; `contrasts: vs_control` declares the
20
+ > family you actually decide on, so the divisor is `g−1` instead of `C(g,2)`
21
+ > (≈ +10 points of power at four arms) and the treatment-vs-treatment pairs stop
22
+ > being computed; `guardrail_correction: none` takes a guardrail out of the
23
+ > screening budget entirely; `interval: score` gives proportions an interval
24
+ > that is the inversion of the z-test printed beside it (no more "significant"
25
+ > next to a CI covering zero, and a real answer on empty cells); and
26
+ > `interval: fieller` does the same for the relative lift of the five
27
+ > mean-based methods — the delta interval it replaces has nominal *two-sided*
28
+ > coverage with lopsided tails (1.7% / 3.3% against 2.5% each), and every abkit
29
+ > verdict is a one-sided claim. `abk validate` gained the one column that can
30
+ > tell those two apart: the share of false positives falling **below** zero.
31
+ > M12 wired **notifications**: `abk run
32
+ > --notify` and `abk validate --notify` push what a run just decided to nine
33
+ > channel types (Slack, Telegram, email, webhook, Mattermost, Discord, Teams,
34
+ > Google Chat, ntfy), as six routable signals — the readout verdict, a verdict
35
+ > flip, a failed sample-ratio gate, a pipeline error, a slipped schedule, and an
36
+ > A/A cell that broke its false-positive budget. Nothing is recomputed for a
37
+ > message, so it cannot disagree with the report; a repeat run over unchanged
38
+ > data is silent; and no channel failure can change an exit code. M11 added
39
+ > **`abk dashboard`**, the
16
40
  > project-level cockpit: one row per experiment with its headline verdict,
17
41
  > effect + CI, p/α and a sparkline of the cumulative series, plus buttons that
18
42
  > spawn real `abk` subprocesses (Run — for the whole experiment or one metric —
@@ -42,9 +66,11 @@ pip install ab-analysis-kit # Python 3.10+; add a DB extra for real dat
42
66
  pip install "ab-analysis-kit[clickhouse]" # or [postgres] / [mysql] / [all-db]
43
67
  ```
44
68
 
45
- (`pip install ab-analysis-kit` gets `0.6.4` — `abk dashboard` with its YAML editor,
46
- `abk ui`, CUPED-aware `abk plan` sizing, `abk plan --from-history` and the
47
- discoverable additive read path all included.)
69
+ (`pip install ab-analysis-kit` gets `0.8.0` — the opt-in M13 statistics (Holm,
70
+ the declared contrast set, the score and Fieller intervals, the A/A sign
71
+ column), opt-in notifications across nine channels, `abk dashboard` with its
72
+ YAML editor, `abk ui`, CUPED-aware `abk plan` sizing, `abk plan --from-history`
73
+ and the discoverable additive read path all included.)
48
74
 
49
75
  `abk --version` and `abk --help` work with no database driver; you can even lint a
50
76
  config (`abk run --steps validate`) with no database at all. See the
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ab-analysis-kit
3
- Version: 0.6.4
3
+ Version: 0.8.0
4
4
  Summary: A/B experiment analysis as declarative YAML + SQL
5
5
  Author: ab-analysis-kit authors
6
6
  License: MIT
@@ -76,8 +76,32 @@ stabilization chart), writes them to a clean warehouse table any BI can read, an
76
76
  gives you a local cockpit to tune the analysis and a harness to prove your method is
77
77
  actually calibrated.
78
78
 
79
- > **Status: `0.6.4` (Alpha) — the latest on PyPI**
80
- > (milestones **M1–M11** shipped — M11 added **`abk dashboard`**, the
79
+ > **Status: `0.8.0` (Alpha) — the latest on PyPI**
80
+ > (milestones **M1–M13** shipped — M13 is the **versioned statistics**
81
+ > milestone: five opt-in options that each buy power or fix an interval, with
82
+ > **no default moved** — a project that changes nothing reproduces `0.7.0` row
83
+ > for row. `correction: holm` is uniformly more powerful than one-step
84
+ > Bonferroni at the same family error rate; `contrasts: vs_control` declares the
85
+ > family you actually decide on, so the divisor is `g−1` instead of `C(g,2)`
86
+ > (≈ +10 points of power at four arms) and the treatment-vs-treatment pairs stop
87
+ > being computed; `guardrail_correction: none` takes a guardrail out of the
88
+ > screening budget entirely; `interval: score` gives proportions an interval
89
+ > that is the inversion of the z-test printed beside it (no more "significant"
90
+ > next to a CI covering zero, and a real answer on empty cells); and
91
+ > `interval: fieller` does the same for the relative lift of the five
92
+ > mean-based methods — the delta interval it replaces has nominal *two-sided*
93
+ > coverage with lopsided tails (1.7% / 3.3% against 2.5% each), and every abkit
94
+ > verdict is a one-sided claim. `abk validate` gained the one column that can
95
+ > tell those two apart: the share of false positives falling **below** zero.
96
+ > M12 wired **notifications**: `abk run
97
+ > --notify` and `abk validate --notify` push what a run just decided to nine
98
+ > channel types (Slack, Telegram, email, webhook, Mattermost, Discord, Teams,
99
+ > Google Chat, ntfy), as six routable signals — the readout verdict, a verdict
100
+ > flip, a failed sample-ratio gate, a pipeline error, a slipped schedule, and an
101
+ > A/A cell that broke its false-positive budget. Nothing is recomputed for a
102
+ > message, so it cannot disagree with the report; a repeat run over unchanged
103
+ > data is silent; and no channel failure can change an exit code. M11 added
104
+ > **`abk dashboard`**, the
81
105
  > project-level cockpit: one row per experiment with its headline verdict,
82
106
  > effect + CI, p/α and a sparkline of the cumulative series, plus buttons that
83
107
  > spawn real `abk` subprocesses (Run — for the whole experiment or one metric —
@@ -107,9 +131,11 @@ pip install ab-analysis-kit # Python 3.10+; add a DB extra for real dat
107
131
  pip install "ab-analysis-kit[clickhouse]" # or [postgres] / [mysql] / [all-db]
108
132
  ```
109
133
 
110
- (`pip install ab-analysis-kit` gets `0.6.4` — `abk dashboard` with its YAML editor,
111
- `abk ui`, CUPED-aware `abk plan` sizing, `abk plan --from-history` and the
112
- discoverable additive read path all included.)
134
+ (`pip install ab-analysis-kit` gets `0.8.0` — the opt-in M13 statistics (Holm,
135
+ the declared contrast set, the score and Fieller intervals, the A/A sign
136
+ column), opt-in notifications across nine channels, `abk dashboard` with its
137
+ YAML editor, `abk ui`, CUPED-aware `abk plan` sizing, `abk plan --from-history`
138
+ and the discoverable additive read path all included.)
113
139
 
114
140
  `abk --version` and `abk --help` work with no database driver; you can even lint a
115
141
  config (`abk run --steps validate`) with no database at all. See the
@@ -55,6 +55,7 @@ abkit/config/method_config.py
55
55
  abkit/config/metric_config.py
56
56
  abkit/config/profile.py
57
57
  abkit/config/project_config.py
58
+ abkit/config/signals.py
58
59
  abkit/config/validator.py
59
60
  abkit/core/__init__.py
60
61
  abkit/core/exposure_counting.py
@@ -74,6 +75,7 @@ abkit/database/internal_tables/_base.py
74
75
  abkit/database/internal_tables/_experiments.py
75
76
  abkit/database/internal_tables/_exposures.py
76
77
  abkit/database/internal_tables/_maintenance.py
78
+ abkit/database/internal_tables/_notify_states.py
77
79
  abkit/database/internal_tables/_results.py
78
80
  abkit/database/internal_tables/_schema.py
79
81
  abkit/database/internal_tables/_tasks.py
@@ -90,11 +92,17 @@ abkit/loaders/templates/abkit_assignment.jinja
90
92
  abkit/notify/__init__.py
91
93
  abkit/notify/base.py
92
94
  abkit/notify/branding.py
95
+ abkit/notify/cooldown.py
96
+ abkit/notify/discord.py
97
+ abkit/notify/dispatch.py
93
98
  abkit/notify/email.py
94
99
  abkit/notify/factory.py
100
+ abkit/notify/googlechat.py
95
101
  abkit/notify/mattermost.py
96
102
  abkit/notify/mock.py
103
+ abkit/notify/ntfy.py
97
104
  abkit/notify/slack.py
105
+ abkit/notify/teams.py
98
106
  abkit/notify/telegram.py
99
107
  abkit/notify/webhook.py
100
108
  abkit/pipeline/__init__.py
@@ -119,7 +127,9 @@ abkit/stats/effects.py
119
127
  abkit/stats/exceptions.py
120
128
  abkit/stats/factory.py
121
129
  abkit/stats/power.py
130
+ abkit/stats/proportion_score.py
122
131
  abkit/stats/registry.py
132
+ abkit/stats/relative_interval.py
123
133
  abkit/stats/result.py
124
134
  abkit/stats/rng.py
125
135
  abkit/stats/samples.py
@@ -10,7 +10,7 @@ from __future__ import annotations
10
10
 
11
11
  from typing import Any
12
12
 
13
- __version__ = "0.6.4"
13
+ __version__ = "0.8.0"
14
14
 
15
15
  #: Symbols re-exported lazily from ``abkit.stats`` (PEP 562) so importing
16
16
  #: ``abkit`` for ``__version__`` (the CLI path) stays numpy-free and fast.
@@ -17,9 +17,13 @@ House conventions:
17
17
  from __future__ import annotations
18
18
 
19
19
  from collections.abc import Callable
20
+ from typing import TYPE_CHECKING
20
21
 
21
22
  import click
22
23
 
24
+ if TYPE_CHECKING: # numpy would load on `abk --help` otherwise (lazy-group rule)
25
+ from abkit.stats import TwoTierAlphas
26
+
23
27
  # Pipeline stage name → display title for the streamed run-log tree
24
28
  # (architecture.md §5 stage order).
25
29
  RUN_STAGE_TITLES = {
@@ -32,6 +36,62 @@ RUN_STAGE_TITLES = {
32
36
  }
33
37
 
34
38
 
39
+ def pairs_phrase(alphas: TwoTierAlphas) -> str:
40
+ """How many variant pairs the two-tier levels were divided by, and which.
41
+
42
+ ``abk run`` and ``abk validate`` print this divisor, and both printed the
43
+ literal ``C(g,2)`` — true only of the default family. (``abk plan`` states
44
+ its levels differently; its own note is ``plan._correction_note``.) Under
45
+ ``contrasts: vs_control`` (m13 STAT-1b) the count is ``g−1`` and the line
46
+ has to SAY so: a divisor an operator cannot reconcile with the alpha beside
47
+ it reads as a bug in whichever of the two they trust less. Reads the
48
+ resolved object rather than re-deriving from ``groups_count``, which no
49
+ longer determines the count.
50
+
51
+ Unlike ``_correction_note`` it stays loud at two arms and under
52
+ ``correction: none``: this line reports what the family IS, not why a level
53
+ moved, and "1 contrast against the control arm" is true in both cases.
54
+ """
55
+ g = alphas.groups_count
56
+ # integral for every integer g >= 2 in both families (g(g−1) is even)
57
+ shown = int(alphas.pairs_count)
58
+ if alphas.contrasts == "vs_control":
59
+ return f"contrasts: vs_control ⇒ {shown} contrast(s) against the control arm"
60
+ return f"C({g},2)={shown} pairs"
61
+
62
+
63
+ def alpha_lines(alphas: TwoTierAlphas, correction: str) -> list[str]:
64
+ """The `effective alphas` tree body — ONE source for `abk run` and `abk validate`.
65
+
66
+ Both printed a main/secondary pair with the Bonferroni divisor spelled out in
67
+ the secondary line. Under a READ-time scheme (`benjamini_hochberg`, `holm`)
68
+ every tier resolves to the raw alpha and nothing was divided by anything, so
69
+ that line asserted a division that did not happen — and neither command said
70
+ the decision is taken later, over the whole family, at a threshold no row
71
+ carries. `abk plan` gained exactly this disclosure (`plan._correction_note`);
72
+ these two are its siblings, so the rule lives in one place (m13 STAT-1).
73
+ """
74
+ from abkit.stats.correction import READ_TIME_CORRECTIONS
75
+
76
+ lines = [f"alpha={alphas.alpha} over {alphas.groups_count} variants ({pairs_phrase(alphas)})"]
77
+ if correction in READ_TIME_CORRECTIONS:
78
+ lines.append(
79
+ f"per-comparison alpha: {alphas.main:.6g} (raw — {correction} is applied "
80
+ "read-time over the whole family; the rows carry this level, the decision "
81
+ "does not)"
82
+ )
83
+ return lines
84
+ lines.append(f"main-metric alpha: {alphas.main:.6g}")
85
+ if alphas.secondary is not None and alphas.metrics_count:
86
+ lines.append(
87
+ f"secondary alpha: {alphas.secondary:.6g} "
88
+ f"(÷{alphas.pairs_count:g}×{alphas.metrics_count} non-main metrics)"
89
+ )
90
+ if alphas.guardrail is not None:
91
+ lines.append(f"guardrail alpha: {alphas.guardrail:.6g} (uncorrected)")
92
+ return lines
93
+
94
+
35
95
  def echo_block(
36
96
  title: str,
37
97
  children: list[str],
@@ -142,6 +142,30 @@ on with nothing declared additive, and how many looks fell back to recompute.
142
142
  what the other read path would have done with it. That slice is PART OF the
143
143
  `compute` total, never a sibling; do not add them. The evidence for turning
144
144
  `compute.incremental_reads` on; unrelated to `--profile` (the DB connection).
145
+ - `--notify` / `--no-notify` (default off, 0.7.0) — after the run, push each
146
+ **completed** experiment's readout to the `notification_channels` configured in
147
+ `profiles.yml`. Same decision the report bakes (`readout.evaluate()` over the
148
+ persisted rows — nothing is recomputed for a message), one message per verdict,
149
+ and **best-effort exactly like `--report`**: a channel that is down or
150
+ misconfigured is a yellow line, never a non-zero exit. A **failed** run sends an
151
+ error notice instead (the reason, no statistics block — nothing was measured);
152
+ `locked`/`skipped` runs and an experiment with no persisted rows of its own send
153
+ nothing. A **failed SRM gate adds no second message**: the readout already built
154
+ answers to the `srm` kind too, so an `on: [srm, error]` channel hears about a
155
+ broken split without receiving routine readouts. Route it per experiment with a
156
+ `notify:` block (`channels` / `mentions` / `on`); with no block, a notified run
157
+ goes to every configured channel. **Only a CHANGE is announced**: `_ab_notify_states`
158
+ remembers what each comparison last said, and an unchanged verdict is not
159
+ re-sent — so a scheduled run every hour is not a message every hour. A newly
160
+ broken SRM gate counts as a change even when the verdict word is identical
161
+ (a pre-horizon pair says INCONCLUSIVE either way), and a message no channel
162
+ accepted is not recorded, so the next run retries it. A completed run also
163
+ sends a **`stale`** notice when a metric's series was more than 3 cadence steps
164
+ behind the looks ALREADY DUE when the run planned it. Read it as "the schedule
165
+ slipped" — the same run computes the missing looks, so it is retrospective, and
166
+ an experiment past its horizon with everything computed is never behind. It
167
+ dedups on WHICH metrics were behind (never how far — that number grows every
168
+ run) and re-announces once they clear and fall behind again.
145
169
  - `--force` — take over a held lock (prefer `abk unlock`; risky with concurrent runs).
146
170
  - `--profile` — override `profiles.yml`'s `default_profile` (e.g. run against staging).
147
171
 
@@ -43,7 +43,12 @@ assignment: # READ-ONLY exposure source — abkit never ran
43
43
  # maturity_delay: 0 # batch_intervals_per_round_trip: 30 — intervals, not rows)
44
44
 
45
45
  alpha: 0.05 # experiment-level significance (unset -> project default)
46
- correction: bonferroni # none | bonferroni | benjamini_hochberg (unset -> project default)
46
+ correction: bonferroni # none | bonferroni | benjamini_hochberg | holm (unset -> project default)
47
+ # contrasts: vs_control # all_pairs (default) | vs_control — the family this experiment
48
+ # CLAIMS: vs_control compares only the g-1 treatments against the
49
+ # first declared variant, divides alpha by g-1 instead of C(g,2)
50
+ # (≈ +10 points of power at 4 arms), and does NOT compute the
51
+ # treatment-vs-treatment pairs at all
47
52
  sequential: {enabled: false, scheme: always_valid} # opt-in peeking-safe CIs (default OFF)
48
53
  # incremental_reads: true # override project.compute.incremental_reads here (unset -> project
49
54
  # default): eligible closed-form comparisons read `_ab_unit_state`
@@ -54,6 +59,14 @@ readout: # READ-TIME verdict knobs — NEVER enter metho
54
59
  stabilization_days: 7 # trailing elapsed-DAYS window for "persistent significance" (default 7)
55
60
  guardrail_policy: block # block (default): regressed guardrail caps WIN at INCONCLUSIVE; warn: keep WIN + caveat
56
61
 
62
+ # notify: # optional ROUTING for `abk run --notify` (0.7.0). Omitting it does
63
+ # channels: [team_slack] # NOT silence the experiment — a notified run with no block goes to
64
+ # mentions: [growth-team] # every configured channel. `on` = the signal kinds this experiment
65
+ # on: [readout] # sends (default all); it INTERSECTS a channel's own `on:`
66
+ # cooldown_seconds: 86400 # repeat an UNCHANGED stale/calibration_red this often
67
+ # # (default: announce each distinct condition once). Never
68
+ # # applies to a verdict — a flip always sends immediately.
69
+
57
70
  comparisons: # required — each binds one library metric to one method
58
71
  - metric: signup_cr # references metrics/signup_cr.yml by name
59
72
  is_main_metric: true # primary winner criterion (drives the verdict + two-tier Bonferroni)
@@ -67,6 +67,45 @@ variants):
67
67
  | `calculate_mde` | `false` | also solve the per-arm MDE at `power` |
68
68
  | `power` | `0.8` | target power for the MDE solve |
69
69
  | `covariate_lookback` | — | **CUPED only**: pre-period window, e.g. `14d`. IDENTITY-BEARING |
70
+ | `interval` | `pooled` | **`z-test` only**: `pooled` (legacy) \| `score`. IDENTITY-BEARING |
71
+ | `interval` | `delta` | **mean methods**: `delta` (legacy) \| `fieller` — the RELATIVE interval. IDENTITY-BEARING |
72
+
73
+ `interval: score` swaps the z-test's interval for the inversion of the test it
74
+ already runs (Miettinen–Nurminen). **P-values do not change** — the statistic at
75
+ the null is the same pooled z — with ONE exception, which is a fix: a table with no
76
+ conversions in either arm has no pooled statistic at all, and now reports `p = 1`
77
+ beside a real interval instead of a blank row (visible under `test_type: absolute`;
78
+ under `relative` a lift over a zero baseline stays undefined). Otherwise the interval
79
+ becomes valid at every effect size instead of only at zero, asymmetric (render it
80
+ `[low, high]`, never `±`), and inside a possible range. It matters most where the arms are IMBALANCED: at a
81
+ 900/100 holdout the pooled SE is 24% too small, i.e. the legacy interval is
82
+ anti-conservative, and worse as the correction shrinks alpha. Two constraints: it
83
+ is identity-bearing (switching starts a new series), and it CANNOT be combined
84
+ with `sequential: {enabled: true}` — config validation refuses the pair (as do the
85
+ explore knob and its Apply seam), because the always-valid transform needs a
86
+ symmetric interval. `abk validate` still scores such a metric: it simply has no
87
+ always-valid column, exactly like a bootstrap method. On a relative metric with
88
+ few CONVERSIONS (not few users — the precision law reads counts) the row carries a
89
+ "weakly identified" warning; the interval is still reported.
90
+
91
+ `interval: fieller` (m13 STAT-4) does the same thing for the mean methods'
92
+ RELATIVE branch: it inverts the test at every candidate lift instead of building
93
+ `θ̂ ± z·SE` at the observed one. Here the p-value DOES move — under `fieller` the
94
+ relative p-value is the ABSOLUTE comparison's, which is the point: "the lift is 0"
95
+ and "the difference is 0" are one hypothesis, and the legacy branch gives them two
96
+ answers that can disagree in a report. The reported lift is unchanged. What it
97
+ fixes is one-sided: delta's two-sided coverage is nominal while its TAILS are
98
+ 0.017/0.033 at a control-mean CV of 5% (0.008/0.039 at 10%), and every verdict
99
+ (WIN/LOSE) is a one-sided claim — so the real directional error rate is up to 1.6×
100
+ the configured one, at every true effect, which is why an A/A run cannot see it.
101
+ The honest cost: when the control mean is not clearly different from zero, NO
102
+ bounded lift interval exists at that level (a theorem, not a limit), and abkit
103
+ reports the effect and p-value with EMPTY bounds plus a warning rather than a
104
+ finite interval it cannot stand behind — the readout then treats the row as a gap,
105
+ so such a comparison is not called a WIN. Same three constraints as `score`:
106
+ identity-bearing, incompatible with `sequential: {enabled: true}`, and — because
107
+ it only governs the relative branch — writing it beside `test_type: absolute` is a
108
+ config ERROR, not a silent no-op (it would fork the series for nothing).
70
109
 
71
110
  CUPED needs **no extra SQL**: with `covariate_lookback` set, abkit re-renders the
72
111
  same metric query over the pre-period window (exposure filter dropped) and uses
@@ -93,7 +132,7 @@ variants):
93
132
  params**. It is the key of a result *series* in `_ab_results`.
94
133
 
95
134
  - **Editing an identity param ORPHANS the prior series.** Changing `test_type`,
96
- `n_samples`, `covariate_lookback`, `stratify`, etc. starts a *new*
135
+ `n_samples`, `covariate_lookback`, `interval`, `stratify`, etc. starts a *new*
97
136
  `method_config_id`; the old rows stay stranded. After retuning, recompute
98
137
  (`abk run --select <exp>`) and prune the orphans with
99
138
  `abk clean --select <exp> --execute`.
@@ -103,8 +142,35 @@ params**. It is the key of a result *series* in `_ab_results`.
103
142
  cutoff, `n_samples`). Bootstrap results are reproducible, not random per run.
104
143
  - **`alpha` is NOT in identity.** It is the post-correction, experiment-level
105
144
  significance level (two-tier Bonferroni: main vs secondary metrics land at
106
- different alphas; read-time BH across a family). Changing `alpha` re-decides
107
- `reject` without orphaning the series.
145
+ different alphas; the read-time schemes BH / Holm decide over the whole family
146
+ instead and leave the raw alpha on the row). Changing `alpha` re-decides
147
+ `reject` without orphaning the series — and under a read-time scheme `reject`
148
+ is the pre-family flag, not the verdict.
149
+ - **`guardrail_correction: none`** (project or experiment level; default
150
+ `inherit` = the old behaviour) takes guardrails OUT of the corrected family:
151
+ they are tested at the raw alpha, because correcting a metric whose job is to
152
+ catch harm makes you less likely to catch it. It also **loosens the secondary
153
+ alpha** for the screening metrics that remain, since guardrails stop counting
154
+ in the divisor. Inert unless `correction: bonferroni`. It moves persisted
155
+ numbers, so it writes new-alpha rows into an existing series — run
156
+ `abk run --full-refresh` if you want the whole series at one alpha, and expect
157
+ guardrail `_ab_aa_runs` rows to read `alpha_mismatch` until `abk validate`
158
+ re-runs them.
159
+ - **`contrasts: vs_control`** (experiment level; default `all_pairs` = the old
160
+ behaviour) declares that the family is the `g-1` contrasts against the FIRST
161
+ declared variant, not all `C(g,2)` pairs. The divisor drops accordingly, so
162
+ every tier's alpha is multiplied by `g/2` (≈ +10 points of power at four
163
+ arms). It is one declaration with two halves: the treatment-vs-treatment pairs
164
+ are also **not computed** — no result rows, no verdicts, no BH family members
165
+ — because keeping them at the loosened level is exactly what would break the
166
+ FWER claim the loosening was bought with. Inert at two arms. Like
167
+ `guardrail_correction`, it moves persisted alphas, so `abk run --full-refresh`
168
+ re-homogenises a series and A/A rows read `alpha_mismatch` until re-run;
169
+ rows for pairs the narrowed family dropped are ignored loudly by every read
170
+ surface (`abk run --full-refresh --from <start> --to <horizon>` removes them —
171
+ `abk clean` prunes by `method_config_id` and never touched them). Widening the
172
+ family back (or adding an arm) is the direction abkit heals for you: a look
173
+ missing a declared pair is re-planned automatically.
108
174
  - Execution-only params (`max_block_bytes`) never enter the hash.
109
175
 
110
176
  ## Sequential eligibility
@@ -115,8 +181,13 @@ the experiment) applies only to **parametric methods** (`t-test`, `z-test`,
115
181
  are NOT sequential-eligible** — enabling sequential leaves their CIs
116
182
  fixed-horizon, and the readout still withholds WIN/LOSE AND FLAT before the
117
183
  horizon. If
118
- you need peeking-valid early reads, choose a parametric method. See
119
- `experiments.md` for the toggle and `overview.md` for why peeking matters.
184
+ you need peeking-valid early reads, choose a parametric method.
185
+
186
+ The two inverted-test intervals are the parametric exceptions, and they fail
187
+ LOUDLY rather than silently: `z-test` with `interval: score` and the mean methods
188
+ with `interval: fieller` are both asymmetric, so either pair is a config ERROR
189
+ naming both settings. See `experiments.md` for the toggle and
190
+ `overview.md` for why peeking matters.
120
191
 
121
192
  ## Quarantined branches (raise, never silently substitute)
122
193
 
@@ -73,6 +73,7 @@ profile's `internal_database` / `internal_schema`, separate from the
73
73
  | `_ab_experiments` | Informational experiment catalog (descriptions, variants, split, alpha, cadence, tags) for BI joins; the pipeline never reads it back for decisions. |
74
74
  | `_ab_aa_runs` | The `abk validate` A/A audit trail (per-cell FPR/power at the effective alpha); lights the explore calibration chip. Never pruned by `abk clean`. |
75
75
  | `_ab_tasks` | Pipeline run/lock bookkeeping — the atomic per-experiment lock (`abk unlock` clears a stale one). |
76
+ | `_ab_notify_states` | What `--notify` last ANNOUNCED per comparison (verdict + SRM flag + when), so an unchanged verdict is not re-sent on every scheduled run — plus one sentinel row per recurring signal (`metric='__stale__'`/`'__calibration_red__'`, empty arm pair) holding that condition's signature. Written only after a channel accepted the message; purged with the experiment by `abk clean --orphaned-experiments`, which resets the dedup. Not a BI table. |
76
77
  | `_ab_unit_state` | Per-(unit, day) cumulative moments, written by the `state` pipeline stage for eligible closed-form metrics. Read on the compute path only with `compute.incremental_reads: true` — opt-in, and what `abk init` scaffolds, though the library default (the key absent) is off; any gap falls back to full recompute. Not a BI table. |
77
78
 
78
79
  ## Glossary
@@ -81,9 +82,13 @@ profile's `internal_database` / `internal_schema`, separate from the
81
82
  `test_type: absolute` or `relative` (percent lift) is a per-method param.
82
83
  - **CI** — confidence interval on the effect; a WIN/LOSE needs it to exclude zero
83
84
  in one direction **and** be stable (excluding-then-recrossing is not a winner).
84
- - **verdict** — the read-time call: **WIN/LOSE** (CI excludes zero, stabilized),
85
- **FLAT** (CI includes zero, adequately powered — needs `min_effect`),
86
- **INCONCLUSIVE** (otherwise / underpowered). Also **blocked** (SRM) and
85
+ - **verdict** — the read-time call: **WIN/LOSE** (significant, stabilized),
86
+ **FLAT** (not significant, adequately powered — needs `min_effect`),
87
+ **INCONCLUSIVE** (otherwise / underpowered). "Significant" is "the CI excludes
88
+ zero" under `correction: none`/`bonferroni`, and the family rule under the
89
+ read-time schemes (`benjamini_hochberg`, `holm`) — where the verdict may
90
+ legitimately differ from the interval shown beside it, and says so in a
91
+ caveat. Also **blocked** (SRM) and
87
92
  **insufficient data**. The main metric drives it; guardrails check regression.
88
93
  - **SRM (sample-ratio-mismatch)** — a χ² gate (anytime-valid multinomial below 1d
89
94
  cadence): observed arm split ≠ expected split ⇒ randomization/cohort is broken.
@@ -104,7 +109,10 @@ profile's `internal_database` / `internal_schema`, separate from the
104
109
  (`alpha` and `seed` excluded). Editing an identity param starts a NEW series
105
110
  and orphans the old rows (recompute, then `abk clean`).
106
111
  - **two-tier alpha** — main vs secondary metrics get different post-correction
107
- (Bonferroni) alphas; read-time Benjamini-Hochberg spans a family.
112
+ (Bonferroni) alphas. The **read-time** schemes (`benjamini_hochberg` = FDR,
113
+ `holm` = FWER) instead leave the raw alpha on every row and decide over the
114
+ whole family at read time — so `reject` is then the pre-family flag, not the
115
+ verdict.
108
116
  - **always-valid / sequential** — opt-in (`sequential: {enabled: true}`)
109
117
  peeking-safe CIs. **Default OFF**: without it the readout WITHHOLDS WIN/LOSE
110
118
  AND FLAT before the horizon (FLAT is equally a stop decision). `scheme: alpha_spending` (group-sequential) is NOT
@@ -26,7 +26,7 @@ paths: # optional — directory names
26
26
  statistics: # project-wide defaults; an experiment overrides any
27
27
  alpha: 0.05 # default significance level (0,1) (default 0.05)
28
28
  test_type: relative # relative | absolute (default relative)
29
- correction: bonferroni # none | bonferroni | benjamini_hochberg (default bonferroni)
29
+ correction: bonferroni # none | bonferroni | benjamini_hochberg | holm (default bonferroni)
30
30
  power: 0.8 # target power for MDE / plan (0,1) (default 0.8)
31
31
  aa_fpr_budget: null # optional A/A false-positive budget the validate matrix colours against
32
32
 
@@ -73,7 +73,7 @@ file is just those two lines. `abk init` writes those plus an explicit
73
73
  |---|---|
74
74
  | `alpha` | Experiment-level significance, **pre-correction**. The per-comparison post-correction alpha is derived (see two-tier below), never set here. |
75
75
  | `test_type` | `relative` (percent lift) or `absolute` (raw difference) — the units the persisted `effect` and any `min_effect` live in. |
76
- | `correction` | Multiple-testing correction across a comparison family. `bonferroni` = the config-time two-tier scheme; `benjamini_hochberg` = read-time FDR across the experiment's metrics; `none` disables. |
76
+ | `correction` | Multiple-testing correction across a comparison family. `bonferroni` = the compute-time two-tier scheme; `benjamini_hochberg` (FDR) and `holm` (FWER) are **read-time** family rules — the rows keep the raw alpha; `none` disables. |
77
77
  | `power` | Target power for MDE reporting and `abk plan` sizing. |
78
78
  | `aa_fpr_budget` | Tuning-only band for the `abk validate` matrix: a fraction in `(0,1]`; a cell whose measured FPR exceeds it colours red. A `metric.aa_fpr_budget` overrides it. Never touches the pipeline math. |
79
79
 
@@ -176,13 +176,14 @@ Keep the internal location **separate** from your analytics location so the
176
176
  `_ab_*` tables don't clutter shared schemas. Override per run with
177
177
  `abk run --profile prod`.
178
178
 
179
- ### `notification_channels` (optional — for `abk test-report`)
179
+ ### `notification_channels` (optional — where readouts are sent)
180
180
 
181
181
  A top-level `notification_channels:` block in `profiles.yml`, keyed by channel
182
182
  name, declares where readouts can be sent. Each entry has a `type`
183
- (`slack` \| `mattermost` \| `webhook` \| `telegram` \| `email`) plus that
183
+ (`slack` \| `mattermost` \| `webhook` \| `telegram` \| `email` \| `discord` \|
184
+ `teams` \| `googlechat` \| `ntfy` — nine) plus that
184
185
  transport's fields (put secrets behind `env_var`/`${VAR}` — an unresolved
185
- channel secret **is** rejected):
186
+ channel secret **is** rejected), and an optional `on:` filter:
186
187
 
187
188
  ```yaml
188
189
  notification_channels:
@@ -193,17 +194,57 @@ notification_channels:
193
194
  type: telegram
194
195
  bot_token: "${TELEGRAM_BOT_TOKEN}"
195
196
  chat_id: "-1001234567890"
197
+ on: [srm, error] # urgent only — no routine readouts (0.7.0)
196
198
  ```
197
199
 
198
- `abk test-report <exp> [--channel <name>]... [--profile <p>]` sends a **mock**
199
- WIN readout through them (no lock, no warehouse read, no stats) and prints a
200
- per-channel ✓/✗, exiting non-zero if any channel fails — a connectivity/format
201
- smoke test before wiring channels into an orchestrator.
200
+ Two commands use them:
201
+
202
+ - `abk test-report <exp> [--channel <name>]... [--profile <p>]` sends a **mock**
203
+ WIN readout (no lock, no warehouse read, no stats) and prints a per-channel
204
+ ✓/✗, exiting non-zero if any channel fails — the connectivity/format smoke
205
+ test to run before wiring channels into an orchestrator.
206
+ - `abk validate --notify` (0.7.0) sends a `calibration_red` notice when a cell's
207
+ measured FPR exceeds its budget — best-effort, exactly like its `--report`.
208
+ - `abk run --notify` (0.7.0) sends the **real** readout of each completed
209
+ experiment — the same `readout.evaluate()` decision `--report` bakes. Opt-in
210
+ and best-effort: a failing channel never fails the run. Narrow it per
211
+ experiment with a `notify:` block; with no block, every configured channel
212
+ receives it.
213
+
214
+ `on:` accepts `readout`, `verdict_change`, `srm`, `calibration_red`, `stale`,
215
+ `error` — **all six fire**. A channel's `on:` and an experiment's `notify.on`
216
+ INTERSECT: the experiment narrows what it sends, the channel what it accepts.
217
+
218
+ `srm` and `verdict_change` are NARROW views of the same readout payload, never
219
+ extra messages: `on: [srm]` gets only readouts whose split broke, and
220
+ `on: [verdict_change]` only those whose verdict WORD moved — not the first
221
+ message about a comparison, and not one re-sent because the SRM gate moved while
222
+ the word held.
223
+
224
+ Two of them describe the MACHINERY rather than a result, and both are recurring —
225
+ their condition survives the run that reports it, so they are deduped on WHICH
226
+ things are wrong (never on the drifting numbers) and repeat only when that set
227
+ changes, or after `notify.cooldown_seconds` if the experiment sets one:
228
+
229
+ - **`calibration_red`** comes from `abk validate --notify`, not from `abk run`:
230
+ the cells whose measured A/A false-positive rate exceeded their budget — the
231
+ matrix's "do not use" verdict, delivered.
232
+ - **`stale`** comes from `abk run --notify`: a metric series more than 3 cadence
233
+ steps behind the looks already due at PLAN time. Retrospective by construction
234
+ (that same run computes them), so it reports a slipped SCHEDULE, not a stale
235
+ warehouse.
236
+
237
+ `srm` is not a second message — an SRM-failed readout answers to BOTH kinds, so
238
+ an `on: [srm, error]` channel is the on-call one: it hears about a broken split
239
+ and a failed run, and stays quiet through routine readouts.
202
240
 
203
241
  ## The two-tier alpha (why the effective alpha isn't the alpha you set)
204
242
 
205
243
  `bonferroni` correction applies the legacy **two-tier** scheme keyed off each
206
- comparison's `is_main_metric` flag. With `C = C(groups, 2)` pairwise comparisons:
244
+ comparison's `is_main_metric` flag. With `C` = the number of comparisons the
245
+ experiment DECLARES — `C(groups, 2)` by default, or `groups - 1` when the
246
+ experiment sets `contrasts: vs_control` (see
247
+ `.claude/rules/ab-analysis-kit/experiments.md`):
207
248
 
208
249
  - **Main metric** (`is_main_metric: true`): effective per-comparison alpha
209
250
  `= alpha / C` — the full budget, only the pairwise divisor.
@@ -214,13 +255,20 @@ comparison's `is_main_metric` flag. With `C = C(groups, 2)` pairwise comparisons
214
255
 
215
256
  So the main verdict is protected at the looser (more powerful) alpha, and the
216
257
  secondary metrics split a stricter budget. `abk run`, `abk validate`, and the HTML
217
- report **echo** the effective per-comparison alpha and the `C × metrics` divisor —
258
+ report **echo** the effective per-comparison alpha, the `C × metrics` divisor and
259
+ which family it counted —
218
260
  inspect them there; do not compute alpha by hand. `abk validate` persists at and
219
261
  `abk plan` sizes at this **same effective** alpha (the same resolver), so an A/A
220
262
  cell calibrated for a metric matches what the pipeline actually applied.
221
263
 
222
- `benjamini_hochberg` instead controls FDR **read-time** across the family;
223
- `none` disables correction. See `.claude/rules/ab-analysis-kit/experiments.md`
264
+ `benjamini_hochberg` (FDR) and `holm` (FWER ≤ α under arbitrary dependence)
265
+ instead decide **read-time** over the whole family — one cutoff's metrics ×
266
+ declared arm pairs — so the rows keep the RAW alpha and the decision is
267
+ recomputed at every read. Two consequences: a verdict may legitimately differ
268
+ from the interval stored beside it (one-directional — a band excluding zero
269
+ under a verdict that declines to call it; the pair carries a caveat when it
270
+ happens), and `_ab_results.reject` is the **pre-family** flag, not the composed
271
+ decision, which is never persisted. `none` disables correction. See `.claude/rules/ab-analysis-kit/experiments.md`
224
272
  for `is_main_metric` / `is_guardrail` on the comparison, and `validate.md` for how
225
273
  the calibration chip reads the effective alpha.
226
274