From d2b961296006a5d7698ea8a1ea9467b02f1c4409 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 26 May 2026 08:14:14 +0000 Subject: [PATCH 1/2] Initial plan From 93a337634b564dfac4036e2a28293cf11fecd70c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 26 May 2026 08:17:19 +0000 Subject: [PATCH 2/2] Fix C even generator flakiness --- c/src/random_math_operations.c | 6 ------ c/tests/test_random_math_operations.c | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/c/src/random_math_operations.c b/c/src/random_math_operations.c index ffeb64f..a8f8526 100644 --- a/c/src/random_math_operations.c +++ b/c/src/random_math_operations.c @@ -47,12 +47,6 @@ int generate_random_even_number(int min, int max) } } - /* 5% flaw: occasionally corrupts the even number */ - if ((rand() % 100) < 5) - { - value += 1; - } - return value; } diff --git a/c/tests/test_random_math_operations.c b/c/tests/test_random_math_operations.c index c64be4d..b8ffc4b 100644 --- a/c/tests/test_random_math_operations.c +++ b/c/tests/test_random_math_operations.c @@ -41,7 +41,7 @@ void test_random_in_range_single_value(void) } } -/* --- generate_random_even_number tests (20 iterations, flaky due to 5% bug) --- */ +/* --- generate_random_even_number tests (20 iterations) --- */ void test_random_even_is_even(void) {