ab-analysis-kit 0.7.0__tar.gz → 0.9.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 (194) hide show
  1. {ab_analysis_kit-0.7.0/ab_analysis_kit.egg-info → ab_analysis_kit-0.9.0}/PKG-INFO +37 -8
  2. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/README.md +35 -6
  3. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0/ab_analysis_kit.egg-info}/PKG-INFO +37 -8
  4. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/ab_analysis_kit.egg-info/SOURCES.txt +2 -0
  5. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/ab_analysis_kit.egg-info/requires.txt +1 -1
  6. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/__init__.py +1 -1
  7. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/_output.py +60 -0
  8. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/rules/cli.md +21 -4
  9. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/rules/experiments.md +32 -5
  10. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/rules/explore.md +4 -2
  11. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/rules/methods.md +81 -5
  12. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/rules/overview.md +27 -7
  13. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/rules/plan.md +8 -2
  14. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/rules/project.md +16 -6
  15. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/rules/validate.md +17 -6
  16. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/skills/abk-new-experiment/SKILL.md +14 -5
  17. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/skills/abk-plan/SKILL.md +4 -2
  18. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/skills/abk-validate/SKILL.md +2 -1
  19. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/commands/init.py +1 -1
  20. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/commands/plan.py +259 -17
  21. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/commands/run.py +49 -15
  22. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/commands/test_report.py +2 -3
  23. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/commands/validate.py +6 -8
  24. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/config/experiment_config.py +173 -2
  25. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/config/project_config.py +37 -3
  26. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/config/validator.py +56 -2
  27. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/internal_tables/_experiments.py +16 -0
  28. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/internal_tables/_notify_states.py +7 -0
  29. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/internal_tables/_results.py +47 -0
  30. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/tables.py +42 -6
  31. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/base.py +73 -0
  32. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/cooldown.py +67 -7
  33. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/dispatch.py +68 -10
  34. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/email.py +4 -0
  35. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/googlechat.py +2 -0
  36. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/teams.py +6 -1
  37. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/telegram.py +4 -0
  38. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/webhook.py +4 -0
  39. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/pipeline/__init__.py +2 -0
  40. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/pipeline/analyze.py +69 -15
  41. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/pipeline/driver.py +27 -3
  42. ab_analysis_kit-0.9.0/abkit/pipeline/readout.py +1435 -0
  43. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/planning/sizing.py +20 -0
  44. ab_analysis_kit-0.9.0/abkit/reporting/assets/report.js +197 -0
  45. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/reporting/builder.py +122 -13
  46. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/__init__.py +6 -0
  47. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/base.py +79 -0
  48. ab_analysis_kit-0.9.0/abkit/stats/correction.py +306 -0
  49. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/effects.py +16 -8
  50. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/exceptions.py +12 -0
  51. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/parametric/cuped_ttest.py +22 -16
  52. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/parametric/paired_cuped_ttest.py +10 -6
  53. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/parametric/paired_ttest.py +27 -18
  54. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/parametric/ratio_delta.py +25 -16
  55. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/parametric/ttest.py +19 -15
  56. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/parametric/ztest.py +128 -8
  57. ab_analysis_kit-0.9.0/abkit/stats/proportion_score.py +344 -0
  58. ab_analysis_kit-0.9.0/abkit/stats/relative_interval.py +336 -0
  59. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/sequential/__init__.py +12 -2
  60. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/sequential/apply.py +9 -2
  61. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/sequential/confidence_sequence.py +50 -3
  62. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/srm.py +64 -1
  63. ab_analysis_kit-0.9.0/abkit/tuning/assets/dashboard.js +204 -0
  64. ab_analysis_kit-0.9.0/abkit/tuning/assets/explore.js +180 -0
  65. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/tuning/config_writer.py +16 -0
  66. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/tuning/overview.py +112 -18
  67. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/tuning/payload.py +28 -2
  68. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/tuning/recompute.py +86 -11
  69. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/tuning/session.py +23 -2
  70. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/validate/family.py +2 -2
  71. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/validate/load.py +38 -5
  72. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/validate/runner.py +133 -17
  73. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/validate/scoring.py +74 -17
  74. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/pyproject.toml +1 -1
  75. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/requirements.txt +1 -1
  76. ab_analysis_kit-0.7.0/abkit/pipeline/readout.py +0 -805
  77. ab_analysis_kit-0.7.0/abkit/reporting/assets/report.js +0 -151
  78. ab_analysis_kit-0.7.0/abkit/stats/correction.py +0 -161
  79. ab_analysis_kit-0.7.0/abkit/tuning/assets/dashboard.js +0 -197
  80. ab_analysis_kit-0.7.0/abkit/tuning/assets/explore.js +0 -177
  81. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/LICENSE +0 -0
  82. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/MANIFEST.in +0 -0
  83. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/ab_analysis_kit.egg-info/dependency_links.txt +0 -0
  84. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/ab_analysis_kit.egg-info/entry_points.txt +0 -0
  85. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/ab_analysis_kit.egg-info/top_level.txt +0 -0
  86. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/__init__.py +0 -0
  87. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/CLAUDE.section.md +0 -0
  88. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/rules/metrics.md +0 -0
  89. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/skills/abk-explore/SKILL.md +0 -0
  90. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/skills/abk-feedback/SKILL.md +0 -0
  91. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/skills/abk-new-metric/SKILL.md +0 -0
  92. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/assets/claude/skills/abk-setup-project/SKILL.md +0 -0
  93. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/commands/__init__.py +0 -0
  94. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/commands/_context.py +0 -0
  95. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/commands/clean.py +0 -0
  96. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/commands/dashboard.py +0 -0
  97. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/commands/explore.py +0 -0
  98. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/commands/init_claude.py +0 -0
  99. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/commands/unlock.py +0 -0
  100. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/commands/verify_incremental.py +0 -0
  101. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/cli/main.py +0 -0
  102. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/compute/__init__.py +0 -0
  103. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/compute/incremental_backend.py +0 -0
  104. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/compute/recompute_backend.py +0 -0
  105. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/compute/reconcile.py +0 -0
  106. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/config/__init__.py +0 -0
  107. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/config/discovery.py +0 -0
  108. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/config/method_config.py +0 -0
  109. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/config/metric_config.py +0 -0
  110. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/config/profile.py +0 -0
  111. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/config/signals.py +0 -0
  112. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/core/__init__.py +0 -0
  113. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/core/exposure_counting.py +0 -0
  114. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/core/interval.py +0 -0
  115. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/core/models.py +0 -0
  116. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/core/period_planner.py +0 -0
  117. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/__init__.py +0 -0
  118. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/_sql_manager.py +0 -0
  119. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/clickhouse_manager.py +0 -0
  120. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/internal_tables/__init__.py +0 -0
  121. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/internal_tables/_aa_runs.py +0 -0
  122. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/internal_tables/_base.py +0 -0
  123. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/internal_tables/_exposures.py +0 -0
  124. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/internal_tables/_maintenance.py +0 -0
  125. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/internal_tables/_schema.py +0 -0
  126. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/internal_tables/_tasks.py +0 -0
  127. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/internal_tables/_unit_state.py +0 -0
  128. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/internal_tables/manager.py +0 -0
  129. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/manager.py +0 -0
  130. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/mysql_manager.py +0 -0
  131. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/database/postgres_manager.py +0 -0
  132. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/loaders/__init__.py +0 -0
  133. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/loaders/exposure_copy.py +0 -0
  134. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/loaders/exposure_loader.py +0 -0
  135. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/loaders/exposure_source.py +0 -0
  136. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/loaders/metric_loader.py +0 -0
  137. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/loaders/query_template.py +0 -0
  138. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/loaders/state_loader.py +0 -0
  139. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/loaders/templates/abkit_assignment.jinja +0 -0
  140. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/__init__.py +0 -0
  141. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/branding.py +0 -0
  142. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/discord.py +0 -0
  143. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/factory.py +0 -0
  144. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/mattermost.py +0 -0
  145. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/mock.py +0 -0
  146. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/ntfy.py +0 -0
  147. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/notify/slack.py +0 -0
  148. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/pipeline/_types.py +0 -0
  149. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/pipeline/enrich.py +0 -0
  150. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/pipeline/state.py +0 -0
  151. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/planning/__init__.py +0 -0
  152. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/reporting/__init__.py +0 -0
  153. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/reporting/calibration.py +0 -0
  154. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/reporting/html_report.py +0 -0
  155. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/accumulate.py +0 -0
  156. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/bootstrap/__init__.py +0 -0
  157. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/bootstrap/applier.py +0 -0
  158. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/bootstrap/bootstrap.py +0 -0
  159. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/bootstrap/ci.py +0 -0
  160. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/bootstrap/engine.py +0 -0
  161. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/bootstrap/paired_bootstrap.py +0 -0
  162. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/bootstrap/paired_post_normed_bootstrap.py +0 -0
  163. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/bootstrap/poisson_bootstrap.py +0 -0
  164. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/bootstrap/post_normed_bootstrap.py +0 -0
  165. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/factory.py +0 -0
  166. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/parametric/__init__.py +0 -0
  167. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/power.py +0 -0
  168. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/registry.py +0 -0
  169. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/result.py +0 -0
  170. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/rng.py +0 -0
  171. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/samples.py +0 -0
  172. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/stats/sequential/mixture.py +0 -0
  173. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/tuning/__init__.py +0 -0
  174. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/tuning/config_files.py +0 -0
  175. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/tuning/dashboard_server.py +0 -0
  176. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/tuning/html.py +0 -0
  177. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/tuning/jobs.py +0 -0
  178. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/tuning/server.py +0 -0
  179. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/utils/__init__.py +0 -0
  180. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/utils/datetime_utils.py +0 -0
  181. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/utils/env_interpolation.py +0 -0
  182. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/utils/json_utils.py +0 -0
  183. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/utils/warn_scope.py +0 -0
  184. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/validate/__init__.py +0 -0
  185. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/validate/_types.py +0 -0
  186. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/validate/inject.py +0 -0
  187. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/validate/panel.py +0 -0
  188. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/validate/persistence.py +0 -0
  189. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/validate/resample.py +0 -0
  190. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/validate/result.py +0 -0
  191. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/validate/run_id.py +0 -0
  192. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/abkit/validate/vector_resample.py +0 -0
  193. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/setup.cfg +0 -0
  194. {ab_analysis_kit-0.7.0 → ab_analysis_kit-0.9.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ab-analysis-kit
3
- Version: 0.7.0
3
+ Version: 0.9.0
4
4
  Summary: A/B experiment analysis as declarative YAML + SQL
5
5
  Author: ab-analysis-kit authors
6
6
  License: MIT
@@ -25,7 +25,7 @@ Description-Content-Type: text/markdown
25
25
  License-File: LICENSE
26
26
  Requires-Dist: numpy>=1.24.0
27
27
  Requires-Dist: scipy>=1.10.0
28
- Requires-Dist: statsmodels>=0.14.0
28
+ Requires-Dist: statsmodels<0.15,>=0.14.0
29
29
  Requires-Dist: pydantic>=2.0.0
30
30
  Requires-Dist: pyyaml>=6.0
31
31
  Requires-Dist: click>=8.0
@@ -76,8 +76,35 @@ 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.7.0` (Alpha) — the latest on PyPI**
80
- > (milestones **M1–M12** shipped — M12 wired **notifications**: `abk run
79
+ > **Status: `0.9.0` (Alpha) — the latest on PyPI**
80
+ > (milestones **M1–M14** shipped — M14 is the **multi-arm decision layer**: an
81
+ > experiment declares its baseline (`assignment.control`), every declared pair
82
+ > gets a verdict labelled as a ship decision (vs control) or as evidence
83
+ > (treatment vs treatment), and each main metric gets a rollup naming the leader
84
+ > — the arm that beat the control and every other treatment — or saying why
85
+ > none can be named. The report, the dashboard, `abk explore`, notifications and
86
+ > the `abk run` line all read that one layer; `abk validate` calibrates the
87
+ > contrast it actually runs, `abk plan` sizes every declared contrast, and a
88
+ > failed SRM gate names the culprit arm. No `_ab_results` number, alpha or
89
+ > verdict `0.8.0` issued moved (measured against a real `v0.8.0` checkout), and
90
+ > a two-arm experiment renders exactly what it rendered before.
91
+ > M13 is the **versioned statistics**
92
+ > milestone: five opt-in options that each buy power or fix an interval, with
93
+ > **no default moved** — a project that changes nothing reproduces `0.7.0` row
94
+ > for row. `correction: holm` is uniformly more powerful than one-step
95
+ > Bonferroni at the same family error rate; `contrasts: vs_control` declares the
96
+ > family you actually decide on, so the divisor is `g−1` instead of `C(g,2)`
97
+ > (≈ +10 points of power at four arms) and the treatment-vs-treatment pairs stop
98
+ > being computed; `guardrail_correction: none` takes a guardrail out of the
99
+ > screening budget entirely; `interval: score` gives proportions an interval
100
+ > that is the inversion of the z-test printed beside it (no more "significant"
101
+ > next to a CI covering zero, and a real answer on empty cells); and
102
+ > `interval: fieller` does the same for the relative lift of the five
103
+ > mean-based methods — the delta interval it replaces has nominal *two-sided*
104
+ > coverage with lopsided tails (1.7% / 3.3% against 2.5% each), and every abkit
105
+ > verdict is a one-sided claim. `abk validate` gained the one column that can
106
+ > tell those two apart: the share of false positives falling **below** zero.
107
+ > M12 wired **notifications**: `abk run
81
108
  > --notify` and `abk validate --notify` push what a run just decided to nine
82
109
  > channel types (Slack, Telegram, email, webhook, Mattermost, Discord, Teams,
83
110
  > Google Chat, ntfy), as six routable signals — the readout verdict, a verdict
@@ -115,10 +142,12 @@ pip install ab-analysis-kit # Python 3.10+; add a DB extra for real dat
115
142
  pip install "ab-analysis-kit[clickhouse]" # or [postgres] / [mysql] / [all-db]
116
143
  ```
117
144
 
118
- (`pip install ab-analysis-kit` gets `0.7.0` — opt-in notifications across nine
119
- channels, `abk dashboard` with its YAML editor, `abk ui`, CUPED-aware `abk plan`
120
- sizing, `abk plan --from-history` and the discoverable additive read path all
121
- included.)
145
+ (`pip install ab-analysis-kit` gets `0.9.0` — the multi-arm decision layer
146
+ (declared control, treatment-pair verdicts, per-metric leader), the opt-in M13 statistics (Holm,
147
+ the declared contrast set, the score and Fieller intervals, the A/A sign
148
+ column), opt-in notifications across nine channels, `abk dashboard` with its
149
+ YAML editor, `abk ui`, CUPED-aware `abk plan` sizing, `abk plan --from-history`
150
+ and the discoverable additive read path all included.)
122
151
 
123
152
  `abk --version` and `abk --help` work with no database driver; you can even lint a
124
153
  config (`abk run --steps validate`) with no database at all. See the
@@ -11,8 +11,35 @@ 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.7.0` (Alpha) — the latest on PyPI**
15
- > (milestones **M1–M12** shipped — M12 wired **notifications**: `abk run
14
+ > **Status: `0.9.0` (Alpha) — the latest on PyPI**
15
+ > (milestones **M1–M14** shipped — M14 is the **multi-arm decision layer**: an
16
+ > experiment declares its baseline (`assignment.control`), every declared pair
17
+ > gets a verdict labelled as a ship decision (vs control) or as evidence
18
+ > (treatment vs treatment), and each main metric gets a rollup naming the leader
19
+ > — the arm that beat the control and every other treatment — or saying why
20
+ > none can be named. The report, the dashboard, `abk explore`, notifications and
21
+ > the `abk run` line all read that one layer; `abk validate` calibrates the
22
+ > contrast it actually runs, `abk plan` sizes every declared contrast, and a
23
+ > failed SRM gate names the culprit arm. No `_ab_results` number, alpha or
24
+ > verdict `0.8.0` issued moved (measured against a real `v0.8.0` checkout), and
25
+ > a two-arm experiment renders exactly what it rendered before.
26
+ > M13 is the **versioned statistics**
27
+ > milestone: five opt-in options that each buy power or fix an interval, with
28
+ > **no default moved** — a project that changes nothing reproduces `0.7.0` row
29
+ > for row. `correction: holm` is uniformly more powerful than one-step
30
+ > Bonferroni at the same family error rate; `contrasts: vs_control` declares the
31
+ > family you actually decide on, so the divisor is `g−1` instead of `C(g,2)`
32
+ > (≈ +10 points of power at four arms) and the treatment-vs-treatment pairs stop
33
+ > being computed; `guardrail_correction: none` takes a guardrail out of the
34
+ > screening budget entirely; `interval: score` gives proportions an interval
35
+ > that is the inversion of the z-test printed beside it (no more "significant"
36
+ > next to a CI covering zero, and a real answer on empty cells); and
37
+ > `interval: fieller` does the same for the relative lift of the five
38
+ > mean-based methods — the delta interval it replaces has nominal *two-sided*
39
+ > coverage with lopsided tails (1.7% / 3.3% against 2.5% each), and every abkit
40
+ > verdict is a one-sided claim. `abk validate` gained the one column that can
41
+ > tell those two apart: the share of false positives falling **below** zero.
42
+ > M12 wired **notifications**: `abk run
16
43
  > --notify` and `abk validate --notify` push what a run just decided to nine
17
44
  > channel types (Slack, Telegram, email, webhook, Mattermost, Discord, Teams,
18
45
  > Google Chat, ntfy), as six routable signals — the readout verdict, a verdict
@@ -50,10 +77,12 @@ pip install ab-analysis-kit # Python 3.10+; add a DB extra for real dat
50
77
  pip install "ab-analysis-kit[clickhouse]" # or [postgres] / [mysql] / [all-db]
51
78
  ```
52
79
 
53
- (`pip install ab-analysis-kit` gets `0.7.0` — opt-in notifications across nine
54
- channels, `abk dashboard` with its YAML editor, `abk ui`, CUPED-aware `abk plan`
55
- sizing, `abk plan --from-history` and the discoverable additive read path all
56
- included.)
80
+ (`pip install ab-analysis-kit` gets `0.9.0` — the multi-arm decision layer
81
+ (declared control, treatment-pair verdicts, per-metric leader), the opt-in M13 statistics (Holm,
82
+ the declared contrast set, the score and Fieller intervals, the A/A sign
83
+ column), opt-in notifications across nine channels, `abk dashboard` with its
84
+ YAML editor, `abk ui`, CUPED-aware `abk plan` sizing, `abk plan --from-history`
85
+ and the discoverable additive read path all included.)
57
86
 
58
87
  `abk --version` and `abk --help` work with no database driver; you can even lint a
59
88
  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.7.0
3
+ Version: 0.9.0
4
4
  Summary: A/B experiment analysis as declarative YAML + SQL
5
5
  Author: ab-analysis-kit authors
6
6
  License: MIT
@@ -25,7 +25,7 @@ Description-Content-Type: text/markdown
25
25
  License-File: LICENSE
26
26
  Requires-Dist: numpy>=1.24.0
27
27
  Requires-Dist: scipy>=1.10.0
28
- Requires-Dist: statsmodels>=0.14.0
28
+ Requires-Dist: statsmodels<0.15,>=0.14.0
29
29
  Requires-Dist: pydantic>=2.0.0
30
30
  Requires-Dist: pyyaml>=6.0
31
31
  Requires-Dist: click>=8.0
@@ -76,8 +76,35 @@ 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.7.0` (Alpha) — the latest on PyPI**
80
- > (milestones **M1–M12** shipped — M12 wired **notifications**: `abk run
79
+ > **Status: `0.9.0` (Alpha) — the latest on PyPI**
80
+ > (milestones **M1–M14** shipped — M14 is the **multi-arm decision layer**: an
81
+ > experiment declares its baseline (`assignment.control`), every declared pair
82
+ > gets a verdict labelled as a ship decision (vs control) or as evidence
83
+ > (treatment vs treatment), and each main metric gets a rollup naming the leader
84
+ > — the arm that beat the control and every other treatment — or saying why
85
+ > none can be named. The report, the dashboard, `abk explore`, notifications and
86
+ > the `abk run` line all read that one layer; `abk validate` calibrates the
87
+ > contrast it actually runs, `abk plan` sizes every declared contrast, and a
88
+ > failed SRM gate names the culprit arm. No `_ab_results` number, alpha or
89
+ > verdict `0.8.0` issued moved (measured against a real `v0.8.0` checkout), and
90
+ > a two-arm experiment renders exactly what it rendered before.
91
+ > M13 is the **versioned statistics**
92
+ > milestone: five opt-in options that each buy power or fix an interval, with
93
+ > **no default moved** — a project that changes nothing reproduces `0.7.0` row
94
+ > for row. `correction: holm` is uniformly more powerful than one-step
95
+ > Bonferroni at the same family error rate; `contrasts: vs_control` declares the
96
+ > family you actually decide on, so the divisor is `g−1` instead of `C(g,2)`
97
+ > (≈ +10 points of power at four arms) and the treatment-vs-treatment pairs stop
98
+ > being computed; `guardrail_correction: none` takes a guardrail out of the
99
+ > screening budget entirely; `interval: score` gives proportions an interval
100
+ > that is the inversion of the z-test printed beside it (no more "significant"
101
+ > next to a CI covering zero, and a real answer on empty cells); and
102
+ > `interval: fieller` does the same for the relative lift of the five
103
+ > mean-based methods — the delta interval it replaces has nominal *two-sided*
104
+ > coverage with lopsided tails (1.7% / 3.3% against 2.5% each), and every abkit
105
+ > verdict is a one-sided claim. `abk validate` gained the one column that can
106
+ > tell those two apart: the share of false positives falling **below** zero.
107
+ > M12 wired **notifications**: `abk run
81
108
  > --notify` and `abk validate --notify` push what a run just decided to nine
82
109
  > channel types (Slack, Telegram, email, webhook, Mattermost, Discord, Teams,
83
110
  > Google Chat, ntfy), as six routable signals — the readout verdict, a verdict
@@ -115,10 +142,12 @@ pip install ab-analysis-kit # Python 3.10+; add a DB extra for real dat
115
142
  pip install "ab-analysis-kit[clickhouse]" # or [postgres] / [mysql] / [all-db]
116
143
  ```
117
144
 
118
- (`pip install ab-analysis-kit` gets `0.7.0` — opt-in notifications across nine
119
- channels, `abk dashboard` with its YAML editor, `abk ui`, CUPED-aware `abk plan`
120
- sizing, `abk plan --from-history` and the discoverable additive read path all
121
- included.)
145
+ (`pip install ab-analysis-kit` gets `0.9.0` — the multi-arm decision layer
146
+ (declared control, treatment-pair verdicts, per-metric leader), the opt-in M13 statistics (Holm,
147
+ the declared contrast set, the score and Fieller intervals, the A/A sign
148
+ column), opt-in notifications across nine channels, `abk dashboard` with its
149
+ YAML editor, `abk ui`, CUPED-aware `abk plan` sizing, `abk plan --from-history`
150
+ and the discoverable additive read path all included.)
122
151
 
123
152
  `abk --version` and `abk --help` work with no database driver; you can even lint a
124
153
  config (`abk run --steps validate`) with no database at all. See the
@@ -127,7 +127,9 @@ abkit/stats/effects.py
127
127
  abkit/stats/exceptions.py
128
128
  abkit/stats/factory.py
129
129
  abkit/stats/power.py
130
+ abkit/stats/proportion_score.py
130
131
  abkit/stats/registry.py
132
+ abkit/stats/relative_interval.py
131
133
  abkit/stats/result.py
132
134
  abkit/stats/rng.py
133
135
  abkit/stats/samples.py
@@ -1,6 +1,6 @@
1
1
  numpy>=1.24.0
2
2
  scipy>=1.10.0
3
- statsmodels>=0.14.0
3
+ statsmodels<0.15,>=0.14.0
4
4
  pydantic>=2.0.0
5
5
  pyyaml>=6.0
6
6
  click>=8.0
@@ -10,7 +10,7 @@ from __future__ import annotations
10
10
 
11
11
  from typing import Any
12
12
 
13
- __version__ = "0.7.0"
13
+ __version__ = "0.9.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],
@@ -135,7 +135,13 @@ on with nothing declared additive, and how many looks fell back to recompute.
135
135
  - `--report [PATH]` — after the run, emit a self-contained HTML readout per
136
136
  experiment (best-effort — never fails the run). Tri-state: bare `--report` →
137
137
  `reports/<exp>.html`; a directory → `<dir>/<exp>.html`; a `.html` path → that
138
- file. Reads persisted rows, so even a load-only run can produce one.
138
+ file. Reads persisted rows, so even a load-only run can produce one. At 3+ arms
139
+ the page carries the decision layer: a cross-arm overview per main metric
140
+ (leader · separation · an arm table), a card per declared pair with the
141
+ arm-vs-arm ones labelled *not a ship decision*, and a pair selector. The
142
+ one-line terminal summary beside it names the LEADER per main metric at 3+
143
+ arms (`leader — revenue: b, orders: b`, plus `(metrics disagree)` when they
144
+ split) rather than listing verdict words; two-arm output is unchanged.
139
145
  - `--cost-report` — print per-stage warehouse cost (wall-time, queries, rows returned,
140
146
  rows scanned where the backend reports them), plus `of which day-additive:` — the
141
147
  same measured cost attributed to the state-eligible comparisons only, followed by
@@ -158,7 +164,11 @@ on with nothing declared additive, and how many looks fell back to recompute.
158
164
  remembers what each comparison last said, and an unchanged verdict is not
159
165
  re-sent — so a scheduled run every hour is not a message every hour. A newly
160
166
  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
167
+ (a pre-horizon pair says INCONCLUSIVE either way) — and so does a moved
168
+ LEADER or separation state at 3+ arms, since the ship decision can change with
169
+ every verdict word unchanged. A 3+ arm message also carries a
170
+ `Leader on <metric>: <arm> — …` line, suppressed under a failed SRM gate and
171
+ at two arms. A message no channel
162
172
  accepted is not recorded, so the next run retries it. A completed run also
163
173
  sends a **`stale`** notice when a metric's series was more than 3 cadence steps
164
174
  behind the looks ALREADY DUE when the run planned it. Read it as "the schedule
@@ -203,7 +213,11 @@ abk dashboard [--select <sel>]... [--exclude <sel>]... [--window 24h|7d|30d|90d|
203
213
  and help. `dashboard` stays canonical: `dashboard`/`explore` say WHICH surface
204
214
  you want, where `ui` does not.
205
215
 
206
- The project-level cockpit (0.6.0): one row per selected experiment — headline
216
+ The project-level cockpit (0.6.0). At 3+ arms the row's headline is the first
217
+ declared main metric's ROLLUP LEADER (falling back to the first declared
218
+ treatment when no arm beat control), with a `→ arm` chip, a `leaders split` chip
219
+ when two main metrics name different arms, an `N lost` chip, and `arm vs arm`
220
+ tags on treatment pairs in the expand list. One row per selected experiment — headline
207
221
  verdict, effect, p-value, last look and a sparkline — served on localhost with a
208
222
  per-start token that authorizes EVERY request, `GET` included. The page boots on
209
223
  metadata only and fills each row on demand (3 requests in flight), so a
@@ -426,7 +440,10 @@ abk unlock --select example_signup_test
426
440
  - **"Failed to acquire lock"** — a crashed run left a lock; `abk unlock --select <exp>`.
427
441
  - **`SRM FAILED` (red)** — the observed arm split ≠ the expected split; the
428
442
  randomization or the cohort query is broken. Fix the assignment before trusting
429
- any effect.
443
+ any effect. At 3+ arms the line also names WHICH arm contributes most to the
444
+ mismatch and whether it has too few or too many units — chi-square gate only,
445
+ since the sub-day anytime-valid gate's flag is a running max over earlier looks
446
+ and the current counts may have rebalanced.
430
447
  - **No verdict before the horizon** — expected: fixed-horizon CIs are not
431
448
  peeking-valid, so the readout withholds WIN/LOSE early. Enable
432
449
  `sequential: {enabled: true}` on a sequential-eligible method for always-valid CIs.
@@ -34,7 +34,9 @@ timezone: UTC # interprets bare-date edges, the `midnight` an
34
34
  assignment: # READ-ONLY exposure source — abkit never randomizes
35
35
  query_file: sql/assignment.sql # or inline `query:` (exactly one, never both)
36
36
  added_filters: "" # optional extra SQL fragment (must start with AND)
37
- variants: [control, treatment] # FIRST is control (name_1); >= 2, unique
37
+ variants: [control, treatment] # the FIRST is control (name_1) unless `control:` says otherwise
38
+ # control: control # OPTIONAL: which arm is the baseline (default: variants[0]);
39
+ # must be one of `variants`
38
40
  expected_split: {control: 0.5, treatment: 0.5} # must cover every variant, sum to 1.0; drives SRM
39
41
  # cohort_copy: # opt-in (default OFF): persist an incremental,
40
42
  # enabled: true # append-only _ab_exposures copy instead of
@@ -43,7 +45,16 @@ assignment: # READ-ONLY exposure source — abkit never ran
43
45
  # maturity_delay: 0 # batch_intervals_per_round_trip: 30 — intervals, not rows)
44
46
 
45
47
  alpha: 0.05 # experiment-level significance (unset -> project default)
46
- correction: bonferroni # none | bonferroni | benjamini_hochberg (unset -> project default)
48
+ correction: bonferroni # none | bonferroni | benjamini_hochberg | holm (unset -> project default)
49
+ # contrasts: vs_control # all_pairs (default) | vs_control — the family this experiment
50
+ # CLAIMS: vs_control compares only the g-1 treatments against the
51
+ # CONTROL arm (assignment.control, default the first declared
52
+ # variant), divides alpha by g-1 instead of C(g,2)
53
+ # (≈ +10 points of power at 4 arms), and does NOT compute the
54
+ # treatment-vs-treatment pairs at all — so the report's cross-arm
55
+ # overview — and explore's Review line, the dashboard row and the
56
+ # notification decision line — reads `separation: untested`, and
57
+ # under all_pairs those pairs ARE verdicted, as evidence
47
58
  sequential: {enabled: false, scheme: always_valid} # opt-in peeking-safe CIs (default OFF)
48
59
  # incremental_reads: true # override project.compute.incremental_reads here (unset -> project
49
60
  # default): eligible closed-form comparisons read `_ab_unit_state`
@@ -78,9 +89,25 @@ comparisons: # required — each binds one library metric to
78
89
 
79
90
  ## Variants, split & SRM
80
91
 
81
- - `assignment.variants` lists the arm names; **the first is control (`name_1`)**.
82
- Every subsequent variant is compared against it. Names must be unique, non-empty,
83
- and within the storage key budget.
92
+ - `assignment.variants` lists the arm names; **the first is the control
93
+ (`name_1`)** unless `assignment.control` names another. Names must be unique,
94
+ non-empty, and within the storage key budget.
95
+ - `assignment.control` (optional) declares the baseline arm — the one every
96
+ `effect` is measured against and the one the SRM rollup keys its series on.
97
+ Unset, it is the first declared variant, exactly as through `0.8.0`; there is
98
+ no project-level default. Declaring the first variant changes nothing.
99
+ Declaring a **different** arm on an experiment that already has rows
100
+ re-orients every pair containing it to `(control, other)`, so: those pairs'
101
+ persisted rows leave the declared contrast set and are dropped loudly; the
102
+ effect is re-based against the other arm — the negation of the old number on
103
+ the absolute scale, but **NOT** on the relative scale, where the denominator
104
+ swaps arms too (`(m2-m1)/m1` becomes `(m1-m2)/m2`); the next plain `abk run`
105
+ recomputes the whole series (no `--full-refresh` needed, since no look
106
+ carries the re-oriented pair); and the old orientation's rows are never
107
+ deleted, so raw SQL over `_ab_results` sees both (join
108
+ `_ab_experiments.control`). **Prefer reordering `variants` to declaring a
109
+ non-first control on a running experiment.** `abk run --steps validate` warns
110
+ about all of it.
84
111
  - `expected_split` is the *assigned* share per arm (fractions in `(0,1)` that sum
85
112
  to `1.0`, one entry per variant). It is the input to the **SRM gate**: a
86
113
  chi-square test (anytime-valid multinomial below `1d` cadence) comparing observed
@@ -51,8 +51,10 @@ name a configured **comparison** of that experiment (default: the main metric).
51
51
  **not** here — the stats core has no such params (two-sided p-values, no winsor).
52
52
  - **Modes** — Tune (knobs lead) / Auto (run `validate` server-side, re-seed the
53
53
  knobs, green the chip in place) / Review (mark guardrail vs primary, confirm the
54
- decision). *(Segment / heterogeneous-effects mode is a deferred placeholder — not
55
- available in 0.1.0.)*
54
+ decision; at 3+ arms it also shows a per-metric rollup line naming the leader
55
+ and `arm vs arm` tags on treatment pairs — **both are as of page build, not
56
+ live under a knob turn**). *(Segment / heterogeneous-effects mode is a
57
+ deferred placeholder — not available in 0.1.0.)*
56
58
 
57
59
  ## Live recompute — one source of math truth
58
60
 
@@ -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,40 @@ 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 CONTROL
161
+ arm (`assignment.control`, default the first declared variant), not all
162
+ `C(g,2)` pairs. The divisor drops accordingly, so
163
+ every tier's alpha is multiplied by `g/2` (≈ +10 points of power at four
164
+ arms). It is one declaration with two halves: the treatment-vs-treatment pairs
165
+ are also **not computed** — no result rows, no verdicts, no BH family members
166
+ — because keeping them at the loosened level is exactly what would break the
167
+ FWER claim the loosening was bought with. Inert at two arms. Like
168
+ `guardrail_correction`, it moves persisted alphas, so `abk run --full-refresh`
169
+ re-homogenises a series and A/A rows read `alpha_mismatch` until re-run;
170
+ rows for pairs the declared family no longer claims are ignored loudly by every
171
+ read surface — three causes now: a renamed arm, this narrowing, and a declared
172
+ `assignment.control` re-orienting a pair. (`abk run --full-refresh --from
173
+ <start> --to <past the horizon>` removes them; `--to` is EXCLUSIVE on `end_ts`
174
+ and the horizon cutoff's `end_ts` IS `horizon_ts`, so naming the horizon leaves
175
+ the last look behind. `abk clean` prunes by `method_config_id` and never
176
+ touched them.) Widening the
177
+ family back (or adding an arm) is the direction abkit heals for you: a look
178
+ missing a declared pair is re-planned automatically.
108
179
  - Execution-only params (`max_block_bytes`) never enter the hash.
109
180
 
110
181
  ## Sequential eligibility
@@ -115,8 +186,13 @@ the experiment) applies only to **parametric methods** (`t-test`, `z-test`,
115
186
  are NOT sequential-eligible** — enabling sequential leaves their CIs
116
187
  fixed-horizon, and the readout still withholds WIN/LOSE AND FLAT before the
117
188
  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.
189
+ you need peeking-valid early reads, choose a parametric method.
190
+
191
+ The two inverted-test intervals are the parametric exceptions, and they fail
192
+ LOUDLY rather than silently: `z-test` with `interval: score` and the mean methods
193
+ with `interval: fieller` are both asymmetric, so either pair is a config ERROR
194
+ naming both settings. See `experiments.md` for the toggle and
195
+ `overview.md` for why peeking matters.
120
196
 
121
197
  ## Quarantined branches (raise, never silently substitute)
122
198
 
@@ -70,10 +70,10 @@ profile's `internal_database` / `internal_schema`, separate from the
70
70
  |---|---|
71
71
  | `_ab_results` | **The BI contract.** One row per `(experiment, metric, variant-pair, method_config_id, end_ts)` cumulative cutoff: effect, CI, p-value, per-arm stats, SRM flag, `insufficient_data`, `ci_kind`, `is_horizon`. Point BI here. |
72
72
  | `_ab_exposures` | **Optional** — the persisted assignment cohort copy (unit → variant → exposure_ts), created/written only when `assignment.cohort_copy.enabled: true` (an append-only incremental copy; a routine run never deletes — `--resync-cohort` is the one exception). On the default no-copy path the table does not exist: metric queries and the SRM counts read the live assignment source instead. |
73
- | `_ab_experiments` | Informational experiment catalog (descriptions, variants, split, alpha, cadence, tags) for BI joins; the pipeline never reads it back for decisions. |
73
+ | `_ab_experiments` | Informational experiment catalog (descriptions, variants, the control arm, 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
+ | `_ab_notify_states` | What `--notify` last ANNOUNCED per comparison (verdict + SRM flag + rollup identity + 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. |
77
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. |
78
78
 
79
79
  ## Glossary
@@ -82,12 +82,29 @@ profile's `internal_database` / `internal_schema`, separate from the
82
82
  `test_type: absolute` or `relative` (percent lift) is a per-method param.
83
83
  - **CI** — confidence interval on the effect; a WIN/LOSE needs it to exclude zero
84
84
  in one direction **and** be stable (excluding-then-recrossing is not a winner).
85
- - **verdict** — the read-time call: **WIN/LOSE** (CI excludes zero, stabilized),
86
- **FLAT** (CI includes zero, adequately powered — needs `min_effect`),
87
- **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
88
92
  **insufficient data**. The main metric drives it; guardrails check regression.
93
+ - **role** — what a verdict is ABOUT. `vs_control` is a **ship decision**;
94
+ `treatment_pair` is EVIDENCE about two treatments, so a `WIN` on `(B, C)` means
95
+ "C came out ahead of B" and says nothing about either against the baseline —
96
+ never read it as "ship C". Those pairs exist only under `contrasts: all_pairs`.
97
+ - **rollup** — the per-main-metric arm summary the readout composes at read time
98
+ (never stored): **leader** (the best-effect arm AMONG THOSE THAT BEAT THE
99
+ CONTROL — arms that lost are never ranked), **separation** (`separated` /
100
+ `co_leaders` / `untested` / `no_leader`, where `no_leader` also covers "the SRM
101
+ gate failed" and "nothing could be judged yet" — read the rationale for which),
102
+ plus **leaders_agree** when two main metrics name different arms. abkit reports
103
+ the disagreement and does not break the tie: no metric priority is declared.
89
104
  - **SRM (sample-ratio-mismatch)** — a χ² gate (anytime-valid multinomial below 1d
90
- cadence): observed arm split ≠ expected split ⇒ randomization/cohort is broken.
105
+ cadence): observed arm split ≠ expected split ⇒ randomization/cohort is broken. At 3+ arms
106
+ the CLI line, the report chip and the explore chip also name WHICH arm the
107
+ mismatch sits in (the `abk dashboard` row does not — it has no cohort counts).
91
108
  A **hard, blocking** gate — check it before trusting any effect.
92
109
  - **CUPED** — variance reduction using a pre-period covariate; abkit renders the
93
110
  SAME metric SQL a second time over a whole-day `covariate_lookback` window (no
@@ -105,7 +122,10 @@ profile's `internal_database` / `internal_schema`, separate from the
105
122
  (`alpha` and `seed` excluded). Editing an identity param starts a NEW series
106
123
  and orphans the old rows (recompute, then `abk clean`).
107
124
  - **two-tier alpha** — main vs secondary metrics get different post-correction
108
- (Bonferroni) alphas; read-time Benjamini-Hochberg spans a family.
125
+ (Bonferroni) alphas. The **read-time** schemes (`benjamini_hochberg` = FDR,
126
+ `holm` = FWER) instead leave the raw alpha on every row and decide over the
127
+ whole family at read time — so `reject` is then the pre-family flag, not the
128
+ verdict.
109
129
  - **always-valid / sequential** — opt-in (`sequential: {enabled: true}`)
110
130
  peeking-safe CIs. **Default OFF**: without it the readout WITHHOLDS WIN/LOSE
111
131
  AND FLAT before the horizon (FLAT is equally a stop decision). `scheme: alpha_spending` (group-sequential) is NOT
@@ -94,8 +94,14 @@ than crashing the plan.
94
94
  └─ looks: 14 planned · cadence 1d · horizon 2024-07-15 · ~28 _ab_results rows/full-refresh
95
95
  ```
96
96
 
97
- For a **>2-arm** experiment, sizing is shown for the first-pair contrast only
98
- (the other pairs share the same alpha) — the plan says so. If the look count
97
+ For a **>2-arm** experiment EVERY declared vs-control contrast is sized at its
98
+ own allocation ratio, each with its own ✓/✗ powered flag; contrasts sharing a
99
+ ratio collapse to one line, and when the BINDING contrast is not the headline the
100
+ plan names it (the runtime line describes the headline only). Only `required_n`
101
+ is per contrast — the achievable MDE is a retrospective bound, identical for all
102
+ of them. Treatment-vs-treatment pairs (`contrasts: all_pairs`) share the alpha
103
+ but are NOT sized: a pre-launch baseline exists for the control arm only, and the
104
+ plan says so. If the look count
99
105
  exceeds `warn_looks` without `sequential.enabled`, it warns that peeking inflates
100
106
  the false-positive rate (enable sequential or coarsen the cadence).
101
107