{"abstract":"Holding two strands together is classified as the same weight as one.","category":"Knitting and sewing pattern grading","checks":8,"contract":"Strands held together combine as 1/sqrt(sum(1/wpi^2)), rounded half-up to 0.1. Classify the rounded value: >=30 lace, >=18 fingering, >=14 dk, >=11 worsted, >=8 bulky, else super bulky. Empty -> \"error: no strands\". Return [wpi, class].","contract_signature":"wpis","evaluation_group":"w2-knitting_and_sewing_pattern_grading-held-strands","failed_approach":"Summing reciprocals combines diameters, not areas, and overstates thickness.","family":"w2-knitting_and_sewing_pattern_grading-held-strands-strand-combination","id":"FA-97751","implementations":{"attempt":{"sha256":"cd8bd2610b148dd16cff6895e653d71d4dfd4bf68254922e9b1f870415bf8036","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(wpis):\n    BANDS = [(30, 'lace'), (18, 'fingering'), (14, 'dk'), (11, 'worsted'), (8, 'bulky'), (0, 'super bulky')]\n    if not wpis:\n        return 'error: no strands'\n    eff = 1 / sum(1 / w for w in wpis)\n    eff = math.floor(eff * 10 + 0.5) / 10\n    for lim, name in BANDS:\n        if eff >= lim:\n            return [eff, name]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['single fingering', [[20]], [20.0, 'fingering']], ['two dk strands', [[14, 14]], [9.9, 'bulky']],\n  ['empty', [[]], 'error: no strands'], ['regression: strand combination', [[8, 24]], [7.6, 'super bulky']],\n  ['repair check: strand combination', [[24, 35]], [19.8, 'fingering']],\n  ['generated control 1', [[30]], [30.0, 'lace']], ['generated control 2', [[30, 14, 12]], [8.7, 'bulky']],\n  ['generated control 3', [[8, 9]], [6.0, 'super bulky']]],\n [['two dk strands', [[14, 14]], [9.9, 'bulky']], ['empty', [[]], 'error: no strands'],\n  ['band edge', [[18]], [18.0, 'fingering']],\n  ['regression: strand combination', [[11, 11]], [7.8, 'super bulky']],\n  ['repair check: strand combination', [[14, 12]], [9.1, 'bulky']],\n  ['generated control 1', [[12]], [12.0, 'worsted']], ['generated control 2', [[24, 12, 12]], [8.0, 'bulky']],\n  ['generated control 3', [[35, 12, 35]], [10.8, 'bulky']]],\n [['empty', [[]], 'error: no strands'], ['band edge', [[18]], [18.0, 'fingering']],\n  ['single fingering', [[20]], [20.0, 'fingering']],\n  ['regression: strand combination', [[24, 12, 12]], [8.0, 'bulky']],\n  ['repair check: strand combination', [[24, 35, 12]], [10.3, 'bulky']],\n  ['generated control 1', [[14, 14, 8]], [6.2, 'super bulky']],\n  ['generated control 2', [[30]], [30.0, 'lace']], ['generated control 3', [[18, 18]], [12.7, 'worsted']]],\n [['band edge', [[18]], [18.0, 'fingering']], ['single fingering', [[20]], [20.0, 'fingering']],\n  ['two dk strands', [[14, 14]], [9.9, 'bulky']],\n  ['regression: strand combination', [[14, 30, 14]], [9.4, 'bulky']],\n  ['repair check: strand combination', [[9, 8, 11]], [5.3, 'super bulky']],\n  ['generated control 1', [[]], 'error: no strands'], ['generated control 2', [[12]], [12.0, 'worsted']],\n  ['generated control 3', [[8, 12]], [6.7, 'super bulky']]],\n [['single fingering', [[20]], [20.0, 'fingering']], ['two dk strands', [[14, 14]], [9.9, 'bulky']],\n  ['empty', [[]], 'error: no strands'], ['regression: strand combination', [[35, 11]], [10.5, 'bulky']],\n  ['repair check: strand combination', [[18, 30, 24]], [13.0, 'worsted']],\n  ['generated control 1', [[30]], [30.0, 'lace']], ['generated control 2', [[24, 11, 20]], [8.9, 'bulky']],\n  ['generated control 3', [[16]], [16.0, 'dk']]]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"426550d73c95a047175c57c85834dadf6b1555782c086d7db65d635a84dc8f1e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(wpis):\n    BANDS = [(30, 'lace'), (18, 'fingering'), (14, 'dk'), (11, 'worsted'), (8, 'bulky'), (0, 'super bulky')]\n    if not wpis:\n        return 'error: no strands'\n    eff = sum(wpis) / len(wpis)\n    eff = math.floor(eff * 10 + 0.5) / 10\n    for lim, name in BANDS:\n        if eff >= lim:\n            return [eff, name]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['single fingering', [[20]], [20.0, 'fingering']], ['two dk strands', [[14, 14]], [9.9, 'bulky']],\n  ['empty', [[]], 'error: no strands'], ['regression: strand combination', [[8, 24]], [7.6, 'super bulky']],\n  ['repair check: strand combination', [[24, 35]], [19.8, 'fingering']],\n  ['generated control 1', [[30]], [30.0, 'lace']], ['generated control 2', [[30, 14, 12]], [8.7, 'bulky']],\n  ['generated control 3', [[8, 9]], [6.0, 'super bulky']]],\n [['two dk strands', [[14, 14]], [9.9, 'bulky']], ['empty', [[]], 'error: no strands'],\n  ['band edge', [[18]], [18.0, 'fingering']],\n  ['regression: strand combination', [[11, 11]], [7.8, 'super bulky']],\n  ['repair check: strand combination', [[14, 12]], [9.1, 'bulky']],\n  ['generated control 1', [[12]], [12.0, 'worsted']], ['generated control 2', [[24, 12, 12]], [8.0, 'bulky']],\n  ['generated control 3', [[35, 12, 35]], [10.8, 'bulky']]],\n [['empty', [[]], 'error: no strands'], ['band edge', [[18]], [18.0, 'fingering']],\n  ['single fingering', [[20]], [20.0, 'fingering']],\n  ['regression: strand combination', [[24, 12, 12]], [8.0, 'bulky']],\n  ['repair check: strand combination', [[24, 35, 12]], [10.3, 'bulky']],\n  ['generated control 1', [[14, 14, 8]], [6.2, 'super bulky']],\n  ['generated control 2', [[30]], [30.0, 'lace']], ['generated control 3', [[18, 18]], [12.7, 'worsted']]],\n [['band edge', [[18]], [18.0, 'fingering']], ['single fingering', [[20]], [20.0, 'fingering']],\n  ['two dk strands', [[14, 14]], [9.9, 'bulky']],\n  ['regression: strand combination', [[14, 30, 14]], [9.4, 'bulky']],\n  ['repair check: strand combination', [[9, 8, 11]], [5.3, 'super bulky']],\n  ['generated control 1', [[]], 'error: no strands'], ['generated control 2', [[12]], [12.0, 'worsted']],\n  ['generated control 3', [[8, 12]], [6.7, 'super bulky']]],\n [['single fingering', [[20]], [20.0, 'fingering']], ['two dk strands', [[14, 14]], [9.9, 'bulky']],\n  ['empty', [[]], 'error: no strands'], ['regression: strand combination', [[35, 11]], [10.5, 'bulky']],\n  ['repair check: strand combination', [[18, 30, 24]], [13.0, 'worsted']],\n  ['generated control 1', [[30]], [30.0, 'lace']], ['generated control 2', [[24, 11, 20]], [8.9, 'bulky']],\n  ['generated control 3', [[16]], [16.0, 'dk']]]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-knitting_and_sewing_pattern_grading-held-strands-strand-combination","generated_at":"2026-09-29T14:52:35.232122+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Knitters hold yarns double to substitute a heavier weight and need the combined wraps per inch.","root_cause":"Wraps per inch are averaged instead of combining strand cross-sections.","sha256":"2f2cc73cf28d0d6dce123f0136b657338f8a6a62771b3bbf7358102172e83646","title":"Held-together yarn weight estimator: strand combination · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":46.052,"exit_code":1,"observations":[{"actual":[20.0,"fingering"],"check":"single fingering","expected":[20.0,"fingering"],"passed":true},{"actual":[7.0,"super bulky"],"check":"two dk strands","expected":[9.9,"bulky"],"passed":false},{"actual":"error: no strands","check":"empty","expected":"error: no strands","passed":true},{"actual":[6.0,"super bulky"],"check":"regression: strand combination","expected":[7.6,"super bulky"],"passed":false},{"actual":[14.2,"dk"],"check":"repair check: strand combination","expected":[19.8,"fingering"],"passed":false},{"actual":[30.0,"lace"],"check":"generated control 1","expected":[30.0,"lace"],"passed":true},{"actual":[5.3,"super bulky"],"check":"generated control 2","expected":[8.7,"bulky"],"passed":false},{"actual":[4.2,"super bulky"],"check":"generated control 3","expected":[6.0,"super bulky"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single fingering\", \"actual\": [20.0, \"fingering\"], \"expected\": [20.0, \"fingering\"], \"passed\": true}, {\"check\": \"two dk strands\", \"actual\": [7.0, \"super bulky\"], \"expected\": [9.9, \"bulky\"], \"passed\": false}, {\"check\": \"empty\", \"actual\": \"error: no strands\", \"expected\": \"error: no strands\", \"passed\": true}, {\"check\": \"regression: strand combination\", \"actual\": [6.0, \"super bulky\"], \"expected\": [7.6, \"super bulky\"], \"passed\": false}, {\"check\": \"repair check: strand combination\", \"actual\": [14.2, \"dk\"], \"expected\": [19.8, \"fingering\"], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [30.0, \"lace\"], \"expected\": [30.0, \"lace\"], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [5.3, \"super bulky\"], \"expected\": [8.7, \"bulky\"], \"passed\": false}, {\"check\": \"generated control 3\", \"actual\": [4.2, \"super bulky\"], \"expected\": [6.0, \"super bulky\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.578,"exit_code":1,"observations":[{"actual":[20.0,"fingering"],"check":"single fingering","expected":[20.0,"fingering"],"passed":true},{"actual":[14.0,"dk"],"check":"two dk strands","expected":[9.9,"bulky"],"passed":false},{"actual":"error: no strands","check":"empty","expected":"error: no strands","passed":true},{"actual":[16.0,"dk"],"check":"regression: strand combination","expected":[7.6,"super bulky"],"passed":false},{"actual":[29.5,"fingering"],"check":"repair check: strand combination","expected":[19.8,"fingering"],"passed":false},{"actual":[30.0,"lace"],"check":"generated control 1","expected":[30.0,"lace"],"passed":true},{"actual":[18.7,"fingering"],"check":"generated control 2","expected":[8.7,"bulky"],"passed":false},{"actual":[8.5,"bulky"],"check":"generated control 3","expected":[6.0,"super bulky"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single fingering\", \"actual\": [20.0, \"fingering\"], \"expected\": [20.0, \"fingering\"], \"passed\": true}, {\"check\": \"two dk strands\", \"actual\": [14.0, \"dk\"], \"expected\": [9.9, \"bulky\"], \"passed\": false}, {\"check\": \"empty\", \"actual\": \"error: no strands\", \"expected\": \"error: no strands\", \"passed\": true}, {\"check\": \"regression: strand combination\", \"actual\": [16.0, \"dk\"], \"expected\": [7.6, \"super bulky\"], \"passed\": false}, {\"check\": \"repair check: strand combination\", \"actual\": [29.5, \"fingering\"], \"expected\": [19.8, \"fingering\"], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [30.0, \"lace\"], \"expected\": [30.0, \"lace\"], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [18.7, \"fingering\"], \"expected\": [8.7, \"bulky\"], \"passed\": false}, {\"check\": \"generated control 3\", \"actual\": [8.5, \"bulky\"], \"expected\": [6.0, \"super bulky\"], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}