{"abstract":"A simultaneous join update counts the delta-delta product twice.","category":"Data systems","checks":7,"contract":"Apply simultaneous signed changes to two bag relations. Emit the consolidated join delta Ldelta*Rold + Lold*Rdelta + Ldelta*Rdelta. Inputs are [key,value,weight]; ordinary non-null equality joins. Return sorted [leftvalue,rightvalue,weight] nonzero rows.","evaluation_group":"s3-data-systems-delta-inner-join","failed_approach":"Joining both deltas against post-update sides still double counts the cross term.","family":"s3-data-systems-delta-inner-join-double-cross","id":"FA-44616","implementations":{"attempt":{"sha256":"139949e2588024934bbe54abb284591a32b7d619a853683eaed844cc7fc4b846","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(d):\n    try:\n        left,right,dl,dr=d\n        terms=[(dl,right+dr),(left+dl,dr)]\n        weights={}\n        for a,b in terms:\n            for ka,va,wa in a:\n                for kb,vb,wb in b:\n                    if ka is None or kb is None or ka!=kb: continue\n                    key=(va,vb)\n                    weights[key]=weights.get(key,0)+wa*wb\n        return [[a,b,w] for (a,b),w in sorted(weights.items()) if w!=0]\n    except (IndexError, KeyError, ValueError, StopIteration) as exc:\n        return {\"representation_error\": type(exc).__name__}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nif N == 1:\n    check('simultaneous insert', solve([[], [], [['k', 1, 1]], [['k', 2, 1]]]), [[1, 2, 1]])\n    check('right retraction', solve([[['k', 1, 2]], [['k', 2, 1]], [], [['k', 2, -1]]]), [[1, 2, -2]])\n    check('left retraction', solve([[['k', 1, 1]], [['k', 2, 3]], [['k', 1, -1]], []]), [[1, 2, -3]])\n    check('null equality', solve([[], [[None, 2, 1]], [[None, 1, 1]], []]), [])\n    check('cancelled delta', solve([[], [['k', 2, 1]], [['k', 1, 1], ['k', 1, -1]], []]), [])\n    check('two payloads', solve([[], [['k', 2, 1], ['k', 3, 1]], [['k', 1, 1]], []]), [[1, 2, 1], [1, 3, 1]])\n    check('empty change', solve([[], [], [], []]), [])\nelif N == 2:\n    check('simultaneous insert', solve([[], [], [['k', 2, 1]], [['k', 3, 1]]]), [[2, 3, 1]])\n    check('right retraction', solve([[['k', 2, 2]], [['k', 3, 1]], [], [['k', 3, -1]]]), [[2, 3, -2]])\n    check('left retraction', solve([[['k', 2, 1]], [['k', 3, 3]], [['k', 2, -1]], []]), [[2, 3, -3]])\n    check('null equality', solve([[], [[None, 3, 1]], [[None, 2, 1]], []]), [])\n    check('cancelled delta', solve([[], [['k', 3, 1]], [['k', 2, 1], ['k', 2, -1]], []]), [])\n    check('two payloads', solve([[], [['k', 3, 1], ['k', 4, 1]], [['k', 2, 1]], []]), [[2, 3, 1], [2, 4, 1]])\n    check('empty change', solve([[], [], [], []]), [])\nelif N == 3:\n    check('simultaneous insert', solve([[], [], [['k', 3, 1]], [['k', 4, 1]]]), [[3, 4, 1]])\n    check('right retraction', solve([[['k', 3, 2]], [['k', 4, 1]], [], [['k', 4, -1]]]), [[3, 4, -2]])\n    check('left retraction', solve([[['k', 3, 1]], [['k', 4, 3]], [['k', 3, -1]], []]), [[3, 4, -3]])\n    check('null equality', solve([[], [[None, 4, 1]], [[None, 3, 1]], []]), [])\n    check('cancelled delta', solve([[], [['k', 4, 1]], [['k', 3, 1], ['k', 3, -1]], []]), [])\n    check('two payloads', solve([[], [['k', 4, 1], ['k', 5, 1]], [['k', 3, 1]], []]), [[3, 4, 1], [3, 5, 1]])\n    check('empty change', solve([[], [], [], []]), [])\nelif N == 4:\n    check('simultaneous insert', solve([[], [], [['k', 4, 1]], [['k', 5, 1]]]), [[4, 5, 1]])\n    check('right retraction', solve([[['k', 4, 2]], [['k', 5, 1]], [], [['k', 5, -1]]]), [[4, 5, -2]])\n    check('left retraction', solve([[['k', 4, 1]], [['k', 5, 3]], [['k', 4, -1]], []]), [[4, 5, -3]])\n    check('null equality', solve([[], [[None, 5, 1]], [[None, 4, 1]], []]), [])\n    check('cancelled delta', solve([[], [['k', 5, 1]], [['k', 4, 1], ['k', 4, -1]], []]), [])\n    check('two payloads', solve([[], [['k', 5, 1], ['k', 6, 1]], [['k', 4, 1]], []]), [[4, 5, 1], [4, 6, 1]])\n    check('empty change', solve([[], [], [], []]), [])\nelif N == 5:\n    check('simultaneous insert', solve([[], [], [['k', 5, 1]], [['k', 6, 1]]]), [[5, 6, 1]])\n    check('right retraction', solve([[['k', 5, 2]], [['k', 6, 1]], [], [['k', 6, -1]]]), [[5, 6, -2]])\n    check('left retraction', solve([[['k', 5, 1]], [['k', 6, 3]], [['k', 5, -1]], []]), [[5, 6, -3]])\n    check('null equality', solve([[], [[None, 6, 1]], [[None, 5, 1]], []]), [])\n    check('cancelled delta', solve([[], [['k', 6, 1]], [['k', 5, 1], ['k', 5, -1]], []]), [])\n    check('two payloads', solve([[], [['k', 6, 1], ['k', 7, 1]], [['k', 5, 1]], []]), [[5, 6, 1], [5, 7, 1]])\n    check('empty change', solve([[], [], [], []]), [])\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":"3a58dd170c29e6d785dfecd65fdfd2a5474c049d863619a097a9beed2ab66f1f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(d):\n    try:\n        left,right,dl,dr=d\n        terms=[(dl,right),(left,dr),(dl,dr),(dl,dr)]\n        weights={}\n        for a,b in terms:\n            for ka,va,wa in a:\n                for kb,vb,wb in b:\n                    if ka is None or kb is None or ka!=kb: continue\n                    key=(va,vb)\n                    weights[key]=weights.get(key,0)+wa*wb\n        return [[a,b,w] for (a,b),w in sorted(weights.items()) if w!=0]\n    except (IndexError, KeyError, ValueError, StopIteration) as exc:\n        return {\"representation_error\": type(exc).__name__}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nif N == 1:\n    check('simultaneous insert', solve([[], [], [['k', 1, 1]], [['k', 2, 1]]]), [[1, 2, 1]])\n    check('right retraction', solve([[['k', 1, 2]], [['k', 2, 1]], [], [['k', 2, -1]]]), [[1, 2, -2]])\n    check('left retraction', solve([[['k', 1, 1]], [['k', 2, 3]], [['k', 1, -1]], []]), [[1, 2, -3]])\n    check('null equality', solve([[], [[None, 2, 1]], [[None, 1, 1]], []]), [])\n    check('cancelled delta', solve([[], [['k', 2, 1]], [['k', 1, 1], ['k', 1, -1]], []]), [])\n    check('two payloads', solve([[], [['k', 2, 1], ['k', 3, 1]], [['k', 1, 1]], []]), [[1, 2, 1], [1, 3, 1]])\n    check('empty change', solve([[], [], [], []]), [])\nelif N == 2:\n    check('simultaneous insert', solve([[], [], [['k', 2, 1]], [['k', 3, 1]]]), [[2, 3, 1]])\n    check('right retraction', solve([[['k', 2, 2]], [['k', 3, 1]], [], [['k', 3, -1]]]), [[2, 3, -2]])\n    check('left retraction', solve([[['k', 2, 1]], [['k', 3, 3]], [['k', 2, -1]], []]), [[2, 3, -3]])\n    check('null equality', solve([[], [[None, 3, 1]], [[None, 2, 1]], []]), [])\n    check('cancelled delta', solve([[], [['k', 3, 1]], [['k', 2, 1], ['k', 2, -1]], []]), [])\n    check('two payloads', solve([[], [['k', 3, 1], ['k', 4, 1]], [['k', 2, 1]], []]), [[2, 3, 1], [2, 4, 1]])\n    check('empty change', solve([[], [], [], []]), [])\nelif N == 3:\n    check('simultaneous insert', solve([[], [], [['k', 3, 1]], [['k', 4, 1]]]), [[3, 4, 1]])\n    check('right retraction', solve([[['k', 3, 2]], [['k', 4, 1]], [], [['k', 4, -1]]]), [[3, 4, -2]])\n    check('left retraction', solve([[['k', 3, 1]], [['k', 4, 3]], [['k', 3, -1]], []]), [[3, 4, -3]])\n    check('null equality', solve([[], [[None, 4, 1]], [[None, 3, 1]], []]), [])\n    check('cancelled delta', solve([[], [['k', 4, 1]], [['k', 3, 1], ['k', 3, -1]], []]), [])\n    check('two payloads', solve([[], [['k', 4, 1], ['k', 5, 1]], [['k', 3, 1]], []]), [[3, 4, 1], [3, 5, 1]])\n    check('empty change', solve([[], [], [], []]), [])\nelif N == 4:\n    check('simultaneous insert', solve([[], [], [['k', 4, 1]], [['k', 5, 1]]]), [[4, 5, 1]])\n    check('right retraction', solve([[['k', 4, 2]], [['k', 5, 1]], [], [['k', 5, -1]]]), [[4, 5, -2]])\n    check('left retraction', solve([[['k', 4, 1]], [['k', 5, 3]], [['k', 4, -1]], []]), [[4, 5, -3]])\n    check('null equality', solve([[], [[None, 5, 1]], [[None, 4, 1]], []]), [])\n    check('cancelled delta', solve([[], [['k', 5, 1]], [['k', 4, 1], ['k', 4, -1]], []]), [])\n    check('two payloads', solve([[], [['k', 5, 1], ['k', 6, 1]], [['k', 4, 1]], []]), [[4, 5, 1], [4, 6, 1]])\n    check('empty change', solve([[], [], [], []]), [])\nelif N == 5:\n    check('simultaneous insert', solve([[], [], [['k', 5, 1]], [['k', 6, 1]]]), [[5, 6, 1]])\n    check('right retraction', solve([[['k', 5, 2]], [['k', 6, 1]], [], [['k', 6, -1]]]), [[5, 6, -2]])\n    check('left retraction', solve([[['k', 5, 1]], [['k', 6, 3]], [['k', 5, -1]], []]), [[5, 6, -3]])\n    check('null equality', solve([[], [[None, 6, 1]], [[None, 5, 1]], []]), [])\n    check('cancelled delta', solve([[], [['k', 6, 1]], [['k', 5, 1], ['k', 5, -1]], []]), [])\n    check('two payloads', solve([[], [['k', 6, 1], ['k', 7, 1]], [['k', 5, 1]], []]), [[5, 6, 1], [5, 7, 1]])\n    check('empty change', solve([[], [], [], []]), [])\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":"291b0bf46542b98ea6f18cf8b7fa1210d6509a6e684673f555e3f936c139d46a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(d):\n    try:\n        left,right,dl,dr=d\n        terms=[(dl,right),(left,dr),(dl,dr)]\n        weights={}\n        for a,b in terms:\n            for ka,va,wa in a:\n                for kb,vb,wb in b:\n                    if ka is None or kb is None or ka!=kb: continue\n                    key=(va,vb)\n                    weights[key]=weights.get(key,0)+wa*wb\n        return [[a,b,w] for (a,b),w in sorted(weights.items()) if w!=0]\n    except (IndexError, KeyError, ValueError, StopIteration) as exc:\n        return {\"representation_error\": type(exc).__name__}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nif N == 1:\n    check('simultaneous insert', solve([[], [], [['k', 1, 1]], [['k', 2, 1]]]), [[1, 2, 1]])\n    check('right retraction', solve([[['k', 1, 2]], [['k', 2, 1]], [], [['k', 2, -1]]]), [[1, 2, -2]])\n    check('left retraction', solve([[['k', 1, 1]], [['k', 2, 3]], [['k', 1, -1]], []]), [[1, 2, -3]])\n    check('null equality', solve([[], [[None, 2, 1]], [[None, 1, 1]], []]), [])\n    check('cancelled delta', solve([[], [['k', 2, 1]], [['k', 1, 1], ['k', 1, -1]], []]), [])\n    check('two payloads', solve([[], [['k', 2, 1], ['k', 3, 1]], [['k', 1, 1]], []]), [[1, 2, 1], [1, 3, 1]])\n    check('empty change', solve([[], [], [], []]), [])\nelif N == 2:\n    check('simultaneous insert', solve([[], [], [['k', 2, 1]], [['k', 3, 1]]]), [[2, 3, 1]])\n    check('right retraction', solve([[['k', 2, 2]], [['k', 3, 1]], [], [['k', 3, -1]]]), [[2, 3, -2]])\n    check('left retraction', solve([[['k', 2, 1]], [['k', 3, 3]], [['k', 2, -1]], []]), [[2, 3, -3]])\n    check('null equality', solve([[], [[None, 3, 1]], [[None, 2, 1]], []]), [])\n    check('cancelled delta', solve([[], [['k', 3, 1]], [['k', 2, 1], ['k', 2, -1]], []]), [])\n    check('two payloads', solve([[], [['k', 3, 1], ['k', 4, 1]], [['k', 2, 1]], []]), [[2, 3, 1], [2, 4, 1]])\n    check('empty change', solve([[], [], [], []]), [])\nelif N == 3:\n    check('simultaneous insert', solve([[], [], [['k', 3, 1]], [['k', 4, 1]]]), [[3, 4, 1]])\n    check('right retraction', solve([[['k', 3, 2]], [['k', 4, 1]], [], [['k', 4, -1]]]), [[3, 4, -2]])\n    check('left retraction', solve([[['k', 3, 1]], [['k', 4, 3]], [['k', 3, -1]], []]), [[3, 4, -3]])\n    check('null equality', solve([[], [[None, 4, 1]], [[None, 3, 1]], []]), [])\n    check('cancelled delta', solve([[], [['k', 4, 1]], [['k', 3, 1], ['k', 3, -1]], []]), [])\n    check('two payloads', solve([[], [['k', 4, 1], ['k', 5, 1]], [['k', 3, 1]], []]), [[3, 4, 1], [3, 5, 1]])\n    check('empty change', solve([[], [], [], []]), [])\nelif N == 4:\n    check('simultaneous insert', solve([[], [], [['k', 4, 1]], [['k', 5, 1]]]), [[4, 5, 1]])\n    check('right retraction', solve([[['k', 4, 2]], [['k', 5, 1]], [], [['k', 5, -1]]]), [[4, 5, -2]])\n    check('left retraction', solve([[['k', 4, 1]], [['k', 5, 3]], [['k', 4, -1]], []]), [[4, 5, -3]])\n    check('null equality', solve([[], [[None, 5, 1]], [[None, 4, 1]], []]), [])\n    check('cancelled delta', solve([[], [['k', 5, 1]], [['k', 4, 1], ['k', 4, -1]], []]), [])\n    check('two payloads', solve([[], [['k', 5, 1], ['k', 6, 1]], [['k', 4, 1]], []]), [[4, 5, 1], [4, 6, 1]])\n    check('empty change', solve([[], [], [], []]), [])\nelif N == 5:\n    check('simultaneous insert', solve([[], [], [['k', 5, 1]], [['k', 6, 1]]]), [[5, 6, 1]])\n    check('right retraction', solve([[['k', 5, 2]], [['k', 6, 1]], [], [['k', 6, -1]]]), [[5, 6, -2]])\n    check('left retraction', solve([[['k', 5, 1]], [['k', 6, 3]], [['k', 5, -1]], []]), [[5, 6, -3]])\n    check('null equality', solve([[], [[None, 6, 1]], [[None, 5, 1]], []]), [])\n    check('cancelled delta', solve([[], [['k', 6, 1]], [['k', 5, 1], ['k', 5, -1]], []]), [])\n    check('two payloads', solve([[], [['k', 6, 1], ['k', 7, 1]], [['k', 5, 1]], []]), [[5, 6, 1], [5, 7, 1]])\n    check('empty change', solve([[], [], [], []]), [])\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":"Offline stipulated semantics over valid small inputs; no performance, concurrency, or production-engine conformance claim. 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":"s3-data-systems-delta-inner-join-double-cross","generated_at":"2026-09-29T14:44:13.895805+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A bounded deterministic data engine model makes representation and changelog faults reproducible.","repair":"Preserve the stated physical representation and operation order: Apply simultaneous signed changes to two bag relations. Emit the consolidated join delta Ldelta*Rold + Lold*Rdelta + Ldelta*Rdelta. Inputs are [key,value,weight]; ordinary non-null equality joins. Return sorted [leftvalue,rightvalue,weight] nonzero rows.","root_cause":"delta-inner-join: A simultaneous join update counts the delta-delta product twice.","sha256":"b5b47e75c173d33f39428998c8f4bab33b90e6f15fb8657f4861b22776807bc9","title":"A simultaneous join update counts the delta-delta product twice · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":46.149,"exit_code":1,"observations":[{"actual":[[1,2,2]],"check":"simultaneous insert","expected":[[1,2,1]],"passed":false},{"actual":[[1,2,-2]],"check":"right retraction","expected":[[1,2,-2]],"passed":true},{"actual":[[1,2,-3]],"check":"left retraction","expected":[[1,2,-3]],"passed":true},{"actual":[],"check":"null equality","expected":[],"passed":true},{"actual":[],"check":"cancelled delta","expected":[],"passed":true},{"actual":[[1,2,1],[1,3,1]],"check":"two payloads","expected":[[1,2,1],[1,3,1]],"passed":true},{"actual":[],"check":"empty change","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"simultaneous insert\", \"actual\": [[1, 2, 2]], \"expected\": [[1, 2, 1]], \"passed\": false}, {\"check\": \"right retraction\", \"actual\": [[1, 2, -2]], \"expected\": [[1, 2, -2]], \"passed\": true}, {\"check\": \"left retraction\", \"actual\": [[1, 2, -3]], \"expected\": [[1, 2, -3]], \"passed\": true}, {\"check\": \"null equality\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"cancelled delta\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"two payloads\", \"actual\": [[1, 2, 1], [1, 3, 1]], \"expected\": [[1, 2, 1], [1, 3, 1]], \"passed\": true}, {\"check\": \"empty change\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.778,"exit_code":1,"observations":[{"actual":[[1,2,2]],"check":"simultaneous insert","expected":[[1,2,1]],"passed":false},{"actual":[[1,2,-2]],"check":"right retraction","expected":[[1,2,-2]],"passed":true},{"actual":[[1,2,-3]],"check":"left retraction","expected":[[1,2,-3]],"passed":true},{"actual":[],"check":"null equality","expected":[],"passed":true},{"actual":[],"check":"cancelled delta","expected":[],"passed":true},{"actual":[[1,2,1],[1,3,1]],"check":"two payloads","expected":[[1,2,1],[1,3,1]],"passed":true},{"actual":[],"check":"empty change","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"simultaneous insert\", \"actual\": [[1, 2, 2]], \"expected\": [[1, 2, 1]], \"passed\": false}, {\"check\": \"right retraction\", \"actual\": [[1, 2, -2]], \"expected\": [[1, 2, -2]], \"passed\": true}, {\"check\": \"left retraction\", \"actual\": [[1, 2, -3]], \"expected\": [[1, 2, -3]], \"passed\": true}, {\"check\": \"null equality\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"cancelled delta\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"two payloads\", \"actual\": [[1, 2, 1], [1, 3, 1]], \"expected\": [[1, 2, 1], [1, 3, 1]], \"passed\": true}, {\"check\": \"empty change\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":47.552,"exit_code":0,"observations":[{"actual":[[1,2,1]],"check":"simultaneous insert","expected":[[1,2,1]],"passed":true},{"actual":[[1,2,-2]],"check":"right retraction","expected":[[1,2,-2]],"passed":true},{"actual":[[1,2,-3]],"check":"left retraction","expected":[[1,2,-3]],"passed":true},{"actual":[],"check":"null equality","expected":[],"passed":true},{"actual":[],"check":"cancelled delta","expected":[],"passed":true},{"actual":[[1,2,1],[1,3,1]],"check":"two payloads","expected":[[1,2,1],[1,3,1]],"passed":true},{"actual":[],"check":"empty change","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"simultaneous insert\", \"actual\": [[1, 2, 1]], \"expected\": [[1, 2, 1]], \"passed\": true}, {\"check\": \"right retraction\", \"actual\": [[1, 2, -2]], \"expected\": [[1, 2, -2]], \"passed\": true}, {\"check\": \"left retraction\", \"actual\": [[1, 2, -3]], \"expected\": [[1, 2, -3]], \"passed\": true}, {\"check\": \"null equality\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"cancelled delta\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"two payloads\", \"actual\": [[1, 2, 1], [1, 3, 1]], \"expected\": [[1, 2, 1], [1, 3, 1]], \"passed\": true}, {\"check\": \"empty change\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}