REPLAYStatic copy of a recorded run (data/replay-cloud.jsonl), played to the end through this checkout's contract service and saved as pages; not live. Flagsmith is not contacted: every number is Flagsmith's own, as recorded. Signing and the owner's tap need the running service, so they are read-only here. All recorded runs
Skip to content
ULYSSES Stop contracts for Flagsmith experiments Data source: Replay of a recorded run

Stop contract · signed before any data exists

Stop contract for experiment 1696

sha256 91af9a5adeea5e25 4aee79ea7f8194e6 4880ae501370b911 e4d5c9875d1ccdc5

Read it before any data exists. Once signed, the agent can start the experiment, and it can only complete it and ship when one of these rules fires.

What the agent may do on its own: Every action waits for maya's signed tap; the agent carries out nothing on its own.

§1

Experiment and flag

Experiment 1696 runs on flag ulysses_checkout_cta: control against bold. executed

§2

Hypothesis

The bold call to action raises purchases without raising refund requests.

§3

Primary metric and direction

ulysses_purchase should increase. Flagsmith's chance to win on this metric is the only number the stop rule reads.

§4

Guardrails

  • ulysses_refund_request not increase (stop on a 1% one-sided Pocock-type boundary at each look)

Checked on every refresh. A guardrail stop never ships anything.

§5

Horizon and looks

1088 identities per arm, up to 30 looks. A refresh counts as a look only when the smaller arm reaches the next planned count; refreshes in between change nothing.

§6

Stop rule

Lan-DeMets O'Brien-Fleming, alpha 0.05 two-sided. The earliest possible stop is look 3 (109 per arm), needing a Flagsmith chance to win of more than 99.999999% (z 6.99). At the final look it needs 98.39% (z 2.14). A loss is called at the mirror image.

LookIdentities per armWin needs chance to win ofz
137 no stop possible –
273 no stop possible –
3109 more than 99.999999% 6.99
4146 99.9999999% 6.03
5182 99.999996% 5.37
6218 99.9999% 4.88
7254 99.9997% 4.51
8291 99.999% 4.20
9327 99.996% 3.96
10363 99.99% 3.75
11399 99.98% 3.57
12436 99.97% 3.41
13472 99.95% 3.28
14508 99.92% 3.15
15544 99.88% 3.04
16581 99.84% 2.95
17617 99.79% 2.86
18653 99.72% 2.78
19690 99.65% 2.70
20726 99.57% 2.63
21762 99.49% 2.57
22798 99.39% 2.51
23835 99.29% 2.45
24871 99.18% 2.40
25907 99.06% 2.35
26943 98.94% 2.30
27980 98.81% 2.26
281,016 98.67% 2.22
291,052 98.54% 2.18
301,088 98.39% 2.14

If a look lands a little after its planned count, its boundary is recomputed for the identities actually there, from the same signed spending rule.

§7

Pre-signed actions

  • If it wins: ship treatment (serve bold to everyone).
  • If it loses: keep control.
  • Horizon with no decision: keep control.
  • Guardrail breach: keep control.

Each runs only after the owner confirms it with one tap.

§8

Signers and validity

Owner maya, signed. Second signer sam, needed for any amendment. The experiment must start within 30 days of the owner's signature. The contract has no expiry: once started, it governs until a look fires.

§9

Traffic split

A win is held while the chi-square test of Flagsmith's exposure counts against the split bold 50%, control 50% gives p below 0.001 (checked from 100 identities). A broken split never ships; at the horizon it means no decision.

Before you sign · computed from this contract

What this boundary does, for each true effect

If the treatment's real lift is the value along the bottom, the top chart is the chance the contract ships it or keeps control, and the bottom chart is how many identities per arm it uses on average before it stops. The marked line is the smallest lift you said you care about (+50%, from a 10.0% baseline).

Ships the treatmentKeeps control on a loss

Chance of each outcome

80.0% at +50%

Expected identities per arm before it stops

Horizon: at most 1,088 per armSingle read: 1,037 805 at +50%

True relative lift of the treatment

Single read: the 1,037 identities per arm a test read once at the end needs for the same power at the design lift, at the same alpha.

