Problem
handleCallers filters by langHasCallSites, definition-line exclusion, and hasWholeWordMatch, but never checks whether the matching line is a comment. Full-line comments are reported (and counted) as call sites.
Live repro on this repo: codedb_callers name=insertRestoredFile returns 3 'call sites' — snapshot.zig:822 (// is false: insertRestoredFile errors above…), test_snapshot.zig:1080 (another comment), and only one real call. For searchContent, several of the 30 results are doc-comment lines. Found in the 2026-06-10 dogfooding audit.
Failing Test
test "issue-562: codedb_callers excludes full-line comment mentions" in src/test_search.zig (branch fix/issue-562-callers-comments): a real call in src/caller.zig:2, a full-line // mention in src/noisy.zig — output must keep the former, exclude the latter, and report 1 call sites. Verified failing on release/0.2.5825: 67/68 (noisy.zig leaks in).
Expected
Full-line comment mentions are documentation, not call sites: excluded from both the rendered list and the header count. (Trailing comments on code lines stay — position-aware comment parsing is out of scope.)
Fix
In both handleCallers loops: skip when explore_mod.isCommentOrBlank(r.line_text, lang) — the same helper compact-mode search already uses.
Problem
handleCallersfilters bylangHasCallSites, definition-line exclusion, andhasWholeWordMatch, but never checks whether the matching line is a comment. Full-line comments are reported (and counted) as call sites.Live repro on this repo:
codedb_callers name=insertRestoredFilereturns 3 'call sites' — snapshot.zig:822 (// is false: insertRestoredFile errors above…), test_snapshot.zig:1080 (another comment), and only one real call. ForsearchContent, several of the 30 results are doc-comment lines. Found in the 2026-06-10 dogfooding audit.Failing Test
test "issue-562: codedb_callers excludes full-line comment mentions"insrc/test_search.zig(branchfix/issue-562-callers-comments): a real call insrc/caller.zig:2, a full-line//mention insrc/noisy.zig— output must keep the former, exclude the latter, and report1 call sites. Verified failing on release/0.2.5825: 67/68 (noisy.zig leaks in).Expected
Full-line comment mentions are documentation, not call sites: excluded from both the rendered list and the header count. (Trailing comments on code lines stay — position-aware comment parsing is out of scope.)
Fix
In both
handleCallersloops: skip whenexplore_mod.isCommentOrBlank(r.line_text, lang)— the same helper compact-mode search already uses.