{
"name": "current-message-reparents-to-last-reference",
"description": "The current message replaces a prior inferred parent with the parent implied by its last reference.",
"spec": {
"source": "RFC 5256",
"url": "https://www.rfc-editor.org/rfc/rfc5256",
"behavior": "when linking the current message to the last reference, break any existing parent/child link before creating the new correct one"
},
"input": [
{
"id": "reparent-descendant",
"message_id": "<reparent-descendant@example>",
"in_reply_to": null,
"references": [
"<wrong-parent@example>",
"<reparent-child@example>"
],
"subject": "Re: Correct parent",
"date": "2026-05-15T09:10:00Z"
},
{
"id": "reparent-child",
"message_id": "<reparent-child@example>",
"in_reply_to": null,
"references": [
"<right-parent@example>"
],
"subject": "Re: Correct parent",
"date": "2026-05-15T09:05:00Z"
},
{
"id": "right-parent",
"message_id": "<right-parent@example>",
"in_reply_to": null,
"references": [],
"subject": "Correct parent",
"date": "2026-05-15T09:00:00Z"
}
],
"expected": {
"threads": [
{
"root": "right-parent",
"messages": [
"right-parent",
"reparent-child",
"reparent-descendant"
]
}
]
}
}