FA-97796 / Knitting and sewing pattern grading / Open access
Circle skirt drafter: circle fraction · case 01
A half circle skirt gets a waist half the intended size.
ROOT CAUSE
The circle fraction multiplies the radius instead of dividing the circumference.
THE FAILURE
The circle fraction multiplies the radius instead of dividing the circumference.
Unsuccessful approach: Dropping the 2 doubles the waist radius.
Case contract
kind full/half/quarter covers fraction 1, 1/2, 1/4 of a circle (else "error: kind"). Waist radius r = (waist+ease)/(2*pi*fraction); cut radius = r - sa (seam extends into the waist hole). Hem circumference = 2*pi*fraction*(r + length). Fabric span needed = 2*(cut_r + length + hem) for full and half, (cut_r + length + hem) for quarter. Return floats rounded to 1 decimal: [r, cut_r, hem_circumference, span].
Why this case matters
Circle skirt drafting converts waist size into a radius and checks the fabric width needed.
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(waist, kind, ease, sa, length, hem):
FR = {'full': 1, 'half': 0.5, 'quarter': 0.25}
if kind not in FR:
return 'error: kind'
W = waist + ease
r = W / (2 * math.pi) * FR[kind]
cut_r = r - sa
hem_c = 2 * math.pi * FR[kind] * (r + length)
span = 2 * (cut_r + length + hem) if kind != 'quarter' else cut_r + length + hem
return [round(r, 1), round(cut_r, 1), round(hem_c, 1), round(span, 1)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['full circle', [70, 'full', 2, 1.5, 55, 2], [11.5, 10.0, 417.6, 133.9]],
['half circle', [66, 'half', 0, 1, 40, 3], [21.0, 20.0, 191.7, 126.0]],
['quarter', [80, 'quarter', 1, 1.5, 70, 2], [51.6, 50.1, 191.0, 122.1]],
['regression: circle fraction', [80, 'quarter', 2, 1, 70, 2], [52.2, 51.2, 192.0, 123.2]],
['repair check: circle fraction', [70, 'half', 0, 1.5, 40, 2], [22.3, 20.8, 195.7, 125.6]],
['generated control 1', [60, 'gored', 0, 1, 55, 3], 'error: kind'],
['generated control 2', [66, 'gored', 1, 1, 55, 2], 'error: kind'],
['generated control 3', [66, 'quarter', 1, 1, 70, 2], [42.7, 41.7, 177.0, 113.7]]],
[['half circle', [66, 'half', 0, 1, 40, 3], [21.0, 20.0, 191.7, 126.0]],
['quarter', [80, 'quarter', 1, 1.5, 70, 2], [51.6, 50.1, 191.0, 122.1]],
['gored rejected', [70, 'gored', 0, 1, 50, 2], 'error: kind'],
['regression: circle fraction', [60, 'quarter', 1, 1, 55, 2], [38.8, 37.8, 147.4, 94.8]],
['repair check: circle fraction', [70, 'full', 1, 1, 55, 2], [11.3, 10.3, 416.6, 134.6]],
['generated control 1', [80, 'gored', 1, 1, 70, 2], 'error: kind'],
['generated control 2', [66, 'gored', 0, 1.5, 40, 3], 'error: kind'],
['generated control 3', [66, 'full', 2, 1.5, 70, 3], [10.8, 9.3, 507.8, 164.6]]],
[['quarter', [80, 'quarter', 1, 1.5, 70, 2], [51.6, 50.1, 191.0, 122.1]],
['gored rejected', [70, 'gored', 0, 1, 50, 2], 'error: kind'],
['full circle', [70, 'full', 2, 1.5, 55, 2], [11.5, 10.0, 417.6, 133.9]],
['regression: circle fraction', [70, 'quarter', 1, 1.5, 70, 2], [45.2, 43.7, 181.0, 115.7]],
['repair check: circle fraction', [92, 'full', 1, 1.5, 55, 3], [14.8, 13.3, 438.6, 142.6]],
['generated control 1', [60, 'gored', 0, 1.5, 55, 3], 'error: kind'],
['generated control 2', [74.5, 'gored', 0, 1.5, 70, 3], 'error: kind'],
['generated control 3', [70, 'full', 0, 1, 55, 2], [11.1, 10.1, 415.6, 134.3]]],
[['gored rejected', [70, 'gored', 0, 1, 50, 2], 'error: kind'],
['full circle', [70, 'full', 2, 1.5, 55, 2], [11.5, 10.0, 417.6, 133.9]],
['half circle', [66, 'half', 0, 1, 40, 3], [21.0, 20.0, 191.7, 126.0]],
['regression: circle fraction', [70, 'quarter', 0, 1.5, 55, 2], [44.6, 43.1, 156.4, 100.1]],
['repair check: circle fraction', [74.5, 'half', 2, 1.5, 55, 3], [24.4, 22.9, 249.3, 161.7]],
['generated control 1', [74.5, 'gored', 2, 1, 70, 2], 'error: kind'],
['generated control 2', [92, 'full', 1, 1.5, 40, 2], [14.8, 13.3, 344.3, 110.6]],
['generated control 3', [92, 'quarter', 1, 1, 55, 2], [59.2, 58.2, 179.4, 115.2]]],
[['full circle', [70, 'full', 2, 1.5, 55, 2], [11.5, 10.0, 417.6, 133.9]],
['half circle', [66, 'half', 0, 1, 40, 3], [21.0, 20.0, 191.7, 126.0]],
['quarter', [80, 'quarter', 1, 1.5, 70, 2], [51.6, 50.1, 191.0, 122.1]],
['regression: circle fraction', [60, 'quarter', 0, 1.5, 55, 2], [38.2, 36.7, 146.4, 93.7]],
['repair check: circle fraction', [70, 'quarter', 2, 1, 40, 2], [45.8, 44.8, 134.8, 86.8]],
['generated control 1', [92, 'half', 1, 1.5, 40, 3], [29.6, 28.1, 218.7, 142.2]],
['generated control 2', [60, 'quarter', 2, 1.5, 70, 3], [39.5, 38.0, 172.0, 111.0]],
['generated control 3', [80, 'half', 0, 1.5, 70, 2], [25.5, 24.0, 299.9, 191.9]]]]
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 |
|---|---|---|---|
| full circle | [11.5, 10.0, 417.6, 133.9] | [11.5, 10.0, 417.6, 133.9] | Passed |
| half circle | [5.3, 4.3, 142.2, 94.5] | [21.0, 20.0, 191.7, 126.0] | Failed |
| quarter | [3.2, 1.7, 115.0, 73.7] | [51.6, 50.1, 191.0, 122.1] | Failed |
| regression: circle fraction | [3.3, 2.3, 115.1, 74.3] | [52.2, 51.2, 192.0, 123.2] | Failed |
| repair check: circle fraction | [5.6, 4.1, 143.2, 92.1] | [22.3, 20.8, 195.7, 125.6] | Failed |
| generated control 1 | error: kind | error: kind | Passed |
| generated control 2 | error: kind | error: kind | Passed |
| generated control 3 | [2.7, 1.7, 114.1, 73.7] | [42.7, 41.7, 177.0, 113.7] | Failed |
SHA-256 / 23a3010e47759d1db57760396b92c5cd8521ebbe00e37c314a14ad077dae25f7
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(waist, kind, ease, sa, length, hem):
FR = {'full': 1, 'half': 0.5, 'quarter': 0.25}
if kind not in FR:
return 'error: kind'
W = waist + ease
r = W / (math.pi * FR[kind])
cut_r = r - sa
hem_c = 2 * math.pi * FR[kind] * (r + length)
span = 2 * (cut_r + length + hem) if kind != 'quarter' else cut_r + length + hem
return [round(r, 1), round(cut_r, 1), round(hem_c, 1), round(span, 1)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['full circle', [70, 'full', 2, 1.5, 55, 2], [11.5, 10.0, 417.6, 133.9]],
['half circle', [66, 'half', 0, 1, 40, 3], [21.0, 20.0, 191.7, 126.0]],
['quarter', [80, 'quarter', 1, 1.5, 70, 2], [51.6, 50.1, 191.0, 122.1]],
['regression: circle fraction', [80, 'quarter', 2, 1, 70, 2], [52.2, 51.2, 192.0, 123.2]],
['repair check: circle fraction', [70, 'half', 0, 1.5, 40, 2], [22.3, 20.8, 195.7, 125.6]],
['generated control 1', [60, 'gored', 0, 1, 55, 3], 'error: kind'],
['generated control 2', [66, 'gored', 1, 1, 55, 2], 'error: kind'],
['generated control 3', [66, 'quarter', 1, 1, 70, 2], [42.7, 41.7, 177.0, 113.7]]],
[['half circle', [66, 'half', 0, 1, 40, 3], [21.0, 20.0, 191.7, 126.0]],
['quarter', [80, 'quarter', 1, 1.5, 70, 2], [51.6, 50.1, 191.0, 122.1]],
['gored rejected', [70, 'gored', 0, 1, 50, 2], 'error: kind'],
['regression: circle fraction', [60, 'quarter', 1, 1, 55, 2], [38.8, 37.8, 147.4, 94.8]],
['repair check: circle fraction', [70, 'full', 1, 1, 55, 2], [11.3, 10.3, 416.6, 134.6]],
['generated control 1', [80, 'gored', 1, 1, 70, 2], 'error: kind'],
['generated control 2', [66, 'gored', 0, 1.5, 40, 3], 'error: kind'],
['generated control 3', [66, 'full', 2, 1.5, 70, 3], [10.8, 9.3, 507.8, 164.6]]],
[['quarter', [80, 'quarter', 1, 1.5, 70, 2], [51.6, 50.1, 191.0, 122.1]],
['gored rejected', [70, 'gored', 0, 1, 50, 2], 'error: kind'],
['full circle', [70, 'full', 2, 1.5, 55, 2], [11.5, 10.0, 417.6, 133.9]],
['regression: circle fraction', [70, 'quarter', 1, 1.5, 70, 2], [45.2, 43.7, 181.0, 115.7]],
['repair check: circle fraction', [92, 'full', 1, 1.5, 55, 3], [14.8, 13.3, 438.6, 142.6]],
['generated control 1', [60, 'gored', 0, 1.5, 55, 3], 'error: kind'],
['generated control 2', [74.5, 'gored', 0, 1.5, 70, 3], 'error: kind'],
['generated control 3', [70, 'full', 0, 1, 55, 2], [11.1, 10.1, 415.6, 134.3]]],
[['gored rejected', [70, 'gored', 0, 1, 50, 2], 'error: kind'],
['full circle', [70, 'full', 2, 1.5, 55, 2], [11.5, 10.0, 417.6, 133.9]],
['half circle', [66, 'half', 0, 1, 40, 3], [21.0, 20.0, 191.7, 126.0]],
['regression: circle fraction', [70, 'quarter', 0, 1.5, 55, 2], [44.6, 43.1, 156.4, 100.1]],
['repair check: circle fraction', [74.5, 'half', 2, 1.5, 55, 3], [24.4, 22.9, 249.3, 161.7]],
['generated control 1', [74.5, 'gored', 2, 1, 70, 2], 'error: kind'],
['generated control 2', [92, 'full', 1, 1.5, 40, 2], [14.8, 13.3, 344.3, 110.6]],
['generated control 3', [92, 'quarter', 1, 1, 55, 2], [59.2, 58.2, 179.4, 115.2]]],
[['full circle', [70, 'full', 2, 1.5, 55, 2], [11.5, 10.0, 417.6, 133.9]],
['half circle', [66, 'half', 0, 1, 40, 3], [21.0, 20.0, 191.7, 126.0]],
['quarter', [80, 'quarter', 1, 1.5, 70, 2], [51.6, 50.1, 191.0, 122.1]],
['regression: circle fraction', [60, 'quarter', 0, 1.5, 55, 2], [38.2, 36.7, 146.4, 93.7]],
['repair check: circle fraction', [70, 'quarter', 2, 1, 40, 2], [45.8, 44.8, 134.8, 86.8]],
['generated control 1', [92, 'half', 1, 1.5, 40, 3], [29.6, 28.1, 218.7, 142.2]],
['generated control 2', [60, 'quarter', 2, 1.5, 70, 3], [39.5, 38.0, 172.0, 111.0]],
['generated control 3', [80, 'half', 0, 1.5, 70, 2], [25.5, 24.0, 299.9, 191.9]]]]
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 |
|---|---|---|---|
| full circle | [22.9, 21.4, 489.6, 156.8] | [11.5, 10.0, 417.6, 133.9] | Failed |
| half circle | [42.0, 41.0, 257.7, 168.0] | [21.0, 20.0, 191.7, 126.0] | Failed |
| quarter | [103.1, 101.6, 272.0, 173.6] | [51.6, 50.1, 191.0, 122.1] | Failed |
| regression: circle fraction | [104.4, 103.4, 274.0, 175.4] | [52.2, 51.2, 192.0, 123.2] | Failed |
| repair check: circle fraction | [44.6, 43.1, 265.7, 170.1] | [22.3, 20.8, 195.7, 125.6] | Failed |
| generated control 1 | error: kind | error: kind | Passed |
| generated control 2 | error: kind | error: kind | Passed |
| generated control 3 | [85.3, 84.3, 244.0, 156.3] | [42.7, 41.7, 177.0, 113.7] | Failed |
SHA-256 / 83ce87ba226f3c93ac28dea4bfe6bb6377ee8011b7c974f397cc2829f3fccb87
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 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
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.741006+00:00.
Case digest / f28fe3028ff2937f7ce58f5b45a32bdd3ebca0e7a213c3459f689f32f95f87a3