Undo Composition Event
undo_composition_eventPreview and apply the inverse of a lift or split event, refusing when model state has diverged; dry runs show the undo plan or refusal before confirmation.
Instructions
Preview, and on confirmation apply, the undo of a lift or split.
event_type is lift or split; event_id is the forward
lift_applied / split_applied activity event's id, or the
lift_id / split_id in its payload. model_id is the model the
event was raised on (another model's event is 404).
By default (dry_run=True) it is read-only: {plan, refusal}, exactly
one non-null. plan lists the inverse operations an undo would commit
(lift: tombstone the LCA entity, restore the source copies, rewrite CO
references; split: restore at the ancestor, tombstone the target
copies). refusal lists why it cannot: state has moved since the event
(assertions submitted on the entity, objectives referencing it, an
edit). Show it to the operator.
With dry_run=False it is mutating, after explicit confirmation: the
divergence check runs again (409 with detail.refusal.reasons when it
refuses), the inverse is persisted across every affected model, and a
lift_undone / split_undone event citing original_event_id is
recorded. Returns {undone_event_id, original_event_id, applied_state_ops, models}; models is {lca_model, source_descendant_models} for a lift and {ancestor_model, descendant_models} for a split.
503 where composition is not available.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| event_id | Yes | ||
| model_id | Yes | ||
| event_type | Yes | ||
| server_version | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||