FA-5766 / Planar geometry / Open access
Triangle area base height · case 01
A triangle is assigned the enclosing parallelogram area.
ROOT CAUSE
A triangle is assigned the enclosing parallelogram area.
VERIFIED REPAIR
Apply the specified mathematical contract directly, preserving all terms and boundary cases: return base*height/2
Unsuccessful approach: Averaging dimensions does not produce an area.
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. Triangle area base height. Exact operational definition: base*height/2
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(base, height):
return base*height
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (4, 3)', solve(*(4, 3)), 6)
check('fixture 2: (0, 5)', solve(*(0, 5)), 0)
check('fixture 3: (2, 2)', solve(*(2, 2)), 2)
check('fixture 4: (7, 4)', solve(*(7, 4)), 14)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: (4, 3) | 12 | 6 | Failed |
| fixture 2: (0, 5) | 0 | 0 | Passed |
| fixture 3: (2, 2) | 4 | 2 | Failed |
| fixture 4: (7, 4) | 28 | 14 | Failed |
SHA-256 / 29cb93a7b30e6ffc3ef626a624767f9185013756555af7e618d61ac307d02bdc
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(base, height):
return (base+height)/2
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (4, 3)', solve(*(4, 3)), 6)
check('fixture 2: (0, 5)', solve(*(0, 5)), 0)
check('fixture 3: (2, 2)', solve(*(2, 2)), 2)
check('fixture 4: (7, 4)', solve(*(7, 4)), 14)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: (4, 3) | 3.5 | 6 | Failed |
| fixture 2: (0, 5) | 2.5 | 0 | Failed |
| fixture 3: (2, 2) | 2.0 | 2 | Passed |
| fixture 4: (7, 4) | 5.5 | 14 | Failed |
SHA-256 / cf8d61cbb63cf71a150b6de93cc922324040e40dd83f71b2b4499454579b442d
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(base, height):
return base*height/2
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (4, 3)', solve(*(4, 3)), 6)
check('fixture 2: (0, 5)', solve(*(0, 5)), 0)
check('fixture 3: (2, 2)', solve(*(2, 2)), 2)
check('fixture 4: (7, 4)', solve(*(7, 4)), 14)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: (4, 3) | 6.0 | 6 | Passed |
| fixture 2: (0, 5) | 0.0 | 0 | Passed |
| fixture 3: (2, 2) | 2.0 | 2 | Passed |
| fixture 4: (7, 4) | 14.0 | 14 | Passed |
SHA-256 / 284cb33df352e69e56e65ef398a192b1efcfd480c2a1dfbef38755e3179850f9
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:53.444400+00:00.
Case digest / dd9b347fdac3786a1b1e91b042911c17f66a02cbc158fc589e96db1145699fe5