{"abstract":"Removing a field leaves a phantom dirty baseline entry.","category":"Form lifecycle","checks":8,"contract":"Edits change draft only; reset restores baseline; commit accepts draft; unmount removal clears both; dirty comparison includes additions and removals.","evaluation_group":"xi-form-dirty","failed_approach":"Clearing all baselines dirties unaffected fields.","family":"xi-form-dirty-remove","id":"FA-7996","implementations":{"attempt":{"sha256":"42f9e3ff64c7b25b10a54857897e3c5e07a17820cec92f523de1673be565f15f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(initial, current, event, name, value):\n    initial, current = initial.copy(), current.copy()\n    if event == 'input': current[name] = value\n    elif event == 'reset': current = dict(initial)\n    elif event == 'commit': initial = dict(current)\n    elif event == 'remove': current.pop(name, None); initial.clear()\n    dirty = sorted(k for k in set(initial) | set(current) if initial.get(k, object()) != current.get(k, object()))\n    return (initial, current, dirty)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('edit', solve({'a':1}, {'a':1}, 'input', 'a', 2), ({'a': 1}, {'a': 2}, ['a']))\ncheck('reset', solve({'a':1}, {'a':2}, 'reset', None, None), ({'a': 1}, {'a': 1}, []))\ncheck('commit', solve({'a':1}, {'a':2}, 'commit', None, None), ({'a': 2}, {'a': 2}, []))\ncheck('remove', solve({'a':1,'b':2}, {'a':3,'b':2}, 'remove', 'a', None), ({'b': 2}, {'b': 2}, []))\ncheck('new', solve({}, {'new':0}, 'read', None, None), ({}, {'new': 0}, ['new']))\ncheck('removed', solve({'a':1}, {}, 'read', None, None), ({'a': 1}, {}, ['a']))\ncheck('parameterized dirty value', solve({'a':N}, {'a':N}, 'input', 'a', N+1), ({'a':N}, {'a':N+1}, ['a']))\nfor repetition in range(N):\n    check('repeat removed', solve({'a':1}, {}, 'read', None, None), ({'a': 1}, {}, ['a']))\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":"73bacb17e06366f54f26209ca5151f0c82f18eed7e172fc0f46282af835a1475","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(initial, current, event, name, value):\n    initial, current = initial.copy(), current.copy()\n    if event == 'input': current[name] = value\n    elif event == 'reset': current = dict(initial)\n    elif event == 'commit': initial = dict(current)\n    elif event == 'remove': current.pop(name, None); None\n    dirty = sorted(k for k in set(initial) | set(current) if initial.get(k, object()) != current.get(k, object()))\n    return (initial, current, dirty)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('edit', solve({'a':1}, {'a':1}, 'input', 'a', 2), ({'a': 1}, {'a': 2}, ['a']))\ncheck('reset', solve({'a':1}, {'a':2}, 'reset', None, None), ({'a': 1}, {'a': 1}, []))\ncheck('commit', solve({'a':1}, {'a':2}, 'commit', None, None), ({'a': 2}, {'a': 2}, []))\ncheck('remove', solve({'a':1,'b':2}, {'a':3,'b':2}, 'remove', 'a', None), ({'b': 2}, {'b': 2}, []))\ncheck('new', solve({}, {'new':0}, 'read', None, None), ({}, {'new': 0}, ['new']))\ncheck('removed', solve({'a':1}, {}, 'read', None, None), ({'a': 1}, {}, ['a']))\ncheck('parameterized dirty value', solve({'a':N}, {'a':N}, 'input', 'a', N+1), ({'a':N}, {'a':N+1}, ['a']))\nfor repetition in range(N):\n    check('repeat removed', solve({'a':1}, {}, 'read', None, None), ({'a': 1}, {}, ['a']))\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":"b63e8e7931c4bdb9300dcd6b9f00fae2852e95c78e3e5bd58ac37e930f722a94","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(initial, current, event, name, value):\n    initial, current = initial.copy(), current.copy()\n    if event == 'input': current[name] = value\n    elif event == 'reset': current = dict(initial)\n    elif event == 'commit': initial = dict(current)\n    elif event == 'remove': current.pop(name, None); initial.pop(name, None)\n    dirty = sorted(k for k in set(initial) | set(current) if initial.get(k, object()) != current.get(k, object()))\n    return (initial, current, dirty)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('edit', solve({'a':1}, {'a':1}, 'input', 'a', 2), ({'a': 1}, {'a': 2}, ['a']))\ncheck('reset', solve({'a':1}, {'a':2}, 'reset', None, None), ({'a': 1}, {'a': 1}, []))\ncheck('commit', solve({'a':1}, {'a':2}, 'commit', None, None), ({'a': 2}, {'a': 2}, []))\ncheck('remove', solve({'a':1,'b':2}, {'a':3,'b':2}, 'remove', 'a', None), ({'b': 2}, {'b': 2}, []))\ncheck('new', solve({}, {'new':0}, 'read', None, None), ({}, {'new': 0}, ['new']))\ncheck('removed', solve({'a':1}, {}, 'read', None, None), ({'a': 1}, {}, ['a']))\ncheck('parameterized dirty value', solve({'a':N}, {'a':N}, 'input', 'a', N+1), ({'a':N}, {'a':N+1}, ['a']))\nfor repetition in range(N):\n    check('repeat removed', solve({'a':1}, {}, 'read', None, None), ({'a': 1}, {}, ['a']))\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":"xi-form-dirty-remove","generated_at":"2026-09-29T14:38:17.260822+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic model of form dirty-field bookkeeping; this isolates one interface invariant without requiring a browser.","repair":"Implement the remove operation as `initial.pop(name, None)`.","root_cause":"The remove operation uses `None` where the contract requires `initial.pop(name, None)`.","sha256":"69a918393393a5286b23f51462e0c3dccf62d422afa46ccafb61f3838748c70f","title":"Form dirty-field bookkeeping: Removing a field leaves a phantom dirty baseline entry · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.28,"exit_code":1,"observations":[{"actual":[{"a":1},{"a":2},["a"]],"check":"edit","expected":[{"a":1},{"a":2},["a"]],"passed":true},{"actual":[{"a":1},{"a":1},[]],"check":"reset","expected":[{"a":1},{"a":1},[]],"passed":true},{"actual":[{"a":2},{"a":2},[]],"check":"commit","expected":[{"a":2},{"a":2},[]],"passed":true},{"actual":[{},{"b":2},["b"]],"check":"remove","expected":[{"b":2},{"b":2},[]],"passed":false},{"actual":[{},{"new":0},["new"]],"check":"new","expected":[{},{"new":0},["new"]],"passed":true},{"actual":[{"a":1},{},["a"]],"check":"removed","expected":[{"a":1},{},["a"]],"passed":true},{"actual":[{"a":1},{"a":2},["a"]],"check":"parameterized dirty value","expected":[{"a":1},{"a":2},["a"]],"passed":true},{"actual":[{"a":1},{},["a"]],"check":"repeat removed","expected":[{"a":1},{},["a"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"edit\", \"actual\": [{\"a\": 1}, {\"a\": 2}, [\"a\"]], \"expected\": [{\"a\": 1}, {\"a\": 2}, [\"a\"]], \"passed\": true}, {\"check\": \"reset\", \"actual\": [{\"a\": 1}, {\"a\": 1}, []], \"expected\": [{\"a\": 1}, {\"a\": 1}, []], \"passed\": true}, {\"check\": \"commit\", \"actual\": [{\"a\": 2}, {\"a\": 2}, []], \"expected\": [{\"a\": 2}, {\"a\": 2}, []], \"passed\": true}, {\"check\": \"remove\", \"actual\": [{}, {\"b\": 2}, [\"b\"]], \"expected\": [{\"b\": 2}, {\"b\": 2}, []], \"passed\": false}, {\"check\": \"new\", \"actual\": [{}, {\"new\": 0}, [\"new\"]], \"expected\": [{}, {\"new\": 0}, [\"new\"]], \"passed\": true}, {\"check\": \"removed\", \"actual\": [{\"a\": 1}, {}, [\"a\"]], \"expected\": [{\"a\": 1}, {}, [\"a\"]], \"passed\": true}, {\"check\": \"parameterized dirty value\", \"actual\": [{\"a\": 1}, {\"a\": 2}, [\"a\"]], \"expected\": [{\"a\": 1}, {\"a\": 2}, [\"a\"]], \"passed\": true}, {\"check\": \"repeat removed\", \"actual\": [{\"a\": 1}, {}, [\"a\"]], \"expected\": [{\"a\": 1}, {}, [\"a\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.785,"exit_code":1,"observations":[{"actual":[{"a":1},{"a":2},["a"]],"check":"edit","expected":[{"a":1},{"a":2},["a"]],"passed":true},{"actual":[{"a":1},{"a":1},[]],"check":"reset","expected":[{"a":1},{"a":1},[]],"passed":true},{"actual":[{"a":2},{"a":2},[]],"check":"commit","expected":[{"a":2},{"a":2},[]],"passed":true},{"actual":[{"a":1,"b":2},{"b":2},["a"]],"check":"remove","expected":[{"b":2},{"b":2},[]],"passed":false},{"actual":[{},{"new":0},["new"]],"check":"new","expected":[{},{"new":0},["new"]],"passed":true},{"actual":[{"a":1},{},["a"]],"check":"removed","expected":[{"a":1},{},["a"]],"passed":true},{"actual":[{"a":1},{"a":2},["a"]],"check":"parameterized dirty value","expected":[{"a":1},{"a":2},["a"]],"passed":true},{"actual":[{"a":1},{},["a"]],"check":"repeat removed","expected":[{"a":1},{},["a"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"edit\", \"actual\": [{\"a\": 1}, {\"a\": 2}, [\"a\"]], \"expected\": [{\"a\": 1}, {\"a\": 2}, [\"a\"]], \"passed\": true}, {\"check\": \"reset\", \"actual\": [{\"a\": 1}, {\"a\": 1}, []], \"expected\": [{\"a\": 1}, {\"a\": 1}, []], \"passed\": true}, {\"check\": \"commit\", \"actual\": [{\"a\": 2}, {\"a\": 2}, []], \"expected\": [{\"a\": 2}, {\"a\": 2}, []], \"passed\": true}, {\"check\": \"remove\", \"actual\": [{\"a\": 1, \"b\": 2}, {\"b\": 2}, [\"a\"]], \"expected\": [{\"b\": 2}, {\"b\": 2}, []], \"passed\": false}, {\"check\": \"new\", \"actual\": [{}, {\"new\": 0}, [\"new\"]], \"expected\": [{}, {\"new\": 0}, [\"new\"]], \"passed\": true}, {\"check\": \"removed\", \"actual\": [{\"a\": 1}, {}, [\"a\"]], \"expected\": [{\"a\": 1}, {}, [\"a\"]], \"passed\": true}, {\"check\": \"parameterized dirty value\", \"actual\": [{\"a\": 1}, {\"a\": 2}, [\"a\"]], \"expected\": [{\"a\": 1}, {\"a\": 2}, [\"a\"]], \"passed\": true}, {\"check\": \"repeat removed\", \"actual\": [{\"a\": 1}, {}, [\"a\"]], \"expected\": [{\"a\": 1}, {}, [\"a\"]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.884,"exit_code":0,"observations":[{"actual":[{"a":1},{"a":2},["a"]],"check":"edit","expected":[{"a":1},{"a":2},["a"]],"passed":true},{"actual":[{"a":1},{"a":1},[]],"check":"reset","expected":[{"a":1},{"a":1},[]],"passed":true},{"actual":[{"a":2},{"a":2},[]],"check":"commit","expected":[{"a":2},{"a":2},[]],"passed":true},{"actual":[{"b":2},{"b":2},[]],"check":"remove","expected":[{"b":2},{"b":2},[]],"passed":true},{"actual":[{},{"new":0},["new"]],"check":"new","expected":[{},{"new":0},["new"]],"passed":true},{"actual":[{"a":1},{},["a"]],"check":"removed","expected":[{"a":1},{},["a"]],"passed":true},{"actual":[{"a":1},{"a":2},["a"]],"check":"parameterized dirty value","expected":[{"a":1},{"a":2},["a"]],"passed":true},{"actual":[{"a":1},{},["a"]],"check":"repeat removed","expected":[{"a":1},{},["a"]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"edit\", \"actual\": [{\"a\": 1}, {\"a\": 2}, [\"a\"]], \"expected\": [{\"a\": 1}, {\"a\": 2}, [\"a\"]], \"passed\": true}, {\"check\": \"reset\", \"actual\": [{\"a\": 1}, {\"a\": 1}, []], \"expected\": [{\"a\": 1}, {\"a\": 1}, []], \"passed\": true}, {\"check\": \"commit\", \"actual\": [{\"a\": 2}, {\"a\": 2}, []], \"expected\": [{\"a\": 2}, {\"a\": 2}, []], \"passed\": true}, {\"check\": \"remove\", \"actual\": [{\"b\": 2}, {\"b\": 2}, []], \"expected\": [{\"b\": 2}, {\"b\": 2}, []], \"passed\": true}, {\"check\": \"new\", \"actual\": [{}, {\"new\": 0}, [\"new\"]], \"expected\": [{}, {\"new\": 0}, [\"new\"]], \"passed\": true}, {\"check\": \"removed\", \"actual\": [{\"a\": 1}, {}, [\"a\"]], \"expected\": [{\"a\": 1}, {}, [\"a\"]], \"passed\": true}, {\"check\": \"parameterized dirty value\", \"actual\": [{\"a\": 1}, {\"a\": 2}, [\"a\"]], \"expected\": [{\"a\": 1}, {\"a\": 2}, [\"a\"]], \"passed\": true}, {\"check\": \"repeat removed\", \"actual\": [{\"a\": 1}, {}, [\"a\"]], \"expected\": [{\"a\": 1}, {}, [\"a\"]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}