)]}'
{
  "commit": "6ce7840252cfe2b4ba4484007d0c1c1650d1196d",
  "tree": "d17dca40c82bdd9c42197cf3cb26d18319c47b14",
  "parents": [
    "44ec76f189dc433c8a0291c5d60e62fada605eb7"
  ],
  "author": {
    "name": "Pierre Gergondet",
    "email": "pierre.gergondet@woven.toyota",
    "time": "Tue Jun 16 23:08:41 2026 +0900"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Jun 16 14:08:41 2026 +0000"
  },
  "message": "fix(coverage): handle nested coverage collection (#3823)\n\nWe discovered that when a py_test invokes py_binary, coverage\ninformation collected by those binaries is lost and only the coverage of\nthe test itself appears.\n\nIt turns out that each binary writes to the same coverage file and only\nthe last one is included in the report.\n\nThis PR makes the lcov_path unique, ensuring the coverage is collected\nfor every binary that might be launched in such a setup.\n\nI have setup\nhttps://github.com/gergondet-woven/repro-rules_python-coverage-issue to\nshow the issue.\n\nIn this repo, a py_binary is launched through a py_test and we would\nexpect coverage information generated by the binary to surface in the\ncoverage report but it doesn\u0027t with the current release:\n\nBefore the patch:\n\n```\n# Generate coverage information\nbazel coverage --combined_report\u003dlcov //...\n# Generate the report\ngenhtml --ignore-errors category --branch-coverage --output ~/genhtml \"$(bazel info output_path)/_coverage/_coverage_report.dat\"\n# (snip)\nOverall coverage rate:\n  lines......: 30.0% (3 of 10 lines)\n# Looking into the report, neither coverage for the library function\n# called by the binary nor the binary code itself is collected\n```\n\nAfter applying the patch:\n\n```\nOverall coverage rate:\n  lines......: 100.0% (11 of 11 lines)\n```\n\nHowever, I am not sure how/if this can be properly tested within\nrules_python itself.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f431cd995e634a19b1c7a3dca595d7a70e1c4ed8",
      "old_mode": 33188,
      "old_path": "CHANGELOG.md",
      "new_id": "7efdd663122047d89a5a3010513215ca4f6fff8f",
      "new_mode": 33188,
      "new_path": "CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "c4326bc026413f2277f7b94881816a1cc76216fb",
      "old_mode": 33188,
      "old_path": "python/private/stage2_bootstrap_template.py",
      "new_id": "a66b6428b067c81bab6d14775ca733db69425330",
      "new_mode": 33188,
      "new_path": "python/private/stage2_bootstrap_template.py"
    }
  ]
}
