codespine 0.9.3__tar.gz → 0.9.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codespine-0.9.3 → codespine-0.9.4}/PKG-INFO +1 -1
- {codespine-0.9.3 → codespine-0.9.4}/codespine/__init__.py +1 -1
- {codespine-0.9.3 → codespine-0.9.4}/codespine/db/store.py +9 -7
- {codespine-0.9.3 → codespine-0.9.4}/codespine/indexer/engine.py +6 -8
- {codespine-0.9.3 → codespine-0.9.4}/codespine.egg-info/PKG-INFO +1 -1
- {codespine-0.9.3 → codespine-0.9.4}/pyproject.toml +1 -1
- {codespine-0.9.3 → codespine-0.9.4}/LICENSE +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/README.md +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/analysis/__init__.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/analysis/community.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/analysis/context.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/analysis/coupling.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/analysis/crossmodule.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/analysis/deadcode.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/analysis/flow.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/analysis/impact.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/cli.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/config.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/db/__init__.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/db/schema.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/diff/__init__.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/diff/branch_diff.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/guide.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/indexer/__init__.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/indexer/call_resolver.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/indexer/di_resolver.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/indexer/java_parser.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/indexer/symbol_builder.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/mcp/__init__.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/mcp/server.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/noise/__init__.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/noise/blocklist.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/overlay/__init__.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/overlay/git_state.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/overlay/merge.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/overlay/store.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/search/__init__.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/search/bm25.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/search/fuzzy.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/search/hybrid.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/search/rrf.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/search/vector.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/watch/__init__.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/watch/git_hook.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine/watch/watcher.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine.egg-info/SOURCES.txt +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine.egg-info/dependency_links.txt +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine.egg-info/entry_points.txt +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine.egg-info/requires.txt +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/codespine.egg-info/top_level.txt +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/gindex.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/setup.cfg +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/tests/test_branch_diff_normalize.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/tests/test_call_resolver.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/tests/test_community_detection.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/tests/test_deadcode.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/tests/test_index_and_hybrid.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/tests/test_java_parser.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/tests/test_multimodule_index.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/tests/test_overlay.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/tests/test_search_ranking.py +0 -0
- {codespine-0.9.3 → codespine-0.9.4}/tests/test_store_recovery.py +0 -0
|
@@ -671,28 +671,30 @@ class GraphStore:
|
|
|
671
671
|
self.clear_file(f_id)
|
|
672
672
|
self._recycle_conn()
|
|
673
673
|
|
|
674
|
-
# 2
|
|
674
|
+
# 2. Upsert file record
|
|
675
675
|
with self.transaction():
|
|
676
676
|
self.upsert_files_batch(
|
|
677
677
|
[{"id": f_id, "path": path, "project_id": project_id,
|
|
678
678
|
"is_test": is_test, "hash": digest}],
|
|
679
|
-
create_mode=True,
|
|
680
679
|
)
|
|
681
680
|
self._recycle_conn()
|
|
682
681
|
|
|
682
|
+
# 3. Upsert classes (typically very few per file)
|
|
683
683
|
if classes:
|
|
684
684
|
with self.transaction():
|
|
685
|
-
self.upsert_classes_batch(classes
|
|
685
|
+
self.upsert_classes_batch(classes)
|
|
686
686
|
self._recycle_conn()
|
|
687
687
|
|
|
688
|
+
# 4. Upsert methods in sub-batches of 200
|
|
688
689
|
for i in range(0, len(methods), self._FILE_METHOD_SUB_BATCH):
|
|
689
690
|
with self.transaction():
|
|
690
|
-
self.upsert_methods_batch(methods[i: i + self._FILE_METHOD_SUB_BATCH]
|
|
691
|
+
self.upsert_methods_batch(methods[i: i + self._FILE_METHOD_SUB_BATCH])
|
|
691
692
|
self._recycle_conn()
|
|
692
693
|
|
|
694
|
+
# 5. Upsert symbols in sub-batches of 200
|
|
693
695
|
for i in range(0, len(symbols), self._FILE_SYMBOL_SUB_BATCH):
|
|
694
696
|
with self.transaction():
|
|
695
|
-
self.upsert_symbols_batch(symbols[i: i + self._FILE_SYMBOL_SUB_BATCH]
|
|
697
|
+
self.upsert_symbols_batch(symbols[i: i + self._FILE_SYMBOL_SUB_BATCH])
|
|
696
698
|
self._recycle_conn()
|
|
697
699
|
|
|
698
700
|
# 6. Write call edges in sub-batches of 500 (normalise key names to match add_calls_batch)
|
|
@@ -705,14 +707,14 @@ class GraphStore:
|
|
|
705
707
|
for rec in batch
|
|
706
708
|
]
|
|
707
709
|
with self.transaction():
|
|
708
|
-
self.add_calls_batch(normalised
|
|
710
|
+
self.add_calls_batch(normalised)
|
|
709
711
|
self._recycle_conn()
|
|
710
712
|
|
|
711
713
|
# 7. Write type relations (IMPLEMENTS, OVERRIDES, REFERENCES_TYPE)
|
|
712
714
|
for i in range(0, len(type_rels), self._FILE_REL_SUB_BATCH):
|
|
713
715
|
batch = type_rels[i: i + self._FILE_REL_SUB_BATCH]
|
|
714
716
|
with self.transaction():
|
|
715
|
-
self.add_references_batch(batch
|
|
717
|
+
self.add_references_batch(batch)
|
|
716
718
|
self._recycle_conn()
|
|
717
719
|
|
|
718
720
|
def clear_file_by_path(self, project_id: str, project_path: str, file_path: str) -> None:
|
|
@@ -462,23 +462,21 @@ class JavaIndexer:
|
|
|
462
462
|
with self.store.transaction():
|
|
463
463
|
self.store.clear_files_batch(clear_sub)
|
|
464
464
|
self.store._recycle_conn()
|
|
465
|
-
# Always CREATE — full clears via clear_project, incremental clears
|
|
466
|
-
# per-file above, so nodes are guaranteed absent in both paths.
|
|
467
465
|
with self.store.transaction():
|
|
468
|
-
self.store.upsert_files_batch(file_rows
|
|
466
|
+
self.store.upsert_files_batch(file_rows)
|
|
469
467
|
self.store._recycle_conn()
|
|
470
468
|
with self.store.transaction():
|
|
471
|
-
self.store.upsert_classes_batch(class_rows
|
|
469
|
+
self.store.upsert_classes_batch(class_rows)
|
|
472
470
|
self.store._recycle_conn()
|
|
473
471
|
_METHOD_SUB_BATCH = 200
|
|
474
472
|
for method_sub in self._chunked(method_rows, _METHOD_SUB_BATCH):
|
|
475
473
|
with self.store.transaction():
|
|
476
|
-
self.store.upsert_methods_batch(method_sub
|
|
474
|
+
self.store.upsert_methods_batch(method_sub)
|
|
477
475
|
self.store._recycle_conn()
|
|
478
476
|
_SYMBOL_SUB_BATCH = 200
|
|
479
477
|
for symbol_sub in self._chunked(symbol_rows, _SYMBOL_SUB_BATCH):
|
|
480
478
|
with self.store.transaction():
|
|
481
|
-
self.store.upsert_symbols_batch(symbol_sub
|
|
479
|
+
self.store.upsert_symbols_batch(symbol_sub)
|
|
482
480
|
self.store._recycle_conn()
|
|
483
481
|
|
|
484
482
|
self._emit(progress, "resolve_calls_start")
|
|
@@ -494,7 +492,7 @@ class JavaIndexer:
|
|
|
494
492
|
)
|
|
495
493
|
for call_chunk in self._chunked(call_rows, edge_batch_size):
|
|
496
494
|
with self.store.transaction():
|
|
497
|
-
self.store.add_calls_batch(call_chunk
|
|
495
|
+
self.store.add_calls_batch(call_chunk)
|
|
498
496
|
calls_resolved += len(call_chunk)
|
|
499
497
|
self.store._recycle_conn()
|
|
500
498
|
self._emit(progress, "resolve_calls_progress", calls_resolved=calls_resolved)
|
|
@@ -509,7 +507,7 @@ class JavaIndexer:
|
|
|
509
507
|
)
|
|
510
508
|
for rel_chunk in self._chunked(type_rows, edge_batch_size):
|
|
511
509
|
with self.store.transaction():
|
|
512
|
-
self.store.add_references_batch(rel_chunk
|
|
510
|
+
self.store.add_references_batch(rel_chunk)
|
|
513
511
|
type_relationships += len(rel_chunk)
|
|
514
512
|
self.store._recycle_conn()
|
|
515
513
|
self._emit(progress, "resolve_types_done", type_relationships=type_relationships)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|