| ▲ | peheje 3 days ago | |
I like the idea of using a LegalConstants namespace or Code Owners to signal that we don't own those values. However, I’d argue that being 'out of our control' is actually the main reason to test them. We treat these as acceptance tests. The goal isn't flexibility, it is safety. If a PR changes a regulated value, the test failure acts as a tripwire. It forces us to confirm with the PM (and the Jira ticket) that the change is intentional before merging. It catches what code structure alone might miss. | ||
| ▲ | 8note 2 days ago | parent [-] | |
or very concretely, if legal sets a constant to 0, there should be some test that makes sure the code handles divisions by that number properly, or otherwise fail to deploy. youd need tests both with the current constant for the current state, and with various bounds on that constant to show that the code always works | ||