)]}'
{
  "commit": "cf828825aab6a0426a032105210584e7b5872e2f",
  "tree": "60c19a30a4c133a2fe8671713416c5049bbc520c",
  "parents": [
    "a476005ea860a4269994d3e92439a9440ecc84e4"
  ],
  "author": {
    "name": "Ignas Anikevicius",
    "email": "240938+aignas@users.noreply.github.com",
    "time": "Sun Nov 08 21:06:17 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sun Nov 08 21:06:17 2026 +0000"
  },
  "message": "test(coverage): check the coverage collection with the bundled coverage tool (#4417)\n\ntest(coverage): check the coverage collection with the bundled coverage\ntool\n\nBefore this change the coverage collection was only exercised by running\n`bazel coverage` on a few targets in CI and the collected data was not\nchecked.\n\nThis adds tests that run as part of `bazel test`. A `py_reconfig_test`\nis\nbuilt with `--collect_code_coverage` for a Python 3.12 toolchain that\nhas the\nbundled coverage tool configured, and `coverage_collection_test` runs it\nonce\nwith the same environment variables that `bazel coverage` sets. The\nseparate\ntest cases then check the produced lcov file, e.g. that the executed\nlines are\ncovered, that a skipped branch, an uncalled function and an uncalled\nmethod\nare not covered, that the `if` statement has partial branch coverage and\nthat\nthe instrumented files are reported with relative paths.\n\n* Adds the `collect_code_coverage` attribute to `py_reconfig_*` rules.\n* Configures the bundled coverage tool for the Python 3.12.16 dev\ntoolchain.\nA full version is used so that it does not shadow the toolchains that\nare\n  checked in `//tests/toolchains`.\n\nWork towards #3902",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "985bf352f683493d3cb6319e2239d2f06ad89d6a",
      "old_mode": 33188,
      "old_path": "MODULE.bazel",
      "new_id": "df1326d4788e158ec0ab5123441573a4ca2ce0e8",
      "new_mode": 33188,
      "new_path": "MODULE.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b578e856574a9d2198865f783366759241e7c480",
      "new_mode": 33188,
      "new_path": "tests/coverage/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2baad9b03e7a21a42ed73a0f8f2837109d375b0e",
      "new_mode": 33188,
      "new_path": "tests/coverage/coverage_collection_test.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "11642e8ecee01673f16a793b9d308bffe87ebf3c",
      "new_mode": 33188,
      "new_path": "tests/coverage/instrumented.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3443fff495758018ea421320fb3fb02523febcbc",
      "new_mode": 33188,
      "new_path": "tests/coverage/lib.py"
    },
    {
      "type": "modify",
      "old_id": "9bbfdb1104fca96089017ae830849588c38d2057",
      "old_mode": 33188,
      "old_path": "tests/support/py_reconfig.bzl",
      "new_id": "64a4e14dddad1c2ab18c170998fc708555505b9a",
      "new_mode": 33188,
      "new_path": "tests/support/py_reconfig.bzl"
    }
  ]
}
