FA-1401 / Concurrency / Open access
Release a distributed generation barrier: A barrier opens before enough distinct participants arrive · case 01
The barrier release operation is admitted even though a barrier opens before enough distinct participants arrive.
ROOT CAUSE
The admission path omits the participant count invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require len(set(r['participant_count'][0])) >= r['participant_count'][1] together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the participant count check repairs the reported defect, but replacing the adjacent generation match check loses that independent invariant.
Case contract
Return a Boolean admission decision for release a distributed generation barrier. The record r must satisfy all of: len(set(r['participant_count'][0])) >= r['participant_count'][1]; all(x == r['generation_match'][0] for x in r['generation_match'][1]); set(r['registered_members'][0]) <= set(r['registered_members'][1]); r['barrier_not_broken'] is False; r['release_persisted'] is True. Extra tracing fields are ignored; validation does not mutate the record.
Why this case matters
A deterministic local contract for concurrency. 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 (all(x == r['generation_match'][0] for x in r['generation_match'][1])) and (set(r['registered_members'][0]) <= set(r['registered_members'][1])) and (r['barrier_not_broken'] is False) and (r['release_persisted'] is True)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'participant_count': [['a', 'b'], 2], 'generation_match': [3, [3, 3]], 'registered_members': [['a', 'b'], ['a', 'b', 'c']], 'barrier_not_broken': False, 'release_persisted': True}
check('valid operation', solve(r), True)
check('A barrier opens before enough distinct participants arrive', solve(dict(r, **{'participant_count': [['a', 'a'], 2]})), False)
check('Arrivals from another barrier round count toward this round', solve(dict(r, **{'generation_match': [3, [2, 3]]})), False)
check('Unregistered arrivals manufacture barrier completion', solve(dict(r, **{'registered_members': [['a', 'x'], ['a', 'b', 'c']]})), False)
check('A failed barrier round is released as successful', solve(dict(r, **{'barrier_not_broken': True})), False)
check('Waiters proceed before the generation release is durable', solve(dict(r, **{'release_persisted': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'participant_count': [['a', 'a'], 2], 'generation_match': [3, [2, 3]], 'registered_members': [['a', 'x'], ['a', 'b', 'c']], 'barrier_not_broken': True, 'release_persisted': 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 barrier opens before enough distinct participants arrive | True | False | Failed |
| Arrivals from another barrier round count toward this round | False | False | Passed |
| Unregistered arrivals manufacture barrier completion | False | False | Passed |
| A failed barrier round is released as successful | False | False | Passed |
| Waiters proceed before the generation release is durable | 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 / 74ff45cb4612a152a89aa6192314a73f89fb51d348b1a54e6b476f1fa679a91e
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (len(set(r['participant_count'][0])) >= r['participant_count'][1]) and (set(r['registered_members'][0]) <= set(r['registered_members'][1])) and (r['barrier_not_broken'] is False) and (r['release_persisted'] is True)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'participant_count': [['a', 'b'], 2], 'generation_match': [3, [3, 3]], 'registered_members': [['a', 'b'], ['a', 'b', 'c']], 'barrier_not_broken': False, 'release_persisted': True}
check('valid operation', solve(r), True)
check('A barrier opens before enough distinct participants arrive', solve(dict(r, **{'participant_count': [['a', 'a'], 2]})), False)
check('Arrivals from another barrier round count toward this round', solve(dict(r, **{'generation_match': [3, [2, 3]]})), False)
check('Unregistered arrivals manufacture barrier completion', solve(dict(r, **{'registered_members': [['a', 'x'], ['a', 'b', 'c']]})), False)
check('A failed barrier round is released as successful', solve(dict(r, **{'barrier_not_broken': True})), False)
check('Waiters proceed before the generation release is durable', solve(dict(r, **{'release_persisted': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'participant_count': [['a', 'a'], 2], 'generation_match': [3, [2, 3]], 'registered_members': [['a', 'x'], ['a', 'b', 'c']], 'barrier_not_broken': True, 'release_persisted': 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 barrier opens before enough distinct participants arrive | False | False | Passed |
| Arrivals from another barrier round count toward this round | True | False | Failed |
| Unregistered arrivals manufacture barrier completion | False | False | Passed |
| A failed barrier round is released as successful | False | False | Passed |
| Waiters proceed before the generation release is durable | 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 / b75451676d0dc9bcdc5b71a9533b6cfa8b508139fd24e8f76ca910a1f2d03653
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (len(set(r['participant_count'][0])) >= r['participant_count'][1]) and (all(x == r['generation_match'][0] for x in r['generation_match'][1])) and (set(r['registered_members'][0]) <= set(r['registered_members'][1])) and (r['barrier_not_broken'] is False) and (r['release_persisted'] is True)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'participant_count': [['a', 'b'], 2], 'generation_match': [3, [3, 3]], 'registered_members': [['a', 'b'], ['a', 'b', 'c']], 'barrier_not_broken': False, 'release_persisted': True}
check('valid operation', solve(r), True)
check('A barrier opens before enough distinct participants arrive', solve(dict(r, **{'participant_count': [['a', 'a'], 2]})), False)
check('Arrivals from another barrier round count toward this round', solve(dict(r, **{'generation_match': [3, [2, 3]]})), False)
check('Unregistered arrivals manufacture barrier completion', solve(dict(r, **{'registered_members': [['a', 'x'], ['a', 'b', 'c']]})), False)
check('A failed barrier round is released as successful', solve(dict(r, **{'barrier_not_broken': True})), False)
check('Waiters proceed before the generation release is durable', solve(dict(r, **{'release_persisted': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'participant_count': [['a', 'a'], 2], 'generation_match': [3, [2, 3]], 'registered_members': [['a', 'x'], ['a', 'b', 'c']], 'barrier_not_broken': True, 'release_persisted': 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 barrier opens before enough distinct participants arrive | False | False | Passed |
| Arrivals from another barrier round count toward this round | False | False | Passed |
| Unregistered arrivals manufacture barrier completion | False | False | Passed |
| A failed barrier round is released as successful | False | False | Passed |
| Waiters proceed before the generation release is durable | 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 / ec2f5589925fcf90ce901282dc6b368cd1f22af30a3e988b8b9c2d3bd9e8c311
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:02.130468+00:00.
Case digest / 9786f1a0906dbb94a31ff36e086e9d9bcdbc03a920f72587b6ccdb942e42d78d