diff --git a/examples/collector.yaml b/examples/collector.yaml index 3b10651..1354d29 100644 --- a/examples/collector.yaml +++ b/examples/collector.yaml @@ -48,4 +48,8 @@ sources: # Valid → emit + delete. Invalid → moved to .dead-letter/ with reason. drop_folder: path: ~/Nyx/workspace/incoming/ - poll_fallback_seconds: 30 # safety net if inotify misses + # Safety net if inotify misses an event. 0 (or unset) = use the + # 30-second default. There is no "disable polling" option in v1 — + # if you don't want polling, leave inotify to do its job and ignore + # the cost (a periodic readdir is microseconds). + poll_fallback_seconds: 30 diff --git a/internal/inbox/inbox.go b/internal/inbox/inbox.go index 54ee0f5..c687c95 100644 --- a/internal/inbox/inbox.go +++ b/internal/inbox/inbox.go @@ -38,6 +38,11 @@ type Event struct { // // Concurrency: a single Writer is safe for use from multiple goroutines. // One sync.Mutex per recipient bounds contention to per-file granularity. +// +// The locks map grows monotonically as new recipients appear. In practice +// the agent network has <10 recipients, so the leak is bounded; if this +// daemon ever lives in a system with thousands of recipients, replace the +// map with an LRU or shard-and-evict scheme. type Writer struct { dir string