{"abstract":"Small kana and long vowel marks begin lines.","category":"Typography line breaking","checks":8,"contract":"Input [text of full-width characters, line length L]. Lines take L characters. If the next character is a hanging comma/period (、。，．) and is not itself followed by a line-start-prohibited character, it hangs on the line (burasage). Otherwise move characters to the next line while the next line would start with a prohibited character (、。，．）」』！？ー and small kana), then while the line would end with an opening bracket; a line keeps at least one character. Return the lines.","contract_signature":"x","evaluation_group":"w2-typography-line-breaking-kinsoku","failed_approach":"Adding small kana but not ー still lets the long vowel mark start lines.","family":"w2-typography-line-breaking-kinsoku-small-kana-strictness","id":"FA-80031","implementations":{"attempt":{"sha256":"e46b1263e4cfef294270740103b6089c098e95afaa73ce7b21f7db90757c5f0a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    text, L = x\n    NO_START = '、。，．）」』！？ぁぃぅぇぉっゃゅょ'\n    NO_END = '（「『'\n    HANG = '、。，．'\n    lines = []\n    pos = 0\n    n = len(text)\n    while pos < n:\n        end = pos + L\n        if end >= n:\n            lines.append(text[pos:])\n            break\n        if text[end] in HANG and (end + 1 >= n or text[end + 1] not in NO_START):\n            end += 1\n        else:\n            while end > pos + 1 and text[end] in NO_START:\n                end -= 1\n            while end > pos + 1 and text[end - 1] in NO_END:\n                end -= 1\n        lines.append(text[pos:end])\n        pos = end\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('small kana prohibited at line start', ['日本語かっこいい', 4], ['日本語', 'かっこい', 'い']), ('regression: small kana strictness', ['こあ）ー、あ）っこ、「（あ「けけっ。えかきー文', 8], ['こあ）ー、あ）っ', 'こ、「（あ「け', 'けっ。えかきー文']), ('regression: small kana strictness', ['（）字「文版い字ー「版ーっ「。』組字組けあか「', 8], ['（）字「文版い', '字ー「版ーっ', '「。』組字組けあ', 'か「']), ('regression: small kana strictness', ['語かおい。字ー」きくおあけ『', 6], ['語かおい。', '字ー」きくお', 'あけ『']), ('period hangs past the measure', ['日本語文。字組版', 4], ['日本語文。', '字組版']), ('period followed by bracket cannot hang', ['日本語文。」字組', 4], ['日本語', '文。」字', '組']), ('control layout', ['組『「（くお字き「本け、くえ日「。。」（お', 8], ['組『「（くお字き', '「本け、くえ日', '「。。」（お']), ('control layout', ['、』ゃあこけ字文お」かーかー。けきー', 8], ['、』ゃあこけ字文', 'お」かーかー。け', 'きー'])], [('regression: small kana strictness', ['きあ。えーくーゃい', 4], ['きあ。', 'えー', 'くーゃい']), ('regression: small kana strictness', ['本『く、ゃ本かっ', 7], ['本『く、ゃ本', 'かっ']), ('regression: small kana strictness', ['語字、え『えくゃえー』』ーこ組「日『。（', 4], ['語字、え', '『えくゃ', 'え', 'ー』』ー', 'こ組「日', '『。（']), ('regression: small kana strictness', ['けこ。語く「組き語け）おい組文うー', 8], ['けこ。語く「組き', '語け）おい組文', 'うー']), ('closing bracket pushes out', ['日本語文」字組版', 4], ['日本語', '文」字組', '版']), ('period followed by bracket cannot hang', ['日本語文。」字組', 4], ['日本語', '文。」字', '組']), ('control layout', ['、け）「文本、語文『こ（字けこ', 5], ['、け）「文', '本、語文', '『こ（字け', 'こ']), ('control layout', ['け（え）けうけ語「組『けーく字え字', 5], ['け（え）け', 'うけ語「組', '『けーく字', 'え字'])], [('regression: small kana strictness', ['日組こ、『っ、ー日ーあ』っ「、き「字っ', 6], ['日組こ、', '『っ、ー日ー', 'あ』っ「、き', '「字っ']), ('regression: small kana strictness', ['えい語く』うっき版うく『）ゃけか', 3], ['えい語', 'く』', 'うっき', '版うく', '『）ゃ', 'けか']), ('regression: small kana strictness', ['（）字「文版い字ー「版ーっ「。』組字組けあか「', 8], ['（）字「文版い', '字ー「版ーっ', '「。』組字組けあ', 'か「']), ('regression: small kana strictness', ['版っ』い「）ー）。）', 3], ['版っ』', 'い', '「', '）', 'ー', '）。）']), ('opening bracket at line end', ['日本語「文字」組版', 4], ['日本語', '「文字」', '組版']), ('closing bracket pushes out', ['日本語文」字組版', 4], ['日本語', '文」字組', '版']), ('control layout', ['っ日本語字こ（く」『、こう文かいえ。。ー', 8], ['っ日本語字こ', '（く」『、こう文', 'かいえ。。ー']), ('control layout', ['語う版っこう『」', 8], ['語う版っこう『」'])], [('regression: small kana strictness', ['）文っ語（く」（。いお、『』ー版版', 7], ['）文っ語（く」', '（。いお、', '『』ー版版']), ('regression: small kana strictness', ['きあ。えーくーゃい', 4], ['きあ。', 'えー', 'くーゃい']), ('regression: small kana strictness', ['いあ『本く）く。ー', 3], ['いあ', '『本', 'く）', 'く。ー']), ('regression: small kana strictness', ['語字、え『えくゃえー』』ーこ組「日『。（', 4], ['語字、え', '『えくゃ', 'え', 'ー』』ー', 'こ組「日', '『。（']), ('period followed by bracket cannot hang', ['日本語文。」字組', 4], ['日本語', '文。」字', '組']), ('opening bracket at line end', ['日本語「文字」組版', 4], ['日本語', '「文字」', '組版']), ('control layout', ['）、えゃ語うかえ「本あこ（字）ーえ字あか版』', 6], ['）、えゃ語う', 'かえ「本あこ', '（字）ーえ字', 'あか版』']), ('control layout', ['あ。」あ文（け版。日）語え』', 6], ['あ。」あ文', '（け版。日）', '語え』'])], [('regression: small kana strictness', ['版ー『版かゃき組本字』', 5], ['版ー『版', 'かゃき組本', '字』']), ('regression: small kana strictness', ['（日おあ」『こか、語。）本文っ、文えあゃ。', 5], ['（日おあ」', '『こか、', '語。）本', '文っ、文え', 'あゃ。']), ('regression: small kana strictness', ['文。いいおっけー本。う「ういおくかえ', 7], ['文。いいおっ', 'けー本。う「う', 'いおくかえ']), ('regression: small kana strictness', ['きっ文こ」あ。けけききき「日ー文ーか、い。', 7], ['きっ文こ」あ。', 'けけききき', '「日ー文ーか、', 'い。']), ('opening bracket at line end', ['日本語「文字」組版', 4], ['日本語', '「文字」', '組版']), ('period hangs past the measure', ['日本語文。字組版', 4], ['日本語文。', '字組版']), ('control layout', ['版っ日けおく、）」版（「', 6], ['版っ日けお', 'く、）」版', '（「']), ('control layout', ['こあく。（く版「うえけ。。。え', 8], ['こあく。（く版', '「うえけ。。。え'])]]\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":"796dd40e40d7bae1e8bf653d6a5d902f55121d573929b04d63ae8bda4065dfb6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    text, L = x\n    NO_START = '、。，．）」』！？'\n    NO_END = '（「『'\n    HANG = '、。，．'\n    lines = []\n    pos = 0\n    n = len(text)\n    while pos < n:\n        end = pos + L\n        if end >= n:\n            lines.append(text[pos:])\n            break\n        if text[end] in HANG and (end + 1 >= n or text[end + 1] not in NO_START):\n            end += 1\n        else:\n            while end > pos + 1 and text[end] in NO_START:\n                end -= 1\n            while end > pos + 1 and text[end - 1] in NO_END:\n                end -= 1\n        lines.append(text[pos:end])\n        pos = end\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('small kana prohibited at line start', ['日本語かっこいい', 4], ['日本語', 'かっこい', 'い']), ('regression: small kana strictness', ['こあ）ー、あ）っこ、「（あ「けけっ。えかきー文', 8], ['こあ）ー、あ）っ', 'こ、「（あ「け', 'けっ。えかきー文']), ('regression: small kana strictness', ['（）字「文版い字ー「版ーっ「。』組字組けあか「', 8], ['（）字「文版い', '字ー「版ーっ', '「。』組字組けあ', 'か「']), ('regression: small kana strictness', ['語かおい。字ー」きくおあけ『', 6], ['語かおい。', '字ー」きくお', 'あけ『']), ('period hangs past the measure', ['日本語文。字組版', 4], ['日本語文。', '字組版']), ('period followed by bracket cannot hang', ['日本語文。」字組', 4], ['日本語', '文。」字', '組']), ('control layout', ['組『「（くお字き「本け、くえ日「。。」（お', 8], ['組『「（くお字き', '「本け、くえ日', '「。。」（お']), ('control layout', ['、』ゃあこけ字文お」かーかー。けきー', 8], ['、』ゃあこけ字文', 'お」かーかー。け', 'きー'])], [('regression: small kana strictness', ['きあ。えーくーゃい', 4], ['きあ。', 'えー', 'くーゃい']), ('regression: small kana strictness', ['本『く、ゃ本かっ', 7], ['本『く、ゃ本', 'かっ']), ('regression: small kana strictness', ['語字、え『えくゃえー』』ーこ組「日『。（', 4], ['語字、え', '『えくゃ', 'え', 'ー』』ー', 'こ組「日', '『。（']), ('regression: small kana strictness', ['けこ。語く「組き語け）おい組文うー', 8], ['けこ。語く「組き', '語け）おい組文', 'うー']), ('closing bracket pushes out', ['日本語文」字組版', 4], ['日本語', '文」字組', '版']), ('period followed by bracket cannot hang', ['日本語文。」字組', 4], ['日本語', '文。」字', '組']), ('control layout', ['、け）「文本、語文『こ（字けこ', 5], ['、け）「文', '本、語文', '『こ（字け', 'こ']), ('control layout', ['け（え）けうけ語「組『けーく字え字', 5], ['け（え）け', 'うけ語「組', '『けーく字', 'え字'])], [('regression: small kana strictness', ['日組こ、『っ、ー日ーあ』っ「、き「字っ', 6], ['日組こ、', '『っ、ー日ー', 'あ』っ「、き', '「字っ']), ('regression: small kana strictness', ['えい語く』うっき版うく『）ゃけか', 3], ['えい語', 'く』', 'うっき', '版うく', '『）ゃ', 'けか']), ('regression: small kana strictness', ['（）字「文版い字ー「版ーっ「。』組字組けあか「', 8], ['（）字「文版い', '字ー「版ーっ', '「。』組字組けあ', 'か「']), ('regression: small kana strictness', ['版っ』い「）ー）。）', 3], ['版っ』', 'い', '「', '）', 'ー', '）。）']), ('opening bracket at line end', ['日本語「文字」組版', 4], ['日本語', '「文字」', '組版']), ('closing bracket pushes out', ['日本語文」字組版', 4], ['日本語', '文」字組', '版']), ('control layout', ['っ日本語字こ（く」『、こう文かいえ。。ー', 8], ['っ日本語字こ', '（く」『、こう文', 'かいえ。。ー']), ('control layout', ['語う版っこう『」', 8], ['語う版っこう『」'])], [('regression: small kana strictness', ['）文っ語（く」（。いお、『』ー版版', 7], ['）文っ語（く」', '（。いお、', '『』ー版版']), ('regression: small kana strictness', ['きあ。えーくーゃい', 4], ['きあ。', 'えー', 'くーゃい']), ('regression: small kana strictness', ['いあ『本く）く。ー', 3], ['いあ', '『本', 'く）', 'く。ー']), ('regression: small kana strictness', ['語字、え『えくゃえー』』ーこ組「日『。（', 4], ['語字、え', '『えくゃ', 'え', 'ー』』ー', 'こ組「日', '『。（']), ('period followed by bracket cannot hang', ['日本語文。」字組', 4], ['日本語', '文。」字', '組']), ('opening bracket at line end', ['日本語「文字」組版', 4], ['日本語', '「文字」', '組版']), ('control layout', ['）、えゃ語うかえ「本あこ（字）ーえ字あか版』', 6], ['）、えゃ語う', 'かえ「本あこ', '（字）ーえ字', 'あか版』']), ('control layout', ['あ。」あ文（け版。日）語え』', 6], ['あ。」あ文', '（け版。日）', '語え』'])], [('regression: small kana strictness', ['版ー『版かゃき組本字』', 5], ['版ー『版', 'かゃき組本', '字』']), ('regression: small kana strictness', ['（日おあ」『こか、語。）本文っ、文えあゃ。', 5], ['（日おあ」', '『こか、', '語。）本', '文っ、文え', 'あゃ。']), ('regression: small kana strictness', ['文。いいおっけー本。う「ういおくかえ', 7], ['文。いいおっ', 'けー本。う「う', 'いおくかえ']), ('regression: small kana strictness', ['きっ文こ」あ。けけききき「日ー文ーか、い。', 7], ['きっ文こ」あ。', 'けけききき', '「日ー文ーか、', 'い。']), ('opening bracket at line end', ['日本語「文字」組版', 4], ['日本語', '「文字」', '組版']), ('period hangs past the measure', ['日本語文。字組版', 4], ['日本語文。', '字組版']), ('control layout', ['版っ日けおく、）」版（「', 6], ['版っ日けお', 'く、）」版', '（「']), ('control layout', ['こあく。（く版「うえけ。。。え', 8], ['こあく。（く版', '「うえけ。。。え'])]]\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 typesetting model with integer widths and a stipulated rule set; it does not claim conformance to any engine. 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-typography-line-breaking-kinsoku-small-kana-strictness","generated_at":"2026-09-29T14:49:50.209444+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Line breaking decides where paragraphs wrap on screen and in print; a wrong decision point shifts every following line.","root_cause":"The prohibited-start set omits small kana and the long vowel mark.","sha256":"ee89808ce8c297ecaa60c8dbdd739e2cfc2ab2e72821a78b4ea5852a55745da4","title":"CJK kinsoku line breaking: small kana strictness · 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":39.777,"exit_code":1,"observations":[{"actual":["日本語","かっこい","い"],"check":"small kana prohibited at line start","expected":["日本語","かっこい","い"],"passed":true},{"actual":["こあ）ー、あ）っ","こ、「（あ「け","けっ。えかきー文"],"check":"regression: small kana strictness","expected":["こあ）ー、あ）っ","こ、「（あ「け","けっ。えかきー文"],"passed":true},{"actual":["（）字「文版い字","ー「版ーっ「。』","組字組けあか「"],"check":"regression: small kana strictness","expected":["（）字「文版い","字ー「版ーっ","「。』組字組けあ","か「"],"passed":false},{"actual":["語かおい。字","ー」きくおあ","け『"],"check":"regression: small kana strictness","expected":["語かおい。","字ー」きくお","あけ『"],"passed":false},{"actual":["日本語文。","字組版"],"check":"period hangs past the measure","expected":["日本語文。","字組版"],"passed":true},{"actual":["日本語","文。」字","組"],"check":"period followed by bracket cannot hang","expected":["日本語","文。」字","組"],"passed":true},{"actual":["組『「（くお字き","「本け、くえ日","「。。」（お"],"check":"control layout","expected":["組『「（くお字き","「本け、くえ日","「。。」（お"],"passed":true},{"actual":["、』ゃあこけ字文","お」かーかー。け","きー"],"check":"control layout","expected":["、』ゃあこけ字文","お」かーかー。け","きー"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"small kana prohibited at line start\", \"actual\": [\"日本語\", \"かっこい\", \"い\"], \"expected\": [\"日本語\", \"かっこい\", \"い\"], \"passed\": true}, {\"check\": \"regression: small kana strictness\", \"actual\": [\"こあ）ー、あ）っ\", \"こ、「（あ「け\", \"けっ。えかきー文\"], \"expected\": [\"こあ）ー、あ）っ\", \"こ、「（あ「け\", \"けっ。えかきー文\"], \"passed\": true}, {\"check\": \"regression: small kana strictness\", \"actual\": [\"（）字「文版い字\", \"ー「版ーっ「。』\", \"組字組けあか「\"], \"expected\": [\"（）字「文版い\", \"字ー「版ーっ\", \"「。』組字組けあ\", \"か「\"], \"passed\": false}, {\"check\": \"regression: small kana strictness\", \"actual\": [\"語かおい。字\", \"ー」きくおあ\", \"け『\"], \"expected\": [\"語かおい。\", \"字ー」きくお\", \"あけ『\"], \"passed\": false}, {\"check\": \"period hangs past the measure\", \"actual\": [\"日本語文。\", \"字組版\"], \"expected\": [\"日本語文。\", \"字組版\"], \"passed\": true}, {\"check\": \"period followed by bracket cannot hang\", \"actual\": [\"日本語\", \"文。」字\", \"組\"], \"expected\": [\"日本語\", \"文。」字\", \"組\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"組『「（くお字き\", \"「本け、くえ日\", \"「。。」（お\"], \"expected\": [\"組『「（くお字き\", \"「本け、くえ日\", \"「。。」（お\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"、』ゃあこけ字文\", \"お」かーかー。け\", \"きー\"], \"expected\": [\"、』ゃあこけ字文\", \"お」かーかー。け\", \"きー\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.214,"exit_code":1,"observations":[{"actual":["日本語か","っこいい"],"check":"small kana prohibited at line start","expected":["日本語","かっこい","い"],"passed":false},{"actual":["こあ）ー、あ）っ","こ、「（あ「けけ","っ。えかきー文"],"check":"regression: small kana strictness","expected":["こあ）ー、あ）っ","こ、「（あ「け","けっ。えかきー文"],"passed":false},{"actual":["（）字「文版い字","ー「版ーっ「。』","組字組けあか「"],"check":"regression: small kana strictness","expected":["（）字「文版い","字ー「版ーっ","「。』組字組けあ","か「"],"passed":false},{"actual":["語かおい。字","ー」きくおあ","け『"],"check":"regression: small kana strictness","expected":["語かおい。","字ー」きくお","あけ『"],"passed":false},{"actual":["日本語文。","字組版"],"check":"period hangs past the measure","expected":["日本語文。","字組版"],"passed":true},{"actual":["日本語","文。」字","組"],"check":"period followed by bracket cannot hang","expected":["日本語","文。」字","組"],"passed":true},{"actual":["組『「（くお字き","「本け、くえ日","「。。」（お"],"check":"control layout","expected":["組『「（くお字き","「本け、くえ日","「。。」（お"],"passed":true},{"actual":["、』ゃあこけ字文","お」かーかー。け","きー"],"check":"control layout","expected":["、』ゃあこけ字文","お」かーかー。け","きー"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"small kana prohibited at line start\", \"actual\": [\"日本語か\", \"っこいい\"], \"expected\": [\"日本語\", \"かっこい\", \"い\"], \"passed\": false}, {\"check\": \"regression: small kana strictness\", \"actual\": [\"こあ）ー、あ）っ\", \"こ、「（あ「けけ\", \"っ。えかきー文\"], \"expected\": [\"こあ）ー、あ）っ\", \"こ、「（あ「け\", \"けっ。えかきー文\"], \"passed\": false}, {\"check\": \"regression: small kana strictness\", \"actual\": [\"（）字「文版い字\", \"ー「版ーっ「。』\", \"組字組けあか「\"], \"expected\": [\"（）字「文版い\", \"字ー「版ーっ\", \"「。』組字組けあ\", \"か「\"], \"passed\": false}, {\"check\": \"regression: small kana strictness\", \"actual\": [\"語かおい。字\", \"ー」きくおあ\", \"け『\"], \"expected\": [\"語かおい。\", \"字ー」きくお\", \"あけ『\"], \"passed\": false}, {\"check\": \"period hangs past the measure\", \"actual\": [\"日本語文。\", \"字組版\"], \"expected\": [\"日本語文。\", \"字組版\"], \"passed\": true}, {\"check\": \"period followed by bracket cannot hang\", \"actual\": [\"日本語\", \"文。」字\", \"組\"], \"expected\": [\"日本語\", \"文。」字\", \"組\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"組『「（くお字き\", \"「本け、くえ日\", \"「。。」（お\"], \"expected\": [\"組『「（くお字き\", \"「本け、くえ日\", \"「。。」（お\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"、』ゃあこけ字文\", \"お」かーかー。け\", \"きー\"], \"expected\": [\"、』ゃあこけ字文\", \"お」かーかー。け\", \"きー\"], \"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."}}