Expand description
Filesystem watcher utility for session cache invalidation.
Wraps the notify crate with a small abstraction that tracks callbacks per
workspace directory. Each callback is triggered when the corresponding
.sqry-index file is modified; callers typically use this to invalidate the
in-memory cache entry for that workspace.
§RR-10 Gap #3: Bounded Event Queue (DoS Prevention)
Uses a bounded synchronous channel (sync_channel) instead of unbounded
channel to prevent memory exhaustion attacks via filesystem event flooding.
The queue capacity is configurable via SQRY_WATCH_EVENT_QUEUE environment
variable (default: 10,000 events).
Structs§
- File
Watcher - Lightweight wrapper around
notifyfor watching.sqry-indexfiles.