Fixes carried in the phoebe-lab production deployment of SourceHut that are not upstream yet. These are stored here for reference and provenance — they are not applied to the clones in this workspace, which mirrors upstream verbatim.
If a question is about behavior that diverges from upstream, check here first to see whether phoebe-lab is running a patched version.
Patches are kept in git format-patch/git diff format against the target upstream repo and are sourced from ~/data/home/phoebe-lab/srht/patches/.
core-go-checksum.patchRepo: core-go · File: objects/middleware.go (NewClient)
Problem. AWS SDK for Go v2 defaults RequestChecksumCalculation to WhenSupported, which causes the S3 client to seek the request body before PutObject to compute a checksum. Non-seekable bodies (streamed uploads) fail or get fully buffered into memory.
This hits two upload paths in production:
pages.sr.ht Publish — streaming the site tarball into S3.builds.sr.ht artifact upload — workers POST job artifacts as a stream.Fix. Set both RequestChecksumCalculation and ResponseChecksumValidation to WhenRequired, so the SDK only checksums when the protocol mandates it. This restores pre-SDK-v1.30 behavior and is the workaround Amazon documents for non-AWS S3 backends (Garage/Ceph/Minio) where strict checksum negotiation is also unreliable.
Status. Applied in phoebe-lab production; not upstreamed yet.
Verify it still applies cleanly:
cd ~/data/home/sourcehut/core-go
git apply --check ../patches/core-go-checksum.patch
If git apply --check fails after a sourcehut-refresh, upstream has changed that file — re-derive the patch against the new context and update the copy in ~/data/home/phoebe-lab/srht/patches/ first, then re-import here.