This is the one we went after. Our agents have to run tsc, lint and the unit tests before they push (it's in a hook), and CI was then doing all three again from scratch. Now the agent records what it ran as a git trailer on the commit and the PR build skips those steps [1]. Anything headed to main still runs everything, so the trailer only has to be trusted on the intermediate pushes.
Builds went from ~10 minutes to 1.5 over a few weeks, and a good third/half of that was this change. It tends to compound too - getting the build time down led to lower contention, warmer caches, faster throughput. All the usual queuing theory stuff.
We love Buck2 and Bazel, from first principles. Unfortunately, the DX hurdles of make a codebase hermetic have prevented widespread adoption.
I maintain witness.dev (CNCF) and cilock.dev (Apache 2.0 open core) that builds provenance around SDLC (or ADLC steps). We are experimenting using this to just let the agents land code after they prove their testing. Right now we are expecting a 2x increase in throughput at the same amount of compute
Three things matter.
1 -- How many non-conflicting changes can actually be made at one time (Fan Out)
2 -- How long a critical path takes
3 -- How many times you have to run that critical path. Most orgs run it 2-3x, once before the PR in the agent loop, once in CI, and another in the MQ
This is why most orgs cant get past about 12 PRs an hour.