HighDevResolvedseen 1× · from 1 signal(s)

The max_of_two function has inverted logic and returns the minimum value instead of the maximum value.

The max_of_two function has inverted logic and returns the minimum value instead of the maximum value.

PR #4 · merged
View on GitHub →
Resolved

This issue is no longer open. If the same signal recurs, Sentinel Loop will automatically reopen it.

Proposed fix

Fixed `max_of_two.py`: the comparison was inverted (`a if a < b else b` returned the smaller value). It now returns `a if a > b else b`, and the docstring no longer describes an intentional bug.

diff --git a/max_of_two.py b/max_of_two.py
index 4637802..a9dcc49 100644
--- a/max_of_two.py
+++ b/max_of_two.py
@@ -1,3 +1,3 @@
 def max_of_two(a, b):
-    """BUG (intentional): should return the larger value, returns the smaller instead."""
-    return a if a < b else b
+    """Return the larger of the two values."""
+    return a if a > b else b
Verification result

Automated CI verification is not wired up in this prototype — see docs/README 'What's real vs simulated'. Treat this fix as unverified; review the diff carefully before approving.

Timeline

status change8/5/2026, 1:22:37 AM
Detected from manual (dev) and triaged (via anthropic classifier).
— Triage Agent
comment8/5/2026, 1:22:45 AM
Autonomous Fix Agent run started.
— Fix Agent
pr opened8/5/2026, 1:23:04 AM
Opened PR #4: https://github.com/ogmworldwide/OGM-APPS-DISPOSAL/pull/4 (1 file(s) changed, 4 turn(s), 3 tool call(s)).
— Fix Agent
verification8/5/2026, 1:23:13 AM
Automated CI verification is not wired up in this prototype — see docs/README 'What's real vs simulated'. Treat this fix as unverified; review the diff carefully before approving.
— Verification Agent
pr merged8/5/2026, 1:23:15 AM
PR #4 merged (28479ecaad966f954db8908d2fc92bcd49e20834) and approved by Manish.
— Manish

Originating signals (1)

manual · dev8/5/2026, 1:22:34 AM
max_of_two returns the smaller value instead of the larger
max_of_two.py: max_of_two(a, b) returns a if a < b else b, which returns the SMALLER value. Fix so it returns the larger value.