Computed exactly for this boundary by the same numerical integration that builds it (canonical sequential z model, looks on their planned counts). These describe the stop rule under the normal approximation; at low conversion counts Flagsmith's relative-lift z is skewed, see docs/STATISTICS.md.

The numbers as a table
True effectExpected z at horizonShipsKeeps control on a lossExpected identities per arm
-25.0%-2.380.001%64.1%889
-20.0%-1.820.01%42.5%972
-15.0%-1.310.1%24.5%1,027
-10.0%-0.840.3%12.5%1,058
-5.0%-0.400.9%5.8%1,073
+0.0%0.002.5%2.5%1,077
+5.0%0.385.5%1.0%1,073
+10.0%0.7310.4%0.4%1,063
+15.0%1.0517.4%0.2%1,046
+20.0%1.3626.1%0.1%1,023
+25.0%1.6536.0%0.02%993
+30.0%1.9246.4%0.01%959
+35.0%2.1856.4%0.003%921
+40.0%2.4265.6%0.001%882
+45.0%2.6573.5%0.0005%843
+50.0%2.8780.0%0.0002%805
+55.0%3.0885.2%0.0001%768
+60.0%3.2889.3%0.00003%734
+65.0%3.4792.3%0.00001%702
+70.0%3.6594.6%0.00001%673
+75.0%3.8296.2%0.000003%647
+80.0%3.9897.4%0.000002%623
+85.0%4.1498.2%0.000001%601
+90.0%4.2998.8%0.0000004%582
+95.0%4.4499.1%0.0000002%564

Sign

This contract has every signature it needs.

The contract file (its SHA-256 is the contract id)
# Ulysses stop contract.
# Sign it before the experiment starts. Its hash is written into the
# experiment's hypothesis field in Flagsmith. Editing any value changes the
# hash, and a changed contract needs fresh signatures.

ulysses_contract = 2
hypothesis = "The bold call to action raises purchases without raising refund requests."
guardrails = [
    { name = "ulysses_refund_request", direction = "not_increase", alpha = 0.01 },
]
require_guardrail_results_to_ship = true

[experiment]
project = 0
environment = "A9872CPTAK36HvgL3ES2CL"
experiment = 1696
flag = "ulysses_checkout_cta"
control = "control"
treatment = "bold"

[primary_metric]
name = "ulysses_purchase"
direction = "increase"

[horizon]
identities_per_arm = 1088
looks = 30
min_minutes_between_looks = 5

[boundary]
spending = "lan_demets_obrien_fleming"
alpha = 0.05
sides = "two_sided"

[[boundary.planned]]
look = 1
fraction = 0.033333
identities_per_arm = 37

[[boundary.planned]]
look = 2
fraction = 0.066667
identities_per_arm = 73

[[boundary.planned]]
look = 3
fraction = 0.1
identities_per_arm = 109
z = 6.9913
chance_to_win = 1.0

[[boundary.planned]]
look = 4
fraction = 0.133333
identities_per_arm = 146
z = 6.0273
chance_to_win = 1.0

[[boundary.planned]]
look = 5
fraction = 0.166667
identities_per_arm = 182
z = 5.3679
chance_to_win = 1.0

[[boundary.planned]]
look = 6
fraction = 0.2
identities_per_arm = 218
z = 4.8821
chance_to_win = 0.999999

[[boundary.planned]]
look = 7
fraction = 0.233333
identities_per_arm = 254
z = 4.5062
chance_to_win = 0.999997

[[boundary.planned]]
look = 8
fraction = 0.266667
identities_per_arm = 291
z = 4.2049
chance_to_win = 0.999987

[[boundary.planned]]
look = 9
fraction = 0.3
identities_per_arm = 327
z = 3.9566
chance_to_win = 0.999962

[[boundary.planned]]
look = 10
fraction = 0.333333
identities_per_arm = 363
z = 3.7475
chance_to_win = 0.999911

[[boundary.planned]]
look = 11
fraction = 0.366667
identities_per_arm = 399
z = 3.5684
chance_to_win = 0.99982

[[boundary.planned]]
look = 12
fraction = 0.4
identities_per_arm = 436
z = 3.4126
chance_to_win = 0.999678

