auto_index skips a repository that commits a symlink: count-only discovery fails where the full walk skips
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
- 68/100
Hướng nghiên cứu
Start with walk_dir_process_entry in src/discover/discover.c and compare its count-only handling of symlinks and unreadable directories with the full walk. Check how cbm_discover_count_bounded reports failures and review the auto-index path in src/mcp/mcp.c and src/daemon/application.c. Done means these paths are skipped without failing the count, while deadline and allocation failures still fail; reproduce with the supplied symlink setup.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version
codebase-memory-mcp 0.12.1, Linux x86_64, release binary from install.sh.
What happens
With auto_index = true, a session rooted in a repository that commits one
symlink never gets indexed. The daemon logs on every session start:
level=warn msg=daemon.autoindex.skipped project=<root> reason=unsafe_or_unavailable_path files=-1
We counted 1210 of these lines for one repository and not one
autoindex.start or autoindex.done. index_repository on the same root
succeeds, because the full discovery skips the symlink.
Cause
cbm_mcp_auto_index_within_file_limit (src/mcp/mcp.c) runs
cbm_discover_count_bounded, which runs discover_impl with
count_only = true. In walk_dir_process_entry (src/discover/discover.c),
safe_stat returns -1 for a symlink, and the count-only branch sets
out->failed = true, while the full walk records the entry as ignored
(file_list_add_ignored(out, rel_path, "symlink")) and continues. failed
makes the count return CBM_DISCOVER_ERROR, count -1, and
application_background_initialize_impl (src/daemon/application.c) reports
unsafe_or_unavailable_path. walk_dir does the same for a directory that
cbm_opendir cannot open (count-only fails, full walk continues).
Reproduction
mkdir -p /tmp/cbm-symlink-repro/sub
cd /tmp/cbm-symlink-repro
git init -q
printf 'def f():\n return 1\n' > sub/a.py
ln -s ../sub sub/link
codebase-memory-mcp config set auto_index true
# start any MCP client session with this directory as its root, then:
grep 'cbm-symlink-repro' ~/.cache/codebase-memory-mcp/logs/cbm-daemon.log
Expected: autoindex.start and autoindex.done. Actual (reproduced with
0.12.1 on 2026-11-14): five
daemon.autoindex.skipped project=tmp-cbm-symlink-repro reason=unsafe_or_unavailable_path files=-1
lines, while an explicit index_repository on the same root logged
daemon.index.result ... status=indexed.
Proposed fix
In count-only mode treat a symlink (and an unreadable directory) the way the
full walk does: skip it without counting it and without setting failed.
Only the deadline and allocation failures should fail the bounded count.
- Ngôn ngữ chính
- C
- Star
- 45.8k
- Fork
- 3.8k
- Merge trung bình
- 2 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 108
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 DeusData/codebase-memory-mcp
-
bug ux/behavior
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
DeusData/codebase-memory-mcp#3191 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation enhancement parsing/quality ux/behavior
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
DeusData/codebase-memory-mcp#3131 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
hook-augment: the five-row cap keeps the first five search_graph rows, so variables and modules displace function definitions (v0.12.1)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug editor/integration parsing/quality ux/behavior
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DeusData/codebase-memory-mcp#3062 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Generated client files (AGENTS.md block, SKILL.md) teach a call syntax no harness can executeĐang mởbug documentation editor/integration parsing/quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DeusData/codebase-memory-mcp#3050 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
editor/integration parsing/quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
DeusData/codebase-memory-mcp#2286 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của DeusData/codebase-memory-mcp
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NVIDIA/open-gpu-kernel-modules#1635 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
iOS: the "Edit controls" button never hides, even with a controller connected, and covers the gameĐang mởgame: 010065A014024000 ios
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
seedds/nxnative#3714 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày