FA-5316 / Python evaluation / Open access
Chained comparison evaluation: Changes the first strict comparison into an inclusive one · case 01
Changes the first strict comparison into an inclusive one and changes the required Python-language result.
ROOT CAUSE
Changes the first strict comparison into an inclusive one. The executable reproducer isolates this operation from the rest of the contract.
THE FAILURE
Changes the first strict comparison into an inclusive one. The executable reproducer isolates this operation from the rest of the contract.
Unsuccessful approach: The alternative still fails because it changes the second strict comparison into an inclusive one.
Case contract
Evaluate lhs() < middle() < rhs(). Evaluate the middle expression once, evaluate each operand left-to-right, and skip the final expression when the first comparison fails. Both inequalities are strict. Inputs use the finite Python types shown in the fixtures. An error string denotes the specified caught exception, not an unhandled process failure.
Why this case matters
Runs Python standard-library language operations in a deterministic local reproducer. Literal expected answers are authored independently. Related defects share an evaluation group to avoid benchmark split leakage.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(left, mid, right):
trace=[]
def lhs(): trace.append('left'); return left
def middle(): trace.append('middle'); return mid
def rhs(): trace.append('right'); return right
result=lhs() <= middle() < rhs()
return [result,trace]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('increasing triple', solve(1, 2, 3), [True, ['left', 'middle', 'right']])
check('first comparison fails', solve(3, 2, 9), [False, ['left', 'middle']])
check('equal first operands', solve(2, 2, 3), [False, ['left', 'middle']])
check('equal last operands', solve(1, 2, 2), [False, ['left', 'middle', 'right']])
check('second comparison fails', solve(1, 3, 2), [False, ['left', 'middle', 'right']])
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 |
|---|---|---|---|
| increasing triple | [True, ['left', 'middle', 'right']] | [True, ['left', 'middle', 'right']] | Passed |
| first comparison fails | [False, ['left', 'middle']] | [False, ['left', 'middle']] | Passed |
| equal first operands | [True, ['left', 'middle', 'right']] | [False, ['left', 'middle']] | Failed |
| equal last operands | [False, ['left', 'middle', 'right']] | [False, ['left', 'middle', 'right']] | Passed |
| second comparison fails | [False, ['left', 'middle', 'right']] | [False, ['left', 'middle', 'right']] | Passed |
SHA-256 / bc851304bb1fd113daa46551ac26ccbb85d2770cca61c0c4aa990f6c7664dab5
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(left, mid, right):
trace=[]
def lhs(): trace.append('left'); return left
def middle(): trace.append('middle'); return mid
def rhs(): trace.append('right'); return right
result=lhs() < middle() <= rhs()
return [result,trace]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('increasing triple', solve(1, 2, 3), [True, ['left', 'middle', 'right']])
check('first comparison fails', solve(3, 2, 9), [False, ['left', 'middle']])
check('equal first operands', solve(2, 2, 3), [False, ['left', 'middle']])
check('equal last operands', solve(1, 2, 2), [False, ['left', 'middle', 'right']])
check('second comparison fails', solve(1, 3, 2), [False, ['left', 'middle', 'right']])
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 |
|---|---|---|---|
| increasing triple | [True, ['left', 'middle', 'right']] | [True, ['left', 'middle', 'right']] | Passed |
| first comparison fails | [False, ['left', 'middle']] | [False, ['left', 'middle']] | Passed |
| equal first operands | [False, ['left', 'middle']] | [False, ['left', 'middle']] | Passed |
| equal last operands | [True, ['left', 'middle', 'right']] | [False, ['left', 'middle', 'right']] | Failed |
| second comparison fails | [False, ['left', 'middle', 'right']] | [False, ['left', 'middle', 'right']] | Passed |
SHA-256 / e168ac4037682f37827b4ba0c93a306ad88f09d8e7a77bacc2692b86ac494cf5
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 5 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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:48.295671+00:00.
Case digest / ade67a006e1be55b332c0c5e20a84ff1bff3086aa9fcaff831672091cb4c9466