On Thu, Aug 15, 2024 at 9:33 AM Peter Eisentraut <pe...@eisentraut.org> wrote: > But a more serious concern here is that the patches created by the cfbot > are not canonical. There are various heuristics when they get applied.
It's true that the code required for CFBot to simply apply a patch is nontrivial. We're accounting for various edge-cases, and soldiering on, where we deem that it makes sense. I'm referring to those cases where "git am" won't work perfectly, but we have a pretty good chance of successfully generating what the patch author intended (I assume that that's what you meant by "heuristics"). One reason why this works better than might be expected is because...we then test the result (that's the whole point, of course). Obviously, if we apply a patch in a way that isn't quite perfectly clean (according to whatever the "git am" criteria is), but that CFBot is nevertheless capable of applying, and we then find that the end result passes all tests, that gives us a fairly strong signal. We can have high confidence that CFBot has done the right thing at that point. We can reasonably present the resulting feature branch as a "known good" usable version of the patch. Of course you can quibble with this. Fundamentally, a patch file can never be updated, but we want to apply it on top of a moving target (as best we can). We're always making some kind of trade-off. I just don't think that the heuristics that humans might choose to apply are necessarily much better on average. Humans are bad at routine boring things, but good at noticing and coping with special cases. > I would prefer that people work with the actual patches sent by email, > at least unless they know exactly what they are doing. We don't want to > create parallel worlds of patches that are like 90% similar but not > really identical. There's a reason why tech companies place so much emphasis on offering a "low friction experience". The aggregate effect on user/consumer behavior is huge. I'm not saying that this is good or bad (let's not get into that now); just that it is an empirical fact that people tend to behave like that. We want more reviewers. Why not try to meet people where they are a bit more? I have to admit that I think that I'd be far more likely to quickly test out a patch if I'm presented with a workflow that makes the setup as painless as possible. Particularly if I'm all but guaranteed to get a working Postgres server with the patch applied (which is possible when I'm building exactly the same feature branch as the one that passed CI by CFBot). I'm entirely willing to believe that it wouldn't work that way for you, but I'm confident that a lot of people are in the same camp as me. -- Peter Geoghegan