2424from java_codebase_rag .pipeline import clip , run_build_ast_graph , run_cocoindex_drop , run_cocoindex_update , run_incremental_graph
2525from java_ontology import VALID_UNRESOLVED_CALL_REASONS
2626
27- KUZU_INCREMENTAL_TRACKING_ISSUE_URL = "https://github.com/HumanBean17/java-codebase-rag/issues/73"
27+ LADYBUG_INCREMENTAL_TRACKING_ISSUE_URL = "https://github.com/HumanBean17/java-codebase-rag/issues/73"
2828
2929_INCREMENT_WARNING_LINES = (
30- "WARNING: AST graph (Kuzu ) incremental rebuild is not yet implemented." ,
30+ "WARNING: AST graph (LadybugDB ) incremental rebuild is not yet implemented." ,
3131 "The graph reflects the index state from the last `init` or `reprocess`," ,
3232 "which means `find`, `neighbors`, and `describe` may return stale results" ,
3333 "for files changed since then." ,
3737 "For an up-to-date graph, run:" ,
3838 " java-codebase-rag reprocess" ,
3939 "" ,
40- "Track progress on Kuzu incremental rebuild:" ,
41- f" { KUZU_INCREMENTAL_TRACKING_ISSUE_URL } " ,
40+ "Track progress on LadybugDB incremental rebuild:" ,
41+ f" { LADYBUG_INCREMENTAL_TRACKING_ISSUE_URL } " ,
4242)
4343
4444_REFRESH_DEPRECATION = (
4747)
4848
4949_REPROCESS_DRIFT_VECTORS_ONLY = (
50- "java-codebase-rag reprocess: rebuilt vectors only; graph (code_graph.kuzu ) was NOT rebuilt "
50+ "java-codebase-rag reprocess: rebuilt vectors only; graph (code_graph.lbug ) was NOT rebuilt "
5151 "and may now reflect a stale source snapshot."
5252)
5353
@@ -178,7 +178,7 @@ def _emit(value: Any) -> None:
178178 print (json .dumps (payload , default = _jsonable , sort_keys = True , indent = None ))
179179
180180
181- def _emit_increment_kuzu_warning () -> None :
181+ def _emit_increment_ladybug_warning () -> None :
182182 for line in _INCREMENT_WARNING_LINES :
183183 print (line , file = sys .stderr )
184184
@@ -289,7 +289,7 @@ def work() -> int:
289289 print (file = sys .stderr , flush = True )
290290 g = run_build_ast_graph (
291291 source_root = cfg .source_root ,
292- kuzu_path = cfg .kuzu_path ,
292+ ladybug_path = cfg .ladybug_path ,
293293 verbose = verbose ,
294294 quiet = bool (args .quiet ),
295295 env = env ,
@@ -319,7 +319,7 @@ def _cmd_increment(args: argparse.Namespace) -> int:
319319 # Check for --vectors-only flag
320320 vectors_only = bool (getattr (args , "vectors_only" , False ))
321321 if vectors_only :
322- _emit_increment_kuzu_warning ()
322+ _emit_increment_ladybug_warning ()
323323
324324 def work () -> int :
325325 env = cfg .subprocess_env ()
@@ -350,7 +350,7 @@ def work() -> int:
350350 # Run incremental graph update
351351 g = run_incremental_graph (
352352 source_root = cfg .source_root ,
353- kuzu_path = cfg .kuzu_path ,
353+ ladybug_path = cfg .ladybug_path ,
354354 verbose = bool (args .verbose ),
355355 quiet = bool (args .quiet ),
356356 env = env ,
@@ -437,7 +437,7 @@ def work() -> int:
437437 if graph_only :
438438 g = run_build_ast_graph (
439439 source_root = cfg .source_root ,
440- kuzu_path = cfg .kuzu_path ,
440+ ladybug_path = cfg .ladybug_path ,
441441 verbose = verbose ,
442442 quiet = bool (args .quiet ),
443443 env = env ,
@@ -509,7 +509,7 @@ def _cmd_erase(args: argparse.Namespace) -> int:
509509 cfg = _resolved_from_ns (args )
510510 _startup_hints (cfg )
511511 cfg .apply_to_os_environ ()
512- to_describe : list [Path ] = [cfg .kuzu_path , cfg .cocoindex_db ]
512+ to_describe : list [Path ] = [cfg .ladybug_path , cfg .cocoindex_db ]
513513 if cfg .index_dir .is_dir ():
514514 try :
515515 import lancedb
@@ -546,8 +546,8 @@ def work() -> int:
546546 )
547547 elif drop .returncode != 0 :
548548 print (clip (drop .stderr , 4000 ), file = sys .stderr )
549- if cfg .kuzu_path .exists ():
550- shutil .rmtree (cfg .kuzu_path , ignore_errors = True )
549+ if cfg .ladybug_path .exists ():
550+ shutil .rmtree (cfg .ladybug_path , ignore_errors = True )
551551 if cfg .cocoindex_db .exists ():
552552 try :
553553 cfg .cocoindex_db .unlink ()
@@ -577,17 +577,17 @@ def _cmd_meta(args: argparse.Namespace) -> int:
577577 cfg = _resolved_from_ns (args )
578578 _startup_hints (cfg )
579579 cfg .apply_to_os_environ ()
580- from kuzu_queries import KuzuGraph # lazy
580+ from ladybug_queries import LadybugGraph # lazy
581581
582- KuzuGraph ._instance = None
583- KuzuGraph ._instance_path = None
582+ LadybugGraph ._instance = None
583+ LadybugGraph ._instance_path = None
584584 payload = server ._graph_meta_output ().model_dump ()
585585 payload ["embedding_model" ] = cfg .embedding_model
586586 payload ["embedding_device" ] = cfg .embedding_device
587587 payload ["embedding_model_source" ] = cfg .embedding_model_source
588588 payload ["embedding_device_source" ] = cfg .embedding_device_source
589589 payload ["index_dir" ] = str (cfg .index_dir .resolve ())
590- payload ["kuzu_path " ] = str (cfg .kuzu_path .resolve ())
590+ payload ["ladybug_path " ] = str (cfg .ladybug_path .resolve ())
591591 payload ["index_dir_source" ] = cfg .index_dir_source
592592 payload ["hints_enabled" ] = cfg .hints_enabled
593593 payload ["hints_enabled_source" ] = cfg .hints_enabled_source
@@ -637,12 +637,12 @@ def _cmd_unresolved_calls_list(args: argparse.Namespace) -> int:
637637 cfg = _resolved_from_ns (args )
638638 _startup_hints (cfg )
639639 cfg .apply_to_os_environ ()
640- from kuzu_queries import KuzuGraph # lazy
640+ from ladybug_queries import LadybugGraph # lazy
641641
642- if not KuzuGraph .exists ():
642+ if not LadybugGraph .exists ():
643643 _emit ({"success" : False , "message" : "Kuzu graph not found" })
644644 return 1
645- graph = KuzuGraph .get ()
645+ graph = LadybugGraph .get ()
646646 rows = graph .list_unresolved_call_sites (
647647 method_id = args .method_id ,
648648 reason = args .reason ,
@@ -658,12 +658,12 @@ def _cmd_unresolved_calls_stats(args: argparse.Namespace) -> int:
658658 cfg = _resolved_from_ns (args )
659659 _startup_hints (cfg )
660660 cfg .apply_to_os_environ ()
661- from kuzu_queries import KuzuGraph # lazy
661+ from ladybug_queries import LadybugGraph # lazy
662662
663- if not KuzuGraph .exists ():
663+ if not LadybugGraph .exists ():
664664 _emit ({"success" : False , "message" : "Kuzu graph not found" })
665665 return 1
666- graph = KuzuGraph .get ()
666+ graph = LadybugGraph .get ()
667667 buckets = graph .stats_unresolved_call_sites (by = args .by )
668668 total = sum (int (r .get ("n" ) or 0 ) for r in buckets )
669669 _emit ({"success" : True , "total" : total , "by" : args .by , "buckets" : buckets })
@@ -683,12 +683,12 @@ def _cmd_analyze_pr(args: argparse.Namespace) -> int:
683683 _emit ({"success" : False , "message" : "Diff is empty" })
684684 return 1
685685 import pr_analysis # lazy
686- from kuzu_queries import KuzuGraph # lazy
686+ from ladybug_queries import LadybugGraph # lazy
687687
688- if not KuzuGraph .exists ():
688+ if not LadybugGraph .exists ():
689689 _emit ({"success" : False , "message" : "Kuzu graph not found" })
690690 return 1
691- graph = KuzuGraph .get ()
691+ graph = LadybugGraph .get ()
692692 report = pr_analysis .analyze_pr_pipeline (graph , diff_text )
693693 _emit (pr_analysis .pr_report_to_dict (report ))
694694 return 0
0 commit comments