{
  "id": "#1064",
  "pr": 1064,
  "title": "perf: dual replace",
  "merged": "2026-01-19",
  "after_ultra_release": false,
  "known": [],
  "provider": "tokenfactory",
  "targets": [
    {
      "target": "packaging.utils:canonicalize_name",
      "image": "bfdb727b-8008-42aa-8523-32888cb60192",
      "backend": "contree",
      "run_id": "adj-1064-788a4e",
      "samples": 3,
      "usd": 0.067,
      "verdicts": [
        {
          "signature": "P1|value|differs|non-ascii",
          "label": "likely-bug",
          "votes": {
            "likely-bug": 2,
            "intended": 1
          },
          "rationale": "The PR is titled a performance improvement with no intent to change Unicode handling; no tests/docs were updated.",
          "evidence": [
            "perf: dual replace",
            "Much faster than re, and even faster than str.translate",
            "None: this PR changes no tests, docs or changelog.",
            "Emulates ``re.sub(r'[-_.]+', '-', name).lower()`` from PEP 503",
            "# Much faster than re, and even faster than str.translate"
          ],
          "rejected": [],
          "reason": "",
          "known": [],
          "facts": "Output `value` differs. Input [\"Á\"]: base gives \"Á\", head gives \"á\"."
        },
        {
          "signature": "P1|value|differs|non-ascii+whitespace",
          "label": "likely-bug",
          "votes": {
            "likely-bug": 2,
            "intended": 1
          },
          "rationale": "Same unintended Unicode lower‑casing introduced by the performance refactor.",
          "evidence": [
            "perf: dual replace",
            "Much faster than re, and even faster than str.translate",
            "None: this PR changes no tests, docs or changelog.",
            "Emulates ``re.sub(r'[-_.]+', '-', name).lower()`` from PEP 503",
            "# Much faster than re, and even faster than str.translate"
          ],
          "rejected": [],
          "reason": "",
          "known": [],
          "facts": "Output `value` differs. Input [\"Á \"]: base gives \"Á \", head gives \"á \"."
        },
        {
          "signature": "P1|value|differs|control+non-ascii",
          "label": "likely-bug",
          "votes": {
            "likely-bug": 2,
            "intended": 1
          },
          "rationale": "Null character unchanged but preceding letter lower‑cased, an accidental side‑effect of the new implementation.",
          "evidence": [
            "perf: dual replace",
            "Much faster than re, and even faster than str.translate",
            "None: this PR changes no tests, docs or changelog.",
            "Emulates ``re.sub(r'[-_.]+', '-', name).lower()`` from PEP 503",
            "# Much faster than re, and even faster than str.translate"
          ],
          "rejected": [],
          "reason": "",
          "known": [],
          "facts": "Output `value` differs. Input [\"Á\\u0000\"]: base gives \"Á\\u0000\", head gives \"á\\u0000\"."
        },
        {
          "signature": "P3|gt|False|True",
          "label": "likely-bug",
          "votes": {
            "likely-bug": 2,
            "intended": 1
          },
          "rationale": "Ordering changed because Unicode letters are now lower‑cased, not intended by the perf‑only PR.",
          "evidence": [
            "perf: dual replace",
            "Much faster than re, and even faster than str.translate",
            "None: this PR changes no tests, docs or changelog.",
            "Emulates ``re.sub(r'[-_.]+', '-', name).lower()`` from PEP 503",
            "# Much faster than re, and even faster than str.translate"
          ],
          "rejected": [],
          "reason": "",
          "known": [],
          "facts": "Relation `a > b` differs for a = target(*[\"Á\"]), b = target(*[\"ẞ\"]): base False, head True."
        },
        {
          "signature": "P3|gt|True|False",
          "label": "likely-bug",
          "votes": {
            "likely-bug": 2,
            "intended": 1
          },
          "rationale": "Relation flipped due to unintended case folding of non‑ASCII characters.",
          "evidence": [
            "perf: dual replace",
            "Much faster than re, and even faster than str.translate",
            "None: this PR changes no tests, docs or changelog.",
            "Emulates ``re.sub(r'[-_.]+', '-', name).lower()`` from PEP 503",
            "# Much faster than re, and even faster than str.translate"
          ],
          "rejected": [],
          "reason": "",
          "known": [],
          "facts": "Relation `a > b` differs for a = target(*[\"ẞ\"]), b = target(*[\"Ω\"]): base True, head False."
        },
        {
          "signature": "P3|lt|True|False",
          "label": "likely-bug",
          "votes": {
            "likely-bug": 2,
            "intended": 1
          },
          "rationale": "Same root cause: lower() now affects Unicode, altering comparison results.",
          "evidence": [
            "perf: dual replace",
            "Much faster than re, and even faster than str.translate",
            "None: this PR changes no tests, docs or changelog.",
            "Emulates ``re.sub(r'[-_.]+', '-', name).lower()`` from PEP 503",
            "# Much faster than re, and even faster than str.translate"
          ],
          "rejected": [],
          "reason": "",
          "known": [],
          "facts": "Relation `a < b` differs for a = target(*[\"Á\"]), b = target(*[\"ẞ\"]): base True, head False."
        },
        {
          "signature": "P3|lt|False|True",
          "label": "likely-bug",
          "votes": {
            "likely-bug": 2,
            "intended": 1
          },
          "rationale": "Comparison ordering changed unintentionally by the performance rewrite.",
          "evidence": [
            "perf: dual replace",
            "Much faster than re, and even faster than str.translate",
            "None: this PR changes no tests, docs or changelog.",
            "Emulates ``re.sub(r'[-_.]+', '-', name).lower()`` from PEP 503",
            "# Much faster than re, and even faster than str.translate"
          ],
          "rejected": [],
          "reason": "",
          "known": [],
          "facts": "Relation `a < b` differs for a = target(*[\"ẞ\"]), b = target(*[\"Ω\"]): base False, head True."
        }
      ]
    }
  ]
}