FA-42287 / Listener lifecycle / Member archive
Rolling back an inner savepoint erases its parent observer changes · case 02
Rolling back an inner savepoint erases its parent observer changes; the returned lifecycle plan violates the stated transition contract.
Case contract
Plan observer notifications around a local state transaction. Pending changes become visible only after successful outermost commit. Rollback restores the prior published revision. Change records [field,old,new] with equal endpoints are suppressed; repeated fields keep the earliest old and latest new in input order. Observer errors do not roll back an already committed state. An inner savepoint contributes child changes only on commit without rollback; parent changes survive every child outcome. Committed observer failures are [registration_position,error] records and report in stable registration order, retaining arrival order for a tied position. 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: visible = s['committed'] and not s['rollback'] and s['depth']==0; changed = [r for r in s['changes'] if r[1]!=r[2]]; first_old = {k:next(r[1] for r in s['changes'] if r[0]==k) for k in dict.fromkeys(r[0] for r in s['changes'])}; last_new = {r[0]:r[2] for r in s['changes']}; order = list(dict.fromkeys(r[0] for r in s['changes'])); revision = s['published'] if s['rollback'] else s['revision']; state_rollback = s['rollback'] and not s['committed']; notify_error = sorted(s['observer_failures'],key=lambda r:r[0]); publish_durable = s['committed'] and s['durable'] and not s['rollback']; deferred = list(s['parent_changes'])+(list(s['child_changes']) if s['child_commit'] and not s['child_rollback'] else [])
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 | {"changed": [["x", 1, 4], ["x", 4, 6]], "deferred": ["parent", "child"], "first_old": {"x": 1, "y": 8}, "last_new": {"x": 6, "y": 8}, "notify_error": [[0, "z"], [1, "m"], [4, "a"]], "order": ["x", "y"], "publish_durable": false, "revision": 4, "state_rollback": false, "visible": false} | {"changed": [["x", 1, 4], ["x", 4, 6]], "deferred": ["parent"], "first_old": {"x": 1, "y": 8}, "last_new": {"x": 6, "y": 8}, "notify_error": [[0, "z"], [1, "m"], [4, "a"]], "order": ["x", "y"], "publish_durable": false, "revision": 4, "state_rollback": false, "visible": 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 ↗