Repository navigation
fix(cli): Treat every OS errno from best-effort scans as expected - #1932
Merged
Merged
Conversation
handleFileError allowlisted errno codes one at a time (EINVAL, ELOOP, ETIMEDOUT, ENOTCONN, Unknown system error), so each new unhealthy-mount failure (EIO, ECANCELED, EINTR, ...) became another Sentry event. Invert the check: ignore any POSIX errno except descriptor/memory exhaustion that points at a CLI bug, and debug-log skipped paths. Fixes CLI-1ES Co-Authored-By: Miguel Betegon <miguel.betegon@sentry.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
betegon
self-requested a review
November 4, 2026 10:01
betegon
approved these changes
Nov 4, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the error-reporting half of CLI-1ES. The scan-scope half is #1930.
handleFileErrordecides which filesystem errors get reported, and it uses an allowlist that has grown one errno per PR: EINVAL (#1286), ELOOP (#1320), ETIMEDOUT (#1217), Unknown system error (#1601), and ENOTCONN. Every new kind of broken mount becomes another Sentry event. CLI-1ES still collects EIO (OneDrive FUSE vault), ECANCELED (macOS.tracebundles), and EINTR (cloud-storage dirs). The walker already skips the unreadable dir either way, so these events tell us nothing actionable.This flips the check. Any POSIX errno (
/^E[A-Z0-9]+$/orUNKNOWN) counts as an environmental failure, exceptEMFILE/ENFILE/ENOMEM/EBADF. Those four point at our own descriptor or memory handling, so they still get reported. NodeERR_*codes and errors with no code are still reported too. Skipped paths now show up at debug level, which also fixes the silent catch.Before:
handleFileError()with real libuv-shapedscandirerrors:(ENOTCONN is already ignored on
main. EIO and ECANCELED aren't.)After: no Sentry events. With
--verbose:ENOENT isn't logged, because
isRegularFileprobes hit it constantly.via bete.
--
View Session [Sentry]