FA-42230 / Listener lifecycle / Member archive
Beginning an inner batch overwrites its checkpoint with zero · case 05
Beginning an inner batch overwrites its checkpoint with zero; the returned lifecycle plan violates the stated transition contract.
Case contract
Plan batched observer publication. A batch holds until threshold or explicit flush, publishes at most threshold values, and preserves the unconsumed suffix. Nested batch scopes publish only at depth zero. An exception rolls back only the current batch checkpoint. Empty batches do not notify; a final partial batch publishes only when partial delivery is allowed. Acknowledgement notifications deduplicate pending batch IDs in first-occurrence order and exclude IDs already acknowledged. Inputs are finite state snapshots, including transitional and stale states; output fields are the exact independent actions/metadata defined by the corrected expression table. Numeric fixture capacities and counts vary with N. Field definitions, each independently computed from the input snapshot: ready = len(s['values'])>=s['threshold']; publish = s['depth']==0 and bool(s['values']) and (len(s['values'])>=s['threshold'] or s['flush'] or (s['final'] and s['partial'])); head = s['values'][:s['threshold']]; tail = s['values'][s['threshold']:]; rollback = s['values'][:s['checkpoint']] if s['error'] else list(s['values']); depth = max(0,s['depth']+int(s['begin'])-int(s['end'])); partial_drop = s['final'] and not s['partial'] and 0<len(s['values'])<s['threshold']; new_checkpoint = len(s['values']) if s['begin'] else s['checkpoint']; unmatched_end = s['end'] and s['depth']==0; empty_flush = list(dict.fromkeys(x for x in s['batch_ids'] if x not in s['acknowledged']))
Why this case matters
Observer implementations need to preserve this state while subscriptions enter, execute, and leave their lifecycle.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| transition 0 | {"depth": 15, "empty_flush": ["b", "a"], "head": ["a"], "new_checkpoint": 0, "partial_drop": false, "publish": false, "ready": true, "rollback": [], "tail": ["b", "c"], "unmatched_end": false} | {"depth": 15, "empty_flush": ["b", "a"], "head": ["a"], "new_checkpoint": 3, "partial_drop": false, "publish": false, "ready": true, "rollback": [], "tail": ["b", "c"], "unmatched_end": false} | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