{"abstract":"Seeking an append descriptor causes an overwrite.","category":"Filesystem semantics","checks":6,"contract":"Deterministic in-memory filesystem model. Open a character file in append mode, seek to nonnegative seek, then write payload. Return [contents,new offset]; zero-length payload leaves the sought offset unchanged in this controlled model.","contract_signature":"text, seek, payload","evaluation_group":"model-84cc1839e92fee9c","failed_approach":"Seeking to EOF once at open time fails after a subsequent explicit seek.","family":"z-filesystems-append-after-seek","id":"FA-11576","implementations":{"attempt":{"sha256":"1bc6e44592b9e54feb7040e80446dbe85f36ab7067ee46d9a36d203df9997afb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(text, seek, payload):\n    position = seek if seek < len(text) else len(text)\n    return [text[:position]+payload+text[position+len(payload):],position+len(payload)] if payload else [text,seek]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('seek to beginning does not overwrite',solve('abc',0,str(N)),['abc'+str(N),4])\ncheck('seek past EOF does not make hole',solve('a',N+3,'b'),['ab',2])\ncheck('seek to EOF',solve('abc',3,'d'),['abcd',4])\ncheck('empty file',solve('',N,'x'),['x',1])\ncheck('empty write leaves offset',solve('abc',N,''),['abc',N])\ncheck('multiple characters appended',solve('abc',1,'XY'),['abcXY',5])\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":"51cdac175b62c39b428f74fa22df0ee3566d1fa5cfe0dc9cc8e614af54221ab4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(text, seek, payload):\n    return [text[:seek]+'\\0'*max(0,seek-len(text))+payload+text[seek+len(payload):],seek+len(payload)] if payload else [text,seek]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('seek to beginning does not overwrite',solve('abc',0,str(N)),['abc'+str(N),4])\ncheck('seek past EOF does not make hole',solve('a',N+3,'b'),['ab',2])\ncheck('seek to EOF',solve('abc',3,'d'),['abcd',4])\ncheck('empty file',solve('',N,'x'),['x',1])\ncheck('empty write leaves offset',solve('abc',N,''),['abc',N])\ncheck('multiple characters appended',solve('abc',1,'XY'),['abcXY',5])\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-append-after-seek","generated_at":"2026-09-29T14:38:49.216151+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.","root_cause":"Append mode chooses the current descriptor offset rather than EOF at write time.","sha256":"0c67e4dc70d27c2ca315c0f715eb2b85107df6a7805a73235684cddf198a7bb7","title":"Seeking an append descriptor causes an overwrite · 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":37.208,"exit_code":1,"observations":[{"actual":["1bc",1],"check":"seek to beginning does not overwrite","expected":["abc1",4],"passed":false},{"actual":["ab",2],"check":"seek past EOF does not make hole","expected":["ab",2],"passed":true},{"actual":["abcd",4],"check":"seek to EOF","expected":["abcd",4],"passed":true},{"actual":["x",1],"check":"empty file","expected":["x",1],"passed":true},{"actual":["abc",1],"check":"empty write leaves offset","expected":["abc",1],"passed":true},{"actual":["aXY",3],"check":"multiple characters appended","expected":["abcXY",5],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"seek to beginning does not overwrite\", \"actual\": [\"1bc\", 1], \"expected\": [\"abc1\", 4], \"passed\": false}, {\"check\": \"seek past EOF does not make hole\", \"actual\": [\"ab\", 2], \"expected\": [\"ab\", 2], \"passed\": true}, {\"check\": \"seek to EOF\", \"actual\": [\"abcd\", 4], \"expected\": [\"abcd\", 4], \"passed\": true}, {\"check\": \"empty file\", \"actual\": [\"x\", 1], \"expected\": [\"x\", 1], \"passed\": true}, {\"check\": \"empty write leaves offset\", \"actual\": [\"abc\", 1], \"expected\": [\"abc\", 1], \"passed\": true}, {\"check\": \"multiple characters appended\", \"actual\": [\"aXY\", 3], \"expected\": [\"abcXY\", 5], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.348,"exit_code":1,"observations":[{"actual":["1bc",1],"check":"seek to beginning does not overwrite","expected":["abc1",4],"passed":false},{"actual":["a\u0000\u0000\u0000b",5],"check":"seek past EOF does not make hole","expected":["ab",2],"passed":false},{"actual":["abcd",4],"check":"seek to EOF","expected":["abcd",4],"passed":true},{"actual":["\u0000x",2],"check":"empty file","expected":["x",1],"passed":false},{"actual":["abc",1],"check":"empty write leaves offset","expected":["abc",1],"passed":true},{"actual":["aXY",3],"check":"multiple characters appended","expected":["abcXY",5],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"seek to beginning does not overwrite\", \"actual\": [\"1bc\", 1], \"expected\": [\"abc1\", 4], \"passed\": false}, {\"check\": \"seek past EOF does not make hole\", \"actual\": [\"a\\u0000\\u0000\\u0000b\", 5], \"expected\": [\"ab\", 2], \"passed\": false}, {\"check\": \"seek to EOF\", \"actual\": [\"abcd\", 4], \"expected\": [\"abcd\", 4], \"passed\": true}, {\"check\": \"empty file\", \"actual\": [\"\\u0000x\", 2], \"expected\": [\"x\", 1], \"passed\": false}, {\"check\": \"empty write leaves offset\", \"actual\": [\"abc\", 1], \"expected\": [\"abc\", 1], \"passed\": true}, {\"check\": \"multiple characters appended\", \"actual\": [\"aXY\", 3], \"expected\": [\"abcXY\", 5], \"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."}}