FA-976 / Reliability / Open access
Launch a speculative hedged request: A duplicate request is launched before the hedge delay · case 01
The hedge request operation is admitted even though a duplicate request is launched before the hedge delay.
ROOT CAUSE
The admission path omits the hedge delay invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require r['hedge_delay'][0] >= r['hedge_delay'][1] together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the hedge delay check repairs the reported defect, but replacing the adjacent primary pending check loses that independent invariant.
Case contract
Return a Boolean admission decision for launch a speculative hedged request. The record r must satisfy all of: r['hedge_delay'][0] >= r['hedge_delay'][1]; r['primary_pending'] == 'pending'; r['separate_domain'][0] != r['separate_domain'][1]; r['hedge_budget'][0] < r['hedge_budget'][1]; r['operation_repeatable'] is True. Extra tracing fields are ignored; validation does not mutate the record.
Why this case matters
A deterministic local contract for reliability. Each negative fixture violates exactly one invariant. No transport timing, persistence, cryptographic verification, or full protocol implementation is claimed.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['primary_pending'] == 'pending') and (r['separate_domain'][0] != r['separate_domain'][1]) and (r['hedge_budget'][0] < r['hedge_budget'][1]) and (r['operation_repeatable'] is True)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'hedge_delay': [5, 5], 'primary_pending': 'pending', 'separate_domain': ['z1', 'z2'], 'hedge_budget': [0, 1], 'operation_repeatable': True}
check('valid operation', solve(r), True)
check('A duplicate request is launched before the hedge delay', solve(dict(r, **{'hedge_delay': [4, 5]})), False)
check('A hedge starts after the primary already completed', solve(dict(r, **{'primary_pending': 'done'})), False)
check('Primary and hedge share the same correlated failure domain', solve(dict(r, **{'separate_domain': ['z1', 'z1']})), False)
check('Speculation consumes more than the allowed duplicate capacity', solve(dict(r, **{'hedge_budget': [1, 1]})), False)
check('A hedge duplicates a non-repeatable side effect', solve(dict(r, **{'operation_repeatable': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'hedge_delay': [4, 5], 'primary_pending': 'done', 'separate_domain': ['z1', 'z1'], 'hedge_budget': [1, 1], 'operation_repeatable': False}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| A duplicate request is launched before the hedge delay | True | False | Failed |
| A hedge starts after the primary already completed | False | False | Passed |
| Primary and hedge share the same correlated failure domain | False | False | Passed |
| Speculation consumes more than the allowed duplicate capacity | False | False | Passed |
| A hedge duplicates a non-repeatable side effect | False | False | Passed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / 92c1b2296950137e01e6cef4f637c2681b10e2b2f875bda1dd992b2120a18ad5
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['hedge_delay'][0] >= r['hedge_delay'][1]) and (r['separate_domain'][0] != r['separate_domain'][1]) and (r['hedge_budget'][0] < r['hedge_budget'][1]) and (r['operation_repeatable'] is True)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'hedge_delay': [5, 5], 'primary_pending': 'pending', 'separate_domain': ['z1', 'z2'], 'hedge_budget': [0, 1], 'operation_repeatable': True}
check('valid operation', solve(r), True)
check('A duplicate request is launched before the hedge delay', solve(dict(r, **{'hedge_delay': [4, 5]})), False)
check('A hedge starts after the primary already completed', solve(dict(r, **{'primary_pending': 'done'})), False)
check('Primary and hedge share the same correlated failure domain', solve(dict(r, **{'separate_domain': ['z1', 'z1']})), False)
check('Speculation consumes more than the allowed duplicate capacity', solve(dict(r, **{'hedge_budget': [1, 1]})), False)
check('A hedge duplicates a non-repeatable side effect', solve(dict(r, **{'operation_repeatable': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'hedge_delay': [4, 5], 'primary_pending': 'done', 'separate_domain': ['z1', 'z1'], 'hedge_budget': [1, 1], 'operation_repeatable': False}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| A duplicate request is launched before the hedge delay | False | False | Passed |
| A hedge starts after the primary already completed | True | False | Failed |
| Primary and hedge share the same correlated failure domain | False | False | Passed |
| Speculation consumes more than the allowed duplicate capacity | False | False | Passed |
| A hedge duplicates a non-repeatable side effect | False | False | Passed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / 7543af67d56a5068391020377ff7dd8cf67a89893b142d835bfa61d57cdd5190
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['hedge_delay'][0] >= r['hedge_delay'][1]) and (r['primary_pending'] == 'pending') and (r['separate_domain'][0] != r['separate_domain'][1]) and (r['hedge_budget'][0] < r['hedge_budget'][1]) and (r['operation_repeatable'] is True)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'hedge_delay': [5, 5], 'primary_pending': 'pending', 'separate_domain': ['z1', 'z2'], 'hedge_budget': [0, 1], 'operation_repeatable': True}
check('valid operation', solve(r), True)
check('A duplicate request is launched before the hedge delay', solve(dict(r, **{'hedge_delay': [4, 5]})), False)
check('A hedge starts after the primary already completed', solve(dict(r, **{'primary_pending': 'done'})), False)
check('Primary and hedge share the same correlated failure domain', solve(dict(r, **{'separate_domain': ['z1', 'z1']})), False)
check('Speculation consumes more than the allowed duplicate capacity', solve(dict(r, **{'hedge_budget': [1, 1]})), False)
check('A hedge duplicates a non-repeatable side effect', solve(dict(r, **{'operation_repeatable': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'hedge_delay': [4, 5], 'primary_pending': 'done', 'separate_domain': ['z1', 'z1'], 'hedge_budget': [1, 1], 'operation_repeatable': False}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| A duplicate request is launched before the hedge delay | False | False | Passed |
| A hedge starts after the primary already completed | False | False | Passed |
| Primary and hedge share the same correlated failure domain | False | False | Passed |
| Speculation consumes more than the allowed duplicate capacity | False | False | Passed |
| A hedge duplicates a non-repeatable side effect | False | False | Passed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / a64170c54cb10b15d4403ceff422da42844614777231b707e5a3b66c3c4b946a
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:36:57.341006+00:00.
Case digest / 2322c5bbe3f9d642720c351d24c3e92b3abeb6e6e2d86616b805ac3c73272154