# Scoring rule

Simulation: every shop, supplier and number below is invented for teaching. It describes no real company.

1. A shop counts as a supported customer of a commerce supplier only when at least one independent source names that supplier for that shop.
2. The checkout is not independent evidence. A shared checkout identifies the payments provider, not the commerce supplier.
3. A shop with no independent evidence is unresolved. It is not counted, and it is not ruled out. It could still be a customer.
4. Suppliers are ranked by supported shops, highest first. Ties break by supplier name, A to Z.
5. Before the correction the analyst counted every shop that used the shared checkout for Brightwell Commerce. That was the analyst’s mistake.

## Run it

Put shops.csv, suppliers.csv and reproduce.mjs in one folder, then run:

    node reproduce.mjs > output.json
    diff output.json expected-output.json

No output from diff means your result matches the expected before-and-after output.
