3abeb575a0e6e34e0fbe70bc7155c55148eabc5c
The report explained the faults and what repairing them was worth, but never
what the repair actually is. Adds a section showing the real code for each of
the five changes, with the reasoning that is not obvious from reading it.
1 put the client in the record's name — scoped-key, five call sites
2 find the existing record under either name before writing — existing-id,
which is what makes the rename safe to deploy and why the totals did not
double across 213,943 renamed records
3 give every order its own payment record — what :keep and :clone do, and
why the Square id must be recovered from the record's owner rather than by
trimming a prefix, since client codes like N-30003 contain dashes
4 add untendered tips rather than replacing the calculation, because where an
order does have a payment the payment is the correct source
5 credit service charges, with both branches of the vendor test explained —
ezCater commission must be excluded, but whole eras of Square orders carry
no vendor at all, so a test on vendor alone credits nothing
Plus the four supporting changes and why the schema install order mattered
enough to block every test in the suite.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description
No description provided
Languages
Clojure
91%
CSS
4.2%
Sass
2.3%
HTML
1.2%
HCL
0.4%
Other
0.7%