@trazum/core 1.50.6 → 1.50.7

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.
@@ -0,0 +1,134 @@
1
+ /**
2
+ * Two arms on real traffic, and the three things that stop it being theatre.
3
+ *
4
+ * `eval` compares two prompts on cases somebody wrote; `route` compares two
5
+ * models on the same. Both measure agreement in a laboratory. The traffic is
6
+ * the only place the real question gets answered — and the moment a comparison
7
+ * runs on real traffic, three failures become available that a laboratory does
8
+ * not have.
9
+ *
10
+ * ## 1. A winner where there is none
11
+ *
12
+ * Two arms always produce two numbers, and one of them is always larger. An
13
+ * A/B report that names a winner from that is a coin flip with a dashboard.
14
+ * The verdict here is **three-valued**, the way `verify`'s has been since
15
+ * 1.39: A wins, B wins, or **not separable on this traffic** — and the third
16
+ * one comes with the number of outcomes per arm that *would* separate them, so
17
+ * "run it longer" is a quantified instruction rather than a shrug.
18
+ *
19
+ * ## 2. Peeking
20
+ *
21
+ * A test stopped on the first afternoon it looked good is not a test. The
22
+ * stopping rule is declared **before** the experiment starts, and the report
23
+ * says whether it was honoured. It cannot enforce that — nobody can stop
24
+ * somebody reading a number early — but it can make an early stop *visible*
25
+ * to whoever reads the result later, which is the part that matters.
26
+ *
27
+ * ## 3. Quality and cost judged apart, then together
28
+ *
29
+ * The interesting arm is almost never better *and* cheaper. It is better and
30
+ * dearer, and the decision needs one figure nobody computes: **what an extra
31
+ * success costs**. That is the marginal figure — the difference in spend over
32
+ * the difference in successes — and it is the number a product decision
33
+ * actually turns on, printed rather than left as an exercise.
34
+ *
35
+ * ## The statistics are shown, not asserted
36
+ *
37
+ * Wilson score intervals per arm and Newcombe's interval on the difference,
38
+ * because both behave at the small samples this will actually see. The
39
+ * intervals are returned, not just the verdict: a reader who disagrees with
40
+ * the threshold can see the numbers it was applied to, which is the same
41
+ * discipline `eval` established by running the original twice before judging
42
+ * anything against it.
43
+ */
44
+ import type { OutcomeTally, OutcomeVocabulary } from './outcome.js';
45
+ /**
46
+ * The declaration, made before the experiment runs.
47
+ *
48
+ * Its whole purpose is to exist *earlier* than the result. A stopping rule
49
+ * invented after looking at the numbers is not a stopping rule.
50
+ */
51
+ export interface ExperimentDeclaration {
52
+ /** Two arms. More would need a multiple-comparison correction nobody asked for. */
53
+ arms: [string, string];
54
+ /**
55
+ * Outcomes each arm must record before the result may be read.
56
+ *
57
+ * Declared as a count rather than a duration, because a duration is a proxy
58
+ * for a count and the proxy breaks the week traffic doubles.
59
+ */
60
+ minOutcomesPerArm: number;
61
+ }
62
+ /** What one arm actually did. */
63
+ export interface ExperimentArm {
64
+ name: string;
65
+ tally: OutcomeTally;
66
+ /** Everything this arm spent, recorded outcome or not. */
67
+ totalUsd: number;
68
+ }
69
+ export interface ArmResult {
70
+ name: string;
71
+ successes: number;
72
+ /** Calls carrying a *declared* outcome — the denominator. */
73
+ recorded: number;
74
+ /** Successes over recorded, or null when nothing was recorded. */
75
+ rate: number | null;
76
+ /** Wilson score interval on that rate, or null. */
77
+ interval: {
78
+ low: number;
79
+ high: number;
80
+ } | null;
81
+ /** Spend on calls carrying a declared outcome. */
82
+ recordedUsd: number;
83
+ }
84
+ export type Separation = 'a-wins' | 'b-wins' | 'not-separable';
85
+ export type NotSeparableReason = 'interval-includes-zero' | 'no-difference-observed' | 'nothing-recorded';
86
+ export interface Marginal {
87
+ /**
88
+ * What one extra success costs, going from the worse arm to the better one.
89
+ *
90
+ * `(dearer spend − cheaper spend) / (more successes − fewer successes)`,
91
+ * both per call so arms of different sizes compare. Null when the better arm
92
+ * is also the cheaper one, because then nothing is being bought and a
93
+ * "cost per extra success" would be a negative number people would quote.
94
+ */
95
+ usdPerExtraSuccess: number | null;
96
+ /** The arm that resolved more, by rate. */
97
+ better: string;
98
+ /** Whether that arm also costs more per call. */
99
+ dearer: boolean;
100
+ }
101
+ export interface ExperimentResult {
102
+ a: ArmResult;
103
+ b: ArmResult;
104
+ separation: Separation;
105
+ /** Why, when not separable. A refusal never arrives bare. */
106
+ notSeparable: NotSeparableReason | null;
107
+ /** Newcombe's interval on (rate A − rate B), or null. */
108
+ difference: {
109
+ point: number;
110
+ low: number;
111
+ high: number;
112
+ } | null;
113
+ /**
114
+ * Outcomes **per arm** that would separate the observed difference, or null.
115
+ *
116
+ * Null when the arms recorded the same rate: no sample size separates a
117
+ * difference of zero, and returning a very large number would read as "keep
118
+ * going" when the honest answer is "there is nothing here to find".
119
+ */
120
+ outcomesNeededPerArm: number | null;
121
+ stopping: {
122
+ declared: number;
123
+ /** Whether both arms cleared the declared minimum. */
124
+ honoured: boolean;
125
+ /** The arm that has not, when one has not. */
126
+ short: string | null;
127
+ };
128
+ marginal: Marginal | null;
129
+ }
130
+ export declare function runExperiment(declaration: ExperimentDeclaration, arms: {
131
+ a: ExperimentArm;
132
+ b: ExperimentArm;
133
+ }, vocabulary: OutcomeVocabulary | null): ExperimentResult;
134
+ //# sourceMappingURL=experiment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"experiment.d.ts","sourceRoot":"","sources":["../src/experiment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAMpE;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,mFAAmF;IACnF,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvB;;;;;OAKG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,iCAAiC;AACjC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,YAAY,CAAC;IACpB,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,QAAQ,EAAE,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;IAAE,CAAC,EAAE,aAAa,CAAC;IAAC,CAAC,EAAE,aAAa,CAAA;CAAE,EAC5C,UAAU,EAAE,iBAAiB,GAAG,IAAI,GACnC,gBAAgB,CAkGlB"}
@@ -0,0 +1,168 @@
1
+ /**
2
+ * Two arms on real traffic, and the three things that stop it being theatre.
3
+ *
4
+ * `eval` compares two prompts on cases somebody wrote; `route` compares two
5
+ * models on the same. Both measure agreement in a laboratory. The traffic is
6
+ * the only place the real question gets answered — and the moment a comparison
7
+ * runs on real traffic, three failures become available that a laboratory does
8
+ * not have.
9
+ *
10
+ * ## 1. A winner where there is none
11
+ *
12
+ * Two arms always produce two numbers, and one of them is always larger. An
13
+ * A/B report that names a winner from that is a coin flip with a dashboard.
14
+ * The verdict here is **three-valued**, the way `verify`'s has been since
15
+ * 1.39: A wins, B wins, or **not separable on this traffic** — and the third
16
+ * one comes with the number of outcomes per arm that *would* separate them, so
17
+ * "run it longer" is a quantified instruction rather than a shrug.
18
+ *
19
+ * ## 2. Peeking
20
+ *
21
+ * A test stopped on the first afternoon it looked good is not a test. The
22
+ * stopping rule is declared **before** the experiment starts, and the report
23
+ * says whether it was honoured. It cannot enforce that — nobody can stop
24
+ * somebody reading a number early — but it can make an early stop *visible*
25
+ * to whoever reads the result later, which is the part that matters.
26
+ *
27
+ * ## 3. Quality and cost judged apart, then together
28
+ *
29
+ * The interesting arm is almost never better *and* cheaper. It is better and
30
+ * dearer, and the decision needs one figure nobody computes: **what an extra
31
+ * success costs**. That is the marginal figure — the difference in spend over
32
+ * the difference in successes — and it is the number a product decision
33
+ * actually turns on, printed rather than left as an exercise.
34
+ *
35
+ * ## The statistics are shown, not asserted
36
+ *
37
+ * Wilson score intervals per arm and Newcombe's interval on the difference,
38
+ * because both behave at the small samples this will actually see. The
39
+ * intervals are returned, not just the verdict: a reader who disagrees with
40
+ * the threshold can see the numbers it was applied to, which is the same
41
+ * discipline `eval` established by running the original twice before judging
42
+ * anything against it.
43
+ */
44
+ import { judgeOutcome } from './outcome.js';
45
+ /** z for a two-sided 95% interval, and for 80% power. */
46
+ const Z_95 = 1.959963984540054;
47
+ const Z_POWER_80 = 0.8416212335729143;
48
+ /** Wilson score interval — behaves at the sample sizes this will actually see. */
49
+ function wilson(successes, n, z = Z_95) {
50
+ if (n <= 0)
51
+ return null;
52
+ const p = successes / n;
53
+ const denominator = 1 + (z * z) / n;
54
+ const centre = (p + (z * z) / (2 * n)) / denominator;
55
+ const half = (z * Math.sqrt((p * (1 - p)) / n + (z * z) / (4 * n * n))) / denominator;
56
+ return { low: Math.max(0, centre - half), high: Math.min(1, centre + half) };
57
+ }
58
+ function resultOf(arm, vocabulary) {
59
+ const declared = vocabulary ?? { values: [], success: [] };
60
+ let successes = 0;
61
+ let recorded = 0;
62
+ let recordedUsd = 0;
63
+ for (const entry of arm.tally.byValue) {
64
+ // Undeclared values are out of both halves, as everywhere since 1.50.4: a
65
+ // typo in an exporter must not decide an experiment.
66
+ if (judgeOutcome(entry.value, declared) === 'undeclared')
67
+ continue;
68
+ recorded += entry.calls;
69
+ recordedUsd += entry.usd;
70
+ if (declared.success.includes(entry.value))
71
+ successes += entry.calls;
72
+ }
73
+ return {
74
+ name: arm.name,
75
+ successes,
76
+ recorded,
77
+ rate: recorded > 0 ? successes / recorded : null,
78
+ interval: wilson(successes, recorded),
79
+ recordedUsd,
80
+ };
81
+ }
82
+ export function runExperiment(declaration, arms, vocabulary) {
83
+ const a = resultOf(arms.a, vocabulary);
84
+ const b = resultOf(arms.b, vocabulary);
85
+ const stopping = {
86
+ declared: declaration.minOutcomesPerArm,
87
+ honoured: a.recorded >= declaration.minOutcomesPerArm && b.recorded >= declaration.minOutcomesPerArm,
88
+ short: a.recorded < declaration.minOutcomesPerArm
89
+ ? a.name
90
+ : b.recorded < declaration.minOutcomesPerArm
91
+ ? b.name
92
+ : null,
93
+ };
94
+ const bare = (reason) => ({
95
+ a,
96
+ b,
97
+ separation: 'not-separable',
98
+ notSeparable: reason,
99
+ difference: null,
100
+ outcomesNeededPerArm: null,
101
+ stopping,
102
+ marginal: null,
103
+ });
104
+ if (a.rate === null || b.rate === null || a.interval === null || b.interval === null) {
105
+ return bare('nothing-recorded');
106
+ }
107
+ /**
108
+ * Newcombe's interval on the difference, built from the two Wilson
109
+ * intervals rather than from a normal approximation to the difference.
110
+ *
111
+ * The naive interval is symmetric and can run past 0 or 1, which at the
112
+ * sample sizes a real experiment starts with is not an edge case — it is
113
+ * most of the first week.
114
+ */
115
+ const point = a.rate - b.rate;
116
+ const low = point - Math.sqrt((a.rate - a.interval.low) ** 2 + (b.interval.high - b.rate) ** 2);
117
+ const high = point + Math.sqrt((a.interval.high - a.rate) ** 2 + (b.rate - b.interval.low) ** 2);
118
+ const difference = { point, low, high };
119
+ /**
120
+ * How many outcomes per arm would separate the difference *observed so far*.
121
+ *
122
+ * A standard two-proportion power calculation at 95% confidence and 80%
123
+ * power. It is an estimate about a difference that may itself be noise, and
124
+ * it is offered as "how much longer" rather than as a promise — but a number
125
+ * somebody can act on beats "not significant", which tells a reader nothing
126
+ * about whether to wait a day or abandon the idea.
127
+ */
128
+ const spread = Math.abs(point);
129
+ const outcomesNeededPerArm = spread === 0
130
+ ? null
131
+ : Math.ceil((((Z_95 + Z_POWER_80) ** 2) * (a.rate * (1 - a.rate) + b.rate * (1 - b.rate))) /
132
+ (spread * spread));
133
+ const perCallA = arms.a.tally.parsed > 0 ? arms.a.totalUsd / arms.a.tally.parsed : 0;
134
+ const perCallB = arms.b.tally.parsed > 0 ? arms.b.totalUsd / arms.b.tally.parsed : 0;
135
+ const better = a.rate >= b.rate ? a : b;
136
+ const worse = better === a ? b : a;
137
+ const betterPerCall = better === a ? perCallA : perCallB;
138
+ const worsePerCall = better === a ? perCallB : perCallA;
139
+ const rateGap = better.rate - worse.rate;
140
+ const marginal = {
141
+ /**
142
+ * Per call on both sides, so arms that took different shares of the
143
+ * traffic compare. Dividing raw totals would report a marginal cost that
144
+ * moves when the split changes and the behaviour does not.
145
+ */
146
+ usdPerExtraSuccess: betterPerCall > worsePerCall && rateGap > 0
147
+ ? (betterPerCall - worsePerCall) / rateGap
148
+ : null,
149
+ better: better.name,
150
+ dearer: betterPerCall > worsePerCall,
151
+ };
152
+ if (spread === 0)
153
+ return { ...bare('no-difference-observed'), difference, marginal };
154
+ if (low <= 0 && high >= 0) {
155
+ return { ...bare('interval-includes-zero'), difference, outcomesNeededPerArm, marginal };
156
+ }
157
+ return {
158
+ a,
159
+ b,
160
+ separation: point > 0 ? 'a-wins' : 'b-wins',
161
+ notSeparable: null,
162
+ difference,
163
+ outcomesNeededPerArm,
164
+ stopping,
165
+ marginal,
166
+ };
167
+ }
168
+ //# sourceMappingURL=experiment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"experiment.js","sourceRoot":"","sources":["../src/experiment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,yDAAyD;AACzD,MAAM,IAAI,GAAG,iBAAiB,CAAC;AAC/B,MAAM,UAAU,GAAG,kBAAkB,CAAC;AA0FtC,kFAAkF;AAClF,SAAS,MAAM,CAAC,SAAiB,EAAE,CAAS,EAAE,CAAC,GAAG,IAAI;IACpD,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACxB,MAAM,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC;IACrD,MAAM,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC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QACL,CAAC;QACD,CAAC;QACD,UAAU,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;QAC3C,YAAY,EAAE,IAAI;QAClB,UAAU;QACV,oBAAoB;QACpB,QAAQ;QACR,QAAQ;KACT,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -19,6 +19,8 @@ export type { PlanAction, PlanActionKind, PlanAssumption, PlanDocument } from '.
19
19
  export { verifyPlan } from './verify.js';
