C import graph: <sys/types.h> resolves to an unrelated repo header (include/curl/types.h); Stage 1 ignores the include's directory
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/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ệ
- c, cpp, objective-c, python
- Lĩnh vực
- devtools
Hướng nghiên cứu
Đọc phần phân giải import Stage 1 trong gitgalaxy/core/network_risk_sensor.py và kiểm tra ngữ cảnh đường dẫn được thêm bởi issue #3544. Tái hiện các cạnh sai đã được báo cáo bằng lệnh và truy vấn curl 7.10.8 trong issue, sau đó áp dụng quy tắc hậu tố đường dẫn cho các include thuộc họ C có chứa /. Hoàn tất khi sys/types.h không còn được phân giải thành include/curl/types.h, trong khi types.h vẫn giữ nguyên hành vi hiện tại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What's wrong. A system include such as #include <sys/types.h> gets an edge to a repository header that merely shares the basename. In curl 7.10.8 (2003), every file under ares/ that includes <sys/types.h> links to include/curl/types.h: 46 false edges out of 479 (import precision 90.4%; 99.6–100% on every other snapshot measured). It reproduces on current main (79b13e354).
Where. gitgalaxy/core/network_risk_sensor.py, Stage 1 of import resolution. When exactly one file matches the token's last segment, it's returned with no check that the token's path context (sys/) is a suffix of the candidate's path. #3544 added exactly that check, but gated on MODULE_PATH_MIRROR_LANGS, so C-family includes skip it. Stage 2 already compares path context when there are several candidates; the single-candidate case is the gap.
Repro.
git -C <curl clone> worktree add /tmp/c7108 curl-7_10_8
galaxyscope /tmp/c7108 --db-only
sqlite3 <db> "select count(*) from edge_data e join file_data s on s.id=e.src_file_id join file_data d on d.id=e.dst_file_id where d.file_path='include/curl/types.h' and s.file_path like 'ares/%'"
ares/ares_init.c:18 is #include <sys/types.h>.
Suggested fix shape. For languages with include_names_file_literally, a token containing / names a file only if the candidate's path ends with that token's path. This is #3544's rule, applied to C/C++/ObjC. A bare "types.h" keeps today's behaviour.
Impact. False in-degree on the matched header, so PageRank, blast radius and the centrality measures are inflated for it. It shows up on any C repo whose headers share names with system headers (types.h, time.h, string.h, signal.h, …).
How it was found. temporal-crucible validated the engine's C function, include and call extraction on curl and nDPI snapshots (2003–2026), running gitgalaxy's own import_graph_accuracy.score_group against each snapshot. Write-up: squid-protocol/temporal-crucible branch validate/engine-c, docs/engine_validation.md.
🤖 Generated with Claude Code
- Ngôn ngữ chính
- Python
- Star
- 57
- Fork
- 11
- Merge trung bình
- 1 giờ 46 phút
- Pull request đã merge (30 ngày)
- 972
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 squid-protocol/gitgalaxy
-
doc drift: wiki [1]Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
squid-protocol/gitgalaxy#8002 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
doc drift: skills [2]Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
squid-protocol/gitgalaxy#8000 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
doc drift: tests [1]Đang mởdocumentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
squid-protocol/gitgalaxy#8001 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
doc drift: rules and agents [1]Đang mởdocumentation
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
squid-protocol/gitgalaxy#7998 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
doc drift: skills [1]Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
squid-protocol/gitgalaxy#7999 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của squid-protocol/gitgalaxy
Issue tương tự
-
LLVM versionsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Translate docs/ to SpanishĐang mởdocumentation good first issue language
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 91/100
-
good first issue help wanted translation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Fix duplicated word in speculative decoding docsCó thể đã có người làm @ddlw đã nhận hôm nay. Đang mởcommunity-request
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 89/100
NVIDIA/Megatron-LM#9118 ·
Maintainer thường phản hồi trong vòng 2 ngày