pub async fn serve_fetch_round(
writer: &mut impl PktLineWriter,
request: &Request,
rounds: &mut FetchRounds,
packgen: Arc<dyn GitPackGen>,
repo: &RepoRecord,
limits: &Limits,
pipeline: Arc<Semaphore>,
) -> Result<(), SubstrateError>Expand description
Serves one command=fetch round (ADR-014): budgets, the request
parse with the object-format check, the no-done acknowledgments
shape, and the done round’s packfile section.
rounds— the session’sFetchRoundscounter (the entries own its state; this machine enforces the cap).packgen— the backend handleGitPackGen::common_havesandGitPackGen::generateare called through.pipeline— the shared pipeline-concurrency semaphore (ADR-009’s enforcement point): a permit is acquired around the done round’sgeneratecall; exhaustion delays the call (the 503-mapped class).
Every response path is flush-terminated (acknowledgments / the packfile section); an error path emits nothing beyond what was already relayed and returns the terminal error the entries map.