Summary
server.max_concurrent_per_repo = 0 passes configuration validation but creates a semaphore with no permits, causing Git requests to wait indefinitely.
Current behavior
Validation accepts zero for the per-repository concurrency setting. The request middleware then constructs a zero-permit semaphore, so no request can acquire a permit and clients stall without useful progress or an immediate configuration error.
Expected behavior
Configuration validation should reject zero, or zero should have a clearly defined non-blocking meaning such as disabling the limit.
Suggested implementation
Require max_concurrent_per_repo to be greater than zero during validation and add a regression test for the invalid configuration. Rejecting zero is preferable unless an unlimited sentinel is intentionally documented and implemented.
Relevant code
crates/walgit-config/src/lib.rs:1079
crates/walgit-server/src/middleware.rs:147
Summary
server.max_concurrent_per_repo = 0passes configuration validation but creates a semaphore with no permits, causing Git requests to wait indefinitely.Current behavior
Validation accepts zero for the per-repository concurrency setting. The request middleware then constructs a zero-permit semaphore, so no request can acquire a permit and clients stall without useful progress or an immediate configuration error.
Expected behavior
Configuration validation should reject zero, or zero should have a clearly defined non-blocking meaning such as disabling the limit.
Suggested implementation
Require
max_concurrent_per_repoto be greater than zero during validation and add a regression test for the invalid configuration. Rejecting zero is preferable unless an unlimited sentinel is intentionally documented and implemented.Relevant code
crates/walgit-config/src/lib.rs:1079crates/walgit-server/src/middleware.rs:147