FA-1341 / Workflow orchestration / Open access
Renew a durable activity heartbeat: Heartbeat detail exceeds durable history payload limits · case 01
The workflow heartbeat operation is admitted even though heartbeat detail exceeds durable history payload limits.
ROOT CAUSE
The admission path omits the payload limit invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require len(r['payload_limit'][0]) <= r['payload_limit'][1] together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the payload limit check repairs the reported defect, but replacing the adjacent absolute deadline check loses that independent invariant.
Case contract
Return a Boolean admission decision for renew a durable activity heartbeat. The record r must satisfy all of: r['heartbeat_attempt'][0] == r['heartbeat_attempt'][1]; r['heartbeat_expiry'][0] < r['heartbeat_expiry'][1]; r['progress_monotonic'][0] >= r['progress_monotonic'][1]; len(r['payload_limit'][0]) <= r['payload_limit'][1]; r['absolute_deadline'][0] <= r['absolute_deadline'][1]. Extra tracing fields are ignored; validation does not mutate the record.
Why this case matters
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.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['heartbeat_attempt'][0] == r['heartbeat_attempt'][1]) and (r['heartbeat_expiry'][0] < r['heartbeat_expiry'][1]) and (r['progress_monotonic'][0] >= r['progress_monotonic'][1]) and (r['absolute_deadline'][0] <= r['absolute_deadline'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'heartbeat_attempt': [4, 4], 'heartbeat_expiry': [9, 10], 'progress_monotonic': [20, 19], 'payload_limit': ['abc', 3], 'absolute_deadline': [20, 20]}
check('valid operation', solve(r), True)
check('A previous activity attempt keeps the new attempt alive', solve(dict(r, **{'heartbeat_attempt': [3, 4]})), False)
check('A heartbeat resurrects an activity after its timeout', solve(dict(r, **{'heartbeat_expiry': [10, 10]})), False)
check('A late heartbeat regresses the resumable progress marker', solve(dict(r, **{'progress_monotonic': [18, 19]})), False)
check('Heartbeat detail exceeds durable history payload limits', solve(dict(r, **{'payload_limit': ['abcd', 3]})), False)
check('Heartbeat renewal extends beyond schedule-to-close timeout', solve(dict(r, **{'absolute_deadline': [21, 20]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'heartbeat_attempt': [3, 4], 'heartbeat_expiry': [10, 10], 'progress_monotonic': [18, 19], 'payload_limit': ['abcd', 3], 'absolute_deadline': [21, 20]}
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 previous activity attempt keeps the new attempt alive | False | False | Passed |
| A heartbeat resurrects an activity after its timeout | False | False | Passed |
| A late heartbeat regresses the resumable progress marker | False | False | Passed |
| Heartbeat detail exceeds durable history payload limits | True | False | Failed |
| Heartbeat renewal extends beyond schedule-to-close timeout | 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 / 64002a20adad2ee5f297cb5b3daa3d7345e0dff9ef60b00fade5f9caa1f0a1bb
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['heartbeat_attempt'][0] == r['heartbeat_attempt'][1]) and (r['heartbeat_expiry'][0] < r['heartbeat_expiry'][1]) and (r['progress_monotonic'][0] >= r['progress_monotonic'][1]) and (len(r['payload_limit'][0]) <= r['payload_limit'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'heartbeat_attempt': [4, 4], 'heartbeat_expiry': [9, 10], 'progress_monotonic': [20, 19], 'payload_limit': ['abc', 3], 'absolute_deadline': [20, 20]}
check('valid operation', solve(r), True)
check('A previous activity attempt keeps the new attempt alive', solve(dict(r, **{'heartbeat_attempt': [3, 4]})), False)
check('A heartbeat resurrects an activity after its timeout', solve(dict(r, **{'heartbeat_expiry': [10, 10]})), False)
check('A late heartbeat regresses the resumable progress marker', solve(dict(r, **{'progress_monotonic': [18, 19]})), False)
check('Heartbeat detail exceeds durable history payload limits', solve(dict(r, **{'payload_limit': ['abcd', 3]})), False)
check('Heartbeat renewal extends beyond schedule-to-close timeout', solve(dict(r, **{'absolute_deadline': [21, 20]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'heartbeat_attempt': [3, 4], 'heartbeat_expiry': [10, 10], 'progress_monotonic': [18, 19], 'payload_limit': ['abcd', 3], 'absolute_deadline': [21, 20]}
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 previous activity attempt keeps the new attempt alive | False | False | Passed |
| A heartbeat resurrects an activity after its timeout | False | False | Passed |
| A late heartbeat regresses the resumable progress marker | False | False | Passed |
| Heartbeat detail exceeds durable history payload limits | False | False | Passed |
| Heartbeat renewal extends beyond schedule-to-close timeout | True | False | Failed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / 7ab319ba353ec150097ac34072f9d8af099a713603b839efb8a80cd067fa45f0
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['heartbeat_attempt'][0] == r['heartbeat_attempt'][1]) and (r['heartbeat_expiry'][0] < r['heartbeat_expiry'][1]) and (r['progress_monotonic'][0] >= r['progress_monotonic'][1]) and (len(r['payload_limit'][0]) <= r['payload_limit'][1]) and (r['absolute_deadline'][0] <= r['absolute_deadline'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'heartbeat_attempt': [4, 4], 'heartbeat_expiry': [9, 10], 'progress_monotonic': [20, 19], 'payload_limit': ['abc', 3], 'absolute_deadline': [20, 20]}
check('valid operation', solve(r), True)
check('A previous activity attempt keeps the new attempt alive', solve(dict(r, **{'heartbeat_attempt': [3, 4]})), False)
check('A heartbeat resurrects an activity after its timeout', solve(dict(r, **{'heartbeat_expiry': [10, 10]})), False)
check('A late heartbeat regresses the resumable progress marker', solve(dict(r, **{'progress_monotonic': [18, 19]})), False)
check('Heartbeat detail exceeds durable history payload limits', solve(dict(r, **{'payload_limit': ['abcd', 3]})), False)
check('Heartbeat renewal extends beyond schedule-to-close timeout', solve(dict(r, **{'absolute_deadline': [21, 20]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'heartbeat_attempt': [3, 4], 'heartbeat_expiry': [10, 10], 'progress_monotonic': [18, 19], 'payload_limit': ['abcd', 3], 'absolute_deadline': [21, 20]}
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 previous activity attempt keeps the new attempt alive | False | False | Passed |
| A heartbeat resurrects an activity after its timeout | False | False | Passed |
| A late heartbeat regresses the resumable progress marker | False | False | Passed |
| Heartbeat detail exceeds durable history payload limits | False | False | Passed |
| Heartbeat renewal extends beyond schedule-to-close timeout | 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 / 17faf5851470c09d2cd3cc35e2833b151f77e5265564ef5154be3d777697bd23
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:37:01.484914+00:00.
Case digest / f06ecb9bd38b770311957644a131105cb246e6a23f2f3f9276ed125c29fec548