{"abstract":"An expression resolves a name from the wrong sheet or workbook scope.","category":"Spreadsheet calculation semantics","checks":7,"contract":"Names are exact strings. Resolve in local_names[active_sheet], then workbook_names; return #NAME? if absent. Numeric zero is a valid bound value.","contract_signature":"name, sheet, workbook, local","evaluation_group":"model-9fb703dc48b2d76f","failed_approach":"Checking all local namespaces finds a name belonging to an unrelated sheet.","family":"z-spreadsheets-local-name-shadow","id":"FA-11386","implementations":{"attempt":{"sha256":"84d220f2ccb7a552f48df5c268dc0fb494297fd1dab104c0258b8eaa74667db9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(name, sheet, workbook, local):\n    for namespace in local.values():\n        if name in namespace:\n            return namespace[name]\n    return workbook.get(name, '#NAME?')\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('active local shadows workbook', solve('rate','B',{'rate':N},{'A':{'rate':2*N},'B':{'rate':3*N}}),3*N)\ncheck('other sheet does not shadow', solve('rate','B',{'rate':N},{'A':{'rate':2*N}}),N)\ncheck('absent active sheet falls back', solve('rate','C',{'rate':N},{'A':{'rate':2*N}}),N)\ncheck('zero local binding retained', solve('rate','B',{'rate':N},{'B':{'rate':0}}),0)\ncheck('unknown name', solve('missing','B',{},{}),'#NAME?')\ncheck('other sheet only name inaccessible', solve('rate','B',{}, {'A':{'rate':N}}),'#NAME?')\ncheck('workbook only binding', solve('rate','B',{'rate':N},{}),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":"fa69dc71c422c13a73edf5dff574ed240b1cd32ea3bc68087382a8209ec0abd5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(name, sheet, workbook, local):\n    return workbook.get(name, '#NAME?')\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('active local shadows workbook', solve('rate','B',{'rate':N},{'A':{'rate':2*N},'B':{'rate':3*N}}),3*N)\ncheck('other sheet does not shadow', solve('rate','B',{'rate':N},{'A':{'rate':2*N}}),N)\ncheck('absent active sheet falls back', solve('rate','C',{'rate':N},{'A':{'rate':2*N}}),N)\ncheck('zero local binding retained', solve('rate','B',{'rate':N},{'B':{'rate':0}}),0)\ncheck('unknown name', solve('missing','B',{},{}),'#NAME?')\ncheck('other sheet only name inaccessible', solve('rate','B',{}, {'A':{'rate':N}}),'#NAME?')\ncheck('workbook only binding', solve('rate','B',{'rate':N},{}),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-local-name-shadow","generated_at":"2026-09-29T14:38:47.447442+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":"Name resolution ignores the active sheet when choosing definitions.","sha256":"eeb7b8755018196ca1d52a57dda10996c7cbacb0aba4ca42b302e23d018ea6c6","title":"A workbook name overrides a sheet-local definition · 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":45.077,"exit_code":1,"observations":[{"actual":2,"check":"active local shadows workbook","expected":3,"passed":false},{"actual":2,"check":"other sheet does not shadow","expected":1,"passed":false},{"actual":2,"check":"absent active sheet falls back","expected":1,"passed":false},{"actual":0,"check":"zero local binding retained","expected":0,"passed":true},{"actual":"#NAME?","check":"unknown name","expected":"#NAME?","passed":true},{"actual":1,"check":"other sheet only name inaccessible","expected":"#NAME?","passed":false},{"actual":1,"check":"workbook only binding","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"active local shadows workbook\", \"actual\": 2, \"expected\": 3, \"passed\": false}, {\"check\": \"other sheet does not shadow\", \"actual\": 2, \"expected\": 1, \"passed\": false}, {\"check\": \"absent active sheet falls back\", \"actual\": 2, \"expected\": 1, \"passed\": false}, {\"check\": \"zero local binding retained\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"unknown name\", \"actual\": \"#NAME?\", \"expected\": \"#NAME?\", \"passed\": true}, {\"check\": \"other sheet only name inaccessible\", \"actual\": 1, \"expected\": \"#NAME?\", \"passed\": false}, {\"check\": \"workbook only binding\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.481,"exit_code":1,"observations":[{"actual":1,"check":"active local shadows workbook","expected":3,"passed":false},{"actual":1,"check":"other sheet does not shadow","expected":1,"passed":true},{"actual":1,"check":"absent active sheet falls back","expected":1,"passed":true},{"actual":1,"check":"zero local binding retained","expected":0,"passed":false},{"actual":"#NAME?","check":"unknown name","expected":"#NAME?","passed":true},{"actual":"#NAME?","check":"other sheet only name inaccessible","expected":"#NAME?","passed":true},{"actual":1,"check":"workbook only binding","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"active local shadows workbook\", \"actual\": 1, \"expected\": 3, \"passed\": false}, {\"check\": \"other sheet does not shadow\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"absent active sheet falls back\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"zero local binding retained\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"unknown name\", \"actual\": \"#NAME?\", \"expected\": \"#NAME?\", \"passed\": true}, {\"check\": \"other sheet only name inaccessible\", \"actual\": \"#NAME?\", \"expected\": \"#NAME?\", \"passed\": true}, {\"check\": \"workbook only binding\", \"actual\": 1, \"expected\": 1, \"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."}}