FAILURE MAP
← Case archive

FA-5881 / Planar geometry / Open access

Triangle side feasibility · case 01

Only one inequality is checked and degeneracy is accepted.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Only one inequality is checked and degeneracy is accepted.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return min(a,b,c)>0 and 2*max(a,b,c)<a+b+c

Unsuccessful approach: Non-strict triangle inequality admits collinear zero-area triangles.

Case contract

Integer coordinates and lengths, with exact arithmetic except for indicated division results. Lengths are nonnegative. Rectangles are (xmin,ymin,xmax,ymax) with ordered bounds; coordinate vectors have matching dimensions. a,b,c may include zero; return true only for positive sides forming a nondegenerate triangle. Exact operational definition: min(a,b,c)>0 and 2*max(a,b,c)<a+b+c

Why this case matters

Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Planar geometry results depend on the stated convention.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(a, b, c):
    return a+b>=c
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3, 4, 5)', solve(*(3, 4, 5)), True)
check('fixture 2: (1, 2, 3)', solve(*(1, 2, 3)), False)
check('fixture 3: (5, 1, 1)', solve(*(5, 1, 1)), False)
check('fixture 4: (0, 1, 1)', solve(*(0, 1, 1)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: (3, 4, 5)TrueTruePassed
fixture 2: (1, 2, 3)TrueFalseFailed
fixture 3: (5, 1, 1)TrueFalseFailed
fixture 4: (0, 1, 1)TrueFalseFailed

SHA-256 / 32a316db08bc733fb81f90f3675fa321cf3b4872e5517a17a5aa7aeabee93988

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(a, b, c):
    return min(a,b,c)>0 and 2*max(a,b,c)<=a+b+c
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3, 4, 5)', solve(*(3, 4, 5)), True)
check('fixture 2: (1, 2, 3)', solve(*(1, 2, 3)), False)
check('fixture 3: (5, 1, 1)', solve(*(5, 1, 1)), False)
check('fixture 4: (0, 1, 1)', solve(*(0, 1, 1)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: (3, 4, 5)TrueTruePassed
fixture 2: (1, 2, 3)TrueFalseFailed
fixture 3: (5, 1, 1)FalseFalsePassed
fixture 4: (0, 1, 1)FalseFalsePassed

SHA-256 / 09c8879e818e2fe95c1b40c599cfc03526dd70c231f0b6468416aa6bd6815dfa

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(a, b, c):
    return min(a,b,c)>0 and 2*max(a,b,c)<a+b+c
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3, 4, 5)', solve(*(3, 4, 5)), True)
check('fixture 2: (1, 2, 3)', solve(*(1, 2, 3)), False)
check('fixture 3: (5, 1, 1)', solve(*(5, 1, 1)), False)
check('fixture 4: (0, 1, 1)', solve(*(0, 1, 1)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: (3, 4, 5)TrueTruePassed
fixture 2: (1, 2, 3)FalseFalsePassed
fixture 3: (5, 1, 1)FalseFalsePassed
fixture 4: (0, 1, 1)FalseFalsePassed

SHA-256 / 94370b027e9dceab370e873dccbcd653ed2db5b3240c47bde3f819e34db974da

Verification & scope

This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:37:54.884870+00:00.

Case digest / f7e7568d8f9c4054165ccf28b42ae2b9944158c0cd720092593c7283052df2c3