# Naive ARR gap under other billing mixes and seeds: protocol

Written before any sweep code existed. It changes nothing in DESIGN.md, DESIGN-realization.md, the generator, the
models, the checks, the faults, results.json or results-realization.json. Its results go in a new file,
results-sensitivity.json.

## Question

The entry page reports how far naive ARR (one month's billings times 12) sits from defined ARR: +7% in the final
month and between -17% and +88% across the 18 reported months. The gap share is (naive ARR less defined ARR) divided
by defined ARR. Those figures come from one seeded company whose billing mix the generator sets: a quarter of seat
plans billed a year ahead (`P_ANNUAL = 0.25`) and six in ten contracts invoiced a year ahead, the rest a quarter ahead
(`P_ANNUAL_BILLING = 0.60`).

How much does the gap move when that billing mix changes, and when the seed changes?

## Inputs

- Billing mix, at the study seed 52817: `P_ANNUAL` in {0, 0.25, 0.5} crossed with `P_ANNUAL_BILLING` in
  {0, 0.3, 0.6, 1.0}. Twelve companies; the cell (0.25, 0.6) is the study's own company.
- Seed, at the study's billing mix (0.25, 0.6): seeds 52817, 53817, 54817, 55817 and 56817. Five companies; the
  first is the study's own company.
- Every other generator setting stays as it is. Each company is built by `warehouse.generate.build(seed)` with the
  two settings set for that run and restored after it. `warehouse/` and `dbt/` are not edited, so the main code hash
  in results.json still holds.
- No dbt run. Defined ARR and naive ARR come from the generator's own calculation from its records, which matched the
  warehouse to the cent in all 18 months on the study's company.

Changing a share changes which random draws later decisions use, so each billing mix is a somewhat different company,
not the same company billed differently. Defined ARR in the final month is reported beside each gap so this shows.

## Outputs (results-sensitivity.json)

Per company: final month defined ARR, naive ARR and gap share; the lowest and highest monthly gap share across the 18
reported months; the median absolute monthly gap share; migrations and migrations whose CRM account has no workspace
link.

Summary: across the twelve billing mixes, and across the five seeds, the range of the final month gap, the lowest and
highest monthly gap, and the range of the median absolute gap; across the five seeds, the range of unlinked
migrations.

## Control

The study's own company (seed 52817, mix 0.25 and 0.6) must give results.json's defined and naive ARR in all 18
reported months to the cent. If it does not, the sweep stops and nothing is reported.

## What it does not show

The seven planted faults and the checks are not run on the other companies, so the sweep says nothing about whether
the catch outcomes hold on other seeds or mixes. The shares tried are settings of this generator, not a survey of how
real companies bill.

## Amendment 1

Recorded after the first run stopped and before any result was written or read; nothing above is changed.

The first run built the twelve billing mixes, then stopped at seed 53817 with an error in the generator's own revenue
calculation: one contract's onboarding fee is invoiced on its service start day, which falls after the 18 reported
months, and that calculation keeps one bucket per month only up to the last reported month. The study's seed never
produces such an invoice, so results.json is unaffected. The run wrote nothing.

Fix, without editing `warehouse/`: during each sweep build, the generator's calculation gets one more month bucket
after the last reported month, and that month is dropped from every output. ARR and naive ARR for a month depend only
on that month's records, so the 18 reported months are unchanged; the control above still has to hold on the study's
company, and the sweep checks that every company still reports exactly the same 18 months.