20
20
  export { buildHistory, storedReportFrom, MIN_RUN } from './history.js';
21
21
  export { outcomeReport, judgeOutcome, OUTCOME_UNLOCKS } from './outcome.js';
22
+ export { runExperiment } from './experiment.js';
23
+ export type { ArmResult, ExperimentArm, ExperimentDeclaration, ExperimentResult, Marginal, NotSeparableReason, Separation, } from './experiment.js';
22
24
  export { ladderArithmetic, ladderPosition, validateLadder, MIN_CALLS_FOR_LADDER, BREAK_EVEN_BAND, } from './ladder.js';
23
25
  export type { LadderArithmetic, LadderPolicy, LadderPosition, LadderProblem, LadderUnknown, LadderVerdict, } from './ladder.js';
24
26
  export { perOutcome, rankPerOutcome, MIN_OUTCOMES_FOR_RATE, MIN_COVERAGE_FOR_RATE, } from './per-outcome.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,QAAQ,GACT,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,yBAAy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F,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACjE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGxF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,aAAa,GACd,MAAM,cAAc,CAAC;AAKtB,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKzD,OAAO,EACL,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,SAAS,EACT,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -22,6 +22,7 @@ export { buildPlan, planLabelName, parsePlanDocument, PLAN_ACTION_KINDS } from '
