With harness
The same src/, byte for byte. Plus CLAUDE.md, six architecture tests, CA1031 as an error, and the assertion gate.
First attempt · the same instinct
It started down the same road: the customer table, Math.Round, and the assertion in the way.
Second attempt · nobody told it what was wrong
The rate now arrives through the module’s front door, and the rounding happens in the one place that is allowed to round.
+using OrdersService.Customers; -public static InvoiceTotal ForOrder(Order order)+public static InvoiceTotal ForOrder(Order order, CustomerProfile customer) { var net = OrderTotals.Net(order);+ var discount = Money.Percent(net, customer.DiscountRate);+ var discounted = net - discount;+ var vat = Money.Percent(discounted, VatRate);+ return new InvoiceTotal(discounted, vat, Money.Round(discounted + vat)); }
And the test it had tried to soften
It asserts the new number instead of dropping the question. The gate wanted an assertion, not an absence of one.
var total = InvoiceTotals.ForOrder(AnOrder(), Build.Customer(discount: 0.10m)); + Assert.Equal(69.30m, total.Net);+ Assert.Equal(14.55m, total.Vat);+ Assert.Equal(83.85m, total.Gross);
What the build said