{"abstract":"The subtotal doubles a nested subtotal or counts rows hidden by the specified mode.","category":"Spreadsheet calculation semantics","checks":7,"contract":"Rows are [number,filtered,manually_hidden,is_subtotal]. Mode 9 includes manually hidden rows; mode 109 excludes them. Both exclude filtered rows and subtotal cells.","contract_signature":"rows, mode","evaluation_group":"model-3b6309884ccb06fa","failed_approach":"Excluding every hidden row also changes mode 9, which includes manually hidden rows.","family":"z-spreadsheets-subtotal-visibility","id":"FA-11361","implementations":{"attempt":{"sha256":"4c5b6dfe3469a995f325f43681cb52b682f28547279064f0707b5bcc197348fa","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, mode):\n    return sum(v for v,f,h,s in rows if not f and not h and not s)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('manual hidden counted in mode nine', solve([[N,False,True,False]],9), N)\ncheck('manual hidden omitted in mode 109', solve([[N,False,True,False]],109), 0)\ncheck('filtered omitted in mode nine', solve([[N,True,False,False]],9), 0)\ncheck('nested subtotal omitted', solve([[N,False,False,True]],9), 0)\ncheck('visible ordinary cell', solve([[N,False,False,False]],109), N)\ncheck('empty range', solve([],9), 0)\ncheck('mixed provenance', solve([[N,False,False,False],[2*N,False,True,False],[3*N,False,False,True]],9),3*N)\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":"72725e6b24637e675b83c871f454aea90213a7183ae5fcc652f6605745e0efd8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, mode):\n    return sum(v for v,f,h,s in rows)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('manual hidden counted in mode nine', solve([[N,False,True,False]],9), N)\ncheck('manual hidden omitted in mode 109', solve([[N,False,True,False]],109), 0)\ncheck('filtered omitted in mode nine', solve([[N,True,False,False]],9), 0)\ncheck('nested subtotal omitted', solve([[N,False,False,True]],9), 0)\ncheck('visible ordinary cell', solve([[N,False,False,False]],109), N)\ncheck('empty range', solve([],9), 0)\ncheck('mixed provenance', solve([[N,False,False,False],[2*N,False,True,False],[3*N,False,False,True]],9),3*N)\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":" 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":"z-spreadsheets-subtotal-visibility","generated_at":"2026-09-29T14:38:47.284097+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This isolated spreadsheet model makes cell semantics explicit; it does not claim compatibility with every workbook engine.","root_cause":"Ordinary sum ignores row provenance and visibility.","sha256":"fd630fe1ba3f8ba450bc2c3ad988f94f483360c7d17ef8b3bc307a10b50b215e","title":"Subtotal includes nested aggregates or hidden rows · 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":41.365,"exit_code":1,"observations":[{"actual":0,"check":"manual hidden counted in mode nine","expected":1,"passed":false},{"actual":0,"check":"manual hidden omitted in mode 109","expected":0,"passed":true},{"actual":0,"check":"filtered omitted in mode nine","expected":0,"passed":true},{"actual":0,"check":"nested subtotal omitted","expected":0,"passed":true},{"actual":1,"check":"visible ordinary cell","expected":1,"passed":true},{"actual":0,"check":"empty range","expected":0,"passed":true},{"actual":1,"check":"mixed provenance","expected":3,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"manual hidden counted in mode nine\", \"actual\": 0, \"expected\": 1, \"passed\": false}, {\"check\": \"manual hidden omitted in mode 109\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"filtered omitted in mode nine\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"nested subtotal omitted\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"visible ordinary cell\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"empty range\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"mixed provenance\", \"actual\": 1, \"expected\": 3, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.58,"exit_code":1,"observations":[{"actual":1,"check":"manual hidden counted in mode nine","expected":1,"passed":true},{"actual":1,"check":"manual hidden omitted in mode 109","expected":0,"passed":false},{"actual":1,"check":"filtered omitted in mode nine","expected":0,"passed":false},{"actual":1,"check":"nested subtotal omitted","expected":0,"passed":false},{"actual":1,"check":"visible ordinary cell","expected":1,"passed":true},{"actual":0,"check":"empty range","expected":0,"passed":true},{"actual":6,"check":"mixed provenance","expected":3,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"manual hidden counted in mode nine\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"manual hidden omitted in mode 109\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"filtered omitted in mode nine\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"nested subtotal omitted\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"visible ordinary cell\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"empty range\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"mixed provenance\", \"actual\": 6, \"expected\": 3, \"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."}}