codespine 1.0.11__tar.gz → 1.0.13__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.
Files changed (80) hide show
  1. {codespine-1.0.11 → codespine-1.0.13}/PKG-INFO +13 -7
  2. {codespine-1.0.11 → codespine-1.0.13}/README.md +12 -6
  3. {codespine-1.0.11 → codespine-1.0.13}/codespine/__init__.py +1 -1
  4. {codespine-1.0.11 → codespine-1.0.13}/codespine/analysis/deadcode.py +4 -4
  5. {codespine-1.0.11 → codespine-1.0.13}/codespine/cli.py +643 -231
  6. {codespine-1.0.11 → codespine-1.0.13}/codespine/db/_cypher_compat.py +2 -0
  7. {codespine-1.0.11 → codespine-1.0.13}/codespine/db/duckdb_store.py +38 -9
  8. {codespine-1.0.11 → codespine-1.0.13}/codespine/health.py +66 -9
  9. {codespine-1.0.11 → codespine-1.0.13}/codespine/mcp/server.py +64 -44
  10. codespine-1.0.13/codespine/project_state.py +225 -0
  11. {codespine-1.0.11 → codespine-1.0.13}/codespine/search/hybrid.py +52 -12
  12. {codespine-1.0.11 → codespine-1.0.13}/codespine/tasks.py +36 -5
  13. {codespine-1.0.11 → codespine-1.0.13}/codespine.egg-info/PKG-INFO +13 -7
  14. {codespine-1.0.11 → codespine-1.0.13}/codespine.egg-info/SOURCES.txt +2 -0
  15. {codespine-1.0.11 → codespine-1.0.13}/pyproject.toml +1 -1
  16. {codespine-1.0.11 → codespine-1.0.13}/tests/test_cypher_compat.py +16 -0
  17. {codespine-1.0.11 → codespine-1.0.13}/tests/test_deadcode.py +52 -0
  18. {codespine-1.0.11 → codespine-1.0.13}/tests/test_duckdb_store.py +36 -4
  19. {codespine-1.0.11 → codespine-1.0.13}/tests/test_health.py +6 -2
  20. codespine-1.0.13/tests/test_hybrid_search.py +89 -0
  21. {codespine-1.0.11 → codespine-1.0.13}/tests/test_tasks.py +15 -0
  22. {codespine-1.0.11 → codespine-1.0.13}/LICENSE +0 -0
  23. {codespine-1.0.11 → codespine-1.0.13}/codespine/analysis/__init__.py +0 -0
  24. {codespine-1.0.11 → codespine-1.0.13}/codespine/analysis/community.py +0 -0
  25. {codespine-1.0.11 → codespine-1.0.13}/codespine/analysis/context.py +0 -0
  26. {codespine-1.0.11 → codespine-1.0.13}/codespine/analysis/coupling.py +0 -0
  27. {codespine-1.0.11 → codespine-1.0.13}/codespine/analysis/crossmodule.py +0 -0
  28. {codespine-1.0.11 → codespine-1.0.13}/codespine/analysis/flow.py +0 -0
  29. {codespine-1.0.11 → codespine-1.0.13}/codespine/analysis/impact.py +0 -0
  30. {codespine-1.0.11 → codespine-1.0.13}/codespine/cache/__init__.py +0 -0
  31. {codespine-1.0.11 → codespine-1.0.13}/codespine/cache/result_cache.py +0 -0
  32. {codespine-1.0.11 → codespine-1.0.13}/codespine/config.py +0 -0
  33. {codespine-1.0.11 → codespine-1.0.13}/codespine/db/__init__.py +0 -0
  34. {codespine-1.0.11 → codespine-1.0.13}/codespine/db/schema.py +0 -0
  35. {codespine-1.0.11 → codespine-1.0.13}/codespine/db/store.py +0 -0
  36. {codespine-1.0.11 → codespine-1.0.13}/codespine/diff/__init__.py +0 -0
  37. {codespine-1.0.11 → codespine-1.0.13}/codespine/diff/branch_diff.py +0 -0
  38. {codespine-1.0.11 → codespine-1.0.13}/codespine/guide.py +0 -0
  39. {codespine-1.0.11 → codespine-1.0.13}/codespine/indexer/__init__.py +0 -0
  40. {codespine-1.0.11 → codespine-1.0.13}/codespine/indexer/call_resolver.py +0 -0
  41. {codespine-1.0.11 → codespine-1.0.13}/codespine/indexer/di_resolver.py +0 -0
  42. {codespine-1.0.11 → codespine-1.0.13}/codespine/indexer/engine.py +0 -0
  43. {codespine-1.0.11 → codespine-1.0.13}/codespine/indexer/java_parser.py +0 -0
  44. {codespine-1.0.11 → codespine-1.0.13}/codespine/indexer/symbol_builder.py +0 -0
  45. {codespine-1.0.11 → codespine-1.0.13}/codespine/mcp/__init__.py +0 -0
  46. {codespine-1.0.11 → codespine-1.0.13}/codespine/noise/__init__.py +0 -0
  47. {codespine-1.0.11 → codespine-1.0.13}/codespine/noise/blocklist.py +0 -0
  48. {codespine-1.0.11 → codespine-1.0.13}/codespine/overlay/__init__.py +0 -0
  49. {codespine-1.0.11 → codespine-1.0.13}/codespine/overlay/git_state.py +0 -0
  50. {codespine-1.0.11 → codespine-1.0.13}/codespine/overlay/merge.py +0 -0
  51. {codespine-1.0.11 → codespine-1.0.13}/codespine/overlay/store.py +0 -0
  52. {codespine-1.0.11 → codespine-1.0.13}/codespine/search/__init__.py +0 -0
  53. {codespine-1.0.11 → codespine-1.0.13}/codespine/search/bm25.py +0 -0
  54. {codespine-1.0.11 → codespine-1.0.13}/codespine/search/fuzzy.py +0 -0
  55. {codespine-1.0.11 → codespine-1.0.13}/codespine/search/rrf.py +0 -0
  56. {codespine-1.0.11 → codespine-1.0.13}/codespine/search/vector.py +0 -0
  57. {codespine-1.0.11 → codespine-1.0.13}/codespine/sharding/__init__.py +0 -0
  58. {codespine-1.0.11 → codespine-1.0.13}/codespine/sharding/router.py +0 -0
  59. {codespine-1.0.11 → codespine-1.0.13}/codespine/sharding/store.py +0 -0
  60. {codespine-1.0.11 → codespine-1.0.13}/codespine/watch/__init__.py +0 -0
  61. {codespine-1.0.11 → codespine-1.0.13}/codespine/watch/git_hook.py +0 -0
  62. {codespine-1.0.11 → codespine-1.0.13}/codespine/watch/watcher.py +0 -0
  63. {codespine-1.0.11 → codespine-1.0.13}/codespine.egg-info/dependency_links.txt +0 -0
  64. {codespine-1.0.11 → codespine-1.0.13}/codespine.egg-info/entry_points.txt +0 -0
  65. {codespine-1.0.11 → codespine-1.0.13}/codespine.egg-info/requires.txt +0 -0
  66. {codespine-1.0.11 → codespine-1.0.13}/codespine.egg-info/top_level.txt +0 -0
  67. {codespine-1.0.11 → codespine-1.0.13}/gindex.py +0 -0
  68. {codespine-1.0.11 → codespine-1.0.13}/setup.cfg +0 -0
  69. {codespine-1.0.11 → codespine-1.0.13}/tests/test_branch_diff_normalize.py +0 -0
  70. {codespine-1.0.11 → codespine-1.0.13}/tests/test_call_resolver.py +0 -0
  71. {codespine-1.0.11 → codespine-1.0.13}/tests/test_community_detection.py +0 -0
  72. {codespine-1.0.11 → codespine-1.0.13}/tests/test_index_and_hybrid.py +0 -0
  73. {codespine-1.0.11 → codespine-1.0.13}/tests/test_java_parser.py +0 -0
  74. {codespine-1.0.11 → codespine-1.0.13}/tests/test_multimodule_index.py +0 -0
  75. {codespine-1.0.11 → codespine-1.0.13}/tests/test_overlay.py +0 -0
  76. {codespine-1.0.11 → codespine-1.0.13}/tests/test_parse_resilience.py +0 -0
  77. {codespine-1.0.11 → codespine-1.0.13}/tests/test_result_cache.py +0 -0
  78. {codespine-1.0.11 → codespine-1.0.13}/tests/test_search_ranking.py +0 -0
  79. {codespine-1.0.11 → codespine-1.0.13}/tests/test_sharding.py +0 -0
  80. {codespine-1.0.11 → codespine-1.0.13}/tests/test_store_recovery.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codespine