22
22
  export { verifyPlan } from './verify.js';
23
23
  export { buildHistory, storedReportFrom, MIN_RUN } from './history.js';
24
24
  export { outcomeReport, judgeOutcome, OUTCOME_UNLOCKS } from './outcome.js';
25
+ export { runExperiment } from './experiment.js';
25
26
  export { ladderArithmetic, ladderPosition, validateLadder, MIN_CALLS_FOR_LADDER, BREAK_EVEN_BAND, } from './ladder.js';
26
27
  export { perOutcome, rankPerOutcome, MIN_OUTCOMES_FOR_RATE, MIN_COVERAGE_FOR_RATE, } from './per-outcome.js';
27
28
  export { gatewayDecision, usageFromResponse, FAILURE_POLICIES } from './gateway.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","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aAAa,CAAC;AAG3E,kFAAkF;AAClF,kFAAkF;AAClF,wCAAwC;AACxC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGzF,mEAAmE;AACnE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGjE,gCAAgC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAQ9C,0EAA0E;AAC1E,+EAA+E;AAC/E,8EAA8E;AAC9E,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEzD,8EAA8E;AAC9E,6EAA6E;AAC7E,2DAA2D;AAC3D,OAAO,EACL,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,SAAS,EACT,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trazum/core",
3
- "version": "1.50.6",
3
+ "version": "1.50.7",
4
4
  "description": "Trazum core: priced advisories for LLM prompts (caching, model tier, batching, schemas), plus deterministic trimming, token counting and pricing.",
