mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-26 18:31:34 +01:00
Wire the admission gate from the prior phase into the bridge server. Every admitted stream now takes one gate slot after the route check, and holds it until the response stream closes or a drain bound frees it, so the gate's process-wide caps carry real weight against host memory instead of sitting unused. The body read now starts capturing data in the same synchronous turn as the stream event, ahead of the admission wait, and arms its idle and lifetime timers only after admission grants a slot. Node does not replay a request body the read was not yet listening for, so a body read that began only after an async admission wait could stall a request that had already fully arrived. Co-authored-by: Paperclip <noreply@paperclip.ing>