{"abstract":"Lateral execution deduplicates repeated inner matches.","category":"Data systems","checks":7,"contract":"For each outer [id,key] row, evaluate matching [key,value] inner rows with a minimum supplied by that outer row. Emit [id,value] in source order, preserving duplicate inner matches. Empty matches emit [id,None] under outer lateral semantics.","evaluation_group":"s3-data-systems-lateral-binding-frames","failed_approach":"Sorting unique matches still loses bag multiplicity.","family":"s3-data-systems-lateral-binding-frames-inner-bag","id":"FA-44811","implementations":{"attempt":{"sha256":"9320b22beeaecac264ba126514610ced1e26c489d21554eef6d721e4b3511ad2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(d):\n    try:\n        outer,inner=d\n        result=[]\n        for ident,key,minimum in outer:\n            matches=[value for k,value in inner if key is not None and k==key and value>=minimum]\n            if not matches: result.append([ident,None])\n            for value in sorted(set(matches)):\n                result.append([ident,value])\n        return result\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('per-row bindings', solve([[[10, 'a', 1], [11, 'b', 3]], [['a', 2], ['b', 2], ['b', 4]]]), [[10, 2], [11, 4]])\n    check('same key different parameter', solve([[[10, 'a', 1], [11, 'a', 3]], [['a', 2], ['a', 4]]]), [[10, 2], [10, 4], [11, 4]])\n    check('null key', solve([[[10, None, 1]], [[None, 2]]]), [[10, None]])\n    check('empty inner', solve([[[10, 'a', 1]], []]), [[10, None]])\n    check('duplicate inner', solve([[[10, 'a', 1]], [['a', 1], ['a', 1]]]), [[10, 1], [10, 1]])\n    check('empty outer', solve([[], [['a', 1]]]), [])\n    check('unmatched key', solve([[[10, 'z', 1]], [['a', 2]]]), [[10, None]])\nelif N == 2:\n    check('per-row bindings', solve([[[10, 'a', 2], [11, 'b', 4]], [['a', 3], ['b', 3], ['b', 5]]]), [[10, 3], [11, 5]])\n    check('same key different parameter', solve([[[10, 'a', 2], [11, 'a', 4]], [['a', 3], ['a', 5]]]), [[10, 3], [10, 5], [11, 5]])\n    check('null key', solve([[[10, None, 2]], [[None, 3]]]), [[10, None]])\n    check('empty inner', solve([[[10, 'a', 2]], []]), [[10, None]])\n    check('duplicate inner', solve([[[10, 'a', 2]], [['a', 2], ['a', 2]]]), [[10, 2], [10, 2]])\n    check('empty outer', solve([[], [['a', 2]]]), [])\n    check('unmatched key', solve([[[10, 'z', 2]], [['a', 3]]]), [[10, None]])\nelif N == 3:\n    check('per-row bindings', solve([[[10, 'a', 3], [11, 'b', 5]], [['a', 4], ['b', 4], ['b', 6]]]), [[10, 4], [11, 6]])\n    check('same key different parameter', solve([[[10, 'a', 3], [11, 'a', 5]], [['a', 4], ['a', 6]]]), [[10, 4], [10, 6], [11, 6]])\n    check('null key', solve([[[10, None, 3]], [[None, 4]]]), [[10, None]])\n    check('empty inner', solve([[[10, 'a', 3]], []]), [[10, None]])\n    check('duplicate inner', solve([[[10, 'a', 3]], [['a', 3], ['a', 3]]]), [[10, 3], [10, 3]])\n    check('empty outer', solve([[], [['a', 3]]]), [])\n    check('unmatched key', solve([[[10, 'z', 3]], [['a', 4]]]), [[10, None]])\nelif N == 4:\n    check('per-row bindings', solve([[[10, 'a', 4], [11, 'b', 6]], [['a', 5], ['b', 5], ['b', 7]]]), [[10, 5], [11, 7]])\n    check('same key different parameter', solve([[[10, 'a', 4], [11, 'a', 6]], [['a', 5], ['a', 7]]]), [[10, 5], [10, 7], [11, 7]])\n    check('null key', solve([[[10, None, 4]], [[None, 5]]]), [[10, None]])\n    check('empty inner', solve([[[10, 'a', 4]], []]), [[10, None]])\n    check('duplicate inner', solve([[[10, 'a', 4]], [['a', 4], ['a', 4]]]), [[10, 4], [10, 4]])\n    check('empty outer', solve([[], [['a', 4]]]), [])\n    check('unmatched key', solve([[[10, 'z', 4]], [['a', 5]]]), [[10, None]])\nelif N == 5:\n    check('per-row bindings', solve([[[10, 'a', 5], [11, 'b', 7]], [['a', 6], ['b', 6], ['b', 8]]]), [[10, 6], [11, 8]])\n    check('same key different parameter', solve([[[10, 'a', 5], [11, 'a', 7]], [['a', 6], ['a', 8]]]), [[10, 6], [10, 8], [11, 8]])\n    check('null key', solve([[[10, None, 5]], [[None, 6]]]), [[10, None]])\n    check('empty inner', solve([[[10, 'a', 5]], []]), [[10, None]])\n    check('duplicate inner', solve([[[10, 'a', 5]], [['a', 5], ['a', 5]]]), [[10, 5], [10, 5]])\n    check('empty outer', solve([[], [['a', 5]]]), [])\n    check('unmatched key', solve([[[10, 'z', 5]], [['a', 6]]]), [[10, None]])\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":"26bef97b88f4d9b2d19cb692a0da47e42dbf0bd346d285e802a919caf86b128f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(d):\n    try:\n        outer,inner=d\n        result=[]\n        for ident,key,minimum in outer:\n            matches=[value for k,value in inner if key is not None and k==key and value>=minimum]\n            if not matches: result.append([ident,None])\n            for value in dict.fromkeys(matches):\n                result.append([ident,value])\n        return result\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('per-row bindings', solve([[[10, 'a', 1], [11, 'b', 3]], [['a', 2], ['b', 2], ['b', 4]]]), [[10, 2], [11, 4]])\n    check('same key different parameter', solve([[[10, 'a', 1], [11, 'a', 3]], [['a', 2], ['a', 4]]]), [[10, 2], [10, 4], [11, 4]])\n    check('null key', solve([[[10, None, 1]], [[None, 2]]]), [[10, None]])\n    check('empty inner', solve([[[10, 'a', 1]], []]), [[10, None]])\n    check('duplicate inner', solve([[[10, 'a', 1]], [['a', 1], ['a', 1]]]), [[10, 1], [10, 1]])\n    check('empty outer', solve([[], [['a', 1]]]), [])\n    check('unmatched key', solve([[[10, 'z', 1]], [['a', 2]]]), [[10, None]])\nelif N == 2:\n    check('per-row bindings', solve([[[10, 'a', 2], [11, 'b', 4]], [['a', 3], ['b', 3], ['b', 5]]]), [[10, 3], [11, 5]])\n    check('same key different parameter', solve([[[10, 'a', 2], [11, 'a', 4]], [['a', 3], ['a', 5]]]), [[10, 3], [10, 5], [11, 5]])\n    check('null key', solve([[[10, None, 2]], [[None, 3]]]), [[10, None]])\n    check('empty inner', solve([[[10, 'a', 2]], []]), [[10, None]])\n    check('duplicate inner', solve([[[10, 'a', 2]], [['a', 2], ['a', 2]]]), [[10, 2], [10, 2]])\n    check('empty outer', solve([[], [['a', 2]]]), [])\n    check('unmatched key', solve([[[10, 'z', 2]], [['a', 3]]]), [[10, None]])\nelif N == 3:\n    check('per-row bindings', solve([[[10, 'a', 3], [11, 'b', 5]], [['a', 4], ['b', 4], ['b', 6]]]), [[10, 4], [11, 6]])\n    check('same key different parameter', solve([[[10, 'a', 3], [11, 'a', 5]], [['a', 4], ['a', 6]]]), [[10, 4], [10, 6], [11, 6]])\n    check('null key', solve([[[10, None, 3]], [[None, 4]]]), [[10, None]])\n    check('empty inner', solve([[[10, 'a', 3]], []]), [[10, None]])\n    check('duplicate inner', solve([[[10, 'a', 3]], [['a', 3], ['a', 3]]]), [[10, 3], [10, 3]])\n    check('empty outer', solve([[], [['a', 3]]]), [])\n    check('unmatched key', solve([[[10, 'z', 3]], [['a', 4]]]), [[10, None]])\nelif N == 4:\n    check('per-row bindings', solve([[[10, 'a', 4], [11, 'b', 6]], [['a', 5], ['b', 5], ['b', 7]]]), [[10, 5], [11, 7]])\n    check('same key different parameter', solve([[[10, 'a', 4], [11, 'a', 6]], [['a', 5], ['a', 7]]]), [[10, 5], [10, 7], [11, 7]])\n    check('null key', solve([[[10, None, 4]], [[None, 5]]]), [[10, None]])\n    check('empty inner', solve([[[10, 'a', 4]], []]), [[10, None]])\n    check('duplicate inner', solve([[[10, 'a', 4]], [['a', 4], ['a', 4]]]), [[10, 4], [10, 4]])\n    check('empty outer', solve([[], [['a', 4]]]), [])\n    check('unmatched key', solve([[[10, 'z', 4]], [['a', 5]]]), [[10, None]])\nelif N == 5:\n    check('per-row bindings', solve([[[10, 'a', 5], [11, 'b', 7]], [['a', 6], ['b', 6], ['b', 8]]]), [[10, 6], [11, 8]])\n    check('same key different parameter', solve([[[10, 'a', 5], [11, 'a', 7]], [['a', 6], ['a', 8]]]), [[10, 6], [10, 8], [11, 8]])\n    check('null key', solve([[[10, None, 5]], [[None, 6]]]), [[10, None]])\n    check('empty inner', solve([[[10, 'a', 5]], []]), [[10, None]])\n    check('duplicate inner', solve([[[10, 'a', 5]], [['a', 5], ['a', 5]]]), [[10, 5], [10, 5]])\n    check('empty outer', solve([[], [['a', 5]]]), [])\n    check('unmatched key', solve([[[10, 'z', 5]], [['a', 6]]]), [[10, None]])\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":"b32c8048bac666216c34274a46822729e81f4c929da54323f38c18e42e704d02","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(d):\n    try:\n        outer,inner=d\n        result=[]\n        for ident,key,minimum in outer:\n            matches=[value for k,value in inner if key is not None and k==key and value>=minimum]\n            if not matches: result.append([ident,None])\n            for value in matches:\n                result.append([ident,value])\n        return result\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('per-row bindings', solve([[[10, 'a', 1], [11, 'b', 3]], [['a', 2], ['b', 2], ['b', 4]]]), [[10, 2], [11, 4]])\n    check('same key different parameter', solve([[[10, 'a', 1], [11, 'a', 3]], [['a', 2], ['a', 4]]]), [[10, 2], [10, 4], [11, 4]])\n    check('null key', solve([[[10, None, 1]], [[None, 2]]]), [[10, None]])\n    check('empty inner', solve([[[10, 'a', 1]], []]), [[10, None]])\n    check('duplicate inner', solve([[[10, 'a', 1]], [['a', 1], ['a', 1]]]), [[10, 1], [10, 1]])\n    check('empty outer', solve([[], [['a', 1]]]), [])\n    check('unmatched key', solve([[[10, 'z', 1]], [['a', 2]]]), [[10, None]])\nelif N == 2:\n    check('per-row bindings', solve([[[10, 'a', 2], [11, 'b', 4]], [['a', 3], ['b', 3], ['b', 5]]]), [[10, 3], [11, 5]])\n    check('same key different parameter', solve([[[10, 'a', 2], [11, 'a', 4]], [['a', 3], ['a', 5]]]), [[10, 3], [10, 5], [11, 5]])\n    check('null key', solve([[[10, None, 2]], [[None, 3]]]), [[10, None]])\n    check('empty inner', solve([[[10, 'a', 2]], []]), [[10, None]])\n    check('duplicate inner', solve([[[10, 'a', 2]], [['a', 2], ['a', 2]]]), [[10, 2], [10, 2]])\n    check('empty outer', solve([[], [['a', 2]]]), [])\n    check('unmatched key', solve([[[10, 'z', 2]], [['a', 3]]]), [[10, None]])\nelif N == 3:\n    check('per-row bindings', solve([[[10, 'a', 3], [11, 'b', 5]], [['a', 4], ['b', 4], ['b', 6]]]), [[10, 4], [11, 6]])\n    check('same key different parameter', solve([[[10, 'a', 3], [11, 'a', 5]], [['a', 4], ['a', 6]]]), [[10, 4], [10, 6], [11, 6]])\n    check('null key', solve([[[10, None, 3]], [[None, 4]]]), [[10, None]])\n    check('empty inner', solve([[[10, 'a', 3]], []]), [[10, None]])\n    check('duplicate inner', solve([[[10, 'a', 3]], [['a', 3], ['a', 3]]]), [[10, 3], [10, 3]])\n    check('empty outer', solve([[], [['a', 3]]]), [])\n    check('unmatched key', solve([[[10, 'z', 3]], [['a', 4]]]), [[10, None]])\nelif N == 4:\n    check('per-row bindings', solve([[[10, 'a', 4], [11, 'b', 6]], [['a', 5], ['b', 5], ['b', 7]]]), [[10, 5], [11, 7]])\n    check('same key different parameter', solve([[[10, 'a', 4], [11, 'a', 6]], [['a', 5], ['a', 7]]]), [[10, 5], [10, 7], [11, 7]])\n    check('null key', solve([[[10, None, 4]], [[None, 5]]]), [[10, None]])\n    check('empty inner', solve([[[10, 'a', 4]], []]), [[10, None]])\n    check('duplicate inner', solve([[[10, 'a', 4]], [['a', 4], ['a', 4]]]), [[10, 4], [10, 4]])\n    check('empty outer', solve([[], [['a', 4]]]), [])\n    check('unmatched key', solve([[[10, 'z', 4]], [['a', 5]]]), [[10, None]])\nelif N == 5:\n    check('per-row bindings', solve([[[10, 'a', 5], [11, 'b', 7]], [['a', 6], ['b', 6], ['b', 8]]]), [[10, 6], [11, 8]])\n    check('same key different parameter', solve([[[10, 'a', 5], [11, 'a', 7]], [['a', 6], ['a', 8]]]), [[10, 6], [10, 8], [11, 8]])\n    check('null key', solve([[[10, None, 5]], [[None, 6]]]), [[10, None]])\n    check('empty inner', solve([[[10, 'a', 5]], []]), [[10, None]])\n    check('duplicate inner', solve([[[10, 'a', 5]], [['a', 5], ['a', 5]]]), [[10, 5], [10, 5]])\n    check('empty outer', solve([[], [['a', 5]]]), [])\n    check('unmatched key', solve([[[10, 'z', 5]], [['a', 6]]]), [[10, None]])\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-lateral-binding-frames-inner-bag","generated_at":"2026-09-29T14:44:15.898371+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: For each outer [id,key] row, evaluate matching [key,value] inner rows with a minimum supplied by that outer row. Emit [id,value] in source order, preserving duplicate inner matches. Empty matches emit [id,None] under outer lateral semantics.","root_cause":"lateral-binding-frames: Lateral execution deduplicates repeated inner matches.","sha256":"a3fe1b2bc34ff12d72f915410f4709fe2108241026cd4fcbafce5e6e532fb110","title":"Lateral execution deduplicates repeated inner matches · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.989,"exit_code":1,"observations":[{"actual":[[10,2],[11,4]],"check":"per-row bindings","expected":[[10,2],[11,4]],"passed":true},{"actual":[[10,2],[10,4],[11,4]],"check":"same key different parameter","expected":[[10,2],[10,4],[11,4]],"passed":true},{"actual":[[10,null]],"check":"null key","expected":[[10,null]],"passed":true},{"actual":[[10,null]],"check":"empty inner","expected":[[10,null]],"passed":true},{"actual":[[10,1]],"check":"duplicate inner","expected":[[10,1],[10,1]],"passed":false},{"actual":[],"check":"empty outer","expected":[],"passed":true},{"actual":[[10,null]],"check":"unmatched key","expected":[[10,null]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"per-row bindings\", \"actual\": [[10, 2], [11, 4]], \"expected\": [[10, 2], [11, 4]], \"passed\": true}, {\"check\": \"same key different parameter\", \"actual\": [[10, 2], [10, 4], [11, 4]], \"expected\": [[10, 2], [10, 4], [11, 4]], \"passed\": true}, {\"check\": \"null key\", \"actual\": [[10, null]], \"expected\": [[10, null]], \"passed\": true}, {\"check\": \"empty inner\", \"actual\": [[10, null]], \"expected\": [[10, null]], \"passed\": true}, {\"check\": \"duplicate inner\", \"actual\": [[10, 1]], \"expected\": [[10, 1], [10, 1]], \"passed\": false}, {\"check\": \"empty outer\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unmatched key\", \"actual\": [[10, null]], \"expected\": [[10, null]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.913,"exit_code":1,"observations":[{"actual":[[10,2],[11,4]],"check":"per-row bindings","expected":[[10,2],[11,4]],"passed":true},{"actual":[[10,2],[10,4],[11,4]],"check":"same key different parameter","expected":[[10,2],[10,4],[11,4]],"passed":true},{"actual":[[10,null]],"check":"null key","expected":[[10,null]],"passed":true},{"actual":[[10,null]],"check":"empty inner","expected":[[10,null]],"passed":true},{"actual":[[10,1]],"check":"duplicate inner","expected":[[10,1],[10,1]],"passed":false},{"actual":[],"check":"empty outer","expected":[],"passed":true},{"actual":[[10,null]],"check":"unmatched key","expected":[[10,null]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"per-row bindings\", \"actual\": [[10, 2], [11, 4]], \"expected\": [[10, 2], [11, 4]], \"passed\": true}, {\"check\": \"same key different parameter\", \"actual\": [[10, 2], [10, 4], [11, 4]], \"expected\": [[10, 2], [10, 4], [11, 4]], \"passed\": true}, {\"check\": \"null key\", \"actual\": [[10, null]], \"expected\": [[10, null]], \"passed\": true}, {\"check\": \"empty inner\", \"actual\": [[10, null]], \"expected\": [[10, null]], \"passed\": true}, {\"check\": \"duplicate inner\", \"actual\": [[10, 1]], \"expected\": [[10, 1], [10, 1]], \"passed\": false}, {\"check\": \"empty outer\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unmatched key\", \"actual\": [[10, null]], \"expected\": [[10, null]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.128,"exit_code":0,"observations":[{"actual":[[10,2],[11,4]],"check":"per-row bindings","expected":[[10,2],[11,4]],"passed":true},{"actual":[[10,2],[10,4],[11,4]],"check":"same key different parameter","expected":[[10,2],[10,4],[11,4]],"passed":true},{"actual":[[10,null]],"check":"null key","expected":[[10,null]],"passed":true},{"actual":[[10,null]],"check":"empty inner","expected":[[10,null]],"passed":true},{"actual":[[10,1],[10,1]],"check":"duplicate inner","expected":[[10,1],[10,1]],"passed":true},{"actual":[],"check":"empty outer","expected":[],"passed":true},{"actual":[[10,null]],"check":"unmatched key","expected":[[10,null]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"per-row bindings\", \"actual\": [[10, 2], [11, 4]], \"expected\": [[10, 2], [11, 4]], \"passed\": true}, {\"check\": \"same key different parameter\", \"actual\": [[10, 2], [10, 4], [11, 4]], \"expected\": [[10, 2], [10, 4], [11, 4]], \"passed\": true}, {\"check\": \"null key\", \"actual\": [[10, null]], \"expected\": [[10, null]], \"passed\": true}, {\"check\": \"empty inner\", \"actual\": [[10, null]], \"expected\": [[10, null]], \"passed\": true}, {\"check\": \"duplicate inner\", \"actual\": [[10, 1], [10, 1]], \"expected\": [[10, 1], [10, 1]], \"passed\": true}, {\"check\": \"empty outer\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unmatched key\", \"actual\": [[10, null]], \"expected\": [[10, null]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}