FA-42367 / Listener lifecycle / Member archive
Rejected filtered events consume downstream demand · case 02
Rejected filtered events consume downstream demand; the returned lifecycle plan violates the stated transition contract.
Case contract
Plan a predicate-filter observer stage. The predicate index counts every upstream value, including rejected values. Predicate errors become error notifications and never value notifications. Falsey input values remain valid data. Rejection does not consume downstream credit; an active filtered stage replaces one upstream request when a value is rejected. Predicate evaluation stops after termination. A stipulated pre-predicate type guard records [valid,payload]; only valid entries invoke user code, and falsey valid payloads remain eligible. Evaluate predicate callbacks left-to-right through the first false result inclusive, then stop; return evaluated callback indices. 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: predicate_index = [r[1] for r in s['guarded_inputs'] if r[0]]; input_index = s['input_index']+int(s['has_value']); output_index = s['output_index']+int(s['has_value'] and s['accepted'] and s['predicate_error'] is None and not s['closed']); value = [s['value']] if s['has_value'] and s['accepted'] and s['predicate_error'] is None and not s['closed'] else []; error = s['predicate_error'] if s['has_value'] and not s['closed'] else None; credit = max(0,s['credit']-int(s['has_value'] and s['accepted'] and s['predicate_error'] is None)); replace_request = s['has_value'] and not s['accepted'] and s['predicate_error'] is None and not s['closed'] and s['upstream_active']; evaluate = list(range(next((i+1 for i,result in enumerate(s['predicate_chain']) if not result),len(s['predicate_chain'])))); terminal = s['closed'] or (s['has_value'] and s['predicate_error'] is not None); predicate_result = None if s['predicate_error'] is not None else s['accepted']
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 | {"credit": 0, "error": "bad", "evaluate": [0, 1], "input_index": 1, "output_index": 0, "predicate_index": [0, "ok"], "predicate_result": null, "replace_request": false, "terminal": true, "value": []} | {"credit": 1, "error": "bad", "evaluate": [0, 1], "input_index": 1, "output_index": 0, "predicate_index": [0, "ok"], "predicate_result": null, "replace_request": false, "terminal": true, "value": []} | 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 ↗