Skip to content

fix(search,context): symbol search crash + trace always-empty domain bug#207

Merged
Wolfvin merged 1 commit into
mainfrom
fix/search-symbol-and-trace-domain
Jul 11, 2026
Merged

fix(search,context): symbol search crash + trace always-empty domain bug#207
Wolfvin merged 1 commit into
mainfrom
fix/search-symbol-and-trace-domain

Conversation

@Wolfvin

@Wolfvin Wolfvin commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Found while validating CodeLens against a real codebase (Coretax-Auto-Downloader extension), trying to trace a call chain.

Bug 1: search --mode symbol crashed with ModuleNotFoundError: No module named 'symbols_engine'. Wrong module name — search_symbols actually lives in search_engine.py.

Bug 2: context --check trace always returned 0 callers/callees for every symbol, in every workspace. Root cause: context.py set ns.domain = None when --domain wasn't passed, but trace_engine.py checks domain in ("backend", "auto") / ("frontend", "auto") — bare None matches neither, so both directions silently no-op every time.

Verified: signInWithGoogle went from {up:0, dn:0} to 7 callers / 21 callees after the fix, matching real call sites confirmed via grep.

Test suite: 2 pre-existing failures (TestSearchPagination) confirmed present on main before this change — unrelated (missing status/matches keys, different bug in search's own output shape).

@Wolfvin Wolfvin merged commit 6a651c8 into main Jul 11, 2026
@Wolfvin Wolfvin deleted the fix/search-symbol-and-trace-domain branch July 11, 2026 18:29
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…-empty domain bug

1. search --mode symbol crashed with ModuleNotFoundError: no module named
   'symbols_engine'. The function it needs (search_symbols) actually lives
   in search_engine.py — wrong module name in the import statement.

2. context --check trace always returned 0 callers/callees regardless of
   symbol or workspace. Root cause: context.py's _build_namespace() set
   ns.domain = None when --domain wasn't passed, but trace_engine.py checks
   `domain in ("backend", "auto")` / `("frontend", "auto")` — a bare
   None matches neither branch, so both trace_via_flat and trace_via_graph
   silently skipped both backend and frontend tracing every time. Must
   default to "auto" (matching commands/trace.py's own standalone default).

Both found via manual validation against Coretax-Auto-Downloader extension:
search --mode symbol crashed outright; trace returned {up:0, dn:0} for
signInWithGoogle and isAuthenticated despite both having real callers/callees
confirmed via grep. After fix: trace returns 7 callers, 21 callees for
signInWithGoogle.
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant