{"abstract":"A dangling symbolic link disappears from metadata results.","category":"Filesystem semantics","checks":6,"contract":"Deterministic in-memory filesystem model. entries maps flat names to [kind,target], where kind is file,dir,or link and target is used only for links. Return named entry kind or missing without following any link.","evaluation_group":"model-74733665d4649cdc","failed_approach":"Falling back to link type only for missing targets still misreports links to existing files.","family":"z-filesystems-lstat-dangling-link","id":"FA-11586","implementations":{"attempt":{"sha256":"db377e0d2869f9e0377514b87cbc80fe62c2c6c7e56ea5b33d3e290871624341","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries, name):\n    entry=entries.get(name)\n    if entry is None: return 'missing'\n    if entry[0]=='link': return entries.get(entry[1],['link'])[0]\n    return entry[0]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nname='link'+str(N)\ncheck('dangling link exists',solve({name:['link','absent']},name),'link')\ncheck('link to file remains link',solve({name:['link','f'],'f':['file',None]},name),'link')\ncheck('link to directory remains link',solve({name:['link','d'],'d':['dir',None]},name),'link')\ncheck('ordinary file',solve({'f':['file',None]},'f'),'file')\ncheck('missing entry',solve({},name),'missing')\ncheck('self link does not recurse',solve({name:['link',name]},name),'link')\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":"a1ef757f183702776dbaf0cabff756246b7167a47ad5f09912f5e02a5120fe61","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries, name):\n    entry=entries.get(name)\n    if entry is None: return 'missing'\n    if entry[0]=='link': return entries.get(entry[1],['missing'])[0]\n    return entry[0]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nname='link'+str(N)\ncheck('dangling link exists',solve({name:['link','absent']},name),'link')\ncheck('link to file remains link',solve({name:['link','f'],'f':['file',None]},name),'link')\ncheck('link to directory remains link',solve({name:['link','d'],'d':['dir',None]},name),'link')\ncheck('ordinary file',solve({'f':['file',None]},'f'),'file')\ncheck('missing entry',solve({},name),'missing')\ncheck('self link does not recurse',solve({name:['link',name]},name),'link')\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"},"fixed":{"sha256":"7d16a7f59866273478f2517d07da0bc1a85acb1eaa62b11fc99e8daa2a25fddd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries, name):\n    return entries.get(name,['missing'])[0]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nname='link'+str(N)\ncheck('dangling link exists',solve({name:['link','absent']},name),'link')\ncheck('link to file remains link',solve({name:['link','f'],'f':['file',None]},name),'link')\ncheck('link to directory remains link',solve({name:['link','d'],'d':['dir',None]},name),'link')\ncheck('ordinary file',solve({'f':['file',None]},'f'),'file')\ncheck('missing entry',solve({},name),'missing')\ncheck('self link does not recurse',solve({name:['link',name]},name),'link')\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-filesystems-lstat-dangling-link","generated_at":"2026-09-29T14:38:49.248546+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"An offline semantic experiment for file API clients; it models only the stated operations, not a complete operating system.","repair":"Report the named entry itself for lstat-style inspection.","root_cause":"Entry inspection follows a symbolic link before reporting the entry type.","sha256":"29e4956cb249e6e5806bbbde1e28c6b2ca9187c30c4f15f1ec56b2ea8ba7834a","title":"A dangling symbolic link disappears from metadata results · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.871,"exit_code":1,"observations":[{"actual":"link","check":"dangling link exists","expected":"link","passed":true},{"actual":"file","check":"link to file remains link","expected":"link","passed":false},{"actual":"dir","check":"link to directory remains link","expected":"link","passed":false},{"actual":"file","check":"ordinary file","expected":"file","passed":true},{"actual":"missing","check":"missing entry","expected":"missing","passed":true},{"actual":"link","check":"self link does not recurse","expected":"link","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"dangling link exists\", \"actual\": \"link\", \"expected\": \"link\", \"passed\": true}, {\"check\": \"link to file remains link\", \"actual\": \"file\", \"expected\": \"link\", \"passed\": false}, {\"check\": \"link to directory remains link\", \"actual\": \"dir\", \"expected\": \"link\", \"passed\": false}, {\"check\": \"ordinary file\", \"actual\": \"file\", \"expected\": \"file\", \"passed\": true}, {\"check\": \"missing entry\", \"actual\": \"missing\", \"expected\": \"missing\", \"passed\": true}, {\"check\": \"self link does not recurse\", \"actual\": \"link\", \"expected\": \"link\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.521,"exit_code":1,"observations":[{"actual":"missing","check":"dangling link exists","expected":"link","passed":false},{"actual":"file","check":"link to file remains link","expected":"link","passed":false},{"actual":"dir","check":"link to directory remains link","expected":"link","passed":false},{"actual":"file","check":"ordinary file","expected":"file","passed":true},{"actual":"missing","check":"missing entry","expected":"missing","passed":true},{"actual":"link","check":"self link does not recurse","expected":"link","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"dangling link exists\", \"actual\": \"missing\", \"expected\": \"link\", \"passed\": false}, {\"check\": \"link to file remains link\", \"actual\": \"file\", \"expected\": \"link\", \"passed\": false}, {\"check\": \"link to directory remains link\", \"actual\": \"dir\", \"expected\": \"link\", \"passed\": false}, {\"check\": \"ordinary file\", \"actual\": \"file\", \"expected\": \"file\", \"passed\": true}, {\"check\": \"missing entry\", \"actual\": \"missing\", \"expected\": \"missing\", \"passed\": true}, {\"check\": \"self link does not recurse\", \"actual\": \"link\", \"expected\": \"link\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.644,"exit_code":0,"observations":[{"actual":"link","check":"dangling link exists","expected":"link","passed":true},{"actual":"link","check":"link to file remains link","expected":"link","passed":true},{"actual":"link","check":"link to directory remains link","expected":"link","passed":true},{"actual":"file","check":"ordinary file","expected":"file","passed":true},{"actual":"missing","check":"missing entry","expected":"missing","passed":true},{"actual":"link","check":"self link does not recurse","expected":"link","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"dangling link exists\", \"actual\": \"link\", \"expected\": \"link\", \"passed\": true}, {\"check\": \"link to file remains link\", \"actual\": \"link\", \"expected\": \"link\", \"passed\": true}, {\"check\": \"link to directory remains link\", \"actual\": \"link\", \"expected\": \"link\", \"passed\": true}, {\"check\": \"ordinary file\", \"actual\": \"file\", \"expected\": \"file\", \"passed\": true}, {\"check\": \"missing entry\", \"actual\": \"missing\", \"expected\": \"missing\", \"passed\": true}, {\"check\": \"self link does not recurse\", \"actual\": \"link\", \"expected\": \"link\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}