[codex] Hold Git concurrency permits through streaming (BUZZ-SEC-018)#1916
Open
jmecom wants to merge 1 commit into
Open
[codex] Hold Git concurrency permits through streaming (BUZZ-SEC-018)#1916jmecom wants to merge 1 commit into
jmecom wants to merge 1 commit into
Conversation
jmecom
marked this pull request as ready for review
July 15, 2026 18:17
jmecom
force-pushed
the
codex/fix-buzz-sec-018
branch
2 times, most recently
from
July 15, 2026 22:37
d9890dd to
f8d7f15
Compare
tlongwell-block
approved these changes
Jul 16, 2026
jmecom
force-pushed
the
codex/fix-buzz-sec-018
branch
from
July 16, 2026 20:32
f8d7f15 to
f1af590
Compare
jmecom
force-pushed
the
codex/fix-buzz-sec-018
branch
from
July 16, 2026 20:54
f1af590 to
20e96af
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Git upload-pack responses now retain their global concurrency permit for the complete response-body stream. The permit is released when the stream reaches EOF or when a disconnected client causes Axum to drop the response body.
Why
The streaming path previously released its semaphore permit as soon as it constructed the HTTP response, even though the Git subprocess and hydrated repository remained active while bytes were sent. Slow or stalled clients could therefore create more simultaneous Git subprocesses than the configured limit.
Impact
The configured Git concurrency limit now reflects actual in-flight subprocesses. Slow clients occupy a slot for their full stream lifetime, which is the intended resource bound; disconnecting releases the slot automatically.
Testing
cargo test -p buzz-relay streaming_body_holds_git_permit_until_drop --libAddresses BUZZ-SEC-018.