FA-1336 / Workflow orchestration / Open access
Renew a durable activity heartbeat: A late heartbeat regresses the resumable progress marker · case 01
The workflow heartbeat operation is admitted even though a late heartbeat regresses the resumable progress marker.
ROOT CAUSE
The admission path omits the progress monotonic invariant while validating the other operation preconditions.
THE FAILURE
The admission path omits the progress monotonic invariant while validating the other operation preconditions.
Unsuccessful approach: Adding the progress monotonic check repairs the reported defect, but replacing the adjacent payload limit 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 (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 | True | False | Failed |
| 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 / a6f2d0c8c5fb1ec46a2bc80211f59a22ed46575af0f958e35b1eb9e6d6465fd5
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 (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
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 9 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.486209+00:00.
Case digest / 46f41781912172c69426eba10ff9b69470c7689eeb20887db6412bee116ae975