{"abstract":"A combined 9.899 wpi displays as 9.8 instead of 9.9.","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":"Rounding to a whole wpi loses the decimal and shifts band edges.","family":"w2-knitting_and_sewing_pattern_grading-held-strands-display-rounding","id":"FA-97761","implementations":{"attempt":{"sha256":"a9a5d4559bcbcdbbd4b9ed9088d17c93741f085b7ecdcf25c9981d6d5164c43f","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 / math.sqrt(sum(1 / (w * w) for w in wpis))\n    eff = round(eff)\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: display rounding', [[20, 24, 8]], [7.1, 'super bulky']],\n  ['repair check: display rounding', [[30, 11, 11]], [7.5, 'super bulky']],\n  ['generated control 1', [[16, 9, 16]], [7.0, 'super bulky']],\n  ['generated control 2', [[24]], [24.0, 'fingering']], ['generated control 3', [[20, 9]], [8.2, 'bulky']]],\n [['two dk strands', [[14, 14]], [9.9, 'bulky']], ['empty', [[]], 'error: no strands'],\n  ['band edge', [[18]], [18.0, 'fingering']], ['regression: display rounding', [[30, 14]], [12.7, 'worsted']],\n  ['repair check: display rounding', [[9, 24]], [8.4, 'bulky']],\n  ['generated control 1', [[35]], [35.0, 'lace']], ['generated control 2', [[24, 12, 12]], [8.0, 'bulky']],\n  ['generated control 3', [[16]], [16.0, 'dk']]],\n [['empty', [[]], 'error: no strands'], ['band edge', [[18]], [18.0, 'fingering']],\n  ['single fingering', [[20]], [20.0, 'fingering']],\n  ['regression: display rounding', [[20, 12]], [10.3, 'bulky']],\n  ['repair check: display rounding', [[16, 8, 8]], [5.3, 'super bulky']],\n  ['generated control 1', [[16]], [16.0, 'dk']], ['generated control 2', [[9]], [9.0, 'bulky']],\n  ['generated control 3', [[9, 11]], [7.0, 'super bulky']]],\n [['band edge', [[18]], [18.0, 'fingering']], ['single fingering', [[20]], [20.0, 'fingering']],\n  ['two dk strands', [[14, 14]], [9.9, 'bulky']],\n  ['regression: display rounding', [[16, 35, 14]], [10.1, 'bulky']],\n  ['repair check: display rounding', [[16, 9, 18]], [7.2, 'super bulky']],\n  ['generated control 1', [[]], 'error: no strands'], ['generated control 2', [[35, 14]], [13.0, 'worsted']],\n  ['generated control 3', [[30, 14]], [12.7, 'worsted']]],\n [['single fingering', [[20]], [20.0, 'fingering']], ['two dk strands', [[14, 14]], [9.9, 'bulky']],\n  ['empty', [[]], 'error: no strands'], ['regression: display rounding', [[11, 16]], [9.1, 'bulky']],\n  ['repair check: display rounding', [[14, 18, 30]], [10.4, 'bulky']],\n  ['generated control 1', [[11]], [11.0, 'worsted']],\n  ['generated control 2', [[14, 8, 11]], [5.9, 'super bulky']],\n  ['generated control 3', [[30, 11]], [10.3, 'bulky']]]]\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":"ee5d979fc0eacc559f175286f2c6d2b06bc17146ff552ba9c3fc8f8597080b25","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 / math.sqrt(sum(1 / (w * w) for w in wpis))\n    eff = math.floor(eff * 10) / 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: display rounding', [[20, 24, 8]], [7.1, 'super bulky']],\n  ['repair check: display rounding', [[30, 11, 11]], [7.5, 'super bulky']],\n  ['generated control 1', [[16, 9, 16]], [7.0, 'super bulky']],\n  ['generated control 2', [[24]], [24.0, 'fingering']], ['generated control 3', [[20, 9]], [8.2, 'bulky']]],\n [['two dk strands', [[14, 14]], [9.9, 'bulky']], ['empty', [[]], 'error: no strands'],\n  ['band edge', [[18]], [18.0, 'fingering']], ['regression: display rounding', [[30, 14]], [12.7, 'worsted']],\n  ['repair check: display rounding', [[9, 24]], [8.4, 'bulky']],\n  ['generated control 1', [[35]], [35.0, 'lace']], ['generated control 2', [[24, 12, 12]], [8.0, 'bulky']],\n  ['generated control 3', [[16]], [16.0, 'dk']]],\n [['empty', [[]], 'error: no strands'], ['band edge', [[18]], [18.0, 'fingering']],\n  ['single fingering', [[20]], [20.0, 'fingering']],\n  ['regression: display rounding', [[20, 12]], [10.3, 'bulky']],\n  ['repair check: display rounding', [[16, 8, 8]], [5.3, 'super bulky']],\n  ['generated control 1', [[16]], [16.0, 'dk']], ['generated control 2', [[9]], [9.0, 'bulky']],\n  ['generated control 3', [[9, 11]], [7.0, 'super bulky']]],\n [['band edge', [[18]], [18.0, 'fingering']], ['single fingering', [[20]], [20.0, 'fingering']],\n  ['two dk strands', [[14, 14]], [9.9, 'bulky']],\n  ['regression: display rounding', [[16, 35, 14]], [10.1, 'bulky']],\n  ['repair check: display rounding', [[16, 9, 18]], [7.2, 'super bulky']],\n  ['generated control 1', [[]], 'error: no strands'], ['generated control 2', [[35, 14]], [13.0, 'worsted']],\n  ['generated control 3', [[30, 14]], [12.7, 'worsted']]],\n [['single fingering', [[20]], [20.0, 'fingering']], ['two dk strands', [[14, 14]], [9.9, 'bulky']],\n  ['empty', [[]], 'error: no strands'], ['regression: display rounding', [[11, 16]], [9.1, 'bulky']],\n  ['repair check: display rounding', [[14, 18, 30]], [10.4, 'bulky']],\n  ['generated control 1', [[11]], [11.0, 'worsted']],\n  ['generated control 2', [[14, 8, 11]], [5.9, 'super bulky']],\n  ['generated control 3', [[30, 11]], [10.3, 'bulky']]]]\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-display-rounding","generated_at":"2026-09-29T14:52:35.326097+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":"The displayed wpi truncates instead of rounding half-up to 0.1.","sha256":"562577939e551c784e43ee1146a08cacabb755d500058ebb4baadc584fd31c0a","title":"Held-together yarn weight estimator: display rounding · 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":42.575,"exit_code":1,"observations":[{"actual":[20,"fingering"],"check":"single fingering","expected":[20.0,"fingering"],"passed":true},{"actual":[10,"bulky"],"check":"two dk strands","expected":[9.9,"bulky"],"passed":false},{"actual":"error: no strands","check":"empty","expected":"error: no strands","passed":true},{"actual":[7,"super bulky"],"check":"regression: display rounding","expected":[7.1,"super bulky"],"passed":false},{"actual":[8,"bulky"],"check":"repair check: display rounding","expected":[7.5,"super bulky"],"passed":false},{"actual":[7,"super bulky"],"check":"generated control 1","expected":[7.0,"super bulky"],"passed":true},{"actual":[24,"fingering"],"check":"generated control 2","expected":[24.0,"fingering"],"passed":true},{"actual":[8,"bulky"],"check":"generated control 3","expected":[8.2,"bulky"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single fingering\", \"actual\": [20, \"fingering\"], \"expected\": [20.0, \"fingering\"], \"passed\": true}, {\"check\": \"two dk strands\", \"actual\": [10, \"bulky\"], \"expected\": [9.9, \"bulky\"], \"passed\": false}, {\"check\": \"empty\", \"actual\": \"error: no strands\", \"expected\": \"error: no strands\", \"passed\": true}, {\"check\": \"regression: display rounding\", \"actual\": [7, \"super bulky\"], \"expected\": [7.1, \"super bulky\"], \"passed\": false}, {\"check\": \"repair check: display rounding\", \"actual\": [8, \"bulky\"], \"expected\": [7.5, \"super bulky\"], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [7, \"super bulky\"], \"expected\": [7.0, \"super bulky\"], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [24, \"fingering\"], \"expected\": [24.0, \"fingering\"], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [8, \"bulky\"], \"expected\": [8.2, \"bulky\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.534,"exit_code":1,"observations":[{"actual":[20.0,"fingering"],"check":"single fingering","expected":[20.0,"fingering"],"passed":true},{"actual":[9.8,"bulky"],"check":"two dk strands","expected":[9.9,"bulky"],"passed":false},{"actual":"error: no strands","check":"empty","expected":"error: no strands","passed":true},{"actual":[7.0,"super bulky"],"check":"regression: display rounding","expected":[7.1,"super bulky"],"passed":false},{"actual":[7.5,"super bulky"],"check":"repair check: display rounding","expected":[7.5,"super bulky"],"passed":true},{"actual":[7.0,"super bulky"],"check":"generated control 1","expected":[7.0,"super bulky"],"passed":true},{"actual":[24.0,"fingering"],"check":"generated control 2","expected":[24.0,"fingering"],"passed":true},{"actual":[8.2,"bulky"],"check":"generated control 3","expected":[8.2,"bulky"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single fingering\", \"actual\": [20.0, \"fingering\"], \"expected\": [20.0, \"fingering\"], \"passed\": true}, {\"check\": \"two dk strands\", \"actual\": [9.8, \"bulky\"], \"expected\": [9.9, \"bulky\"], \"passed\": false}, {\"check\": \"empty\", \"actual\": \"error: no strands\", \"expected\": \"error: no strands\", \"passed\": true}, {\"check\": \"regression: display rounding\", \"actual\": [7.0, \"super bulky\"], \"expected\": [7.1, \"super bulky\"], \"passed\": false}, {\"check\": \"repair check: display rounding\", \"actual\": [7.5, \"super bulky\"], \"expected\": [7.5, \"super bulky\"], \"passed\": true}, {\"check\": \"generated control 1\", \"actual\": [7.0, \"super bulky\"], \"expected\": [7.0, \"super bulky\"], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [24.0, \"fingering\"], \"expected\": [24.0, \"fingering\"], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [8.2, \"bulky\"], \"expected\": [8.2, \"bulky\"], \"passed\": true}], \"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."}}