fix: batch fix 3 bugs - exclude filter, progress feedback, KuzuDB cleanup#1
Closed
MorningStar0709 wants to merge 1 commit into
Closed
fix: batch fix 3 bugs - exclude filter, progress feedback, KuzuDB cleanup#1MorningStar0709 wants to merge 1 commit into
MorningStar0709 wants to merge 1 commit into
Conversation
- 修复 --exclude 参数无效: Cypher ALL 精确匹配改为 NOT ANY CONTAINS 包含匹配,兼容 KuzuDB - 修复索引后进度无反馈: 后处理 8 个阶段前设置 status_message,进度栏优先显示阶段消息 - 修复 KuzuDB 锁未释放: close_driver 逐个关闭 Connection、销毁 pool 引用、触发 GC 回收
🔍 PR Code Graph Analysisfix: batch fix 3 bugs - exclude filter, progress feedback, KuzuDB cleanup (#1) 📊 Interactive VisualizationView the blast radius graph: PR Reviewer Dashboard 📦 ArtifactsThe graph JSON has been uploaded as a build artifact: Generated by CodeGraphContext using FalkorDB Lite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Batch fix of 3 known CGC bugs identified during tool evaluation.
1.
--excludeflag not filtering decorationsRoot cause: The Cypher query
ALL(decorator_name IN $exclude WHERE NOT decorator_name IN func.decorators)performs exact matching. The database stores full decorator strings like@router.get("/path"), so passingrouteras filter never matches.Fix: Replaced with
NOT ANY(d IN func.decorators WHERE d CONTAINS 'router')substring matching. KuzuDB does not support Cypher parameters inside nestedANY(), so conditions are generated inline in Python with proper escaping.Verification: Direct Cypher query confirmed 237 -> 226 results, correctly filtering the 11 functions with matching decorators.
2. Index progress hangs at perceived 100%
Root cause: After file parsing, the post-processing phase (inheritance resolution, function calls, Spring injection, ORM, MyBatis, etc.) runs with no progress updates. Users see 100% stuck and assume the tool is hung.
Fix: Each post-processing stage now calls
job_manager.update_job(job_id, status_message=...). The progress bar display prioritizescurrent_file>status_message> empty string.Verification: Indexed the CGC core module (30+ files) and observed all 8 status_message updates in the live output.
3. KuzuDB lock file not released
Root cause:
close_driver()only drained the connection pool and set_db = None. Connections were never explicitly closed, and garbage collection was not forced, leaving lock files on disk.Fix: Iterate the pool and call
conn.close()on each connection, set_pool = None, triggergc.collect(). Addedwith self._lockguard to prevent race conditions.Verification: Code review confirmed thread safety. Unit tests pass (no regression).
Changed Files
code_finder.pypipeline.pyjobs.pystatus_messagefield toJobInfo1+cli_helpers.pystatus_message1+/1-database_kuzu.pyclose_driver19+/9-Test Results
--exclude: Verified via direct Cypher query on KuzuDB