3
- Version: 1.0.11
3
+ Version: 1.0.13
4
4
  Summary: Local Java code intelligence indexer backed by a graph database
5
5
  Author: CodeSpine contributors
6
6
  License: MIT License
@@ -66,7 +66,7 @@ Dynamic: license-file
66
66
 
67
67
  # CodeSpine
68
68
 
69
- **v1.0.11** — Local Java code intelligence for coding agents, backed by a graph database.
69
+ **v1.0.13** — Local Java code intelligence for coding agents, backed by a graph database.
70
70
 
71
71
  CodeSpine cuts token burn for coding agents working on Java codebases.
72
72
 
@@ -324,12 +324,14 @@ Higher-level tools designed to answer full agent questions in a single call, wit
324
324
 
325
325
  ```bash
326
326
  # Indexing
327
- codespine analyse <path> # incremental index (default)
327
+ codespine analyse <path> # trust-first incremental index (default)
328
328
  codespine analyse <path> --full # full re-index from scratch
329
- codespine analyse <path> --budget 90 # fast index with a resolver deadline
329
+ codespine analyse <path> --fast --budget 90 # budgeted partial core index
330
330
  codespine analyse <path> --complete --deep # + communities, flows, dead code, coupling
331
331
  codespine analyse <path> --complete --incremental-deep
332
332
  codespine analyse <path> --embed # + vector embeddings
333
+ codespine repair <project-id-or-path> # retry failed or incomplete phase
334
+ codespine repair <project-id-or-path> --full # force full core rebuild
333
335
 
334
336
  # Background jobs and local UI
335
337
  codespine background # background task progress
@@ -382,7 +384,7 @@ codespine force-reset # emergency: delete all data files
382
384
 
383
385
  `analyse` defaults to incremental mode. Repeat runs only process changed files and are fast.
384
386
 
385
- `analyse` runs in fast mode by default: it indexes the core graph, honors the foreground time budget, publishes a read replica, then continues unfinished core indexing or enrichment in the background. Use `codespine background` or `codespine ui` to watch that work. Use `--complete --deep` when you want those passes refreshed before the command returns.
387
+ `analyse` is trust-first by default: it completes the core graph in the foreground, validates and publishes the read replica, then keeps deep enrichment moving in the background. Use `--fast` only when you want a budgeted partial core index. Use `codespine background`, `codespine ui`, or `codespine repair` to inspect and recover incomplete or degraded work.
386
388
 
387
389
  ---
388
390
 
@@ -568,11 +570,15 @@ The deep analysis phase covers four passes that are expensive but optional:
568
570
  | Dead code | Finds methods with no callers (Java-aware exemptions) | Cleanup audits |
569
571
  | Change coupling | Analyses git history for co-changed file pairs | `get_change_coupling`, `related` |
570
572
 
571
- **Fast default:** `codespine analyse` prioritizes a queryable core index and keeps the foreground run inside the configured budget. If core indexing or call/type resolution cannot finish in time, the partial index is published and a background continuation finishes the core graph. Communities, flows, dead-code, git coupling, and cross-module links are queued in a detached background enrichment job unless you use `--complete`.
573
+ **Trust-first default:** `codespine analyse` now treats success as “the core graph is complete, validated, and queryable.” The default foreground path finishes parse, DB writes, call resolution, type resolution, DI resolution, and snapshot publish before it returns. Deep enrichment still continues in the background unless you use `--complete --deep`.
574
+
575
+ **Fast mode:** `codespine analyse --fast` keeps the old budgeted behavior for large repos. If the budget expires before the core graph is complete, CodeSpine publishes a partial snapshot, marks the project as partial, and tracks the background continuation until the core graph is repaired.
572
576
 
573
577
  **Health checks:** every analyse run now performs a small self-test query suite and reports index anomalies such as large projects with zero call edges. Use `codespine health` for the terminal dashboard or `codespine self-test --json` in CI.
574
578
 
575
- **Background visibility:** `codespine background` shows running background job progress in the terminal, and `codespine tasks` remains available as the shorter registry view. `codespine ui` serves a local read-only index explorer with project counts, index health, and the same background task state at `http://127.0.0.1:8765`.
579
+ **Background visibility:** `codespine background` shows status, result, last phase, progress, and repair hints in the terminal, and `codespine tasks` remains available as the shorter registry view. `codespine ui` serves a local explorer with project state (`ready`, `enriching`, `partial`, `degraded`, `repair_required`), background tasks, and one-click Repair/Reindex actions at `http://127.0.0.1:8765`.
580
+
581
+ **Repair flows:** `codespine repair <project-id-or-path>` retries the failed or incomplete phase first. Use `--full` when the project needs a full core rebuild.
576
582
 
