FAILURE MAP
← Case archive

FA-97711 / Knitting and sewing pattern grading / Open access

Full and small bust adjustment: redraft threshold basis · case 01

A two-cup FBA is marked for redrafting.

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

ROOT CAUSE

The redraft threshold tests the total instead of the per-side amount.

VERIFIED REPAIR

Test per-side amount against 4 cm.

Unsuccessful approach: A 5 cm threshold misses 4.4 cm per side.

Case contract

d = full - high bust (cm); negative -> "error: measurements". Cup index = floor(d/2.5) capped at the last of AA, A, B, C, D, DD, E. delta = index - index(drafted_cup). kind "none", "FBA" (delta > 0) or "SBA". Total adjustment 2.5 cm per cup, per side = total/2; if per side > 4 cm append " (redraft)". Return [cup, kind, per_side float].

Why this case matters

Sewists compare their cup size to the pattern draft cup and perform full or small bust adjustments.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(high_bust, full_bust, drafted_cup):
    CUPS = ['AA', 'A', 'B', 'C', 'D', 'DD', 'E']
    d = Fraction(str(full_bust)) - Fraction(str(high_bust))
    if d < 0:
        return 'error: measurements'
    idx = min(math.floor(d / Fraction(5, 2)), len(CUPS) - 1)
    cup = CUPS[idx]
    delta = idx - CUPS.index(drafted_cup)
    total = Fraction(5, 2) * abs(delta)
    per = total / 2
    kind = 'none' if delta == 0 else 'FBA' if delta > 0 else 'SBA'
    if total > 4:
        kind += ' (redraft)'
    return [cup, kind, float(per)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['matches draft', [88, 93, 'B'], ['B', 'none', 0.0]],
  ['big FBA', [84, 101, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['small bust', [92.5, 94, 'C'], ['AA', 'SBA', 3.75]],
  ['regression: redraft threshold basis', [84, 84, 'B'], ['AA', 'SBA', 2.5]],
  ['repair check: redraft threshold basis', [88, 103, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['generated control 1', [92.5, 112.5, 'A'], ['E', 'FBA (redraft)', 6.25]],
  ['generated control 2', [96, 105, 'D'], ['C', 'SBA', 1.25]],
  ['generated control 3', [88, 95.5, 'B'], ['C', 'FBA', 1.25]]],
 [['big FBA', [84, 101, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['small bust', [92.5, 94, 'C'], ['AA', 'SBA', 3.75]],
  ['negative difference', [90, 89, 'B'], 'error: measurements'],
  ['regression: redraft threshold basis', [88, 88, 'C'], ['AA', 'SBA', 3.75]],
  ['repair check: redraft threshold basis', [88, 88, 'D'], ['AA', 'SBA (redraft)', 5.0]],
  ['generated control 1', [96, 111, 'D'], ['E', 'FBA', 2.5]],
  ['generated control 2', [80, 82.5, 'A'], ['A', 'none', 0.0]],
  ['generated control 3', [88, 89, 'B'], ['AA', 'SBA', 2.5]]],
 [['small bust', [92.5, 94, 'C'], ['AA', 'SBA', 3.75]],
  ['negative difference', [90, 89, 'B'], 'error: measurements'],
  ['matches draft', [88, 93, 'B'], ['B', 'none', 0.0]],
  ['regression: redraft threshold basis', [84, 88, 'C'], ['A', 'SBA', 2.5]],
  ['repair check: redraft threshold basis', [84, 99, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['generated control 1', [84, 86.5, 'B'], ['A', 'SBA', 1.25]],
  ['generated control 2', [92.5, 102.5, 'D'], ['D', 'none', 0.0]],
  ['generated control 3', [84, 83, 'D'], 'error: measurements']],
 [['negative difference', [90, 89, 'B'], 'error: measurements'],
  ['matches draft', [88, 93, 'B'], ['B', 'none', 0.0]],
  ['big FBA', [84, 101, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['regression: redraft threshold basis', [92.5, 95.0, 'D'], ['A', 'SBA', 3.75]],
  ['repair check: redraft threshold basis', [80, 81, 'D'], ['AA', 'SBA (redraft)', 5.0]],
  ['generated control 1', [80, 90, 'D'], ['D', 'none', 0.0]],
  ['generated control 2', [80, 84, 'C'], ['A', 'SBA', 2.5]],
  ['generated control 3', [80, 81, 'C'], ['AA', 'SBA', 3.75]]],
 [['matches draft', [88, 93, 'B'], ['B', 'none', 0.0]],
  ['big FBA', [84, 101, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['small bust', [92.5, 94, 'C'], ['AA', 'SBA', 3.75]],
  ['regression: redraft threshold basis', [88, 98, 'B'], ['D', 'FBA', 2.5]],
  ['repair check: redraft threshold basis', [96, 113.5, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['generated control 1', [96, 101, 'A'], ['B', 'FBA', 1.25]],
  ['generated control 2', [92.5, 101.5, 'B'], ['C', 'FBA', 1.25]],
  ['generated control 3', [80, 82.5, 'B'], ['A', 'SBA', 1.25]]]]
for label, args, expected in fixtures[N - 1]:
    check(label, solve(*args), expected)
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
matches draft['B', 'none', 0.0]['B', 'none', 0.0]Passed
big FBA['E', 'FBA (redraft)', 5.0]['E', 'FBA (redraft)', 5.0]Passed
small bust['AA', 'SBA (redraft)', 3.75]['AA', 'SBA', 3.75]Failed
regression: redraft threshold basis['AA', 'SBA (redraft)', 2.5]['AA', 'SBA', 2.5]Failed
repair check: redraft threshold basis['E', 'FBA (redraft)', 5.0]['E', 'FBA (redraft)', 5.0]Passed
generated control 1['E', 'FBA (redraft)', 6.25]['E', 'FBA (redraft)', 6.25]Passed
generated control 2['C', 'SBA', 1.25]['C', 'SBA', 1.25]Passed
generated control 3['C', 'FBA', 1.25]['C', 'FBA', 1.25]Passed

SHA-256 / 10692498478031a49fdd87841bd8ffc7752dfea1f2b90aed9c13d3aeebb17ab5

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(high_bust, full_bust, drafted_cup):
    CUPS = ['AA', 'A', 'B', 'C', 'D', 'DD', 'E']
    d = Fraction(str(full_bust)) - Fraction(str(high_bust))
    if d < 0:
        return 'error: measurements'
    idx = min(math.floor(d / Fraction(5, 2)), len(CUPS) - 1)
    cup = CUPS[idx]
    delta = idx - CUPS.index(drafted_cup)
    total = Fraction(5, 2) * abs(delta)
    per = total / 2
    kind = 'none' if delta == 0 else 'FBA' if delta > 0 else 'SBA'
    if per > 5:
        kind += ' (redraft)'
    return [cup, kind, float(per)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['matches draft', [88, 93, 'B'], ['B', 'none', 0.0]],
  ['big FBA', [84, 101, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['small bust', [92.5, 94, 'C'], ['AA', 'SBA', 3.75]],
  ['regression: redraft threshold basis', [84, 84, 'B'], ['AA', 'SBA', 2.5]],
  ['repair check: redraft threshold basis', [88, 103, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['generated control 1', [92.5, 112.5, 'A'], ['E', 'FBA (redraft)', 6.25]],
  ['generated control 2', [96, 105, 'D'], ['C', 'SBA', 1.25]],
  ['generated control 3', [88, 95.5, 'B'], ['C', 'FBA', 1.25]]],
 [['big FBA', [84, 101, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['small bust', [92.5, 94, 'C'], ['AA', 'SBA', 3.75]],
  ['negative difference', [90, 89, 'B'], 'error: measurements'],
  ['regression: redraft threshold basis', [88, 88, 'C'], ['AA', 'SBA', 3.75]],
  ['repair check: redraft threshold basis', [88, 88, 'D'], ['AA', 'SBA (redraft)', 5.0]],
  ['generated control 1', [96, 111, 'D'], ['E', 'FBA', 2.5]],
  ['generated control 2', [80, 82.5, 'A'], ['A', 'none', 0.0]],
  ['generated control 3', [88, 89, 'B'], ['AA', 'SBA', 2.5]]],
 [['small bust', [92.5, 94, 'C'], ['AA', 'SBA', 3.75]],
  ['negative difference', [90, 89, 'B'], 'error: measurements'],
  ['matches draft', [88, 93, 'B'], ['B', 'none', 0.0]],
  ['regression: redraft threshold basis', [84, 88, 'C'], ['A', 'SBA', 2.5]],
  ['repair check: redraft threshold basis', [84, 99, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['generated control 1', [84, 86.5, 'B'], ['A', 'SBA', 1.25]],
  ['generated control 2', [92.5, 102.5, 'D'], ['D', 'none', 0.0]],
  ['generated control 3', [84, 83, 'D'], 'error: measurements']],
 [['negative difference', [90, 89, 'B'], 'error: measurements'],
  ['matches draft', [88, 93, 'B'], ['B', 'none', 0.0]],
  ['big FBA', [84, 101, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['regression: redraft threshold basis', [92.5, 95.0, 'D'], ['A', 'SBA', 3.75]],
  ['repair check: redraft threshold basis', [80, 81, 'D'], ['AA', 'SBA (redraft)', 5.0]],
  ['generated control 1', [80, 90, 'D'], ['D', 'none', 0.0]],
  ['generated control 2', [80, 84, 'C'], ['A', 'SBA', 2.5]],
  ['generated control 3', [80, 81, 'C'], ['AA', 'SBA', 3.75]]],
 [['matches draft', [88, 93, 'B'], ['B', 'none', 0.0]],
  ['big FBA', [84, 101, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['small bust', [92.5, 94, 'C'], ['AA', 'SBA', 3.75]],
  ['regression: redraft threshold basis', [88, 98, 'B'], ['D', 'FBA', 2.5]],
  ['repair check: redraft threshold basis', [96, 113.5, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['generated control 1', [96, 101, 'A'], ['B', 'FBA', 1.25]],
  ['generated control 2', [92.5, 101.5, 'B'], ['C', 'FBA', 1.25]],
  ['generated control 3', [80, 82.5, 'B'], ['A', 'SBA', 1.25]]]]
for label, args, expected in fixtures[N - 1]:
    check(label, solve(*args), expected)
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
matches draft['B', 'none', 0.0]['B', 'none', 0.0]Passed
big FBA['E', 'FBA', 5.0]['E', 'FBA (redraft)', 5.0]Failed
small bust['AA', 'SBA', 3.75]['AA', 'SBA', 3.75]Passed
regression: redraft threshold basis['AA', 'SBA', 2.5]['AA', 'SBA', 2.5]Passed
repair check: redraft threshold basis['E', 'FBA', 5.0]['E', 'FBA (redraft)', 5.0]Failed
generated control 1['E', 'FBA (redraft)', 6.25]['E', 'FBA (redraft)', 6.25]Passed
generated control 2['C', 'SBA', 1.25]['C', 'SBA', 1.25]Passed
generated control 3['C', 'FBA', 1.25]['C', 'FBA', 1.25]Passed

SHA-256 / 021459e2672a7afa3fcf87da5e17b2d4d0929997e9a124304ab3714d5521fb47

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(high_bust, full_bust, drafted_cup):
    CUPS = ['AA', 'A', 'B', 'C', 'D', 'DD', 'E']
    d = Fraction(str(full_bust)) - Fraction(str(high_bust))
    if d < 0:
        return 'error: measurements'
    idx = min(math.floor(d / Fraction(5, 2)), len(CUPS) - 1)
    cup = CUPS[idx]
    delta = idx - CUPS.index(drafted_cup)
    total = Fraction(5, 2) * abs(delta)
    per = total / 2
    kind = 'none' if delta == 0 else 'FBA' if delta > 0 else 'SBA'
    if per > 4:
        kind += ' (redraft)'
    return [cup, kind, float(per)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['matches draft', [88, 93, 'B'], ['B', 'none', 0.0]],
  ['big FBA', [84, 101, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['small bust', [92.5, 94, 'C'], ['AA', 'SBA', 3.75]],
  ['regression: redraft threshold basis', [84, 84, 'B'], ['AA', 'SBA', 2.5]],
  ['repair check: redraft threshold basis', [88, 103, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['generated control 1', [92.5, 112.5, 'A'], ['E', 'FBA (redraft)', 6.25]],
  ['generated control 2', [96, 105, 'D'], ['C', 'SBA', 1.25]],
  ['generated control 3', [88, 95.5, 'B'], ['C', 'FBA', 1.25]]],
 [['big FBA', [84, 101, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['small bust', [92.5, 94, 'C'], ['AA', 'SBA', 3.75]],
  ['negative difference', [90, 89, 'B'], 'error: measurements'],
  ['regression: redraft threshold basis', [88, 88, 'C'], ['AA', 'SBA', 3.75]],
  ['repair check: redraft threshold basis', [88, 88, 'D'], ['AA', 'SBA (redraft)', 5.0]],
  ['generated control 1', [96, 111, 'D'], ['E', 'FBA', 2.5]],
  ['generated control 2', [80, 82.5, 'A'], ['A', 'none', 0.0]],
  ['generated control 3', [88, 89, 'B'], ['AA', 'SBA', 2.5]]],
 [['small bust', [92.5, 94, 'C'], ['AA', 'SBA', 3.75]],
  ['negative difference', [90, 89, 'B'], 'error: measurements'],
  ['matches draft', [88, 93, 'B'], ['B', 'none', 0.0]],
  ['regression: redraft threshold basis', [84, 88, 'C'], ['A', 'SBA', 2.5]],
  ['repair check: redraft threshold basis', [84, 99, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['generated control 1', [84, 86.5, 'B'], ['A', 'SBA', 1.25]],
  ['generated control 2', [92.5, 102.5, 'D'], ['D', 'none', 0.0]],
  ['generated control 3', [84, 83, 'D'], 'error: measurements']],
 [['negative difference', [90, 89, 'B'], 'error: measurements'],
  ['matches draft', [88, 93, 'B'], ['B', 'none', 0.0]],
  ['big FBA', [84, 101, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['regression: redraft threshold basis', [92.5, 95.0, 'D'], ['A', 'SBA', 3.75]],
  ['repair check: redraft threshold basis', [80, 81, 'D'], ['AA', 'SBA (redraft)', 5.0]],
  ['generated control 1', [80, 90, 'D'], ['D', 'none', 0.0]],
  ['generated control 2', [80, 84, 'C'], ['A', 'SBA', 2.5]],
  ['generated control 3', [80, 81, 'C'], ['AA', 'SBA', 3.75]]],
 [['matches draft', [88, 93, 'B'], ['B', 'none', 0.0]],
  ['big FBA', [84, 101, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['small bust', [92.5, 94, 'C'], ['AA', 'SBA', 3.75]],
  ['regression: redraft threshold basis', [88, 98, 'B'], ['D', 'FBA', 2.5]],
  ['repair check: redraft threshold basis', [96, 113.5, 'B'], ['E', 'FBA (redraft)', 5.0]],
  ['generated control 1', [96, 101, 'A'], ['B', 'FBA', 1.25]],
  ['generated control 2', [92.5, 101.5, 'B'], ['C', 'FBA', 1.25]],
  ['generated control 3', [80, 82.5, 'B'], ['A', 'SBA', 1.25]]]]
for label, args, expected in fixtures[N - 1]:
    check(label, solve(*args), expected)
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
matches draft['B', 'none', 0.0]['B', 'none', 0.0]Passed
big FBA['E', 'FBA (redraft)', 5.0]['E', 'FBA (redraft)', 5.0]Passed
small bust['AA', 'SBA', 3.75]['AA', 'SBA', 3.75]Passed
regression: redraft threshold basis['AA', 'SBA', 2.5]['AA', 'SBA', 2.5]Passed
repair check: redraft threshold basis['E', 'FBA (redraft)', 5.0]['E', 'FBA (redraft)', 5.0]Passed
generated control 1['E', 'FBA (redraft)', 6.25]['E', 'FBA (redraft)', 6.25]Passed
generated control 2['C', 'SBA', 1.25]['C', 'SBA', 1.25]Passed
generated control 3['C', 'FBA', 1.25]['C', 'FBA', 1.25]Passed

SHA-256 / 5feff6abb28e897fa1d93988a66bd70372b94b959eeac0c44ccd7de3e8864572

Verification & scope

A deterministic toy contract stated in full here; it is a bounded teaching model, not an authoritative reference or standards implementation. 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:52:34.812877+00:00.

Case digest / 0f44b4990a13833a1bc7ef951db6365e0836cebc8baf57c769f8506460e2fe93