Infrastructure · Verification
FailurePreservingReduction
Shrink a failing input or action sequence while the same failure keeps occurring
Definition
Mechanism
Given an input, configuration or action sequence that triggers a failure, and a check that reliably recognises that same failure rather than any failure, smaller candidates are tried repeatedly, each from the starting state recorded for the original case, and any candidate on which the same failure still occurs is kept, for example by removing coarse chunks first and then finer ones. Where the failure is intermittent, the check runs each candidate a stated number of times. Reduction stops when no candidate the strategy generates keeps the failure, or when a declared budget runs out. Unlike Bisect, which assumes the cause lies in one half, reduction keeps elements that fail only together; unlike the ablation in Parsimony, which asks whether a part is needed for a function, it preserves a failure. The reduced case is a reproduction, not a diagnosis: it shows what suffices to trigger the failure, not why it occurs.
Invariants
- Every candidate runs from the starting state recorded for the original failing case.
- Every kept candidate reproduces the original failure signature, not merely some failure.
- The result states its failure signature and whether it stopped because no candidate kept the failure or because the budget ran out.
- The reduced case is reported as sufficient to trigger the failure, not as its cause.
Risks
Failure modes
Failure slippage
the shrunk case fails for a different reason, for example a crash replacing an assertion, so it no longer points at the original defect.
Carried-over state
a trial leaves state behind, such as a system left armed, so a later candidate appears to fail on its own.
Flaky check
a nondeterministic failure is kept or dropped by chance, so the reduction is arbitrary.
Cause read from the minimum
the remaining elements are taken as the cause though they only suffice to trigger it.
Masked second fault
removing setup hides a second defect that the original case also exercised.
Relationships
Builds on
Nothing in this library builds on this pattern yet.
