)]}'
{
  "commit": "5fe3666b5e09f613e1de3fe9b049510c6a79cf9a",
  "tree": "9fef29e78487bf92a1da1f0baa10fbe0709dc3f3",
  "parents": [
    "88e12538434fb9750a11f317899ab58d37c6f055"
  ],
  "author": {
    "name": "Richard Levasseur",
    "email": "richardlev@gmail.com",
    "time": "Thu Sep 03 07:13:13 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Sep 03 07:13:13 2026 +0000"
  },
  "message": "fix(bootstrap): remap stdlib sys.path entries to runfiles during site init (#4104)\n\nWhen CPython resolves interpreter symlinks during startup, it leaks\nunderlying repository cache or external repository paths into sys.path\nand sys prefixes instead of their runfiles locations.\n\nThis breaks runfiles isolation and prevents using a mixture of\ngenerated and non-generated files as part of the python runtime, as\nstandard library modules and runtime site-packages are loaded from\nlocations outside the runfiles tree.\n\nFix this by passing interpreter_actual_path into site_init_template.py\nduring virtual environment creation. During site initialization,\ncollect any non-runfiles sys prefixes into a set and remap matching\nsys.path entries, sys prefixes, and site.PREFIXES to the runfiles\nruntime root.\n\nAlso adds a reproduction test target\n(stdlib_symlink_syspath_bootstrap_script_test) to verify that sys.path\nentries remain within the runfiles tree.\n\nWork towards https://github.com/bazel-contrib/rules_python/issues/1653",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e30e6baeb58d53bbc7d7cba009ff12ee64d6fd24",
      "new_mode": 33188,
      "new_path": "news/4104.changed.md"
    },
    {
      "type": "modify",
      "old_id": "d6f01193ea91a445de4221d304ed9e23d9b91fde",
      "old_mode": 33188,
      "old_path": "python/private/py_executable.bzl",
      "new_id": "f7386ee353789b4a86fbfbe0f29ab5858a78bb78",
      "new_mode": 33188,
      "new_path": "python/private/py_executable.bzl"
    },
    {
      "type": "modify",
      "old_id": "c5a484813124a378c04212e948893b5f138ccc1d",
      "old_mode": 33188,
      "old_path": "python/private/site_init_template.py",
      "new_id": "4597deebb5b2d739524fd00e7eec06f33b0e6bb0",
      "new_mode": 33188,
      "new_path": "python/private/site_init_template.py"
    },
    {
      "type": "modify",
      "old_id": "89cd682a6acb0309b6d7ebe4cea1ea43c63fef9d",
      "old_mode": 33188,
      "old_path": "tests/bootstrap_impls/BUILD.bazel",
      "new_id": "2c4eae8d21f187877cc57d0b22c7d168c05a80f9",
      "new_mode": 33188,
      "new_path": "tests/bootstrap_impls/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a8b1dfadd756988e965977e5501e3080ad47541a",
      "new_mode": 33188,
      "new_path": "tests/bootstrap_impls/stdlib_symlink_syspath_test.py"
    }
  ]
}
