RealDiff
RealDiff finds runtime behavior changes that ordinary source review misses.
It builds two Git revisions, observes their tests, learns a noise baseline from three base runs, and reports the first changed behavior in each call tree. A source diff tells you what was edited. RealDiff tells you what the edit did, including effects in files the pull request never touched.
Why use it?
A harmless-looking refactor can change behavior far from the edited file:
public static List<(int Priority, T Value)> ByPriority<T>( - this IEnumerable<(int Priority, T Value)> src) - { - var list = src.ToList(); - list.Sort((a, b) => a.Priority.CompareTo(b.Priority)); - return list; - } + this IEnumerable<(int Priority, T Value)> src) => + src.OrderBy(item => item.Priority).ToList();
List.Sort is not stable; OrderBy is. In the included demo, that one-line infrastructure change alters an unedited pricing engine:
RealDiff: 1 behavior gap outside this diff DiscountEngine.SelectDiscount returned "CLEARANCE_40", now returns "SEASONAL_15". CheckoutTotals.Compute returned 60, now returns 85. 2 of the 3 tests that executed this did not assert on the change.
The edited helper is in Infrastructure.Collections ; the observed effect is in Commerce.Pricing . Run the included demo below, or inspect the maintained public .NET demo pull request and its successful hosted run.
Five-minute .NET demo
... continue reading