Address #126 review: one home for the middleware rationale
Build image / build-and-push (push) Successful in 20s

The why-a-controller-can't-reach-the-socket story was told in full in
deadlines.go, agent.go, the test, and CLAUDE.md. It lives in deadlines.go
now; the others say what they need to and point there.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
2026-08-22 23:09:36 -04:00
co-authored by Claude Fable 5
parent 2a903f6428
commit 68cb686d60
3 changed files with 13 additions and 22 deletions
+2 -4
View File
@@ -165,10 +165,8 @@ type eventStream struct {
// dropped connection. Hence a deadline set up front and refreshed per frame,
// rather than anything checked after the fact.
//
// The controller comes from responseController, NOT from c.Writer: by the time
// a handler runs, the logging middleware has wrapped the writer in something a
// controller can't unwrap, and every deadline call fails — which is how this
// fix shipped, tested, and stayed broken live (see deadlines.go).
// The controller comes from responseController, not from c.Writer — a
// controller built here can't reach the socket; deadlines.go says why.
func openEventStream(c *gin.Context) *eventStream {
c.Header("Content-Type", "text/event-stream")
c.Header("Cache-Control", "no-cache")