FAILURE MAP
← Case archive

FA-991 / Reliability / Open access

Launch a speculative hedged request: Speculation consumes more than the allowed duplicate capacity · case 01

The hedge request operation is admitted even though speculation consumes more than the allowed duplicate capacity.

Verified by executionVariant 1 · 9 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The admission path omits the hedge budget invariant while validating the other operation preconditions.

VERIFIED REPAIR

Require r['hedge_budget'][0] < r['hedge_budget'][1] together with every other stated precondition before accepting the operation.

Unsuccessful approach: Adding the hedge budget check repairs the reported defect, but replacing the adjacent operation repeatable 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['hedge_delay'][0] >= r['hedge_delay'][1]) and (r['primary_pending'] == 'pending') and (r['separate_domain'][0] != r['separate_domain'][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 fixtureActualExpectedOutcome
valid operationTrueTruePassed
A duplicate request is launched before the hedge delayFalseFalsePassed
A hedge starts after the primary already completedFalseFalsePassed
Primary and hedge share the same correlated failure domainFalseFalsePassed
Speculation consumes more than the allowed duplicate capacityTrueFalseFailed
A hedge duplicates a non-repeatable side effectFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / ff4a3c57a65d314da580a386be75e88ef1a16ce5d907cc522c2cf860d7b89bb7

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['primary_pending'] == 'pending') and (r['separate_domain'][0] != r['separate_domain'][1]) and (r['hedge_budget'][0] < r['hedge_budget'][1])
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 fixtureActualExpectedOutcome
valid operationTrueTruePassed
A duplicate request is launched before the hedge delayFalseFalsePassed
A hedge starts after the primary already completedFalseFalsePassed
Primary and hedge share the same correlated failure domainFalseFalsePassed
Speculation consumes more than the allowed duplicate capacityFalseFalsePassed
A hedge duplicates a non-repeatable side effectTrueFalseFailed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / c50be0b392668cad34ab4ec813aaf3991dcfb0f8cc7f0a0131709d74156c0e37

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 fixtureActualExpectedOutcome
valid operationTrueTruePassed
A duplicate request is launched before the hedge delayFalseFalsePassed
A hedge starts after the primary already completedFalseFalsePassed
Primary and hedge share the same correlated failure domainFalseFalsePassed
Speculation consumes more than the allowed duplicate capacityFalseFalsePassed
A hedge duplicates a non-repeatable side effectFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

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.889472+00:00.

Case digest / c59ef043735a402fd291643458b8c4c6006add209e8344ced5c2e8b7c6b77daf