feat(envd): add optional EntryInfo to watch FilesystemEvent#2930
feat(envd): add optional EntryInfo to watch FilesystemEvent#2930mishushakov wants to merge 4 commits into
Conversation
Add an include_entryinfo flag to WatchDirRequest and CreateWatcherRequest. When set, each FilesystemEvent carries the affected entry's EntryInfo, populated best-effort (left nil for remove/rename-away events where the entry no longer exists at the path). Bumps envd version to 0.6.2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit 9449fdc. Bugbot is set up for automated code reviews on this repo. Configure here. |
❌ 5 Tests Failed:
View the full list of 5 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
There was a problem hiding this comment.
Code Review
Failing the entire watch stream when retrieving the optional entry info fails makes the watcher fragile. Since entry info is intended to be best-effort, any error from eventEntryInfo should be ignored, leaving the entry field nil so the stream can continue processing other events. Similarly, terminating the background watcher goroutine when retrieving the optional entry info fails causes a resource leak and stops all future event processing; this error should also be ignored to keep the watcher active.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Match the FilesystemEvent.entry field name for consistency. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Failing to stat the affected entry no longer tears down the watch stream or the polling watcher goroutine (which previously leaked the fsnotify watcher). The entry is left unset and non-NotFound errors are logged at warn level. Addresses PR review feedback. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The errors.As type assertion was always true since entryInfo always returns a connect.Error; only the code matters. Addresses PR feedback. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds an
include_entryinfoflag toWatchDirRequestandCreateWatcherRequest; when set, eachFilesystemEventcarries the affected entry'sEntryInfo(newoptional EntryInfo entryfield). The entry is populated best-effort and leftnilfor remove/rename-away events where the path no longer exists, so the watch stream/watcher is never torn down by a stat of a gone file. Both the streamingWatchDirand the pollingCreateWatcher/GetWatcherEventspaths are supported, with regenerated proto code inpackages/envdandpackages/shared. Bumps the envd version to0.6.2and addswatch_test.gocovering entry-present, entry-absent, and removed-entry cases.🤖 Generated with Claude Code