577
583
  **Complete deep:** `--complete --deep` runs the expensive enrichment passes before returning. `--complete --incremental-deep` combines incremental file indexing with a forced full deep pass.
578
584
 
@@ -1,6 +1,6 @@
1
1
  # CodeSpine
2
2
 
3
- **v1.0.11** — Local Java code intelligence for coding agents, backed by a graph database.
3
+ **v1.0.13** — Local Java code intelligence for coding agents, backed by a graph database.
4
4
 
5
5
  CodeSpine cuts token burn for coding agents working on Java codebases.
6
6
 
@@ -258,12 +258,14 @@ Higher-level tools designed to answer full agent questions in a single call, wit
258
258
 
259
259
  ```bash
260
260
  # Indexing
261
- codespine analyse <path> # incremental index (default)
261
+ codespine analyse <path> # trust-first incremental index (default)
262
262
  codespine analyse <path> --full # full re-index from scratch
263
- codespine analyse <path> --budget 90 # fast index with a resolver deadline
263
+ codespine analyse <path> --fast --budget 90 # budgeted partial core index
264
264
  codespine analyse <path> --complete --deep # + communities, flows, dead code, coupling
265
265
  codespine analyse <path> --complete --incremental-deep
266
266
  codespine analyse <path> --embed # + vector embeddings
267
+ codespine repair <project-id-or-path> # retry failed or incomplete phase
268
+ codespine repair <project-id-or-path> --full # force full core rebuild
267
269
 
268
270
  # Background jobs and local UI
269
271
  codespine background # background task progress
@@ -316,7 +318,7 @@ codespine force-reset # emergency: delete all data files
316
318
 
317
319
  `analyse` defaults to incremental mode. Repeat runs only process changed files and are fast.
318
320
 
319
- `analyse` runs in fast mode by default: it indexes the core graph, honors the foreground time budget, publishes a read replica, then continues unfinished core indexing or enrichment in the background. Use `codespine background` or `codespine ui` to watch that work. Use `--complete --deep` when you want those passes refreshed before the command returns.
321
+ `analyse` is trust-first by default: it completes the core graph in the foreground, validates and publishes the read replica, then keeps deep enrichment moving in the background. Use `--fast` only when you want a budgeted partial core index. Use `codespine background`, `codespine ui`, or `codespine repair` to inspect and recover incomplete or degraded work.
320
322
 
321
323
  ---
322
324
 
@@ -502,11 +504,15 @@ The deep analysis phase covers four passes that are expensive but optional:
502
504
  | Dead code | Finds methods with no callers (Java-aware exemptions) | Cleanup audits |
503
505
  | Change coupling | Analyses git history for co-changed file pairs | `get_change_coupling`, `related` |
504
506
 
505
- **Fast default:** `codespine analyse` prioritizes a queryable core index and keeps the foreground run inside the configured budget. If core indexing or call/type resolution cannot finish in time, the partial index is published and a background continuation finishes the core graph. Communities, flows, dead-code, git coupling, and cross-module links are queued in a detached background enrichment job unless you use `--complete`.
507
+ **Trust-first default:** `codespine analyse` now treats success as “the core graph is complete, validated, and queryable.” The default foreground path finishes parse, DB writes, call resolution, type resolution, DI resolution, and snapshot publish before it returns. Deep enrichment still continues in the background unless you use `--complete --deep`.
508
+
509
+ **Fast mode:** `codespine analyse --fast` keeps the old budgeted behavior for large repos. If the budget expires before the core graph is complete, CodeSpine publishes a partial snapshot, marks the project as partial, and tracks the background continuation until the core graph is repaired.
506
510
 
507
511
  **Health checks:** every analyse run now performs a small self-test query suite and reports index anomalies such as large projects with zero call edges. Use `codespine health` for the terminal dashboard or `codespine self-test --json` in CI.
508
512
 
509
- **Background visibility:** `codespine background` shows running background job progress in the terminal, and `codespine tasks` remains available as the shorter registry view. `codespine ui` serves a local read-only index explorer with project counts, index health, and the same background task state at `http://127.0.0.1:8765`.
513
+ **Background visibility:** `codespine background` shows status, result, last phase, progress, and repair hints in the terminal, and `codespine tasks` remains available as the shorter registry view. `codespine ui` serves a local explorer with project state (`ready`, `enriching`, `partial`, `degraded`, `repair_required`), background tasks, and one-click Repair/Reindex actions at `http://127.0.0.1:8765`.
514
+
515
+ **Repair flows:** `codespine repair <project-id-or-path>` retries the failed or incomplete phase first. Use `--full` when the project needs a full core rebuild.
510
516
 
