)]}'
{
  "commit": "fcbb41263690ddec3c6aa83fac337baf5ed8036a",
  "tree": "678791e32f27c4ca9390326aea1e78b1619c87f6",
  "parents": [
    "e4cf762fa488b6f92b108d8abedd3c0e1df1a76f"
  ],
  "author": {
    "name": "Ian (Hee) Cha",
    "email": "heec@google.com",
    "time": "Fri Aug 28 22:06:05 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Aug 28 22:06:05 2026 +0000"
  },
  "message": "[9.3.0] Report each top-level node to the progress receiver only once (https:… (#30918)\n\n…//github.com/bazelbuild/bazel/pull/30734)\n\n`ParallelEvaluator#doMutatingEvaluation` classifies the requested\ntop-level keys with `addReverseDepAndCheckIfDone` and schedules them in\nthe same loop. Scheduling starts concurrent evaluation, so a key the\nloop has not reached yet can be built as a dependency of an already\nscheduled one. When the loop does reach it, it observes `DONE` and hands\nit to `informProgressReceiverThatValueIsDone`, which reports it to the\nprogress receiver a second time -- the first report having come from\n`SkyFunctionEnvironment#commitAndGetParents` when the node was actually\nbuilt.\n\nWhether a given key takes that path is a race between the main thread\nand the evaluator threads, so the double report is intermittent.\n\nThis is not confined to tests.\n`SkyframeBuildView.ActionLookupValueProgressReceiver#evaluated` counts\nevery call whose state is `SUCCESS_VERSION_CHANGED`, and the second\nreport qualifies: a node built by this evaluation has a value version\nequal to the graph version, so `informProgressReceiverThatValueIsDone`\ncomputes `changed \u003d true`. The `configuredObjectCount` and\n`configuredTargetCount` behind `AnalysisPhaseCompleteEvent` -- the \"N\ntargets configured\" line and the corresponding BEP metrics -- are\ninflated by one for every top-level target that is also a dependency of\nanother top-level target and happens to be built first.\n\nThe fix records which keys were already done before anything is\nscheduled, so the loop can tell \"was done when this evaluation began\"\nfrom \"became done while this loop was running\". Only the former is\nreported, which is what the notification exists for; the latter has\nalready been reported by `commitAndGetParents`.\n\nFixes over-reporting of configured target counts, and fixes a flaky\ntest.\n\n\n`//src/test/java/com/google/devtools/build/lib/analysis/test:TrimTestConfigurationTest`\nfails on unmodified master roughly two thirds of the time locally (9/15\nat `e3c6211224`, 10/15 at `39055fdcc1`), always in\n`flagOffDifferentTestOptions_ResultsInDifferentCTs`:\n\n```\nIllegalStateException: Number of newly evaluated action lookup values 41\n  does not agree with number that changed in graph: 43\n```\n\nThat test requests `//test:native_shared_dep` and\n`//test:starlark_shared_dep` as top-level targets and they are also\ndependencies of earlier top-level targets in the same request, which is\nexactly the shape above. Instrumenting the receiver showed those two\nkeys, and only those two, reported twice, with the second report coming\nfrom `informProgressReceiverThatValueIsDone` on the main thread. Across\nruns, the number of second reports was 0 in every passing run and 2 in\nevery failing one.\n\nWith this change the test passes 20/20.\n\nNo\n\n- [x] I have added tests for the new use cases (if any).\n- [ ] I have updated the documentation (if applicable).\n\nRELNOTES: None\n\nCloses #30734.\n\nPiperOrigin-RevId: 967655660\nChange-Id: Ib5faaf98fe7f325ab0fbf8b12735456dbf361a90\n\n\u003c!--\nThank you for contributing to Bazel!\nPlease read the contribution guidelines: https://bazel.build/contribute\n--\u003e\n\n### Description\n\u003c!--\nPlease provide a brief summary of the changes in this PR.\n--\u003e\n\n### Motivation\n\u003c!--\nWhy is this change important? Does it fix a specific bug or add a new\nfeature?\nIf this PR fixes an existing issue, please link it here (e.g. \"Fixes\n#1234\").\n--\u003e\n\n### Build API Changes\n\u003c!--\nDoes this PR affect the Build API? (e.g. Starlark API, providers,\ncommand-line flags, native rules)\nIf yes, please answer the following:\n1. Has this been discussed in a design doc or issue? (Please link it)\n2. Is the change backward compatible?\n3. If it\u0027s a breaking change, what is the migration plan?\n--\u003e\n\nNo\n\n### Checklist\n\n- [ ] I have added tests for the new use cases (if any).\n- [ ] I have updated the documentation (if applicable).\n\n### Release Notes\n\n\u003c!--\nIf this is a new feature, please add \u0027RELNOTES[NEW]: \u003cdescription\u003e\u0027\nhere.\nIf this is a breaking change, please add \u0027RELNOTES[INC]: \u003creason\u003e\u0027 here.\nIf this change should be mentioned in release notes, please add\n\u0027RELNOTES: \u003creason\u003e\u0027 here.\n--\u003e\n\nRELNOTES: None\n\nCommit\nhttps://github.com/bazelbuild/bazel/commit/032b4bc20e1c58f66ee90cc0f94205b95346520f\n\nCo-authored-by: Fabian Meumertzheim \u003cfabian@meumertzhe.im\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "50d6c51f9feb4b4c03903dd628960f0fd33b3acc",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java",
      "new_id": "b260039ed9fcd2379d08433ee7311adf7d5085e0",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java"
    },
    {
      "type": "modify",
      "old_id": "4e3b2d694d53a109bcc4e2e07f996d25b27a0d92",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/skyframe/ParallelEvaluatorTest.java",
      "new_id": "226a9070bdde546cd5475a667e81db41f26ac6e7",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/skyframe/ParallelEvaluatorTest.java"
    }
  ]
}
