Find the test that would catch the bugGenerate small counterexamples from a behavioural contract instead of copying the implementation into tests.testingregression-testscode
Refactor without changing the contractRequest a small rewrite with explicit behaviour-preservation checks, including awkward inputs already allowed by the code.refactoringtestingcode