511
517
  **Complete deep:** `--complete --deep` runs the expensive enrichment passes before returning. `--complete --incremental-deep` combines incremental file indexing with a forced full deep pass.
512
518
 
@@ -1,4 +1,4 @@
1
1
  """CodeSpine package."""
2
2
 
3
3
  __all__ = ["__version__"]
4
- __version__ = "1.0.11"
4
+ __version__ = "1.0.13"
@@ -197,9 +197,9 @@ def detect_dead_code(store, limit: int = 200, project: str | None = None, strict
197
197
  m.is_constructor as is_constructor,
198
198
  m.is_test as is_test,
199
199
  f.path as file_path
200
- LIMIT $limit
200
+ LIMIT $lim
201
201
  """,
202
- {"limit": int(limit * 5), "proj": project},
202
+ {"lim": int(limit * 5), "proj": project},
203
203
  )
204
204
  else:
205
205
  candidates = store.query_records(
@@ -215,9 +215,9 @@ def detect_dead_code(store, limit: int = 200, project: str | None = None, strict
215
215
  m.is_constructor as is_constructor,
216
216
  m.is_test as is_test,
217
217
  f.path as file_path
218
- LIMIT $limit
218
+ LIMIT $lim
219
219
  """,
220
- {"limit": int(limit * 5)},
220
+ {"lim": int(limit * 5)},
221
221
  )
222
222
 
223
223
  if not candidates: