A developer fixes a duplicate-order bug. The tests are green. But would the new test have failed before the fix? Change Proof checks exactly that.
01The bug
A payment notification arrives twice. The old handler creates two orders for one payment.
1 payment → 2 orders
02The fix
The developer changes the handler to ignore a repeated event ID in this sequential example.
1 payment → 1 order
03The missing proof
A test that checks only acceptance passes on both versions. It never checks the duplicate order.
Green ≠ evidence
Weak test
Checks whether both deliveries are accepted.
assert.equal(handlePaymentSucceeded(event, orders).accepted, true);
assert.equal(handlePaymentSucceeded(event, orders).accepted, true);
Regression test
Checks whether only one order is created.
handlePaymentSucceeded(event, orders);
handlePaymentSucceeded(event, orders);
assert.equal(orders.length, 1);
*Expected assertion failure: one order expected, two created. A useful test detects the observed difference in this scenario.
The panel above runs a synthetic browser fixture. The results below come from recorded executions of the actual Change Proof CLI.
How Change Proof verifies a test
A: old code + old tests establish a baseline. B: fixed code + new tests establish the new behavior. C: old code + selected new tests check whether the test detects the original difference.
Weak verdict: NON_DISCRIMINATING_TESTS. Regression verdict: OBSERVED_TEST_DISCRIMINATION.
The comparison is limited to explicitly selected tests and paths. It does not prove overall correctness or provide a security sandbox. No live payment service is involved.