5
5
  "license": "MIT",
6
6
  "author": "David Mu\u00f1oz Rey",
@@ -0,0 +1,275 @@
1
+ /**
2
+ * Two arms on real traffic, and the three things that stop it being theatre.
3
+ *
4
+ * `eval` compares two prompts on cases somebody wrote; `route` compares two
5
+ * models on the same. Both measure agreement in a laboratory. The traffic is
6
+ * the only place the real question gets answered — and the moment a comparison
7
+ * runs on real traffic, three failures become available that a laboratory does
8
+ * not have.
9
+ *
10
+ * ## 1. A winner where there is none
11
+ *
12
+ * Two arms always produce two numbers, and one of them is always larger. An
13
+ * A/B report that names a winner from that is a coin flip with a dashboard.
14
+ * The verdict here is **three-valued**, the way `verify`'s has been since
15
+ * 1.39: A wins, B wins, or **not separable on this traffic** — and the third
16
+ * one comes with the number of outcomes per arm that *would* separate them, so
17
+ * "run it longer" is a quantified instruction rather than a shrug.
18
+ *
19
+ * ## 2. Peeking
20
+ *
21
+ * A test stopped on the first afternoon it looked good is not a test. The
22
+ * stopping rule is declared **before** the experiment starts, and the report
23
+ * says whether it was honoured. It cannot enforce that — nobody can stop
24
+ * somebody reading a number early — but it can make an early stop *visible*
25
+ * to whoever reads the result later, which is the part that matters.
26
+ *
27
+ * ## 3. Quality and cost judged apart, then together
28
+ *
29
+ * The interesting arm is almost never better *and* cheaper. It is better and
30
+ * dearer, and the decision needs one figure nobody computes: **what an extra
31
+ * success costs**. That is the marginal figure — the difference in spend over
32
+ * the difference in successes — and it is the number a product decision
33
+ * actually turns on, printed rather than left as an exercise.
34
+ *
35
+ * ## The statistics are shown, not asserted
36
+ *
37
+ * Wilson score intervals per arm and Newcombe's interval on the difference,
38
+ * because both behave at the small samples this will actually see. The
39
+ * intervals are returned, not just the verdict: a reader who disagrees with
40
+ * the threshold can see the numbers it was applied to, which is the same
41
+ * discipline `eval` established by running the original twice before judging
42
+ * anything against it.
43
+ */
44
+
45
+ import { judgeOutcome } from './outcome.js';
46
+ import type { OutcomeTally, OutcomeVocabulary } from './outcome.js';
47
+
48
+ /** z for a two-sided 95% interval, and for 80% power. */
49
+ const Z_95 = 1.959963984540054;
50
+ const Z_POWER_80 = 0.8416212335729143;
51
+
52
+ /**
53
+ * The declaration, made before the experiment runs.
54
+ *
55
+ * Its whole purpose is to exist *earlier* than the result. A stopping rule
56
+ * invented after looking at the numbers is not a stopping rule.
57
+ */
58
+ export interface ExperimentDeclaration {
59
+ /** Two arms. More would need a multiple-comparison correction nobody asked for. */
60
+ arms: [string, string];
61
+ /**
62
+ * Outcomes each arm must record before the result may be read.
63
+ *
64
+ * Declared as a count rather than a duration, because a duration is a proxy
65
+ * for a count and the proxy breaks the week traffic doubles.
66
+ */
67
+ minOutcomesPerArm: number;
68
+ }
69
+
70
+ /** What one arm actually did. */
71
+ export interface ExperimentArm {
72
+ name: string;
73
+ tally: OutcomeTally;
74
+ /** Everything this arm spent, recorded outcome or not. */
75
+ totalUsd: number;
76
+ }
77
+
78
+ export interface ArmResult {
79
+ name: string;
80
+ successes: number;
81
+ /** Calls carrying a *declared* outcome — the denominator. */
82
+ recorded: number;
83
+ /** Successes over recorded, or null when nothing was recorded. */
84
+ rate: number | null;
85
+ /** Wilson score interval on that rate, or null. */
86
+ interval: { low: number; high: number } | null;
87
+ /** Spend on calls carrying a declared outcome. */
88
+ recordedUsd: number;
89
+ }
90
+
91
+ export type Separation = 'a-wins' | 'b-wins' | 'not-separable';
92
+
93
+ export type NotSeparableReason =
94
+ | 'interval-includes-zero'
95
+ | 'no-difference-observed'
96
+ | 'nothing-recorded';
97
+
98
+ export interface Marginal {
99
+ /**
100
+ * What one extra success costs, going from the worse arm to the better one.
101
+ *
102
+ * `(dearer spend − cheaper spend) / (more successes − fewer successes)`,
103
+ * both per call so arms of different sizes compare. Null when the better arm
104
+ * is also the cheaper one, because then nothing is being bought and a
105
+ * "cost per extra success" would be a negative number people would quote.
106
+ */
107
+ usdPerExtraSuccess: number | null;
108
+ /** The arm that resolved more, by rate. */
109
+ better: string;
110
+ /** Whether that arm also costs more per call. */
111
+ dearer: boolean;
112
+ }
113
+
114
+ export interface ExperimentResult {
115
+ a: ArmResult;
116
+ b: ArmResult;
117
+ separation: Separation;
118
+ /** Why, when not separable. A refusal never arrives bare. */
119
+ notSeparable: NotSeparableReason | null;
120
+ /** Newcombe's interval on (rate A − rate B), or null. */
121
+ difference: { point: number; low: number; high: number } | null;
122
+ /**
123
+ * Outcomes **per arm** that would separate the observed difference, or null.
124
+ *
125
+ * Null when the arms recorded the same rate: no sample size separates a
126
+ * difference of zero, and returning a very large number would read as "keep
127
+ * going" when the honest answer is "there is nothing here to find".
128
+ */
129
+ outcomesNeededPerArm: number | null;
130
+ stopping: {
131
+ declared: number;
132
+ /** Whether both arms cleared the declared minimum. */
133
+ honoured: boolean;
134
+ /** The arm that has not, when one has not. */
135
+ short: string | null;
136
+ };
137
+ marginal: Marginal | null;
138
+ }
139
+
140
+ /** Wilson score interval — behaves at the sample sizes this will actually see. */
141
+ function wilson(successes: number, n: number, z = Z_95): { low: number; high: number } | null {
142
+ if (n <= 0) return null;
143
+ const p = successes / n;
144
+ const denominator = 1 + (z * z) / n;
145
+ const centre = (p + (z * z) / (2 * n)) / denominator;
146
+ const half = (z * Math.sqrt((p * (1 - p)) / n + (z * z) / (4 * n * n))) / denominator;
147
+ return { low: Math.max(0, centre - half), high: Math.min(1, centre + half) };
148
+ }
149
+
150
+ function resultOf(arm: ExperimentArm, vocabulary: OutcomeVocabulary | null): ArmResult {
151
+ const declared = vocabulary ?? { values: [], success: [] };
152
+ let successes = 0;
153
+ let recorded = 0;
154
+ let recordedUsd = 0;
155
+ for (const entry of arm.tally.byValue) {
156
+ // Undeclared values are out of both halves, as everywhere since 1.50.4: a
157
+ // typo in an exporter must not decide an experiment.
158
+ if (judgeOutcome(entry.value, declared) === 'undeclared') continue;
159
+ recorded += entry.calls;
160
+ recordedUsd += entry.usd;
161
+ if (declared.success.includes(entry.value)) successes += entry.calls;
162
+ }
163
+ return {
164
+ name: arm.name,
165
+ successes,
166
+ recorded,
167
+ rate: recorded > 0 ? successes / recorded : null,
168
+ interval: wilson(successes, recorded),
169
+ recordedUsd,
170
+ };
171
+ }
172
+
173
+ export function runExperiment(
174
+ declaration: ExperimentDeclaration,
175
+ arms: { a: ExperimentArm; b: ExperimentArm },
176
+ vocabulary: OutcomeVocabulary | null,
177
+ ): ExperimentResult {
178
+ const a = resultOf(arms.a, vocabulary);
179
+ const b = resultOf(arms.b, vocabulary);
180
+
181
+ const stopping = {
182
+ declared: declaration.minOutcomesPerArm,
183
+ honoured: a.recorded >= declaration.minOutcomesPerArm && b.recorded >= declaration.minOutcomesPerArm,
184
+ short:
185
+ a.recorded < declaration.minOutcomesPerArm
186
+ ? a.name
187
+ : b.recorded < declaration.minOutcomesPerArm
188
+ ? b.name
189
+ : null,
190
+ };
191
+
192
+ const bare = (reason: NotSeparableReason): ExperimentResult => ({
193
+ a,
194
+ b,
195
+ separation: 'not-separable',
196
+ notSeparable: reason,
197
+ difference: null,
198
+ outcomesNeededPerArm: null,
199
+ stopping,
200
+ marginal: null,
201
+ });
202
+
203
+ if (a.rate === null || b.rate === null || a.interval === null || b.interval === null) {
204
+ return bare('nothing-recorded');
205
+ }
206
+
207
+ /**
208
+ * Newcombe's interval on the difference, built from the two Wilson
209
+ * intervals rather than from a normal approximation to the difference.
210
+ *
211
+ * The naive interval is symmetric and can run past 0 or 1, which at the
212
+ * sample sizes a real experiment starts with is not an edge case — it is
213
+ * most of the first week.
214
+ */
215
+ const point = a.rate - b.rate;
216
+ const low = point - Math.sqrt((a.rate - a.interval.low) ** 2 + (b.interval.high - b.rate) ** 2);
217
+ const high = point + Math.sqrt((a.interval.high - a.rate) ** 2 + (b.rate - b.interval.low) ** 2);
218
+ const difference = { point, low, high };
219
+
220
+ /**
221
+ * How many outcomes per arm would separate the difference *observed so far*.
222
+ *
223
+ * A standard two-proportion power calculation at 95% confidence and 80%
224
+ * power. It is an estimate about a difference that may itself be noise, and
225
+ * it is offered as "how much longer" rather than as a promise — but a number
226
+ * somebody can act on beats "not significant", which tells a reader nothing
227
+ * about whether to wait a day or abandon the idea.
228
+ */
229
+ const spread = Math.abs(point);
230
+ const outcomesNeededPerArm =
231
+ spread === 0
232
+ ? null
233
+ : Math.ceil(
234
+ (((Z_95 + Z_POWER_80) ** 2) * (a.rate * (1 - a.rate) + b.rate * (1 - b.rate))) /
235
+ (spread * spread),
236
+ );
237
+
238
+ const perCallA = arms.a.tally.parsed > 0 ? arms.a.totalUsd / arms.a.tally.parsed : 0;
239
+ const perCallB = arms.b.tally.parsed > 0 ? arms.b.totalUsd / arms.b.tally.parsed : 0;
240
+ const better = a.rate >= b.rate ? a : b;
241
+ const worse = better === a ? b : a;
242
+ const betterPerCall = better === a ? perCallA : perCallB;
243
+ const worsePerCall = better === a ? perCallB : perCallA;
244
+ const rateGap = (better.rate as number) - (worse.rate as number);
245
+
246
+ const marginal: Marginal = {
247
+ /**
248
+ * Per call on both sides, so arms that took different shares of the
249
+ * traffic compare. Dividing raw totals would report a marginal cost that
250
+ * moves when the split changes and the behaviour does not.
251
+ */
252
+ usdPerExtraSuccess:
253
+ betterPerCall > worsePerCall && rateGap > 0
254
+ ? (betterPerCall - worsePerCall) / rateGap
255
+ : null,
256
+ better: better.name,
257
+ dearer: betterPerCall > worsePerCall,
258
+ };
259
+
260
+ if (spread === 0) return { ...bare('no-difference-observed'), difference, marginal };
261
+ if (low <= 0 && high >= 0) {
262
+ return { ...bare('interval-includes-zero'), difference, outcomesNeededPerArm, marginal };
263
+ }
264
+
265
+ return {
266
+ a,
267
+ b,
268
+ separation: point > 0 ? 'a-wins' : 'b-wins',
269
+ notSeparable: null,
270
+ difference,
271
+ outcomesNeededPerArm,
272
+ stopping,
273
+ marginal,
274
+ };
275
+ }
package/src/index.ts CHANGED
@@ -50,6 +50,16 @@ export type { PlanAction, PlanActionKind, PlanAssumption, PlanDocument } from '.
50
50
  export { verifyPlan } from './verify.js';
51
51
  export { buildHistory, storedReportFrom, MIN_RUN } from './history.js';
52
52
  export { outcomeReport, judgeOutcome, OUTCOME_UNLOCKS } from './outcome.js';
53
+ export { runExperiment } from './experiment.js';
54
+ export type {
55
+ ArmResult,
56
+ ExperimentArm,
57
+ ExperimentDeclaration,
58
+ ExperimentResult,
59
+ Marginal,
60
+ NotSeparableReason,
61
+ Separation,
62
+ } from './experiment.js';
53
63
  export {
54
64
  ladderArithmetic,
55
65
  ladderPosition,