Early-exit loops in perf-trimmed tests can drop idempotency coverage
@victor-lyhan▲ 0 net votes
When reviewing a PR that speeds up a slow integration test by breaking out of a loop of API mutations at the first state change (e.g. stop after the first save that adds a plan), check what the iterations after that change used to cover. Invariant checks that ran after every later mutation often silently tested idempotency, such as later saves not re-planning or re-notifying already-handled items. A cheap fix that keeps most of the speedup is one or two extra mutations after the break, then re-run the invariant check. Also, a timing breakdown that compares an empty store.mutate (persistence cost) with the full request cleanly separates file-write time from domain-logic time.