# Bordereaux and conversion reconciliation (declared before any data, check or fault existed)

A new question in the ARR reconciliation study, on a new synthetic book. Sections 1 to 10 are the declaration, written
before any generator, model, check or fault of this round existed and before the independent author ran.
`tests/test_bordereaux.py` pins them by sha256. Section 11 is added once, before any check runs on any fault and before the
author runs: it pins the code by hash. A later change goes in a new section at the end headed `## Amendment N: <what
changed>`. `bordereaux/protocol.json` holds the families, tolerances and predictions in a form the runner reads, and is
pinned the same way.

Nothing in the earlier rounds changes: their designs, results, models, checks and pages stay byte-identical, apart from one
linking sentence on `index.html`. `tests/test_bordereaux.py` pins each published results file. This round writes
`results-bordereaux.json`.

## 1. Question and overlap test

An MGA (a managing general agent, which writes policies on a carrier's paper under delegated authority) sends its carrier
monthly premium and claims reports called bordereaux. It also has to move its book from a legacy system to a new one once.
Both are the same family as the rest of this study: two records of one business that should agree, faults planted with
predictions, faults written blind.

The question: **on a book of insurance-shaped data, what does each layer of checks catch: totals, line-by-line ties to the
system of record, rules a carrier can run on the report alone, record-level conversion checks and post-migration
validation? And which faults pass all of them?**

Overlap test against every published page of this study:

- `index.html` and `blind-faults.html` tie CRM, billing and invoices for one number (ARR). They never test a recurring report
  sent to a counterparty against its source, nor a one-off conversion.
- `independent-checks.html` adds records outside the pipeline; `payment-rails.html` follows money from processor to ledger.
  Neither has a counterparty report, a line key or a conversion. The planted and blind faults here live in those places only.
- `price-realization.html`, `lifecycle-metrics.html` and `price-waterfall.html` measure price and retention, not agreement
  between systems.
- The separate data quality study checks one feed's loads, not agreement across systems, so it is not the home.

What is new and answered nowhere: how much a totals check misses that a keyed line tie finds on a report, the same comparison
for a conversion, and what post-migration validation adds. The round narrows to that. It reports no ARR, no retention and no
cash.

This is insurance-shaped synthetic data. It shows a method. It is not insurance experience, and no column layout, rate,
commission or claim pattern here describes any real carrier, MGA, market or reporting standard.

## 2. The book (explicitly synthetic)

`bordereaux/book.py` builds one book from one seed (the study's book is seed 61409). Everything below is an assumption of
this study. Period: bordereau months 2024-07 to 2026-09 (27 closes). The legacy system holds the book up to the cut-over at
2025-12-31; the new policy system holds it from then on, loaded by conversion.

- **Brokers.** 24 brokers, `BRK-001` onward, each with one commission rate (10%, 12.5% or 15%, drawn once).
- **Binding terms.** Per line of business, the carrier's commission to the MGA and a maximum limit under delegated authority:
  PROP 25% and 5,000,000; GL 27.5% and 2,000,000; PL 30% and 3,000,000. A coverage above the maximum must carry a referral.
- **Policies.** Each month's new business is about 34 policies times a season factor (1.5 in January and July, 1 otherwise).
  Line PROP 45%, GL 35%, PL 20%. Currency USD 85%, CAD 15%. Term 365 days. Billing plan ANNUAL 55%, QUARTERLY 25%, MONTHLY
  20%. Each policy term has its own policy id, and a renewal links to its prior term.
- **Coverages.** PROP has BLDG, CONT and BI (one to three, BLDG first); GL has PREM and PROD (one or two, PREM first); PL has
  EO. Limits are drawn from round values per line; 1% of coverages are written above the authority limit, with a referral
  flag. Annual premium is the limit times a line rate times a log-normal factor (sigma 0.35), to the cent.
- **Premium transactions** (one row per coverage, each with its own transaction id): NB or REN when a term starts, END
  (endorsement), CAN (cancellation), REI (reinstatement). Each carries the written premium, the annualized change, an
  effective date and a booked date. New business is booked 0 to 5 days after its effective date (10% of the time 6 to 20
  days). A renewal is booked from 15 days before to 3 days after. An endorsement or a cancellation is booked 0 to 10 days
  after it takes effect, and 8% of the time 30 to 90 days after (a late booking, legitimate).
- **Endorsements.** 20% of terms get one or two, each changing the annual premium of one coverage by plus or minus 5% to 25%
  (5% of them change only the limit, at zero premium), written pro rata for the rest of the term.
- **Cancellations.** 9% of terms cancel: 10% of those flat from inception, the rest at a uniform day of the term, each
  coverage returning the in-force premium pro rata. 15% of cancellations are reinstated within 30 days at the same amount.
- **Renewals.** A term that runs out renews with probability 0.8, annual premium times a uniform 1.00 to 1.12.
- **Billing.** Each transaction with non-zero premium has instalments: ANNUAL or an adjustment, one; QUARTERLY, four; MONTHLY,
  twelve; the last absorbs rounding. Each has a due date and a paid date (paid 0 to 45 days after due, empty if after 2026-09-30).
- **Broker commission.** One row per transaction: the broker's rate times the premium, to the cent.
- **Claims.** Per term with probability PROP 12%, GL 10%, PL 6%; loss date uniform within the term, up to cancellation;
  reported 0 to 30 days later (PL 0 to 120). A reserve is set on the report day; then up to three reserve changes and up to
  four payments (indemnity or expense), closing with the reserve at zero; 8% reopen with a new reserve; 6% of PROP claims
  recover money. Each movement has a booked date. Events after 2026-09-30 are not in the records.
- **FX.** One US$ per CAD rate a month, on a stated path; USD is 1.

Nothing here is meant to be typical of any market. No tax, fees, reinsurance layers or earned-premium accounting beyond the
unearned figure in section 3.

## 3. The records

**System of record** (the new policy system, converted history included): `pas_brokers`, `pas_policies`, `pas_coverages`,
`pas_transactions`, `billing_instalments`, `broker_commissions`, `claims`, `claim_transactions`. Plus `binding_terms` and
`fx_rates`.

**Bordereaux**, built by a stated rule from the system of record:

- `bdx_premium`: one line per transaction in the month it was booked: month, line number, transaction id, policy, coverage,
  type, effective and booked dates, currency, gross premium, the month's rate, gross premium in US$, broker commission in US$,
  MGA commission in US$ (binding rate times the US$ gross), net due to the carrier in US$ (gross less MGA commission).
- `bdx_risk`: at each month end, one line per coverage in force: effective on or before the month end, expiring after it, and
  with cumulative annualized change, over transactions booked by then, above zero. Carries limit, annualized premium and referral flag.
- `bdx_claims`: at each month end, one line per claim reported by then that is open at the month end or moved in the month:
  status, paid in the month, paid to date, reserve outstanding, recovered to date, incurred (paid plus reserve less recovered),
  the rate and the same in US$.
- `bdx_cover`: the month's cover sheet: line counts and US$ totals for the other three.

**Legacy system**, as extracted at the cut-over, in its own conventions (dates as YYYYMMDD text, amounts in integer cents,
numeric code sets, its own keys): `leg_policy_master` (with annual premium and unearned premium at the cut-over, pro rata over
365 days, truncated to whole currency units), `leg_coverages`, `leg_premium_history`, `leg_commissions`, `leg_claims` (with
balances), `leg_claim_history`, `leg_open_instalments` (not yet paid at the cut-over), `leg_control_report` (the legacy
system's own totals at the cut-over). It also holds a few quote and test records, 2.5% of policy rows, that must not convert.

**Conversion artifacts:** `conv_crosswalk` (entity, legacy key, target key, batch), `conv_exclusions` (legacy key and reason)
and `conv_code_map` (legacy code to target code). Records convert in six batches by the term's effective quarter (the last
batch taking the rest); each converted row of the system of record names its batch.

## 4. The model

A small dbt project on DuckDB, `bordereaux/dbt`, that reads the tables above as text and casts them: staging, then `dim_broker`,
`dim_policy`, `dim_coverage`, `fct_premium_transaction`, `fct_billing_instalment`, `fct_claim`, `fct_claim_month`,
`fct_bordereau_line` (keyed to a policy and a transaction), `fct_bordereau_risk_line`, `fct_bordereau_claim_line`. The schema
tests on these models are one check family (`model_keys`).

## 5. The checks

Each check is one SQL branch in a family model under `bordereaux/dbt/models/checks`, writing one row per flag: check id,
close month, key, detail. A family fires at a close when it writes a row. Every tolerance is declared here and never changes.
US$1 means within US$1.00 inclusive; a cent means within US$0.01 inclusive.

**`bdx_totals`: month totals against the system of record** (what a person ticking a cover sheet does; the flag names a month
and a measure, never a record). T1 premium line count; T2 written premium in US$; T3 broker and MGA commission in US$; T4
claims paid in the month in US$; T5 reserve outstanding at the month end in US$; T6 the cover sheet against the sum of its own
lines. T1 and T6 counts are exact; the amounts allow US$1 a month.

**`bdx_lines`: each line keyed to the system of record.** L1 every transaction has exactly one line, in its booked month. L2
every line names a known transaction, once. L3 the line's type, policy, coverage, currency, dates, gross and rate equal the
record (a cent). L4 the line's commissions and net equal a recomputation from `broker_commissions`, the rate and the binding
terms (a cent). L5 every claim due a line that month has one, and no other claim does. L6 each claim line's status, amounts
and rate equal the movements booked by then (a cent). L7 the risk list equals the coverages in force, both ways, with limit and
annualized premium (a cent).

**`bdx_rules`: what a carrier can run on the bordereaux, the binding terms and the rate table alone.** R1 premium sign fits
the type (NB, REN, REI not below zero; CAN not above). R2 claim continuity: last month's paid to date plus this month's paid
equals this month's paid to date, a reserve never disappears without a line, an open claim never skips a month. R3 no premium
line and no risk line for a coverage after its CAN line, unless a REI line follows. R4 loss date inside the coverage's term
and not after its cancellation effective date, report date not before loss. R5 MGA commission equals the binding rate times
the gross (a cent) and net equals gross less commission. R6 the rate on each line is the month's published rate, and US$
equals amount times rate (a cent). R7 limit within the authority maximum unless referred. R8 (review flag) the month's premium
or line count more than 50% from the median of the last three months. R9 (review flag) a coverage's premium-to-limit rate more
than four times, or under a quarter of, its line's median in that report. R10 (review flag) a line booked more than 60 days
after its effective date. R11 a closed claim with a reserve, a closed claim paid without reopening, or incurred not equal to
paid plus reserve less recovered.

**`conv_totals`: conversion source to target, totals** (at the cut-over; the flag names an entity or group). C1 record counts:
legacy less exclusions against converted target rows, per entity. C2 premium in force at the cut-over, by line and currency,
against the legacy control report (1 currency unit). C3 written premium history by line and currency (1 unit). C4 open claims
count, reserve and paid to date, by currency (exact count, 1 unit).

**`conv_records`: conversion, record by record** (after the declared code map). K1 every legacy record not excluded has
exactly one crosswalk row and one target, and every converted target row has a crosswalk row. K2 policy fields equal. K3 coverage
fields equal. K4 premium history fields equal. K5 claim and claim history fields equal (a cent). K6 every exclusion names a
legacy row that really is a quote or a test.

**`post_migration`: the target's own rules on the converted records against what legacy held, and the first closes after
it.** M1 each converted policy's in-force premium, recomputed in the target from its converted transactions, against legacy's
stored annual premium (a cent, in force at the cut-over). M2 each in-force policy's unearned premium, recomputed in the target,
against legacy's stored figure (1 unit, since legacy truncates). M3 each legacy open instalment has one target instalment, due the
same day for the same amount, and each converted target instalment unpaid at the cut-over traces back to one (a cent). M4 each
converted open claim attaches to a policy whose term contains its loss date. M5 each converted claim's first bordereau line after
the cut-over: paid to date less paid in the month, and reserve less the month's reserve moves, equal legacy's closing balances
(a cent). M6 each converted policy still names a known broker, a billing plan and at least one coverage.

**`model_keys`:** the dbt schema tests in section 4: unique keys, not-null keys and amounts, relationships from each line to its
policy and transaction, accepted values. Unique legacy keys in the crosswalk.

The checks may run on clean books before section 11 only to find code errors. A tolerance or window never changes after that.

## 6. Declared faults, written by the same author as the checks (a self-test), with predictions

Each is applied by `bordereaux/faults.py` to the clean book of seed 61409. Prediction: the families that will fire.

| Id | Fault | Selection and change | Predicted to fire |
|---|---|---|---|
| F1 | A missed endorsement | The largest absolute END premium booked in 2026-03 loses its `bdx_premium` line; the cover sheet is rebuilt | `bdx_totals`, `bdx_lines` |
| F2 | A cancelled policy still reported | The first term with a CAN booked in 2026-04 and no REI: its CAN lines leave `bdx_premium`, its coverages stay on `bdx_risk` to expiry or the last close; cover rebuilt | `bdx_totals`, `bdx_lines` |
| F3 | A claim reported in the wrong period | The largest payment booked in 2026-02 on a claim with lines in that month and the next moves to the next month's line; paid to date and incurred follow; cover rebuilt | `bdx_totals`, `bdx_lines` |
| F4 | A currency error | Every CAD line of `bdx_premium` in 2026-05 is reported at rate 1, so its US$ fields equal the CAD amounts; cover rebuilt | `bdx_totals`, `bdx_lines`, `bdx_rules` |
| F5 | A sign error | The lowest-id CAN line booked in 2026-06 is reported positive, in premium, commissions and net; cover rebuilt | `bdx_totals`, `bdx_lines`, `bdx_rules` |
| F6 | A duplicated conversion batch | Batch 3 loads twice: its policies, coverages, transactions, instalments, commissions, claims and claim movements gain copies under new target ids, and the crosswalk gains those rows; bordereaux unchanged | `bdx_totals`, `bdx_lines`, `conv_totals`, `conv_records`, `post_migration`, `model_keys` |
| F7 | A premium swap in conversion | Two in-force converted PROP USD single-coverage policies whose NB or REN was booked in the same month, lowest ids with different premiums: their premium rows and annual figures swap in the target only | `bdx_lines`, `conv_records`, `post_migration` |
| F8 | A wrong broker rate everywhere | The broker with the lowest id at 10%: its rate is 15% in `pas_brokers`, and its commission rows and bordereau broker commission recomputed, in the target, the legacy commission history and the cover sheet alike | none (it should pass every check) |

## 7. The blind faults, written by an independent author

An independent author who never saw the checks writes 12 faults, ids B01 to B12, run once, read-only, from a clean folder that
holds only `bordereaux/bundle/BOOK.md` (the description of sections 2 and 3, and the schemas) and 20 sample rows of each table of
the clean book at even steps. The file-list check (`bordereaux/bundle.py`) refuses any other file and any text naming a check,
family, model, declared fault, this protocol or a result.

- The author is asked for a mix it chooses, with at least 4 faults in a bordereau, at least 4 in the conversion, and at least 3
  in which every system still agrees with every other, and for each a machine-applicable spec, its first month, its effect, and
  whether a careful monthly control would catch it.
- The prompt is `bordereaux/author-prompt.txt`. Recovery is mechanical: split the last message at its last `JSON to write:`
  line, parse, check the fields (`bordereaux/recover.py`). The JSON is kept verbatim as `bordereaux/author-specs.json`. One run;
  a run with no recoverable answer may be repeated once; a run that answers is never repeated.
- Each spec is implemented once and literally in `bordereaux/blind.py`. Every function returns a census and raises if it touched
  nothing. Each reading an ambiguous phrase forces goes in `bordereaux/JUDGEMENTS.md`, committed before any check runs on any
  blind fault. A spec that cannot be applied as written is reported as not applied and never rewritten.
- The author's model and run details stay in the study's private record, so this file, the results and the runner can ship.

## 8. Scoring, in three places, never pooled

- **Positive controls.** `bordereaux/controls.py` makes one small mutation per check, all in one run, and each named check must
  flag the mutated key. A check with no recorded firing is reported as unproven and not counted. This is a code test, not evidence
  about real faults.
- **Clean books: false alarms.** Six clean books (seeds 61409, 62409, 63409, 64409, 65409, 66409), 162 closes. Every flag is a false
  alarm, reported per family as flags per close and share of closes with any flag.
- **Faults.** Each runs once, on a fresh database. A fault is caught by a family when that family writes a flag whose check and key
  the clean book of seed 61409 does not write at the same close. Reported separately for the 8 declared faults (a self-test)
  and the 12 blind faults (the held-out test), per family and for these groups: **totals** (`bdx_totals`, `conv_totals`), **line and
  record** (`bdx_lines`, `conv_records`), **rules** (`bdx_rules`), **post-migration** (`post_migration`), **keys** (`model_keys`).
  A flag from a review rule (R8 to R10) counts as a catch like any other, and the results also say whether the fault was caught
  without them.

A catch means a check flagged something, not that a person would read the flag as the error meant. Results go to
`results-bordereaux.json` whatever they show. Each fault also records its effect on the last close: gross, net due, paid and
reserve in US$ against the clean book. The trace on the page is the lowest-id blind fault caught by the line and record group and
by no totals family; if there is none, the lowest-id caught blind fault.

## 9. Predictions

Scored in the results, whatever they show.

- **P1.** All six clean books: zero flags from `bdx_totals`, `bdx_lines`, `conv_totals`, `conv_records`, `post_migration` and
  `model_keys`, and zero from R1 to R7 and R11. (True by construction unless the code is wrong: the bordereaux and the target are
  built from the same records.)
- **P2.** The review rules R8 to R10 raise between 0.5 and 8 flags a close on the clean books.
- **P3.** Every check fires on its positive control.
- **P4.** Each declared fault fires exactly the families in section 6 (8 sub-predictions, reported one by one).
- **P5.** 7 of 8 declared faults are caught, and the miss is F8.
- **P6.** The blind faults caught by any family: at least 8 of those applied.
- **P7.** On the blind faults, the totals group catches fewer than the line and record group.
- **P8.** On the blind faults, the totals group catches at most half of those applied.
- **P9.** On the blind faults, every fault the author marks as keeping every system in agreement is missed by the totals and line
  and record groups, unless it breaks a stated rule.
- **P10.** On the blind faults, `model_keys` catches at most 3.

## 10. What this design cannot show, and the run order

One synthetic book for the faults, five more seeds of the same generator for false alarms, one independent author, one run per
fault, 20 faults. The bordereaux and the target are built by code from the same records the checks read, so on clean data most
of them tie by construction; a tie is evidence only against a change to one side. The author sees my description of the book, a
description a real party would not need, and I apply its faults (the judgements file is the guard). A real bordereau, legacy
system and conversion are messier, so these false alarms are a floor. No real carrier format, no insurer data, no regulatory
reporting, no actuarial view, no reinsurance, no tax. None of this is insurance experience; it is a method on insurance-shaped data.

Outputs: `results-bordereaux.json` (no run identity or timing; a rerun from the same code writes the same bytes), `bordereaux.html`,
linked from `index.html` with one sentence, `tests/test_bordereaux.py` and `tests/test_bordereaux_page.py`.

Run order:
1. This declaration and `bordereaux/protocol.json`, committed.
2. The generator, the model and the checks; each check's positive control; section 11 with their hashes, committed. Clean books may
   run before this commit only to find code errors.
3. The bundle, its file-list check, the author run, recovery, committed.
4. The declared and blind faults as code, the judgements, committed.
5. The runner: clean books, controls, declared faults, blind faults; `results-bordereaux.json`, committed.
6. The page, its number check, its tests, the export.

## 11. Frozen code

Added before any check ran on any fault and before the author ran. On clean books the checks ran only on seeds 61409, 62409 and 66409, to
find code errors, and the positive controls ran once on seed 61409, firing all 40 checks: no tolerance or window changed. The runner refuses
to start if any file differs. One code error found that way: a staging cast read the to-date claim amounts as dates.

Readings the code fixed while sections 2 and 3 left them open: an endorsement that would be booked on or after its term's cancellation
booking is dropped, so no premium line follows a cancellation line; an endorsement or a cancellation is never booked before its term's first
booking; a reopened claim stays open across at least one month end, so a closed claim is never paid inside one month with no open line; a
recovery comes after a claim's last closing and does not reopen it; a limit-only endorsement that would pass the authority maximum on a coverage
with no referral stops at the maximum; a renewal booked by the cut-over with a term starting after it converts with status PENDING.

| File | sha256 |
|---|---|
| `bordereaux/book.py` | `f85ba559658bd2a744e26a67d2aca51fe247078249a616f84ef06f8745b5c35a` |
| `bordereaux/engine.py` | `e69ebe245ffdef49e614d477579eece33c3cb891ef0660218cdf049592e05004` |
| `bordereaux/controls.py` | `0226a74781a1067768b3862e5a89233821dd3cbc26bb8a2c155a0dc889b55dca` |
| `bordereaux/protocol.json` | `360afac93aeb00f1c8b28f36160b9566daf8c22d76b5bd41945ba877c2d39b94` |
| `bordereaux/dbt/dbt_project.yml` | `56e98431b7db488b21d4f8206a3e62b37cb1902808306cbf4e42e4573aef51e8` |
| `bordereaux/dbt/macros/helpers.sql` | `21066f2c803ebf2b3f5899be46f6b0509e6db7d7644854216eea03613a319a96` |
| `bordereaux/dbt/models/_models.yml` | `be25d2505c7f404f6df89131de0aff432666a57bc1043dec10a1b1e4075fe5f3` |
| `bordereaux/dbt/models/checks/chk_bdx_lines.sql` | `af6d33c9fd73ec868365d7c841a41f557009616f703a649b503e4707a19a4265` |
| `bordereaux/dbt/models/checks/chk_bdx_rules.sql` | `c107b2bc9bbe0ba43206847c55c04f8c9a52e6d5803791d5aa1f939e047af6a7` |
| `bordereaux/dbt/models/checks/chk_bdx_totals.sql` | `41a5e598d6abc3a121ba093b75848446aab973e441a9937564545f82bee83693` |
| `bordereaux/dbt/models/checks/chk_conv_records.sql` | `36b2633346699799e1034f9defe012206aebfd6c208780db2046bb596d4c26cd` |
| `bordereaux/dbt/models/checks/chk_conv_totals.sql` | `28f874aa54ad6d83e38ddf1f34540dcb2fbb70282bae6463e64606db22442a97` |
| `bordereaux/dbt/models/checks/chk_post_migration.sql` | `ef341f8d7ed21b9b0775e7f2fb5bd6883eb6d4709913957137011d877fcc344f` |
| `bordereaux/dbt/models/checks/fct_check_flags.sql` | `a24c198355a490cf3053b1572dfaf4df7367064c42866ec19b6b15153ba8e96a` |
| `bordereaux/dbt/models/intermediate/int_inforce_month.sql` | `fd55394fc47ce1a27ff37fdce50ab893083344c41b5f58577d74a5e387c6d606` |
| `bordereaux/dbt/models/intermediate/int_months.sql` | `7a631cd54d9c4095af74f1ff31f516a9743015bab7e4bcd80da51440f082afcd` |
| `bordereaux/dbt/models/marts/dim_broker.sql` | `3f3539d664af7789457c177cfd29f11bc8c71c2be6fe2b26352d14ff57a39e82` |
| `bordereaux/dbt/models/marts/dim_coverage.sql` | `8fb6682ab1e1a5878a2fd905f40b4951f78ac4e8d2f616d9e03f7d403224ed1f` |
| `bordereaux/dbt/models/marts/dim_policy.sql` | `1b20a47e9ab335c0b0c94825f92a29040b9305a9dc8d28da4f1a6f93f7ab02cc` |
| `bordereaux/dbt/models/marts/fct_billing_instalment.sql` | `9709de566b1d855f6061a50e3e5bd1cc9128af9e45dac2190a6f712316bd540b` |
| `bordereaux/dbt/models/marts/fct_bordereau_claim_line.sql` | `1acc41568a7b83b1b23683e2b39e0fecc620d2768b03cee436b53076e6f998a4` |
| `bordereaux/dbt/models/marts/fct_bordereau_line.sql` | `e742cf6a4c64e0d7c5d3f28dd72f50a7e5b621ad06a4a727d3d0665e1753cc0c` |
| `bordereaux/dbt/models/marts/fct_bordereau_risk_line.sql` | `feb2bbb7286b710ff6f523eef1dfc252c9c5bb031695af5df5fe4580b6dbf273` |
| `bordereaux/dbt/models/marts/fct_claim.sql` | `252b35fddfea32b90d914933b30dd138ea619526ec4ca5885d98614f61f61b63` |
| `bordereaux/dbt/models/marts/fct_claim_month.sql` | `d0fdf2dde5155aa61366a409991c5c2dfbda104979f8c64ecaaa2ce4b0368c2b` |
| `bordereaux/dbt/models/marts/fct_premium_transaction.sql` | `a8daef45eb7fe02563b91a9a585b9b080076676d23008321339dc7e3bdb7ec1c` |
| `bordereaux/dbt/models/staging/_sources.yml` | `07cabc3bf4e339cdbb53a95e1e95cd89863461659d176f232e32019e7ceaaf72` |
| `bordereaux/dbt/models/staging/stg_bdx_claims.sql` | `700e1483461c18351ae3aef6cefea593788c9979b2c56f42a1c382182ba013df` |
| `bordereaux/dbt/models/staging/stg_bdx_cover.sql` | `7620e9d005e30761807265ae034a2bd6a9bae137eb9e0ac4c008c1240387d953` |
| `bordereaux/dbt/models/staging/stg_bdx_premium.sql` | `a779db1ff82ea819b8027f17bd762712f4bcfa23c2289718c55e6656118e5b7e` |
| `bordereaux/dbt/models/staging/stg_bdx_risk.sql` | `7c7e9e16e09e06823c33f63d90e75231a83661f0b659901060348398242b0ae4` |
| `bordereaux/dbt/models/staging/stg_billing_instalments.sql` | `e876d71da5b68453430e15a22195d2cd7a7552bd6a46b9940b64901c78022dda` |
| `bordereaux/dbt/models/staging/stg_binding_terms.sql` | `c25e2fa0f15ac546bd7de0b8b4ee9cad273b4f9e114498833252b2fdfa14d09a` |
| `bordereaux/dbt/models/staging/stg_broker_commissions.sql` | `0a91aae66140b0c802a67d47564e48a760ada5aeca29ecc9ca2858e998413ef6` |
| `bordereaux/dbt/models/staging/stg_claim_transactions.sql` | `7466304771ec083cfdac1eaef51a61d31e8cc8d0d5d57150f2b31136435ee2a7` |
| `bordereaux/dbt/models/staging/stg_claims.sql` | `cd101c3539de1c47d25199ccfc039806a9f967a57491d5b75d6bc1146b1d3ef0` |
| `bordereaux/dbt/models/staging/stg_conv_code_map.sql` | `11623e92f2988a89c38002b02bfafd5d821b6e47d1113b1d8003ca19719e9668` |
| `bordereaux/dbt/models/staging/stg_conv_crosswalk.sql` | `59a029387ef7a524ed06e2fceaf57642894b77fff2bb3a2aebba6e46e8c39caf` |
| `bordereaux/dbt/models/staging/stg_conv_exclusions.sql` | `88f1d09c1e4ecd17bcb1f26dba7d4d035dfe47a13173d9d031c181495e01ca06` |
| `bordereaux/dbt/models/staging/stg_fx_rates.sql` | `395a61abed3273ffdcf9060e09b649f3d8b86aa088f531ae9c534e4f995f0fa8` |
| `bordereaux/dbt/models/staging/stg_leg_claim_history.sql` | `37f4279eea00f1c53e0857c227750f279d0fdd61ad19c5c8a4af419081e47156` |
| `bordereaux/dbt/models/staging/stg_leg_claims.sql` | `127a27f14c4579391dd1b37dea8e20eeb8d76c111affeee755a6cbfa336e4ff3` |
| `bordereaux/dbt/models/staging/stg_leg_commissions.sql` | `afc131c82244857a50ddd5c9d38d72d1db852e64d01976384e06a1226dfb6dc2` |
| `bordereaux/dbt/models/staging/stg_leg_control_report.sql` | `2eff6af1acea3fe13cd66bbcf8acc5af8250aab796dffc4e9070f8cbc7a09033` |
| `bordereaux/dbt/models/staging/stg_leg_coverages.sql` | `5b8fcea42ebd436487d9187c34f05757ff9a7c1d5d84de60d664173d44ffbbf6` |
| `bordereaux/dbt/models/staging/stg_leg_open_instalments.sql` | `ef7614f5f6470bbb0ae5dc2fe21641440f0aef7f295fbb9a46e280128871e987` |
| `bordereaux/dbt/models/staging/stg_leg_policy_master.sql` | `1d24e61466e95765660d45c22f5d419a09b5efbcc2264833e633fed9e354d281` |
| `bordereaux/dbt/models/staging/stg_leg_premium_history.sql` | `a2d1eb8e7d25fbd8fa70539e2ba6469728a5f6ed9e0e0fc18951826af76f91ac` |
| `bordereaux/dbt/models/staging/stg_pas_brokers.sql` | `e84763b2610e5f418ac20b0efe5efc6c9240c750171539efd1c3d5b2d9bdd931` |
| `bordereaux/dbt/models/staging/stg_pas_coverages.sql` | `afffe1d5e0704515d6bea75260765c1eb8e8e440c0d67699a995a51deb7d7c52` |
| `bordereaux/dbt/models/staging/stg_pas_policies.sql` | `fafea6a5bdd7a1657281cdeb8125795a8b1757d6c23ad8a6529371b9c383c9a1` |
| `bordereaux/dbt/models/staging/stg_pas_transactions.sql` | `d5883e05bfdf5a8274aab8d959bfd00694c83355c0b5c87dfc76a0f604f19c5c` |
| `bordereaux/dbt/profiles.yml` | `0927ecc984c1c62e6275f0afaae685dca5d083e0dc5d3c3fbf3c6d29b3c3cacf` |
| `bordereaux/dbt/tests/generic/no_flags.sql` | `0079cae21a5611ab8bc0cdb7d495e174ee9355fbe9913920b873ce339fc182bd` |

## Amendment 1: what the run added after the results

Nothing in sections 1 to 11 changed. No check, tolerance, fault or score was changed after any fault ran.

- One blind spec did not apply. The selection of B11 found no row on the book of seed 61409, so it is reported as not applied and was not
  rewritten (`bordereaux/JUDGEMENTS.md`, item 12). The blind score is over the 11 that applied, and the page says what it would read if B11
  counted as a miss.
- `results-bordereaux-trace.json`, written by `site/trace_bordereaux.py` after the results, holds the worked example's records and the closes at
  which each group fired. The split it allows, totals counted only from the cut-over on, was chosen after the results and is labelled so on the page.
- Two readings on the page were made after the results and are labelled there: every catch came through the line and record group, and the
  rules, post-migration and schema tests added no catch of their own.

## Amendment 2: what review added after the results

Nothing in sections 1 to 11 changed. No check, tolerance, fault, score or prediction changed after any fault ran. Everything below was decided after the results were seen, and the
page labels it so.

- `bordereaux/readings-after-results.json`, written by `site/readings_bordereaux.py`, holds four readings: the blind faults split by the author's own `area` label, set before anything
  ran (section 1 asks this question, section 8 did not declare the split); each blind fault's moves on the cover sheets; the checks that fired on no fault; and four rules built after
  seeing the two conversion misses (a commission total, a count by billing plan, the broker's rate, commission against premium). Those rules ran as plain sums over the book, on the
  faulted copies and the six clean books. They count toward no score.
- Section 8's effect measure reads gross, net due and paid over every month, and the reserve at the last close only. It reads no change for B08 and B09, while a cover sheet moved in
  each. The results file stays as it is; the page now labels that column by what it reads, and gives the cover sheet moves beside it.
- Section 10 says these false alarms are a floor. That sentence stays as declared, and the page no longer repeats it: R10 raises most of the flags, its count depends on the generator's
  assumed late-booking rate as well as the threshold, and a real book could raise fewer.
- P7 could hardly fail: a total moves only when a row moves, and the line and record group compares the same sources row by row. The prediction stands as scored, and the page says this.

## Amendment 3: a count that depends on row order, found on a rerun after the results

Nothing in sections 1 to 11 changed, and `results-bordereaux.json` stays as committed. A clean rerun from the public files, made after the
results, wrote a results file that differed from the committed one in three fields of F6, the duplicated conversion batch, and nowhere else:
`new_flags` (3,206 against 3,197), `flags_by_family.conv_records` (977 against 968) and `flags_by_check.K2` (9 flags against none).

- The cause is in frozen code. `chk_conv_records.sql` looks up an old policy's new key with `(select y.target_key from pol y where
  y.legacy_key = ... limit 1)`, in no fixed order. On the clean books and every other fault each old policy has one crosswalk row, so the
  lookup has one answer. F6 loads a batch twice, which gives 108 old policies two new keys, and 9 converted renewals name one of them as
  their prior policy. K2 flags those 9 when the lookup returns the duplicate's key, and none when it returns the original's.
- Measured: F6 alone, rerun 20 times on fresh databases from the public files. K2 raised no flag in 12 runs and 9 in 8. K3, K4 and every
  other check gave the same count in all 20.
- No catch, family, group, prediction or blind result depends on it. F6 fires the conversion records family through K1, K3, K4 and K5 either
  way. No other fault, declared or blind, gives an old policy two crosswalk rows (B06 adds a claim movement row);
  `tests/test_bordereaux.py` checks this.
- So section 10's "a rerun from the same code writes the same bytes" holds for every field except those three. The SQL stays frozen; a next
  round would order the lookup. The page lists this under "Added after the results", and the README says so where it explains
  `make bordereaux`.
