filesystem: list_directory_with_sizes reports an entry it could not stat as 0 B
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
Start with list_directory_with_sizes in src/filesystem/server.ts and the pinned behavior in src/filesystem/__tests__/server-tools.test.ts; the prior PR #4911 is identified as a prototype. Check how failed stat calls are handled and how the combined size is calculated. Done when an entry that cannot be stat'd is reported as unknown or as a failure and is excluded from the total, with tests covering the behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The list_directory_with_sizes handler in src/filesystem/server.ts catches a failed stat on an entry and substitutes a size of 0 and an mtime of the epoch. An unreadable entry, a dangling symlink, or a file removed between readdir and stat is therefore listed as 0 B and counted in the combined size, which makes it look like an empty file. src/filesystem/__tests__/server-tools.test.ts pins this behavior.
Expected
An entry that could not be stat'd is shown as unknown (or the failure is reported), rather than given an invented size, and is left out of the total. Any change to how this handler stats entries should be coordinated with other open work on the same handler.
Prior work
- #4911 by @feiiiiii5
The PR(s) above targeted the pre-refactor code and are closed as part of the backlog triage in #4875; this issue is where the work continues, with the PR(s) as a prototype. Thank you to their authors.
- Ngôn ngữ chính
- TypeScript
- Star
- 91.4k
- Fork
- 11.8k
- Merge trung bình
- 6 giờ 39 phút
- Pull request đã merge (30 ngày)
- 146
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/servers
-
Clear the four CodeQL alerts in the release scripts (replaceAll for %2F, comment-line check)Đang mởchore v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
modelcontextprotocol/servers#5261 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs(git): clarify unconfined default scope and repository confinement options in README and CLIĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
modelcontextprotocol/servers#5231 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs(git): clarify unconfined default scope and repository confinement options in README and CLIĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
modelcontextprotocol/servers#5230 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
git: README should state plainly that without --repository every reachable repository is in scopeĐang mởdocumentation server-git v2
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
modelcontextprotocol/servers#5225 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
modelcontextprotocol/servers#5223 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của modelcontextprotocol/servers
Issue tương tự
-
freshness freshness:observed-only
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
thoroc/context-radar#282 ·
-
bug P2 rust
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: web
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
gabe-santana/arkdraw#25 ·
-
bug require-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
expressjs/expressjs.com#2549 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
codercops/discord-bot#101 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày