)]}'
{
  "commit": "47edd28f36f158f33a2c319d48f7759dc6d15c24",
  "tree": "a53b43c8106dfefd5b477e709751ed9dce939aa5",
  "parents": [
    "449754dcbbd64c9f09544131f67b207a4c042cb7"
  ],
  "author": {
    "name": "Ted Kaplan",
    "email": "tkaplan@roku.com",
    "time": "Tue Sep 08 08:28:26 2026 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Sep 08 16:28:26 2026 +0100"
  },
  "message": "fix: make Gradle resolver cache writes race-tolerant (#1615)\n\nWhen pinning a large dependency graph with resolver \u003d \"gradle\", the pin\naborted non-deterministically with FileAlreadyExistsException while\ncopying a freshly-downloaded artifact into the local cache. The failing\nartifact differed from run to run: whichever one lost a race between\nparallel downloader threads.\n\nFor the Gradle resolver, localRepository is the shared Gradle module\ncache, which the Gradle daemon and other worker threads write to\nconcurrently. Downloader.performDownload cached downloads with\nFiles.copy(REPLACE_EXISTING), which is not atomic: REPLACE_EXISTING only\nremoves a target present at check time, so a target created in the TOCTOU\nwindow makes the copy fail. A plain copy also lets another worker observe\na half-written cache file through the Files.exists check at the top of\nperformDownload.\n\nCache to a temp file in the destination directory, then atomically move\nit into place. These artifacts are content-addressed, so a destination\nanother writer already produced is success, and FileAlreadyExistsException\non the move is ignored.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "38d5e3bf77bee11cb1fe89c197e22505325c7845",
      "old_mode": 33188,
      "old_path": "private/tools/java/com/github/bazelbuild/rules_jvm_external/resolver/remote/Downloader.java",
      "new_id": "d28e89cac47f48fc3f806908d0c079a8d53c299f",
      "new_mode": 33188,
      "new_path": "private/tools/java/com/github/bazelbuild/rules_jvm_external/resolver/remote/Downloader.java"
    },
    {
      "type": "modify",
      "old_id": "79aecf73148b8a6b127df462989127f17951c18e",
      "old_mode": 33188,
      "old_path": "tests/com/github/bazelbuild/rules_jvm_external/resolver/maven/DownloaderTest.java",
      "new_id": "6eb448307f415906087343f1214ca66adcbac4d9",
      "new_mode": 33188,
      "new_path": "tests/com/github/bazelbuild/rules_jvm_external/resolver/maven/DownloaderTest.java"
    }
  ]
}
