mail-threading 0.1.1

JWZ email threading (RFC 5256). Reconstruct message threads from References/In-Reply-To headers, with subject fallback for broken clients.
Documentation
{
  "name": "invalid-threading-headers-allow-subject-fallback",
  "description": "Malformed threading headers do not block subject fallback.",
  "spec": {
    "source": "RFC 5256",
    "url": "https://www.rfc-editor.org/rfc/rfc5256",
    "behavior": "invalid References are ignored before subject fallback considers whether a thread is header-backed"
  },
  "input": [
    {
      "id": "root",
      "message_id": "<subject-root@example>",
      "in_reply_to": null,
      "references": [],
      "subject": "Broken Headers",
      "date": "2026-05-15T09:00:00Z"
    },
    {
      "id": "malformed-reply",
      "message_id": "<malformed-reply@example>",
      "in_reply_to": "not-a-message-id",
      "references": [
        "also-not-a-message-id"
      ],
      "subject": "Re: Broken Headers",
      "date": "2026-05-15T09:05:00Z"
    }
  ],
  "expected": {
    "threads": [
      {
        "root": "root",
        "messages": [
          "root",
          "malformed-reply"
        ]
      }
    ]
  }
}