FAILURE MAP
← Case archive

FA-100106 / Preference pair construction / Open access

Preference pairs: ordinal labels are treated as numeric distances · case 01

ordinal labels are treated as numeric distances.

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

ROOT CAUSE

Ordinal categories establish order but not meaningful numeric distance.

THE FAILURE

Ordinal categories establish order but not meaningful numeric distance.

Unsuccessful approach: Comparing category strings lexically puts labels such as low and high in the wrong order.

Case contract

Rows are [id,category]. Categories map low < middle < high. Return every strictly ordered [higher_id,lower_id] pair once in input pair order.

Why this case matters

A small deterministic preference-data transform makes pair semantics inspectable without a training framework.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(rows):
    return [[a[0],b[0]] for i,a in enumerate(rows) for b in rows[i+1:] if a[1]>b[1]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a='a'+str(N); b='b'+str(N)
check('adjacent ordinal pair',solve([[a,'middle'],[b,'low']]),[[a,b]])
check('reverse order',solve([['a','low'],['b','high']]),[['b','a']])
check('tie skipped',solve([['a','middle'],['b','middle']]),[])
check('empty',solve([]),[])
check('full order',solve([['a','high'],['b','middle'],['c','low']]),[['a','b'],['a','c'],['b','c']])
check('singleton',solve([['a','low']]),[])
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
adjacent ordinal pair[['a1', 'b1']][['a1', 'b1']]Passed
reverse order[['a', 'b']][['b', 'a']]Failed
tie skipped[][]Passed
empty[][]Passed
full order[['b', 'c']][['a', 'b'], ['a', 'c'], ['b', 'c']]Failed
singleton[][]Passed

SHA-256 / a97721fbf75699fe1a2bb6aa1ed92f117e9ce6e7597540f4ae0a3f9569c02347

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(rows):
    rank={"low":0,"middle":1,"high":2}
    return [[a[0],b[0]] for i,a in enumerate(rows) for b in rows[i+1:] if rank[a[1]]-rank[b[1]]>=2]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a='a'+str(N); b='b'+str(N)
check('adjacent ordinal pair',solve([[a,'middle'],[b,'low']]),[[a,b]])
check('reverse order',solve([['a','low'],['b','high']]),[['b','a']])
check('tie skipped',solve([['a','middle'],['b','middle']]),[])
check('empty',solve([]),[])
check('full order',solve([['a','high'],['b','middle'],['c','low']]),[['a','b'],['a','c'],['b','c']])
check('singleton',solve([['a','low']]),[])
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
adjacent ordinal pair[][['a1', 'b1']]Failed
reverse order[][['b', 'a']]Failed
tie skipped[][]Passed
empty[][]Passed
full order[['a', 'c']][['a', 'b'], ['a', 'c'], ['b', 'c']]Failed
singleton[][]Passed

SHA-256 / 89db13e59671860807ead9a14898a8e032bd7c5058437338ffac493383a546c9

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 6 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

These are explicit toy record contracts; they do not claim compatibility with a trainer or improved model behavior. 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-30T16:48:31.716945+00:00.

Case digest / eee1b7e729cbd76f616f831ad043d3ac4fc9254673be50803dd6b1a603381a6a