FAILURE MAP
← Case archive

FA-981 / Reliability / Open access

Launch a speculative hedged request: A hedge starts after the primary already completed · case 01

The hedge request operation is admitted even though a hedge starts after the primary already completed.

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

ROOT CAUSE

The admission path omits the primary pending invariant while validating the other operation preconditions.

VERIFIED REPAIR

Require r['primary_pending'] == 'pending' together with every other stated precondition before accepting the operation.

Unsuccessful approach: Adding the primary pending check repairs the reported defect, but replacing the adjacent separate domain 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['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 completedTrueFalseFailed
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 / 7543af67d56a5068391020377ff7dd8cf67a89893b142d835bfa61d57cdd5190

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['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 domainTrueFalseFailed
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 / cdac50393e14b9de6da4a2ee9f755e3cacabab9be3a0ad24c817dae5432739d9

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

Case digest / 7c9a11acafb0b845c1e25b9d620e12d09a3c618d80e7d045db1f813eec7b15c2