# Readings taken where a blind spec was ambiguous

Written after the 12 specs were implemented in `blind/faults.py` and applied once to the clean company to see whether
each one selects rows, and before any check ran on any blind fault (DESIGN-blind.md section 6). Each line names the
phrase and the reading taken. Nothing here rewrites a spec.

## All faults

- "If none qualify, make no changes" (the author's general rules): replaced by the protocol. A fault that selects
  nothing raises and is reported as not applied, because applying it would leave the clean company, which passes every
  check, and score a miss that never happened.
- "Sort IDs lexicographically ascending": every id in the extract has a fixed width, so this is the numeric order.
- "Round money to cents, half up": every amount a spec recomputes is rounded once, as the billing systems round it.
- "The original extract": the clean company before this fault; each fault runs alone on its own copy.
- "No linked crm_accounts row" for a workspace: no CRM account whose `workspace_id` is that workspace.
- "Between A and B" for dates: both ends included.

## B01, contract prices doubled during CRM import

- "Exactly one tier covering every day of the contract": read as the contract has exactly one tier row, and it runs
  from service start to service end (a contract with one contract year). The other reading, that every day is covered
  by exactly one tier, holds for every contract in the extract and would make the phrase empty.
- Tier months for the opportunity amount come from the tier dates (12 for every tier selected).
- "Every selected payment": every payment on an invoice that holds one of the contract's recurring lines, set to the
  invoice's new total over all its lines.

## B02, negotiated contract discount omitted everywhere

- "The account_id has exactly one crm_contracts row": counted over the whole extract.
- Opportunity amount and payments as in B01.

## B03, lifetime card coupon lost at subscription creation

- "A positive seat count in effect on September 30": the seats of the latest seat change on or before 2026-09-30.
- "All recurring and proration card_invoice_lines": every such line of the subscription since it started.
- A proration line's period is the subscription's billing period that contains the line's invoice date. The selected
  subscriptions have not ended, so they have no refunds and none is changed.

## B04, metering counts every run twice before billing

- "Exactly one subscription for that customer, with started_on <= 2026-07-01 and ended_on null": the customer has
  exactly one subscription in total, and that subscription meets both conditions. The same reading is used in B09 and
  B10.
- "No later plan change through September 30": no plan change dated after 2026-07-01 and on or before 2026-09-30.
- "Positive timely usage": a row with runs above zero loaded before day 5 of the month after its usage month.
- A usage billing group is a workspace, a usage month, a billing date and a line type, from the author's general usage
  rule. Groups billed after 2026-10-05 have no invoice line and are not required to match one; their rows are still
  doubled, because the spec doubles every selected row from July 1 to September 30.

## B05, current ramp price overwritten with the prior-year price

- "Whose amount equals the original current-tier net annual value times 1 or 3/12": compared after rounding to cents,
  as the invoicing rule rounds.

## B06, latest billed seat increase missing from the extract

- The latest seat change is the last by effective date then change id, over the whole extract.
- "A positive proration line on the latest effective_date": a proration line whose invoice date is that day, with an
  amount above zero and a quantity equal to the increase.

## B07, scheduled seat decrease backdated by one billing period

- Not applied. The spec selects monthly subscriptions whose latest seat change is a decrease effective 1 to 5 October
  2026. No seat change in the extract takes effect after 2026-09-30 (customer behaviour in the extract stops that day),
  so no subscription qualifies. The spec is reported as written and not rewritten.

## B08, workspace link erased on migrated CRM accounts

- Accounts are tested in account id order and each account's contracts in contract id order; an account qualifies when
  any of its contracts meets the conditions.

## B09, September usage partition partially omitted

- The workspace rule is B04's shared reading, plus this spec's own conditions. "Exactly one card usage invoice line
  dated 2026-10-05 with period September" counts card lines of type `usage` and `usage_late`.

## B10, warehouse load timestamps substituted for metering arrival times

- Same workspace rule as B09, so B09 and B10 select the same workspace; each runs alone on its own copy.

## B11, paid contract renewal charge missing from the invoice extract

- The title says renewal, but the selection rule does not restrict to renewal contracts. The selection rule is applied
  as written: any recurring line that meets it.

## B12, bank transfer replayed as a second contract payment

- "The smallest unused identifier": the smallest positive integer not used by any payment id, padded to five digits.