[[boundary.planned]]
look = 13
fraction = 0.433333
identities_per_arm = 472
z = 3.2757
chance_to_win = 0.999473

[[boundary.planned]]
look = 14
fraction = 0.466667
identities_per_arm = 508
z = 3.154
chance_to_win = 0.999195

[[boundary.planned]]
look = 15
fraction = 0.5
identities_per_arm = 544
z = 3.0449
chance_to_win = 0.998836

[[boundary.planned]]
look = 16
fraction = 0.533333
identities_per_arm = 581
z = 2.9464
chance_to_win = 0.998393

[[boundary.planned]]
look = 17
fraction = 0.566667
identities_per_arm = 617
z = 2.8569
chance_to_win = 0.997861

[[boundary.planned]]
look = 18
fraction = 0.6
identities_per_arm = 653
z = 2.7751
chance_to_win = 0.997241

[[boundary.planned]]
look = 19
fraction = 0.633333
identities_per_arm = 690
z = 2.6999
chance_to_win = 0.996532

[[boundary.planned]]
look = 20
fraction = 0.666667
identities_per_arm = 726
z = 2.6306
chance_to_win = 0.995738

[[boundary.planned]]
look = 21
fraction = 0.7
identities_per_arm = 762
z = 2.5663
chance_to_win = 0.99486

[[boundary.planned]]
look = 22
fraction = 0.733333
identities_per_arm = 798
z = 2.5065
chance_to_win = 0.993903

[[boundary.planned]]
look = 23
fraction = 0.766667
identities_per_arm = 835
z = 2.4507
chance_to_win = 0.992871

[[boundary.planned]]
look = 24
fraction = 0.8
identities_per_arm = 871
z = 2.3985
chance_to_win = 0.991769

[[boundary.planned]]
look = 25
fraction = 0.833333
identities_per_arm = 907
z = 2.3495
chance_to_win = 0.9906

[[boundary.planned]]
look = 26
fraction = 0.866667
identities_per_arm = 943
z = 2.3034
chance_to_win = 0.989371

[[boundary.planned]]
look = 27
fraction = 0.9
identities_per_arm = 980
z = 2.2598
chance_to_win = 0.988085

[[boundary.planned]]
look = 28
fraction = 0.933333
identities_per_arm = 1016
z = 2.2187
chance_to_win = 0.986747

[[boundary.planned]]
look = 29
fraction = 0.966667
identities_per_arm = 1052
z = 2.1797
chance_to_win = 0.985362

[[boundary.planned]]
look = 30
fraction = 1.0
identities_per_arm = 1088
z = 2.1428
chance_to_win = 0.983934

[actions]
win = "ship_treatment"
loss = "keep_control"
horizon = "keep_control"
guardrail_breach = "keep_control"

[owner]
name = "maya"
public_key = "ed25519:vBVqeJ7abhdHHJ3/G0yd5rhItungf5UMvWJz93hEKxw="

[second_signer]
name = "sam"
public_key = "ed25519:RZ8S9AQBeQtWnhVQNwkUUy4aQVc87+i3NEiGBONIwzM="

[validity]
start_within_days = 30

[design]
baseline_rate = 0.1
min_relative_lift = 0.5
power = 0.8

[sample_ratio]
p_threshold = 0.001
min_total = 100

[sample_ratio.split]
bold = 50.0
control = 50.0

[health]
block_ship_when_unhealthy = true
REPLAY OF A RECORDED RUN · run recorded on Flagsmith Cloud (https://api.flagsmith.com), free plan, an existing organisation, played back at 13.8x; Flagsmith is not contacted. Its traffic was: synthetic identities (visitors simulated by examples/shop/visitors.py; Flagsmith assigns the variations)
Owner · maya · signed
Second signer · sam · needed only for amendments
Signed boundary, one ring per look Flagsmith docs: 95% / 5%
EXP 1696 · ulysses_checkout_cta
LOOKS 30
CONTRACT 91af9a5adeea
ALPHA 0.05
Signed: the shell is cast between the rings. Face it square on (Read) and it is the boundary chart.