Okay I found the problem! It's a bug in the Python package
unidiff. I need to setup an Alpine box to upgrade the package version in sourcehut's package installs...
I haven't figured it out yet. It's not related to nginx: it just throws a 502 error when the proxy returns an empty response. I have no idea why the flask app returns an empty response yet.
It looks like it maybe has to do with the server somehow killing the request before it's been fully processed. I cloned both your repos into my test sourcehut server and over there these two changesets are correctly displayed... I'll check the nginx config to see if anything jumps at me.
Fixed by 136a03621049.
Fix by Nolan Prescott, deployed with 0.27.4.
I'm going to close this now since we pushed several optimizations months ago and haven't heard complaints since.
Fixed by Nolan in 701795ec3596.