{"abstract":"The workflow replay operation is admitted even though replay consumes an unrecorded nondeterministic random value.","category":"Workflow orchestration","checks":9,"contract":"Return a Boolean admission decision for replay durable workflow history. The record r must satisfy all of: r['command_type'][0] == r['command_type'][1]; r['command_order'][0] == r['command_order'][1]; r['version_marker'][0] in r['version_marker'][1]; r['random_recorded'] is True; r['history_contiguous'] == list(range(len(r['history_contiguous']))). Extra tracing fields are ignored; validation does not mutate the record.","evaluation_group":"xd-workflow-replay","failed_approach":"Adding the random recorded check repairs the reported defect, but replacing the adjacent history contiguous check loses that independent invariant.","family":"xd-workflow-replay-random_recorded","id":"FA-1241","implementations":{"attempt":{"sha256":"b13c8d88331ab45165d9d6c9f7e96375f4c7f1e30de0cae3466d1d71612c2d95","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r):\n    return (r['command_type'][0] == r['command_type'][1]) and (r['command_order'][0] == r['command_order'][1]) and (r['version_marker'][0] in r['version_marker'][1]) and (r['random_recorded'] is True)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nr = {'command_type': ['timer', 'timer'], 'command_order': [['a', 'b'], ['a', 'b']], 'version_marker': [2, [1, 2]], 'random_recorded': True, 'history_contiguous': [0, 1, 2]}\ncheck('valid operation', solve(r), True)\ncheck('Replayed code emits a different command kind than history', solve(dict(r, **{'command_type': ['activity', 'timer']})), False)\ncheck('Replayed commands reverse the recorded causal order', solve(dict(r, **{'command_order': [['b', 'a'], ['a', 'b']]})), False)\ncheck('Code executes a branch not selected by the recorded marker', solve(dict(r, **{'version_marker': [3, [1, 2]]})), False)\ncheck('Replay consumes an unrecorded nondeterministic random value', solve(dict(r, **{'random_recorded': False})), False)\ncheck('Replay silently skips a missing history event', solve(dict(r, **{'history_contiguous': [0, 2, 3]})), False)\ncheck('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)\ncheck('repeat validation is pure', solve(r), True)\ninvalid = {'command_type': ['activity', 'timer'], 'command_order': [['b', 'a'], ['a', 'b']], 'version_marker': [3, [1, 2]], 'random_recorded': False, 'history_contiguous': [0, 2, 3]}\nkeys = list(invalid)\npair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}\ncheck('two independent violations in variant', solve(dict(r, **pair)), False)\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":"6d9fa8810f1a60a32b4166e7931053144a2ea300bcf82d03788124a786e90615","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r):\n    return (r['command_type'][0] == r['command_type'][1]) and (r['command_order'][0] == r['command_order'][1]) and (r['version_marker'][0] in r['version_marker'][1]) and (r['history_contiguous'] == list(range(len(r['history_contiguous']))))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nr = {'command_type': ['timer', 'timer'], 'command_order': [['a', 'b'], ['a', 'b']], 'version_marker': [2, [1, 2]], 'random_recorded': True, 'history_contiguous': [0, 1, 2]}\ncheck('valid operation', solve(r), True)\ncheck('Replayed code emits a different command kind than history', solve(dict(r, **{'command_type': ['activity', 'timer']})), False)\ncheck('Replayed commands reverse the recorded causal order', solve(dict(r, **{'command_order': [['b', 'a'], ['a', 'b']]})), False)\ncheck('Code executes a branch not selected by the recorded marker', solve(dict(r, **{'version_marker': [3, [1, 2]]})), False)\ncheck('Replay consumes an unrecorded nondeterministic random value', solve(dict(r, **{'random_recorded': False})), False)\ncheck('Replay silently skips a missing history event', solve(dict(r, **{'history_contiguous': [0, 2, 3]})), False)\ncheck('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)\ncheck('repeat validation is pure', solve(r), True)\ninvalid = {'command_type': ['activity', 'timer'], 'command_order': [['b', 'a'], ['a', 'b']], 'version_marker': [3, [1, 2]], 'random_recorded': False, 'history_contiguous': [0, 2, 3]}\nkeys = list(invalid)\npair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}\ncheck('two independent violations in variant', solve(dict(r, **pair)), False)\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":"a4af76672b3655f0e41c6196a5b9d72d57e3863cecf4e51a457754e1c9ec4467","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r):\n    return (r['command_type'][0] == r['command_type'][1]) and (r['command_order'][0] == r['command_order'][1]) and (r['version_marker'][0] in r['version_marker'][1]) and (r['random_recorded'] is True) and (r['history_contiguous'] == list(range(len(r['history_contiguous']))))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nr = {'command_type': ['timer', 'timer'], 'command_order': [['a', 'b'], ['a', 'b']], 'version_marker': [2, [1, 2]], 'random_recorded': True, 'history_contiguous': [0, 1, 2]}\ncheck('valid operation', solve(r), True)\ncheck('Replayed code emits a different command kind than history', solve(dict(r, **{'command_type': ['activity', 'timer']})), False)\ncheck('Replayed commands reverse the recorded causal order', solve(dict(r, **{'command_order': [['b', 'a'], ['a', 'b']]})), False)\ncheck('Code executes a branch not selected by the recorded marker', solve(dict(r, **{'version_marker': [3, [1, 2]]})), False)\ncheck('Replay consumes an unrecorded nondeterministic random value', solve(dict(r, **{'random_recorded': False})), False)\ncheck('Replay silently skips a missing history event', solve(dict(r, **{'history_contiguous': [0, 2, 3]})), False)\ncheck('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)\ncheck('repeat validation is pure', solve(r), True)\ninvalid = {'command_type': ['activity', 'timer'], 'command_order': [['b', 'a'], ['a', 'b']], 'version_marker': [3, [1, 2]], 'random_recorded': False, 'history_contiguous': [0, 2, 3]}\nkeys = list(invalid)\npair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}\ncheck('two independent violations in variant', solve(dict(r, **pair)), False)\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":"xd-workflow-replay-random_recorded","generated_at":"2026-09-29T14:37:00.091821+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic local contract for workflow orchestration. Each negative fixture violates exactly one invariant. No transport timing, persistence, cryptographic verification, or full protocol implementation is claimed.","repair":"Require r['random_recorded'] is True together with every other stated precondition before accepting the operation.","root_cause":"The admission path omits the random recorded invariant while validating the other operation preconditions.","sha256":"46f1c0c481eaf3943dc5da8343ef49efe54f8d020785e35a2a0e46076ae83d63","title":"Replay durable workflow history: Replay consumes an unrecorded nondeterministic random value · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":79.293,"exit_code":1,"observations":[{"actual":true,"check":"valid operation","expected":true,"passed":true},{"actual":false,"check":"Replayed code emits a different command kind than history","expected":false,"passed":true},{"actual":false,"check":"Replayed commands reverse the recorded causal order","expected":false,"passed":true},{"actual":false,"check":"Code executes a branch not selected by the recorded marker","expected":false,"passed":true},{"actual":false,"check":"Replay consumes an unrecorded nondeterministic random value","expected":false,"passed":true},{"actual":true,"check":"Replay silently skips a missing history event","expected":false,"passed":false},{"actual":true,"check":"unrelated tracing metadata","expected":true,"passed":true},{"actual":true,"check":"repeat validation is pure","expected":true,"passed":true},{"actual":false,"check":"two independent violations in variant","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"valid operation\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"Replayed code emits a different command kind than history\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Replayed commands reverse the recorded causal order\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Code executes a branch not selected by the recorded marker\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Replay consumes an unrecorded nondeterministic random value\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Replay silently skips a missing history event\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"unrelated tracing metadata\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"repeat validation is pure\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"two independent violations in variant\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":54.044,"exit_code":1,"observations":[{"actual":true,"check":"valid operation","expected":true,"passed":true},{"actual":false,"check":"Replayed code emits a different command kind than history","expected":false,"passed":true},{"actual":false,"check":"Replayed commands reverse the recorded causal order","expected":false,"passed":true},{"actual":false,"check":"Code executes a branch not selected by the recorded marker","expected":false,"passed":true},{"actual":true,"check":"Replay consumes an unrecorded nondeterministic random value","expected":false,"passed":false},{"actual":false,"check":"Replay silently skips a missing history event","expected":false,"passed":true},{"actual":true,"check":"unrelated tracing metadata","expected":true,"passed":true},{"actual":true,"check":"repeat validation is pure","expected":true,"passed":true},{"actual":false,"check":"two independent violations in variant","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"valid operation\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"Replayed code emits a different command kind than history\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Replayed commands reverse the recorded causal order\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Code executes a branch not selected by the recorded marker\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Replay consumes an unrecorded nondeterministic random value\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"Replay silently skips a missing history event\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"unrelated tracing metadata\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"repeat validation is pure\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"two independent violations in variant\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":34.499,"exit_code":0,"observations":[{"actual":true,"check":"valid operation","expected":true,"passed":true},{"actual":false,"check":"Replayed code emits a different command kind than history","expected":false,"passed":true},{"actual":false,"check":"Replayed commands reverse the recorded causal order","expected":false,"passed":true},{"actual":false,"check":"Code executes a branch not selected by the recorded marker","expected":false,"passed":true},{"actual":false,"check":"Replay consumes an unrecorded nondeterministic random value","expected":false,"passed":true},{"actual":false,"check":"Replay silently skips a missing history event","expected":false,"passed":true},{"actual":true,"check":"unrelated tracing metadata","expected":true,"passed":true},{"actual":true,"check":"repeat validation is pure","expected":true,"passed":true},{"actual":false,"check":"two independent violations in variant","expected":false,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"valid operation\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"Replayed code emits a different command kind than history\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Replayed commands reverse the recorded causal order\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Code executes a branch not selected by the recorded marker\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Replay consumes an unrecorded nondeterministic random value\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Replay silently skips a missing history event\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"unrelated tracing metadata\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"repeat validation is pure\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"two independent violations in variant\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}