Index-watch `send on closed channel` panic on watch-stream reconnect
Garden (miren-development) hard-crashed at 2026-07-06 17:21:39 UTC with:
panic: send on closed channel
goroutine 35196 [running]:
pkg/entity/indexwatch/watcher.go:248
pkg/entity/indexwatch/watcher.go:368
pkg/rpc/stream/stream.go:298
pkg/rpc/stream/stream.gen.go:127
pkg/rpc/client.go:851 (:761 :722)
A watch goroutine in the indexwatch abstraction (watcher.go:248) sends on a channel that's already been closed, during RPC stream teardown/reconnect. This is a lifecycle race between the stream closing and the watcher still trying to deliver an event, so the send needs to be guarded (select on a done channel, or don't close from the producer side). indexwatch landed in #841 (MIR-1200, June 3).
Impact: whole-process fatal. Same day and same churn as the activator double-unlock crash (filed as MIR-1306), on garden version main:5b9b37b (built 2026-07-06 17:12:29). Both are concurrency bugs on the pool/watch activation paths that get hammered when many apps wake at once; garden restarted repeatedly today as PRs deployed, exercising the reconnect path.