)]}'
{
  "commit": "6dfb9f5f7256023344ac32f665067765431af021",
  "tree": "f2991ccdcc3092cfc3684547879fa7c79bedf0ae",
  "parents": [
    "6ab54da08a1d85c70c93b8fb1ae09a645c61d323"
  ],
  "author": {
    "name": "Fabian Meumertzheim",
    "email": "fabian@meumertzhe.im",
    "time": "Thu Jun 25 20:42:43 2026 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Jun 25 18:42:43 2026 +0000"
  },
  "message": "[9.2.0] remote: trust in-memory outputs across incremental builds (#30005)\n\nModified from the original via:\n* using a distinct version for the action cache that can\u0027t collide with\nfuture versions at HEAD\n* including\nhttps://github.com/bazelbuild/bazel/commit/741ee016bd45aa3df7ea8dde109e2fe3d0b5e972\n(see https://github.com/bazelbuild/bazel/issues/29976 for context)\n\nOriginal commit message follows:\n\nIn-memory outputs (--experimental_inmemory_{dotd,jdeps}_files) are kept\nonly in memory and never written to disk. shouldTrustMetadata() gates\ntrust of a remote output\u0027s metadata on shouldDownloadOutput(), which\nunder --remote_download_outputs\u003dall is unconditionally true, so an\nin-memory output\u0027s still-alive remote metadata is distrusted and its\naction is re-executed on every incremental build (e.g. every CppCompile,\nwhich emits a .d, and every Java compile, which emits a .jdeps): the\naction re-executes, hits the remote cache, and re-downloads its outputs,\nturning a no-op build into a full re-validation pass.\n\nThis is a regression from #27291, which moved these outputs from on-disk\n(local, always trusted) to in-memory (remote) metadata.\n\nAn in-memory output is indistinguishable from an ordinary remote output\nthat an earlier build left unmaterialized (e.g. under\n--remote_download_outputs\u003dminimal): both are remote with no contents\nproxy. So mark in-memory outputs when their metadata is injected, carry\nthe bit through the action cache (bumping its version), and trust a\nmarked output via its TTL in shouldTrustMetadata(). This is read from\nthe metadata alone, so it holds in both ActionCacheChecker and\nFilesystemValueChecker, and on a cold server. Ordinary unmaterialized\nremote outputs stay unmarked and are still re-fetched, so switching to\n--remote_download_outputs\u003dall correctly materializes them.\n\nThe regression test covers a warm rebuild, a rebuild after a server\nrestart, and the minimal -\u003e all transition. Also manually tested with a\nfull Chromium build - the second build with a warm server went from\nre-executing 72k compile actions in ~216s down to ~0.9s with 0 actions.\nVerified again with a cold server, which also re-ran 0 actions.\n\nFixes #29313\n\nRELNOTES: None\n\nCloses #29993.\n\nPiperOrigin-RevId: 937976000\nChange-Id: I1fb24ae4db407101ebb4f4c203f258bd7c15f51f\n(cherry picked from commit 4c929580dc50a02398fde9a0c9046bd8bf982960)\n\nFixes #29995\n\nCo-authored-by: Philipp Wollermann \u003cphilwo@google.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9704a2c05fac14329a8ee3514e998e1cd53a7225",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/actions/FileArtifactValue.java",
      "new_id": "7385e69e8d6f0527cba8768ca81ea20dd457abb3",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/actions/FileArtifactValue.java"
    },
    {
      "type": "modify",
      "old_id": "ed4fe5c787913d9fce70f10fd207eab028e8a5f7",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/actions/cache/CompactPersistentActionCache.java",
      "new_id": "9f788157277bc9401140bab70b6909c2561b24e9",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/actions/cache/CompactPersistentActionCache.java"
    },
    {
      "type": "modify",
      "old_id": "6e083a2485c69cd55abee6a0c1ba0cbc338f82a0",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/remote/RemoteActionFileSystem.java",
      "new_id": "ce2f03167d1e58e219ca94256d5b10ec644f4616",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/remote/RemoteActionFileSystem.java"
    },
    {
      "type": "modify",
      "old_id": "b422a16ed4891ee83d74732c458fa1c93beb1b7f",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/remote/RemoteExecutionService.java",
      "new_id": "16c07c1ec1e1388c1574cac6056264b1f972572d",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/remote/RemoteExecutionService.java"
    },
    {
      "type": "modify",
      "old_id": "466d72ac2ddde3a49902e281f0716833a7a4ec58",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/remote/RemoteExternalOverlayFileSystem.java",
      "new_id": "1e8b482a6e13afa1158fa340eacad127eb975b0d",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/remote/RemoteExternalOverlayFileSystem.java"
    },
    {
      "type": "modify",
      "old_id": "eadfef41c38f95ed5004306eff58819170848195",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/remote/RemoteOutputChecker.java",
      "new_id": "3e73d4257526ebdd928a49751b50265afbcdf8db",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/remote/RemoteOutputChecker.java"
    },
    {
      "type": "modify",
      "old_id": "e1c1bc9db04efea3079c65cfcd7f5a2b5f3a5e03",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java",
      "new_id": "974243d7d688279532025653afaf9edadeda0a2a",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java"
    },
    {
      "type": "modify",
      "old_id": "03cc0013360e2baf813412f710528da11bdaabc7",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java",
      "new_id": "03e665b568375372db6049e36f97d00ced1b2544",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java"
    },
    {
      "type": "modify",
      "old_id": "09c8393c810dba7ad943e19945130270dbd64c86",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/actions/ActionCacheCheckerTest.java",
      "new_id": "9cb16a6aa9c066b593a52c8186f7090dba4696c9",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/actions/ActionCacheCheckerTest.java"
    },
    {
      "type": "modify",
      "old_id": "8d2a82d8ff67a9cb3be102eaf47041764c1a27e3",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/actions/cache/CompactPersistentActionCacheTest.java",
      "new_id": "48a24365adcb7fb7cd20ce48bb27c9cc79a57509",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/actions/cache/CompactPersistentActionCacheTest.java"
    },
    {
      "type": "modify",
      "old_id": "9490510d970f08d02eba6b1922b71d942b4ea9bc",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/remote/ActionInputPrefetcherTestBase.java",
      "new_id": "1a3c590d60b8c22f604033b10e032155ea999e27",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/remote/ActionInputPrefetcherTestBase.java"
    },
    {
      "type": "modify",
      "old_id": "1660fca3cc1460b2059d6489916f4c3570ffc2be",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/remote/RemoteActionFileSystemTest.java",
      "new_id": "7f3c8839c2285fd67054f59e7b28c6267572343a",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/remote/RemoteActionFileSystemTest.java"
    },
    {
      "type": "modify",
      "old_id": "8d6b3cfa0d96e301bf0d8f173f1d235e46cbf05e",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/skyframe/FileArtifactValueTest.java",
      "new_id": "7ba7765eb4e530920b422d61846455115f69b4c5",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/skyframe/FileArtifactValueTest.java"
    },
    {
      "type": "modify",
      "old_id": "bc79baf5dcb3f6e5bad0a0d9d64adee6ea904306",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/skyframe/FilesystemValueCheckerTest.java",
      "new_id": "45abdcb776d9025d0fcf0dbb6994a73b499c31cc",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/skyframe/FilesystemValueCheckerTest.java"
    },
    {
      "type": "modify",
      "old_id": "a806859db08aa9268753d065ed2e22d6c0655898",
      "old_mode": 33261,
      "old_path": "src/test/shell/bazel/remote/build_without_the_bytes_test.sh",
      "new_id": "94bf9efc12109dc8efd47f9fcbb8e1f262d31208",
      "new_mode": 33261,
      "new_path": "src/test/shell/bazel/remote/build_without_the_bytes_test.sh"
    }
  ]
}
