FA-97766 / Knitting and sewing pattern grading / Open access
Top-down raglan setup: raglan seam reserve · case 01
Front, back and sleeves add up to four more stitches than cast on.
ROOT CAUSE
The four raglan seam stitches are not reserved before dividing.
VERIFIED REPAIR
Subtract 4 seam stitches first.
Unsuccessful approach: Reserving two stitches assumes two seam lines instead of four.
Case contract
neck_sts < 16 -> "error: neck too small". Reserve 4 raglan seam stitches; rem = neck-4; front = rem//3; sleeves share rem - 2*front, each sleeve half of that, and an odd leftover goes to the back (back = front + leftover%2). Each increase round adds 2 to front (and back); rounds = max(0, ceiling((underarm_body_sts//2 - front)/2)). yoke_total = neck + 8*rounds.
Why this case matters
Top-down raglan sweaters split the neck cast-on among front, back, sleeves and seam stitches.
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(neck_sts, underarm_body_sts):
if neck_sts < 16:
return 'error: neck too small'
rem = neck_sts
front = rem // 3
sleeves_total = rem - 2 * front
sleeve = sleeves_total // 2
back = front + sleeves_total % 2
target = underarm_body_sts // 2
incs = max(0, math.ceil(Fraction(target - front, 2)))
return {'front': front, 'back': back, 'sleeve': sleeve, 'raglan': 4, 'increase_rounds': incs,
'yoke_total': neck_sts + 8 * incs}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['standard neck', [100, 200],
{'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372}],
['odd leftover', [101, 180],
{'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333}],
['tiny neck', [12, 100], 'error: neck too small'],
['regression: raglan seam reserve', [110, 220],
{'back': 35, 'front': 35, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 18, 'yoke_total': 414}],
['repair check: raglan seam reserve', [120, 200],
{'back': 38, 'front': 38, 'increase_rounds': 31, 'raglan': 4, 'sleeve': 20, 'yoke_total': 368}],
['generated control 1', [100, 80],
{'back': 32, 'front': 32, 'increase_rounds': 4, 'raglan': 4, 'sleeve': 16, 'yoke_total': 132}],
['generated control 2', [80, 200],
{'back': 25, 'front': 25, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 13, 'yoke_total': 384}],
['generated control 3', [120, 220],
{'back': 38, 'front': 38, 'increase_rounds': 36, 'raglan': 4, 'sleeve': 20, 'yoke_total': 408}]],
[['odd leftover', [101, 180],
{'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333}],
['tiny neck', [12, 100], 'error: neck too small'],
['already wide', [120, 60],
{'back': 38, 'front': 38, 'increase_rounds': 0, 'raglan': 4, 'sleeve': 20, 'yoke_total': 120}],
['regression: raglan seam reserve', [101, 160],
{'back': 33, 'front': 32, 'increase_rounds': 24, 'raglan': 4, 'sleeve': 16, 'yoke_total': 293}],
['repair check: raglan seam reserve', [16, 160],
{'back': 4, 'front': 4, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 2, 'yoke_total': 320}],
['generated control 1', [12, 180], 'error: neck too small'],
['generated control 2', [12, 201], 'error: neck too small'],
['generated control 3', [88, 160],
{'back': 28, 'front': 28, 'increase_rounds': 26, 'raglan': 4, 'sleeve': 14, 'yoke_total': 296}]],
[['tiny neck', [12, 100], 'error: neck too small'],
['already wide', [120, 60],
{'back': 38, 'front': 38, 'increase_rounds': 0, 'raglan': 4, 'sleeve': 20, 'yoke_total': 120}],
['standard neck', [100, 200],
{'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372}],
['regression: raglan seam reserve', [110, 80],
{'back': 35, 'front': 35, 'increase_rounds': 3, 'raglan': 4, 'sleeve': 18, 'yoke_total': 134}],
['repair check: raglan seam reserve', [16, 220],
{'back': 4, 'front': 4, 'increase_rounds': 53, 'raglan': 4, 'sleeve': 2, 'yoke_total': 440}],
['generated control 1', [12, 220], 'error: neck too small'],
['generated control 2', [120, 180],
{'back': 38, 'front': 38, 'increase_rounds': 26, 'raglan': 4, 'sleeve': 20, 'yoke_total': 328}],
['generated control 3', [16, 180],
{'back': 4, 'front': 4, 'increase_rounds': 43, 'raglan': 4, 'sleeve': 2, 'yoke_total': 360}]],
[['already wide', [120, 60],
{'back': 38, 'front': 38, 'increase_rounds': 0, 'raglan': 4, 'sleeve': 20, 'yoke_total': 120}],
['standard neck', [100, 200],
{'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372}],
['odd leftover', [101, 180],
{'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333}],
['regression: raglan seam reserve', [88, 180],
{'back': 28, 'front': 28, 'increase_rounds': 31, 'raglan': 4, 'sleeve': 14, 'yoke_total': 336}],
['repair check: raglan seam reserve', [110, 80],
{'back': 35, 'front': 35, 'increase_rounds': 3, 'raglan': 4, 'sleeve': 18, 'yoke_total': 134}],
['generated control 1', [12, 201], 'error: neck too small'],
['generated control 2', [120, 220],
{'back': 38, 'front': 38, 'increase_rounds': 36, 'raglan': 4, 'sleeve': 20, 'yoke_total': 408}],
['generated control 3', [100, 160],
{'back': 32, 'front': 32, 'increase_rounds': 24, 'raglan': 4, 'sleeve': 16, 'yoke_total': 292}]],
[['standard neck', [100, 200],
{'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372}],
['odd leftover', [101, 180],
{'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333}],
['tiny neck', [12, 100], 'error: neck too small'],
['regression: raglan seam reserve', [101, 80],
{'back': 33, 'front': 32, 'increase_rounds': 4, 'raglan': 4, 'sleeve': 16, 'yoke_total': 133}],
['repair check: raglan seam reserve', [101, 201],
{'back': 33, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 373}],
['generated control 1', [100, 160],
{'back': 32, 'front': 32, 'increase_rounds': 24, 'raglan': 4, 'sleeve': 16, 'yoke_total': 292}],
['generated control 2', [110, 180],
{'back': 35, 'front': 35, 'increase_rounds': 28, 'raglan': 4, 'sleeve': 18, 'yoke_total': 334}],
['generated control 3', [96, 60],
{'back': 30, 'front': 30, 'increase_rounds': 0, 'raglan': 4, 'sleeve': 16, 'yoke_total': 96}]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| standard neck | {'back': 33, 'front': 33, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 17, 'yoke_total': 372} | {'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372} | Failed |
| odd leftover | {'back': 34, 'front': 33, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 17, 'yoke_total': 333} | {'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333} | Failed |
| tiny neck | error: neck too small | error: neck too small | Passed |
| regression: raglan seam reserve | {'back': 36, 'front': 36, 'increase_rounds': 37, 'raglan': 4, 'sleeve': 19, 'yoke_total': 406} | {'back': 35, 'front': 35, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 18, 'yoke_total': 414} | Failed |
| repair check: raglan seam reserve | {'back': 40, 'front': 40, 'increase_rounds': 30, 'raglan': 4, 'sleeve': 20, 'yoke_total': 360} | {'back': 38, 'front': 38, 'increase_rounds': 31, 'raglan': 4, 'sleeve': 20, 'yoke_total': 368} | Failed |
| generated control 1 | {'back': 33, 'front': 33, 'increase_rounds': 4, 'raglan': 4, 'sleeve': 17, 'yoke_total': 132} | {'back': 32, 'front': 32, 'increase_rounds': 4, 'raglan': 4, 'sleeve': 16, 'yoke_total': 132} | Failed |
| generated control 2 | {'back': 26, 'front': 26, 'increase_rounds': 37, 'raglan': 4, 'sleeve': 14, 'yoke_total': 376} | {'back': 25, 'front': 25, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 13, 'yoke_total': 384} | Failed |
| generated control 3 | {'back': 40, 'front': 40, 'increase_rounds': 35, 'raglan': 4, 'sleeve': 20, 'yoke_total': 400} | {'back': 38, 'front': 38, 'increase_rounds': 36, 'raglan': 4, 'sleeve': 20, 'yoke_total': 408} | Failed |
SHA-256 / 80445ebee486017ae71ba564b8553bef475ab92c74a116b3aa19de512501998a
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(neck_sts, underarm_body_sts):
if neck_sts < 16:
return 'error: neck too small'
rem = neck_sts - 2
front = rem // 3
sleeves_total = rem - 2 * front
sleeve = sleeves_total // 2
back = front + sleeves_total % 2
target = underarm_body_sts // 2
incs = max(0, math.ceil(Fraction(target - front, 2)))
return {'front': front, 'back': back, 'sleeve': sleeve, 'raglan': 4, 'increase_rounds': incs,
'yoke_total': neck_sts + 8 * incs}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['standard neck', [100, 200],
{'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372}],
['odd leftover', [101, 180],
{'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333}],
['tiny neck', [12, 100], 'error: neck too small'],
['regression: raglan seam reserve', [110, 220],
{'back': 35, 'front': 35, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 18, 'yoke_total': 414}],
['repair check: raglan seam reserve', [120, 200],
{'back': 38, 'front': 38, 'increase_rounds': 31, 'raglan': 4, 'sleeve': 20, 'yoke_total': 368}],
['generated control 1', [100, 80],
{'back': 32, 'front': 32, 'increase_rounds': 4, 'raglan': 4, 'sleeve': 16, 'yoke_total': 132}],
['generated control 2', [80, 200],
{'back': 25, 'front': 25, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 13, 'yoke_total': 384}],
['generated control 3', [120, 220],
{'back': 38, 'front': 38, 'increase_rounds': 36, 'raglan': 4, 'sleeve': 20, 'yoke_total': 408}]],
[['odd leftover', [101, 180],
{'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333}],
['tiny neck', [12, 100], 'error: neck too small'],
['already wide', [120, 60],
{'back': 38, 'front': 38, 'increase_rounds': 0, 'raglan': 4, 'sleeve': 20, 'yoke_total': 120}],
['regression: raglan seam reserve', [101, 160],
{'back': 33, 'front': 32, 'increase_rounds': 24, 'raglan': 4, 'sleeve': 16, 'yoke_total': 293}],
['repair check: raglan seam reserve', [16, 160],
{'back': 4, 'front': 4, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 2, 'yoke_total': 320}],
['generated control 1', [12, 180], 'error: neck too small'],
['generated control 2', [12, 201], 'error: neck too small'],
['generated control 3', [88, 160],
{'back': 28, 'front': 28, 'increase_rounds': 26, 'raglan': 4, 'sleeve': 14, 'yoke_total': 296}]],
[['tiny neck', [12, 100], 'error: neck too small'],
['already wide', [120, 60],
{'back': 38, 'front': 38, 'increase_rounds': 0, 'raglan': 4, 'sleeve': 20, 'yoke_total': 120}],
['standard neck', [100, 200],
{'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372}],
['regression: raglan seam reserve', [110, 80],
{'back': 35, 'front': 35, 'increase_rounds': 3, 'raglan': 4, 'sleeve': 18, 'yoke_total': 134}],
['repair check: raglan seam reserve', [16, 220],
{'back': 4, 'front': 4, 'increase_rounds': 53, 'raglan': 4, 'sleeve': 2, 'yoke_total': 440}],
['generated control 1', [12, 220], 'error: neck too small'],
['generated control 2', [120, 180],
{'back': 38, 'front': 38, 'increase_rounds': 26, 'raglan': 4, 'sleeve': 20, 'yoke_total': 328}],
['generated control 3', [16, 180],
{'back': 4, 'front': 4, 'increase_rounds': 43, 'raglan': 4, 'sleeve': 2, 'yoke_total': 360}]],
[['already wide', [120, 60],
{'back': 38, 'front': 38, 'increase_rounds': 0, 'raglan': 4, 'sleeve': 20, 'yoke_total': 120}],
['standard neck', [100, 200],
{'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372}],
['odd leftover', [101, 180],
{'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333}],
['regression: raglan seam reserve', [88, 180],
{'back': 28, 'front': 28, 'increase_rounds': 31, 'raglan': 4, 'sleeve': 14, 'yoke_total': 336}],
['repair check: raglan seam reserve', [110, 80],
{'back': 35, 'front': 35, 'increase_rounds': 3, 'raglan': 4, 'sleeve': 18, 'yoke_total': 134}],
['generated control 1', [12, 201], 'error: neck too small'],
['generated control 2', [120, 220],
{'back': 38, 'front': 38, 'increase_rounds': 36, 'raglan': 4, 'sleeve': 20, 'yoke_total': 408}],
['generated control 3', [100, 160],
{'back': 32, 'front': 32, 'increase_rounds': 24, 'raglan': 4, 'sleeve': 16, 'yoke_total': 292}]],
[['standard neck', [100, 200],
{'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372}],
['odd leftover', [101, 180],
{'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333}],
['tiny neck', [12, 100], 'error: neck too small'],
['regression: raglan seam reserve', [101, 80],
{'back': 33, 'front': 32, 'increase_rounds': 4, 'raglan': 4, 'sleeve': 16, 'yoke_total': 133}],
['repair check: raglan seam reserve', [101, 201],
{'back': 33, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 373}],
['generated control 1', [100, 160],
{'back': 32, 'front': 32, 'increase_rounds': 24, 'raglan': 4, 'sleeve': 16, 'yoke_total': 292}],
['generated control 2', [110, 180],
{'back': 35, 'front': 35, 'increase_rounds': 28, 'raglan': 4, 'sleeve': 18, 'yoke_total': 334}],
['generated control 3', [96, 60],
{'back': 30, 'front': 30, 'increase_rounds': 0, 'raglan': 4, 'sleeve': 16, 'yoke_total': 96}]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| standard neck | {'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 17, 'yoke_total': 372} | {'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372} | Failed |
| odd leftover | {'back': 34, 'front': 33, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333} | {'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333} | Failed |
| tiny neck | error: neck too small | error: neck too small | Passed |
| regression: raglan seam reserve | {'back': 36, 'front': 36, 'increase_rounds': 37, 'raglan': 4, 'sleeve': 18, 'yoke_total': 406} | {'back': 35, 'front': 35, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 18, 'yoke_total': 414} | Failed |
| repair check: raglan seam reserve | {'back': 39, 'front': 39, 'increase_rounds': 31, 'raglan': 4, 'sleeve': 20, 'yoke_total': 368} | {'back': 38, 'front': 38, 'increase_rounds': 31, 'raglan': 4, 'sleeve': 20, 'yoke_total': 368} | Failed |
| generated control 1 | {'back': 32, 'front': 32, 'increase_rounds': 4, 'raglan': 4, 'sleeve': 17, 'yoke_total': 132} | {'back': 32, 'front': 32, 'increase_rounds': 4, 'raglan': 4, 'sleeve': 16, 'yoke_total': 132} | Failed |
| generated control 2 | {'back': 26, 'front': 26, 'increase_rounds': 37, 'raglan': 4, 'sleeve': 13, 'yoke_total': 376} | {'back': 25, 'front': 25, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 13, 'yoke_total': 384} | Failed |
| generated control 3 | {'back': 39, 'front': 39, 'increase_rounds': 36, 'raglan': 4, 'sleeve': 20, 'yoke_total': 408} | {'back': 38, 'front': 38, 'increase_rounds': 36, 'raglan': 4, 'sleeve': 20, 'yoke_total': 408} | Failed |
SHA-256 / d391454862e15db0106b2d50ad37416f4d840ea12ce2935c96fa71cc73d285e9
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(neck_sts, underarm_body_sts):
if neck_sts < 16:
return 'error: neck too small'
rem = neck_sts - 4
front = rem // 3
sleeves_total = rem - 2 * front
sleeve = sleeves_total // 2
back = front + sleeves_total % 2
target = underarm_body_sts // 2
incs = max(0, math.ceil(Fraction(target - front, 2)))
return {'front': front, 'back': back, 'sleeve': sleeve, 'raglan': 4, 'increase_rounds': incs,
'yoke_total': neck_sts + 8 * incs}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['standard neck', [100, 200],
{'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372}],
['odd leftover', [101, 180],
{'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333}],
['tiny neck', [12, 100], 'error: neck too small'],
['regression: raglan seam reserve', [110, 220],
{'back': 35, 'front': 35, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 18, 'yoke_total': 414}],
['repair check: raglan seam reserve', [120, 200],
{'back': 38, 'front': 38, 'increase_rounds': 31, 'raglan': 4, 'sleeve': 20, 'yoke_total': 368}],
['generated control 1', [100, 80],
{'back': 32, 'front': 32, 'increase_rounds': 4, 'raglan': 4, 'sleeve': 16, 'yoke_total': 132}],
['generated control 2', [80, 200],
{'back': 25, 'front': 25, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 13, 'yoke_total': 384}],
['generated control 3', [120, 220],
{'back': 38, 'front': 38, 'increase_rounds': 36, 'raglan': 4, 'sleeve': 20, 'yoke_total': 408}]],
[['odd leftover', [101, 180],
{'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333}],
['tiny neck', [12, 100], 'error: neck too small'],
['already wide', [120, 60],
{'back': 38, 'front': 38, 'increase_rounds': 0, 'raglan': 4, 'sleeve': 20, 'yoke_total': 120}],
['regression: raglan seam reserve', [101, 160],
{'back': 33, 'front': 32, 'increase_rounds': 24, 'raglan': 4, 'sleeve': 16, 'yoke_total': 293}],
['repair check: raglan seam reserve', [16, 160],
{'back': 4, 'front': 4, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 2, 'yoke_total': 320}],
['generated control 1', [12, 180], 'error: neck too small'],
['generated control 2', [12, 201], 'error: neck too small'],
['generated control 3', [88, 160],
{'back': 28, 'front': 28, 'increase_rounds': 26, 'raglan': 4, 'sleeve': 14, 'yoke_total': 296}]],
[['tiny neck', [12, 100], 'error: neck too small'],
['already wide', [120, 60],
{'back': 38, 'front': 38, 'increase_rounds': 0, 'raglan': 4, 'sleeve': 20, 'yoke_total': 120}],
['standard neck', [100, 200],
{'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372}],
['regression: raglan seam reserve', [110, 80],
{'back': 35, 'front': 35, 'increase_rounds': 3, 'raglan': 4, 'sleeve': 18, 'yoke_total': 134}],
['repair check: raglan seam reserve', [16, 220],
{'back': 4, 'front': 4, 'increase_rounds': 53, 'raglan': 4, 'sleeve': 2, 'yoke_total': 440}],
['generated control 1', [12, 220], 'error: neck too small'],
['generated control 2', [120, 180],
{'back': 38, 'front': 38, 'increase_rounds': 26, 'raglan': 4, 'sleeve': 20, 'yoke_total': 328}],
['generated control 3', [16, 180],
{'back': 4, 'front': 4, 'increase_rounds': 43, 'raglan': 4, 'sleeve': 2, 'yoke_total': 360}]],
[['already wide', [120, 60],
{'back': 38, 'front': 38, 'increase_rounds': 0, 'raglan': 4, 'sleeve': 20, 'yoke_total': 120}],
['standard neck', [100, 200],
{'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372}],
['odd leftover', [101, 180],
{'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333}],
['regression: raglan seam reserve', [88, 180],
{'back': 28, 'front': 28, 'increase_rounds': 31, 'raglan': 4, 'sleeve': 14, 'yoke_total': 336}],
['repair check: raglan seam reserve', [110, 80],
{'back': 35, 'front': 35, 'increase_rounds': 3, 'raglan': 4, 'sleeve': 18, 'yoke_total': 134}],
['generated control 1', [12, 201], 'error: neck too small'],
['generated control 2', [120, 220],
{'back': 38, 'front': 38, 'increase_rounds': 36, 'raglan': 4, 'sleeve': 20, 'yoke_total': 408}],
['generated control 3', [100, 160],
{'back': 32, 'front': 32, 'increase_rounds': 24, 'raglan': 4, 'sleeve': 16, 'yoke_total': 292}]],
[['standard neck', [100, 200],
{'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372}],
['odd leftover', [101, 180],
{'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333}],
['tiny neck', [12, 100], 'error: neck too small'],
['regression: raglan seam reserve', [101, 80],
{'back': 33, 'front': 32, 'increase_rounds': 4, 'raglan': 4, 'sleeve': 16, 'yoke_total': 133}],
['repair check: raglan seam reserve', [101, 201],
{'back': 33, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 373}],
['generated control 1', [100, 160],
{'back': 32, 'front': 32, 'increase_rounds': 24, 'raglan': 4, 'sleeve': 16, 'yoke_total': 292}],
['generated control 2', [110, 180],
{'back': 35, 'front': 35, 'increase_rounds': 28, 'raglan': 4, 'sleeve': 18, 'yoke_total': 334}],
['generated control 3', [96, 60],
{'back': 30, 'front': 30, 'increase_rounds': 0, 'raglan': 4, 'sleeve': 16, 'yoke_total': 96}]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| standard neck | {'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372} | {'back': 32, 'front': 32, 'increase_rounds': 34, 'raglan': 4, 'sleeve': 16, 'yoke_total': 372} | Passed |
| odd leftover | {'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333} | {'back': 33, 'front': 32, 'increase_rounds': 29, 'raglan': 4, 'sleeve': 16, 'yoke_total': 333} | Passed |
| tiny neck | error: neck too small | error: neck too small | Passed |
| regression: raglan seam reserve | {'back': 35, 'front': 35, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 18, 'yoke_total': 414} | {'back': 35, 'front': 35, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 18, 'yoke_total': 414} | Passed |
| repair check: raglan seam reserve | {'back': 38, 'front': 38, 'increase_rounds': 31, 'raglan': 4, 'sleeve': 20, 'yoke_total': 368} | {'back': 38, 'front': 38, 'increase_rounds': 31, 'raglan': 4, 'sleeve': 20, 'yoke_total': 368} | Passed |
| generated control 1 | {'back': 32, 'front': 32, 'increase_rounds': 4, 'raglan': 4, 'sleeve': 16, 'yoke_total': 132} | {'back': 32, 'front': 32, 'increase_rounds': 4, 'raglan': 4, 'sleeve': 16, 'yoke_total': 132} | Passed |
| generated control 2 | {'back': 25, 'front': 25, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 13, 'yoke_total': 384} | {'back': 25, 'front': 25, 'increase_rounds': 38, 'raglan': 4, 'sleeve': 13, 'yoke_total': 384} | Passed |
| generated control 3 | {'back': 38, 'front': 38, 'increase_rounds': 36, 'raglan': 4, 'sleeve': 20, 'yoke_total': 408} | {'back': 38, 'front': 38, 'increase_rounds': 36, 'raglan': 4, 'sleeve': 20, 'yoke_total': 408} | Passed |
SHA-256 / 3677793d1790ec53a0ae09f8d346508d39d7865ad393e8a6c84068eac3b0dc2e
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:35.373121+00:00.
Case digest / 022782ead73f2f943ab4b66c8590c3641c9c80168f41920223b7606a5b4144a1