20ad1a97 (2.1.7) created `cib__element_in_patchset()` to replace alert change detection. It has two major issues:
* It looks for `PCMK__XA_CIB_OP` when it's actually `PCMK_XA_OPERATION`
* It expects create operations to have the `PCMK_XA_PATH` of the created element but it's actually the parent
Example patchset:
```
<diff format="2">
<version>
<source admin_epoch="0" epoch="149" num_updates="93"/>
<target admin_epoch="0" epoch="150" num_updates="0"/>
</version>
<change operation="modify" path="/cib">
<change-list>
<change-attr name="epoch" operation="set" value="150"/>
<change-attr name="num_updates" operation="set" value="0
"/>
</change-list>
<change-result>
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4
.0" epoch="150" num_updates="0" admin_epoch="0" cib-last-written="Wed Aug 21 11:06:36 2024" have-quorum="1" update-origin="rhel9-2" update-client="root" update-user="root" dc-uu
id="2"/>
</change-result>
</change>
<change operation="create" path="/cib/configuration" positio
n="7">
<alerts>
<alert id="alert-1" path="/var/lib/pacemaker/notify.sh">
<recipient id="alert-1-recipient-1" value="/run/crm/pacemaker-alerts.log"/>
</alert>
</alerts>
</change>
</diff>
```
To do:
* Create a bunch of example patchsets (using the patchset code, not manually) for all possible syntax that patchsets can have
* Move `cib__element_in_patchset()` to lib/common/patchset.c
* Create unit tests for it using the example patchsets
* Fix the detection
* Merge in main then backport to 2.1
See also:
* [[https://issues.redhat.com/browse/RHEL-55458 | RHEL-55458]]