graphite-code 1.4.1__tar.gz → 1.6.0__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 (321) hide show
  1. {graphite_code-1.4.1 → graphite_code-1.6.0}/CHANGELOG.md +209 -5
  2. {graphite_code-1.4.1 → graphite_code-1.6.0}/CONTRIBUTING.md +8 -0
  3. {graphite_code-1.4.1 → graphite_code-1.6.0}/PKG-INFO +3 -2
  4. {graphite_code-1.4.1 → graphite_code-1.6.0}/README.md +1 -1
  5. {graphite_code-1.4.1 → graphite_code-1.6.0}/pyproject.toml +12 -1
  6. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/__init__.py +1 -1
  7. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/agent_hooks.py +20 -2
  8. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/cli.py +12 -0
  9. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/daemon.py +105 -6
  10. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/daemon_health.py +83 -2
  11. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/doctor.py +9 -0
  12. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/git.py +12 -0
  13. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/ingest.py +7 -2
  14. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/usage_ledger.py +27 -0
  15. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/conftest.py +17 -1
  16. graphite_code-1.6.0/tests/test_agent_hooks_session_tagging.py +172 -0
  17. graphite_code-1.6.0/tests/test_daemon_snapshot_failure.py +507 -0
  18. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_hardening.py +31 -0
  19. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_listing_surfaces.py +2 -1
  20. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_typescript_activation.py +89 -6
  21. {graphite_code-1.4.1 → graphite_code-1.6.0}/.gitignore +0 -0
  22. {graphite_code-1.4.1 → graphite_code-1.6.0}/ARCHITECTURE.md +0 -0
  23. {graphite_code-1.4.1 → graphite_code-1.6.0}/LICENSE +0 -0
  24. {graphite_code-1.4.1 → graphite_code-1.6.0}/RELEASING.md +0 -0
  25. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/__main__.py +0 -0
  26. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/_cleanup_worker.py +0 -0
  27. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/_win32_ctypes.py +0 -0
  28. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/activation.py +0 -0
  29. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/agent_settings.py +0 -0
  30. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/analyze.py +0 -0
  31. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/answer_contract.py +0 -0
  32. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/bootstrap.py +0 -0
  33. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/buildlock.py +0 -0
  34. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/cache.py +0 -0
  35. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/channel.py +0 -0
  36. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/cluster.py +0 -0
  37. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/config.py +0 -0
  38. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/context.py +0 -0
  39. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/daemon_launch.py +0 -0
  40. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/debt.py +0 -0
  41. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/dependency_install.py +0 -0
  42. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/detach.py +0 -0
  43. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/doctor_probes.py +0 -0
  44. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/engine_identity.py +0 -0
  45. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/export/__init__.py +0 -0
  46. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/export/html.py +0 -0
  47. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/export/json.py +0 -0
  48. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/export/md.py +0 -0
  49. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/extract/__init__.py +0 -0
  50. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/extract/ast.py +0 -0
  51. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/extract/pyscope.py +0 -0
  52. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/freshness.py +0 -0
  53. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/graph.py +0 -0
  54. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/graph_io.py +0 -0
  55. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/health.py +0 -0
  56. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/hook_entry.py +0 -0
  57. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/hookinstall.py +0 -0
  58. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/hookshim.py +0 -0
  59. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/incident_ledger.py +0 -0
  60. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/init.py +0 -0
  61. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/io.py +0 -0
  62. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/launchd_agent.py +0 -0
  63. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/listing.py +0 -0
  64. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/llm.py +0 -0
  65. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/llm_probe.py +0 -0
  66. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/mcp.py +0 -0
  67. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/mcp_server.py +0 -0
  68. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/natural_query.py +0 -0
  69. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/overlays.py +0 -0
  70. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/ownership.py +0 -0
  71. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/probe_process.py +0 -0
  72. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/probe_workspace.py +0 -0
  73. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/process_contracts.py +0 -0
  74. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/programs.py +0 -0
  75. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/provider_observer.py +0 -0
  76. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/py.typed +0 -0
  77. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/query.py +0 -0
  78. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/query_plan.py +0 -0
  79. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/replacement_audit.py +0 -0
  80. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/resolve.py +0 -0
  81. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/review.py +0 -0
  82. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/__init__.py +0 -0
  83. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/approval.py +0 -0
  84. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/classifier.py +0 -0
  85. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/claude_executor.py +0 -0
  86. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/claude_probe.py +0 -0
  87. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/cli_identity.py +0 -0
  88. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/codex_executor.py +0 -0
  89. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/codex_probe.py +0 -0
  90. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/context_builder.py +0 -0
  91. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/contracts.py +0 -0
  92. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/diff_policy.py +0 -0
  93. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/edit_apply.py +0 -0
  94. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/effort.py +0 -0
  95. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/lifecycle.py +0 -0
  96. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/lifecycle_operator.py +0 -0
  97. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/lifecycle_service.py +0 -0
  98. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/lifecycle_storage.py +0 -0
  99. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/ollama_executor.py +0 -0
  100. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/ollama_probe.py +0 -0
  101. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/openrouter_executor.py +0 -0
  102. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/openrouter_probe.py +0 -0
  103. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/policy.py +0 -0
  104. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/probe_runner.py +0 -0
  105. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/process_runner.py +0 -0
  106. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/profiles.py +0 -0
  107. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/prompt.py +0 -0
  108. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/registry.py +0 -0
  109. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/route_pool.py +0 -0
  110. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/route_pool_execution.py +0 -0
  111. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/schema_validation.py +0 -0
  112. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/service.py +0 -0
  113. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/settings.py +0 -0
  114. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/shadow.py +0 -0
  115. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/storage.py +0 -0
  116. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/telemetry.py +0 -0
  117. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/worktree.py +0 -0
  118. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/zai_edit.py +0 -0
  119. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/zai_executor.py +0 -0
  120. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/routing/zai_probe.py +0 -0
  121. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/savings.py +0 -0
  122. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/systemd_unit.py +0 -0
  123. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/ts_bridge.py +0 -0
  124. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/ts_resolver.mjs +0 -0
  125. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/typescript_activation.py +0 -0
  126. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/validation.py +0 -0
  127. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/watch.py +0 -0
  128. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/windows_job.py +0 -0
  129. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/windows_startup.py +0 -0
  130. {graphite_code-1.4.1 → graphite_code-1.6.0}/src/graphite/windows_task.py +0 -0
  131. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/data/sqloracle/blindspots.py.txt +0 -0
  132. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/data/sqloracle/round69.py.txt +0 -0
  133. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/fake_clis/fake_cli.py +0 -0
  134. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/fixtures/provider_lifecycle_schema_v1.sql +0 -0
  135. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/fixtures/routing_schema_v2_ca77600.sql +0 -0
  136. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/fixtures/routing_schema_v3_94eb333.sql +0 -0
  137. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/fixtures/routing_schema_v4_lifecycle_migration.sql +0 -0
  138. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test__win32_ctypes.py +0 -0
  139. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_activation.py +0 -0
  140. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_activation_backstop.py +0 -0
  141. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_agent_hook_activation.py +0 -0
  142. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_agent_hooks.py +0 -0
  143. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_agent_hooks_session_books.py +0 -0
  144. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_agent_settings.py +0 -0
  145. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_answer_contract.py +0 -0
  146. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_arrow_and_constructor_binding.py +0 -0
  147. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_ast_make_id_length.py +0 -0
  148. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_ast_name_a_module_only_imports.py +0 -0
  149. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_ast_source_lines.py +0 -0
  150. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_ast_super_over_a_builtin_base.py +0 -0
  151. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_atomic_write.py +0 -0
  152. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_bootstrap.py +0 -0
  153. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_build_detach.py +0 -0
  154. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_buildlock.py +0 -0
  155. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cache_engine_identity.py +0 -0
  156. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cache_entry_pruning.py +0 -0
  157. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cache_file_identity.py +0 -0
  158. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cache_file_set.py +0 -0
  159. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cache_pruning.py +0 -0
  160. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_call_graph.py +0 -0
  161. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_case_ambiguous_answer.py +0 -0
  162. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_channel_attribution.py +0 -0
  163. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_channel_cli.py +0 -0
  164. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_channel_core.py +0 -0
  165. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_channel_kind.py +0 -0
  166. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_channel_lock.py +0 -0
  167. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_channel_log_integrity.py +0 -0
  168. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_channel_mcp.py +0 -0
  169. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_channel_register.py +0 -0
  170. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_channel_report.py +0 -0
  171. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_channel_status.py +0 -0
  172. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_class_field_arrow_binding.py +0 -0
  173. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cli_below_repository_root.py +0 -0
  174. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cli_build_missing_path.py +0 -0
  175. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cli_channel.py +0 -0
  176. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cli_channel_attribution.py +0 -0
  177. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cli_doctor_below_root.py +0 -0
  178. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cli_reference.py +0 -0
  179. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cli_usage.py +0 -0
  180. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cli_version.py +0 -0
  181. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cluster.py +0 -0
  182. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_compare_dist.py +0 -0
  183. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_configuration_reference.py +0 -0
  184. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_context.py +0 -0
  185. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_context_builder.py +0 -0
  186. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cwd_relative_config.py +0 -0
  187. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_cycle_search.py +0 -0
  188. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_daemon.py +0 -0
  189. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_daemon_activation.py +0 -0
  190. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_daemon_build_lock.py +0 -0
  191. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_daemon_child_lock.py +0 -0
  192. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_daemon_engine_staleness.py +0 -0
  193. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_daemon_health.py +0 -0
  194. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_daemon_health_activation.py +0 -0
  195. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_daemon_launch.py +0 -0
  196. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_daemon_service_cli.py +0 -0
  197. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_debt.py +0 -0
  198. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_dependency_install.py +0 -0
  199. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_destructured_binding.py +0 -0
  200. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_determinism.py +0 -0
  201. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_dispatch_evidence.py +0 -0
  202. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_doctor.py +0 -0
  203. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_doctor_agent_hooks.py +0 -0
  204. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_doctor_hooks.py +0 -0
  205. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_doctor_managed_docs.py +0 -0
  206. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_doctor_probes.py +0 -0
  207. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_documentation.py +0 -0
  208. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_edit_apply.py +0 -0
  209. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_engine_identity.py +0 -0
  210. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_exit_codes_reference.py +0 -0
  211. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_external_calls.py +0 -0
  212. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_file_node_id_collision.py +0 -0
  213. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_git_security.py +0 -0
  214. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_go_rust.py +0 -0
  215. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_graph_io.py +0 -0
  216. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_graph_provider_isolation.py +0 -0
  217. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_health.py +0 -0
  218. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_hook_entry.py +0 -0
  219. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_hook_template.py +0 -0
  220. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_hookinstall.py +0 -0
  221. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_hookshim.py +0 -0
  222. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_html_security.py +0 -0
  223. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_incident_ledger.py +0 -0
  224. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_init.py +0 -0
  225. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_init_activation_doctrine.py +0 -0
  226. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_init_hooks.py +0 -0
  227. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_init_validation_exit.py +0 -0
  228. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_launchd_agent.py +0 -0
  229. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_lifecycle_operator.py +0 -0
  230. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_listing.py +0 -0
  231. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_llm.py +0 -0
  232. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_llm_probe.py +0 -0
  233. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_mcp.py +0 -0
  234. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_mcp_server.py +0 -0
  235. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_mcp_server_channel_attribution.py +0 -0
  236. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_member_call_receiver.py +0 -0
  237. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_method_dispatch_scope.py +0 -0
  238. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_monorepo.py +0 -0
  239. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_mutation_tests.py +0 -0
  240. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_natural_query.py +0 -0
  241. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_no_path_is_graded.py +0 -0
  242. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_node_identity.py +0 -0
  243. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_ollama_executor.py +0 -0
  244. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_overlays.py +0 -0
  245. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_path_leak_fixture.py +0 -0
  246. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_probe_diagnostics.py +0 -0
  247. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_probe_process.py +0 -0
  248. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_probe_workspace.py +0 -0
  249. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_process_contracts.py +0 -0
  250. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_programs.py +0 -0
  251. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_provider_claude_probe.py +0 -0
  252. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_provider_codex_probe.py +0 -0
  253. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_provider_lifecycle.py +0 -0
  254. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_provider_lifecycle_service.py +0 -0
  255. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_provider_lifecycle_storage.py +0 -0
  256. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_provider_observer.py +0 -0
  257. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_provider_ollama_probe.py +0 -0
  258. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_provider_openrouter_probe.py +0 -0
  259. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_provider_probe_runner.py +0 -0
  260. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_public_surface.py +0 -0
  261. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_published_schemas.py +0 -0
  262. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_pyscope.py +0 -0
  263. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_pyscopeoracle.py +0 -0
  264. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_python_builtin_named_symbols.py +0 -0
  265. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_python_import_bindings.py +0 -0
  266. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_python_inherits_edge.py +0 -0
  267. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_python_local_alias_call.py +0 -0
  268. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_python_reexport_follow.py +0 -0
  269. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_python_resolver.py +0 -0
  270. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_python_scope_identity.py +0 -0
  271. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_query_plan.py +0 -0
  272. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_reliability.py +0 -0
  273. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_replacement_audit.py +0 -0
  274. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_repository_root_ownership.py +0 -0
  275. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_resolve.py +0 -0
  276. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_resolve_python_reexports_of.py +0 -0
  277. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_review.py +0 -0
  278. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_route_pool.py +0 -0
  279. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_route_pool_execution.py +0 -0
  280. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_approval.py +0 -0
  281. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_benchmark.py +0 -0
  282. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_classifier.py +0 -0
  283. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_claude_executor.py +0 -0
  284. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_cli.py +0 -0
  285. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_cli_contracts.py +0 -0
  286. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_cli_recovery.py +0 -0
  287. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_codex_executor.py +0 -0
  288. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_context.py +0 -0
  289. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_contracts.py +0 -0
  290. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_diff_policy.py +0 -0
  291. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_executor.py +0 -0
  292. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_openrouter_executor.py +0 -0
  293. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_policy.py +0 -0
  294. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_process_runner.py +0 -0
  295. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_profiles.py +0 -0
  296. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_registry.py +0 -0
  297. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_schema_validation.py +0 -0
  298. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_security.py +0 -0
  299. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_service.py +0 -0
  300. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_shadow.py +0 -0
  301. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_storage.py +0 -0
  302. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_telemetry.py +0 -0
  303. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_worktree.py +0 -0
  304. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_zai_executor.py +0 -0
  305. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_routing_zai_probe.py +0 -0
  306. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_savings.py +0 -0
  307. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_search.py +0 -0
  308. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_self_super_dispatch.py +0 -0
  309. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_smoke.py +0 -0
  310. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_sqloracle.py +0 -0
  311. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_synthetic_repo.py +0 -0
  312. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_systemd_unit.py +0 -0
  313. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_ts_bridge.py +0 -0
  314. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_typescript_resolver.py +0 -0
  315. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_usage_ledger.py +0 -0
  316. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_verify_artifact.py +0 -0
  317. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_verify_published_release.py +0 -0
  318. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_watch.py +0 -0
  319. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_windows_startup.py +0 -0
  320. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_windows_task.py +0 -0
  321. {graphite_code-1.4.1 → graphite_code-1.6.0}/tests/test_zai_edit.py +0 -0
@@ -15,6 +15,205 @@ machine-checkable identity; the version is for humans.
15
15
 
16
16
  ## [Unreleased]
17
17
 
18
+ ## [1.6.0] — 2026-10-27
19
+
20
+ A minor release: the daemon's health report no longer reads "ok" while every
21
+ snapshot of an activated project fails (#113), and the daemon's log now
22
+ carries the cause of a failure instead of only its message. The
23
+ `daemon-health --json` output gains two fields on a failing project and a
24
+ new error code, and the `dev` extra gains one dependency, so this is a
25
+ minor by the rule in `docs/compatibility.md` -- "Fields are added in
26
+ minors" -- and by the precedent of 1.1.0, whose own note reads "The agent
27
+ channel's read surfaces gain fields, which is an addition to a stable
28
+ surface." No command, option, exit code or entry point is added, removed or
29
+ renamed, and the `daemon-status` output gains a listing where it had none.
30
+
31
+ The graph changes by what this fix adds. Measured on this repository: the
32
+ 1.5.0 release tree built by the installed 1.5.0 engine, and this tree built
33
+ by this engine, each into fresh output, cache and state directories:
34
+
35
+ - 9,244 nodes become 9,298 and 25,415 edges become 25,599. The 54 new nodes
36
+ are the functions and classes this change adds, the file of the new test
37
+ file, and the fixtures and helpers that go with them;
38
+ - every node id survives: 9,244 of 9,244 are in both, 54 are new and none
39
+ is removed;
40
+ - 6,712 definition ids become 6,752: 6,495 survive naming the same
41
+ definition at the same line, and 217 survive by id but move line -- every
42
+ one of them in the eight files this change touches (`cli.py` 43,
43
+ `doctor.py` 37, `daemon.py` 31, `daemon_health.py` 18,
44
+ `tests/test_typescript_activation.py` 17, `git.py` 12,
45
+ `ingest.py` 2, `tests/test_hardening.py` 57). No definition id is
46
+ removed and 40 are new;
47
+ - `contains` goes from 6,710 relation triples to 6,750 and `imports` from
48
+ 2,465 to 2,480; `calls` goes from 16,290 to 16,418; `inherits` (120)
49
+ becomes 121. 25,585 relation triples become 25,769, with none removed;
50
+ - 18 cycles where there were 18, the same ones, and 177 communities where
51
+ there were 175. Orphans and surprising connections are identical; the
52
+ entry points, the god nodes and the top files by links differ, because
53
+ the new code adds and moves them.
54
+
55
+ `metadata.engine.fingerprint` moves, as it does whenever the engine's own
56
+ files change -- and they do: the identity hashes every `.py` and `.mjs`
57
+ file in the package, so a change to the daemon, the health report, the
58
+ ingest or the Git wrapper moves it whether or not the extraction changed.
59
+
60
+ The two builds above used different `tree-sitter` versions (0.25.2 for the
61
+ installed 1.5.0 and 0.26.0 for the dev environment; `tree-sitter-python`
62
+ is 0.25.0 in both), so the difference was controlled for rather than
63
+ assumed away: the SAME tree built by both engines gives the same ids, the
64
+ same edges and the same triples, node for node -- 9,298 nodes, 25,599
65
+ edges and all 25,769 relation triples identical, with no id moved and none
66
+ removed, and the same resolution health. The figures above are therefore
67
+ attributable to this change and not to the parsers.
68
+
69
+ ### Fixed
70
+
71
+ - Daemon: the health report no longer reads `ok` while every snapshot of an
72
+ activated project fails (#113). A project the daemon could not snapshot
73
+ was logged as `project_snapshot_failed` and then dropped: it never entered
74
+ the supervised set, so it was absent from `status.json`, nothing counted
75
+ it as failing, and `daemon-health` read `ok, 0 projects, 0 failing` while
76
+ no graph was being maintained at all. On 2026-10-27 the daemon failed every
77
+ snapshot of an activated repository -- ten failures across nine discovery
78
+ cycles, 01:50:22Z to 02:03:59Z -- and the report said `ok` throughout. The
79
+ daemon now keeps each failure -- its root and its reason -- under
80
+ `snapshot_failures` in `status.json`, counts the project as failing, and
81
+ names it with the reason in `daemon-health` and `daemon-status`. A
82
+ `status.json` written before this key existed is read unchanged, and a
83
+ failure whose reason is missing is still counted and named: the reason is
84
+ absent, not the failure. A project whose snapshot failed is still never
85
+ built -- with no snapshot there is no change set, and building on an empty
86
+ one would publish an empty graph over a working one -- and one broken
87
+ repository no longer blinds the daemon to the healthy ones beside it.
88
+ Measured on this machine against a repository whose `.git` is not a valid
89
+ repository, the failure the daemon hit on 2026-10-27: the health report
90
+ goes from `ok`, `0 total, 0 failing` to `degraded`, `2 total, 1 failing`,
91
+ naming the project and the reason, while the healthy repository beside it
92
+ is still built.
93
+ - Daemon: a snapshot failure now logs the cause, not just the sentence
94
+ (#113's follow-up). The daemon logged `str(exc)`, which for a failed
95
+ enumeration is the constant `unable to enumerate Git repository safely` and
96
+ nothing else: which step failed and which errno it was lived in the
97
+ exception's `__cause__` chain, and the chain was discarded. On 2026-10-27
98
+ the daemon failed every snapshot of an activated repository for thirteen
99
+ minutes, and the log could not say why. The `project_snapshot_failed` and
100
+ `project_scan_failed` events now carry a `cause`: the exception and its
101
+ chain, rendered path-free -- a `GitError` by its own `diagnostic()` (class,
102
+ step, errno) and every other exception by its class name alone, so no path
103
+ and no Git text can reach the log. The chain is bounded and a cycle cannot
104
+ make it loop. A Git command that runs and exits non-zero now leaves a
105
+ cause too: Git's own text is discarded on purpose, and the run's stderr
106
+ was never captured, but the exit status is an integer and is the only
107
+ thing left that says which failure this was -- previously that error
108
+ carried no cause at all.
109
+ - Tests: a stubbed module no longer outlives the test that made it. The
110
+ boundary test in `tests/test_typescript_activation.py` installs fake `mcp`
111
+ modules -- `mcp.types.Tool = object` -- to check that importing the MCP
112
+ server never reaches activation orchestration, and then imports
113
+ `graphite.mcp` against them. `monkeypatch.delitem(sys.modules, name,
114
+ raising=False)` records NOTHING when the key is absent, so the
115
+ `graphite.mcp` / `graphite.mcp_server` imported against the stubs stayed
116
+ reachable after the test: in `sys.modules`, and as the ATTRIBUTE the import
117
+ system sets on the parent package, which `from graphite import mcp_server`
118
+ returns without importing anything. A later test in the same worker that
119
+ read the module got the stub, and died with `AttributeError: type object
120
+ 'object' has no attribute 'model_validate'`. The serial suite never saw
121
+ it, because every file that reads `graphite.mcp_server` sorts before the
122
+ one that stubs it; the parallel suite does, because `--dist loadfile`
123
+ reorders the work queue by test count per file (`--loadscope-reorder`
124
+ defaults to on) and the stubbing file is the largest in the suite. The
125
+ import is now undone in a `finally`, from both places it was reachable, and
126
+ a regression test pins that.
127
+
128
+ ### Changed
129
+
130
+ - The test suite runs in parallel. The suite is WAIT-bound, not CPU-bound
131
+ -- the channel tests alone spend about 760s mostly sleeping on locks and
132
+ broker round trips -- so serial execution paid for nothing.
133
+ `pytest-xdist` is a declared dev dependency, which adds one
134
+ `Requires-Dist` line to the wheel's metadata for the `dev` extra alone,
135
+ and the pre-push gate runs the suite across six processes, distributed by
136
+ file so that a file's tests share one process and the suite keeps the
137
+ per-file semantics it has today. Measured on this machine, same
138
+ interpreter, the same tree six tests apart: **1,190s serial becomes
139
+ 323s**, 3.7x faster, and green either way -- six tests cannot account
140
+ for the difference. No assertion changes; only how many of them run at
141
+ once. The gate's budgets are re-derived from that measurement rather than
142
+ left stale: `timeout_s` 1800 -> 1200 and `pre_push` 2100 -> 1800.
143
+ The gate also runs it with `--no-loadscope-reorder`, because `--dist
144
+ loadfile` alone does NOT keep the suite's order: pytest-xdist reorders the
145
+ work queue by test count per file unless that is turned off, so the
146
+ parallel run stops matching the serial one. Measured on this machine, same
147
+ tree, same interpreter: 412.5s with the reorder on, 329.9s with it off --
148
+ not slower, because the suite is WAIT-bound rather than CPU-bound.
149
+
150
+ ## [1.5.0] — 2026-10-26
151
+
152
+ A minor release: one fix to the agent hooks' savings line (#110), and with
153
+ it one environment variable added to the configuration surface. No command,
154
+ option, JSON field, exit code or entry point is added, removed or renamed,
155
+ the ledger's other fields and the hook's wire format are unchanged, and
156
+ `Requires-Dist` and the entry points are those of 1.4.1.
157
+
158
+ The graph changes by what this fix adds. Measured on this repository: the
159
+ 1.4.1 release tree and this one, each built by the same interpreter with the
160
+ same parsers, into fresh output, cache and state directories:
161
+
162
+ - 9,221 nodes become 9,244 and 25,347 edges become 25,415. The 23 new
163
+ nodes are the two functions this fix adds (`current_session_id`,
164
+ `_entry_is_this_session`), the fixture that keeps the suite hermetic, the
165
+ eighteen functions and the file of the new test file, and the
166
+ `os.environ.get` call site;
167
+ - 6,664 of 6,691 definition ids survive naming the same definition at the
168
+ same line, and 27 survive by id but move line -- every one of them in the
169
+ three files this change touches (`agent_hooks.py` 3, `usage_ledger.py` 13,
170
+ `conftest.py` 11). No definition id is removed and 21 are new;
171
+ - `contains` goes from 6,689 relation triples to 6,710 and `imports` from
172
+ 2,457 to 2,465; `calls` goes from 16,251 to 16,290; `inherits` (120) is
173
+ unchanged. 25,517 relation triples become 25,585, with none removed;
174
+ - 18 cycles where there were 18, the same ones, and 177 communities where
175
+ there were 179;
176
+ - two builds of this tree are byte-identical.
177
+
178
+ `metadata.engine.fingerprint` moves, as it does whenever the engine's
179
+ environment changes: it folds in the parser versions present, and the
180
+ interpreter's tree-sitter-python moved from 0.25.2 to 0.26.0 since 1.4.1's
181
+ build. The graph is unchanged by that: the same tree built by both parser
182
+ versions gives the same ids, the same edges and the same triples, node for
183
+ node.
184
+
185
+ ### Added
186
+
187
+ **`GRAPHITE_SESSION_ID` names the session a usage-ledger entry belongs to**
188
+ (#110). This release adds to the configuration surface, so
189
+ `docs/reference/configuration.md` now lists the new variable together with
190
+ the two harness variables graphite falls back to when it is unset --
191
+ `CLAUDE_CODE_SESSION_ID` and `CODEX_COMPANION_SESSION_ID`. The first of the
192
+ three that is set is the one an entry records. Unset means the entry is
193
+ recorded untagged and every session counts it, as it did before.
194
+
195
+ ### Fixed
196
+
197
+ **Two sessions open in one repository no longer count each other's use**
198
+ (#110). The usage ledger is per repository and every session appends to it,
199
+ and an entry said nothing about who made it. So where two sessions were open
200
+ at once each one's Stop counted the other's queries as its own: the second
201
+ session's Stop saw the first session's query, because that query was written
202
+ after the second session's books were opened, and the first session's next
203
+ Stop saw the second's. Each session reported the other's use as saved "this
204
+ turn", and both session totals ended at both.
205
+
206
+ An entry now records the session that made it, and a Stop counts only the
207
+ entries that name its own session. The tag is what the process can know:
208
+ `GRAPHITE_SESSION_ID` first, then `CLAUDE_CODE_SESSION_ID`, then
209
+ `CODEX_COMPANION_SESSION_ID`, the first that is set -- the same value the
210
+ Stop hook is given, so an entry and the hook that counts it name one session.
211
+ An entry no session can be attributed to -- a person running graphite in a
212
+ terminal in the same repository -- is counted as it was, so no real use is
213
+ dropped. The ledger's other fields, the hook's wire format and
214
+ `graphite savings` are unchanged: that command reports the repository's
215
+ totals, which is what it is for.
216
+
18
217
  ## [1.4.1] — 2026-10-25
19
218
 
20
219
  A patch release: three fixes, two to the Python graph (#106, #107) and one
@@ -35,8 +234,9 @@ deployed 1.4.0 engine, with the same interpreter, from one tree:
35
234
  constructor (#106). `calls` goes from 16,265 to 16,251 edges, and the
36
235
  Python `calls` ratio from 0.978 to 0.983: 12,236 of 12,452 call sites
37
236
  are bound, where 12,191 of 12,466 were;
38
- - `contains` (6,689), `imports` (2,457) and `inherits` (120) are
39
- unchanged;
237
+ - `contains` is unchanged: 6,519 edges, and 6,689 relation triples, the
238
+ difference being 170 edges that carry `contains` as a second relation
239
+ beside `calls`. `imports` (2,457) and `inherits` (120) are unchanged;
40
240
  - `analysis` lists 18 cycles where it listed 20: the two it no longer lists
41
241
  ran through those edges. Entry points, god nodes, orphans, surprising
42
242
  connections and top files are identical; the community count goes from
@@ -131,7 +331,9 @@ deployed 1.3.0 engine, with the same interpreter, from one tree:
131
331
  ended at a placeholder named for the local: 16 now end at a definition,
132
332
  and 5 at a placeholder for a name the module only imports, which is where
133
333
  a direct call of it already ended (#90; that gap is #107). One call site is
134
- new (#85). `contains` (6,614) and `imports` (2,431) are unchanged, and
334
+ new (#85). `contains` is 6,446 edges where 1.3.0 held 6,447, and 6,614
335
+ relation triples on both sides: 168 edges carry `contains` as a second
336
+ relation beside `calls` where 167 did. `imports` (2,431) is unchanged, and
135
337
  25,177 of the 25,230 edge triples are unchanged;
136
338
  - the Python `calls` ratio goes from 0.976 to 0.978: 12,001 of 12,276 call
137
339
  sites are bound, where 11,984 of 12,275 were;
@@ -251,8 +453,10 @@ one tree:
251
453
  - all 9,031 node ids survive, each naming the same definition, file or
252
454
  placeholder, and none is new;
253
455
  - `calls` goes from 15,811 to 15,771: 44 call triples are gone and 4 are
254
- new. `contains` (6,502), `imports` (2,383) and `inherits` (120) are
255
- unchanged, and 24,772 of 24,816 edge triples are unchanged;
456
+ new. `contains` is unchanged: 6,337 edges, and 6,502 relation triples, the
457
+ difference being 165 edges that carry `contains` as a second relation
458
+ beside `calls`. `imports` (2,383) and `inherits` (120) are unchanged, and
459
+ 24,772 of 24,816 edge triples are unchanged;
256
460
  - `analysis` (20 cycles, entry points, god nodes, orphans) is identical. The
257
461
  community count goes from 169 to 170;
258
462
  - the Python `calls` ratio is 0.976 before and after. The cell counts 40
@@ -100,6 +100,14 @@ python -m graphite --help
100
100
 
101
101
  Focused tests shorten the feedback loop; they do not replace the full Ruff, mypy, pytest, and CLI smoke checks. Add behavior-level tests for new or changed contracts and ensure failures are meaningful rather than dependent on local machine state.
102
102
 
103
+ The suite is WAIT-bound, not CPU-bound — the channel tests alone spend most of their time sleeping on locks and broker round trips — so `pytest-xdist` is a declared dev dependency and the suite can be run across processes:
104
+
105
+ ```bash
106
+ python -m pytest -q -rs -n 6 --dist loadfile --no-loadscope-reorder
107
+ ```
108
+
109
+ `--dist loadfile` keeps a file's tests in one worker, which preserves the per-file semantics the suite has today; plain `-n` balances better but splits a file's tests across workers. `--no-loadscope-reorder` is needed because `--dist loadfile` alone does NOT keep the suite's order: pytest-xdist reorders the work queue by test count per file (descending) unless that is turned off, so the biggest file runs first and the parallel run stops matching the serial one. A test that depends on which file ran first is then order-dependent in a way the serial suite never was — which is how a stub-imported module in `tests/test_typescript_activation.py` reached a later test in the same worker and failed it. The pre-push gate runs the suite this way, and `aramid.toml` records the measurement.
110
+
103
111
  What CI enforces on every push and pull request (`.github/workflows/ci.yml`): a `lint` job (ruff, mypy, the generated CLI reference in sync); a `test` matrix of Windows, Linux and macOS × Python 3.11–3.14 in which **every cell gates**; a `security` job that runs the same aramid pre-commit and pre-push gates as the local hooks (gitleaks, semgrep, ruff security rules, the repo-root shadow check, mypy, the suite) and asserts from the gate's JSON report that each scanner actually ran; the `coverage` floor; a `benchmark` job against the synthetic corpus; and an `artifact` job that builds the distribution twice and requires byte-identical results. The local git hooks are installed by `aramid` from the committed `aramid.toml`; do not push with `--no-verify`.
104
112
 
105
113
  Doctor changes require focused tests for stable doctor JSON, deterministic ordering, redaction, end-to-end deadlines, process cleanup, missing tools, and optional semantics. Cover both successful and adversarial outcomes. Cross-platform behavior must have Windows and POSIX coverage; use narrowly scoped platform skips only when an operating-system primitive truly has no counterpart, and test the portable contract on every platform.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: graphite-code
3
- Version: 1.4.1
3
+ Version: 1.6.0
4
4
  Summary: Local-first, zero-LLM knowledge graph extraction for codebases.
5
5
  Project-URL: Homepage, https://github.com/jared0565/graphite
6
6
  Project-URL: Repository, https://github.com/jared0565/graphite
@@ -37,6 +37,7 @@ Provides-Extra: dev
37
37
  Requires-Dist: mypy>=1.14; extra == 'dev'
38
38
  Requires-Dist: pytest-cov>=5.0; extra == 'dev'
39
39
  Requires-Dist: pytest-timeout>=2.3; extra == 'dev'
40
+ Requires-Dist: pytest-xdist>=3.5; extra == 'dev'
40
41
  Requires-Dist: pytest>=8.0; extra == 'dev'
41
42
  Requires-Dist: ruff>=0.5; extra == 'dev'
42
43
  Provides-Extra: local-llm
@@ -48,7 +49,7 @@ Description-Content-Type: text/markdown
48
49
 
49
50
  Local-first, deterministic knowledge graph extraction for codebases — zero-LLM, daemon-maintained, agent-agnostic.
50
51
 
51
- **Status: 1.4.1, production/stable.** Published on PyPI as
52
+ **Status: 1.6.0, production/stable.** Published on PyPI as
52
53
  [`graphite-code`](https://pypi.org/project/graphite-code/) with PEP 740
53
54
  attestations; supported on Windows, Linux and macOS with Python 3.11–3.14
54
55
  (every cell gates CI). What 1.x promises — CLI, JSON outputs, `graph.json`,
@@ -2,7 +2,7 @@
2
2
 
3
3
  Local-first, deterministic knowledge graph extraction for codebases — zero-LLM, daemon-maintained, agent-agnostic.
4
4
 
5
- **Status: 1.4.1, production/stable.** Published on PyPI as
5
+ **Status: 1.6.0, production/stable.** Published on PyPI as
6
6
  [`graphite-code`](https://pypi.org/project/graphite-code/) with PEP 740
7
7
  attestations; supported on Windows, Linux and macOS with Python 3.11–3.14
8
8
  (every cell gates CI). What 1.x promises — CLI, JSON outputs, `graph.json`,
@@ -116,7 +116,18 @@ mcp = ["mcp>=1.0,<3"]
116
116
  # here because that job installs `[dev]`, and a `--timeout` flag without the
117
117
  # plugin is an unknown-argument error -- which would turn a hang into a
118
118
  # different silent failure rather than naming it. See #45.
119
- dev = ["pytest>=8.0", "ruff>=0.5", "pytest-timeout>=2.3", "pytest-cov>=5.0", "mypy>=1.14"]
119
+ # `pytest-xdist` runs the suite across processes. It is here because the
120
+ # suite is WAIT-bound, not CPU-bound: the channel tests alone spend about
121
+ # 760s mostly sleeping on locks and broker round trips, so serial execution
122
+ # pays for nothing. 6 workers is this machine's physical core count.
123
+ dev = [
124
+ "pytest>=8.0",
125
+ "ruff>=0.5",
126
+ "pytest-timeout>=2.3",
127
+ "pytest-cov>=5.0",
128
+ "pytest-xdist>=3.5",
129
+ "mypy>=1.14",
130
+ ]
120
131
 
121
132
  # Without these the package advertises no way back to its own source. A
122
133
  # distribution page with no repository link is the shape a typosquat has, and it
@@ -38,4 +38,4 @@ __all__ = ["__version__"]
38
38
  #: Coarse and hand-maintained by construction. It is a release label, not
39
39
  #: evidence that a given fix is present -- to answer that, survey for the marker
40
40
  #: the fix introduced, or compare `graphite --version` fingerprints.
41
- __version__ = "1.4.1"
41
+ __version__ = "1.6.0"
@@ -1348,6 +1348,21 @@ def _entries_between(path: Path, start: int, end: int) -> list[dict[str, Any]]:
1348
1348
  return entries
1349
1349
 
1350
1350
 
1351
+ def _entry_is_this_session(entry: dict[str, Any], session_id: str) -> bool:
1352
+ """Whether a ledger entry is this session's own use.
1353
+
1354
+ An entry that names no session is counted, as it was: a person running
1355
+ graphite in a terminal in the same repository is real use, and dropping
1356
+ it would understate what the graph saved. An entry that names another
1357
+ session is that session's, and where two sessions are open at once each
1358
+ one's Stop would otherwise claim the other's use as its own (#110).
1359
+ """
1360
+ tag = entry.get("session")
1361
+ if not isinstance(tag, str) or not tag:
1362
+ return True
1363
+ return tag == session_id
1364
+
1365
+
1351
1366
  def _cursor_number(value: Any, cast: type) -> Any:
1352
1367
  """Coerce a possibly-corrupted cursor field; non-numeric (or bool) -> 0.
1353
1368
 
@@ -1409,9 +1424,12 @@ def handle_stop(payload: dict[str, Any]) -> dict[str, Any] | None:
1409
1424
  if not isinstance(offset, int) or offset > size or rotated:
1410
1425
  offset = 0 # ledger rotated or cursor damaged; resync
1411
1426
  new_entries = _entries_between(ledger, offset, size) if size > offset else []
1427
+ # The ledger holds every session's entries, and where two sessions are
1428
+ # open at once each one's Stop must claim only its own use (#110).
1429
+ own_entries = [entry for entry in new_entries if _entry_is_this_session(entry, session_id)]
1412
1430
  turn_tokens = 0
1413
1431
  turn_seconds = 0.0
1414
- for entry in new_entries:
1432
+ for entry in own_entries:
1415
1433
  est = savings_model.estimate_entry(entry)
1416
1434
  turn_tokens += est["tokens_saved"]
1417
1435
  turn_seconds += est["seconds_saved"]
@@ -1422,7 +1440,7 @@ def handle_stop(payload: dict[str, Any]) -> dict[str, Any] | None:
1422
1440
  sessions[session_id] = state # re-insert -> newest position
1423
1441
  _keep_newest_sessions(sessions)
1424
1442
  usage_ledger.write_cursor(root, {"sessions": sessions})
1425
- if not new_entries or not usage_ledger.savings_display_enabled(root):
1443
+ if not own_entries or not usage_ledger.savings_display_enabled(root):
1426
1444
  return None
1427
1445
  turn_text = savings_model.format_compact(turn_tokens, turn_seconds)
1428
1446
  session_text = savings_model.format_compact(state["tokens"], state["seconds"])
@@ -2021,6 +2021,18 @@ def cmd_daemon_status(args: argparse.Namespace) -> int:
2021
2021
  more_hint=" — use --json for the full list",
2022
2022
  ):
2023
2023
  print(line)
2024
+ # A project the daemon could not snapshot is not in `projects` -- it
2025
+ # never entered the supervised set -- but it is a project the daemon
2026
+ # is failing to maintain, so it is named here too (#113).
2027
+ failures = status.get("snapshot_failures", [])
2028
+ for line in listing_lines(
2029
+ failures if isinstance(failures, list) else [],
2030
+ lambda f: f"{f.get('root')} | snapshot failed: {f.get('error')}",
2031
+ cap=_DAEMON_STATUS_PROJECT_CAP,
2032
+ empty=None,
2033
+ more_hint=" — use --json for the full list",
2034
+ ):
2035
+ print(line)
2024
2036
  return 0
2025
2037
 
2026
2038
 
@@ -16,6 +16,7 @@ from . import activation, buildlock
16
16
  from .config import Config
17
17
  from .engine_identity import EngineIdentityError, engine_identity
18
18
  from .freshness import graph_engine_changed
19
+ from .git import GitError
19
20
  from .incident_ledger import record_incident, repo_ledger_dir
20
21
  from .io import atomic_write_json
21
22
  from .provider_observer import ProviderObservationSummary
@@ -164,6 +165,66 @@ class BuildResult:
164
165
  return self.returncode == buildlock.REFUSED_EXIT_STATUS
165
166
 
166
167
 
168
+ _MAX_CAUSE_DEPTH = 5
169
+
170
+
171
+ def _exception_identity(exc: BaseException) -> str:
172
+ """One exception's path-free identity.
173
+
174
+ A `GitError` carries its own: `diagnostic()` names the class, the step
175
+ that failed and the errno, and is built from fixed tokens and an integer
176
+ so no path and no Git text can ride along. Every other exception
177
+ contributes its class name and nothing else -- the message may name a
178
+ path, and the class is what separates the causes.
179
+ """
180
+ if isinstance(exc, GitError):
181
+ return exc.diagnostic()
182
+ return type(exc).__name__
183
+
184
+
185
+ def describe_exception_chain(exc: BaseException) -> str:
186
+ """An exception and whatever caused it, in one path-free line.
187
+
188
+ `str(exc)` says WHAT failed and not WHY, and for the daemon's snapshot
189
+ path that difference is the whole diagnosis: seven distinct sites raise
190
+ `GitLaunchError` inside `_run_bounded` alone, and only its step token
191
+ and errno separate them. On 2026-10-27 the daemon failed every snapshot
192
+ of an activated repository for thirteen minutes and the log could not
193
+ say why -- the cause was in the exception's chain, and the chain was
194
+ discarded.
195
+ """
196
+ parts: list[str] = []
197
+ seen: set[int] = set()
198
+ current: BaseException | None = exc
199
+ while current is not None and len(parts) < _MAX_CAUSE_DEPTH and id(current) not in seen:
200
+ seen.add(id(current))
201
+ parts.append(_exception_identity(current))
202
+ current = current.__cause__
203
+ return " <- ".join(parts)
204
+
205
+
206
+ @dataclass(frozen=True)
207
+ class SnapshotFailure:
208
+ """An activated project the daemon could not snapshot (#113).
209
+
210
+ Kept out of the supervised set on purpose. A project with no snapshot has
211
+ no change set to diff and nothing to build, so putting it there would
212
+ make the build path act on an empty one. It is reported instead: a
213
+ failure that is only in the log is a failure nobody sees.
214
+ """
215
+
216
+ root: Path
217
+ error: str
218
+ failed_at: str = field(default_factory=utc_now)
219
+
220
+ def to_status(self) -> dict[str, object]:
221
+ return {
222
+ "root": str(self.root),
223
+ "error": self.error,
224
+ "failed_at": self.failed_at,
225
+ }
226
+
227
+
167
228
  @dataclass
168
229
  class ProjectRuntime:
169
230
  root: Path
@@ -527,23 +588,30 @@ def _write_status(
527
588
  options: DaemonOptions,
528
589
  cycle: int,
529
590
  provider_lifecycle: dict[str, object] | None = None,
591
+ snapshot_failures: dict[Path, SnapshotFailure] | None = None,
530
592
  ) -> dict[str, object]:
593
+ failures = list((snapshot_failures or {}).values())
531
594
  projects = [state.to_status() for _, state in sorted(states.items(), key=lambda item: str(item[0]).lower())]
532
595
  healthy = sum(1 for state in states.values() if state.last_error is None and not state.needs_initial_build)
533
- failing = sum(1 for state in states.values() if state.last_error is not None)
596
+ # A project whose snapshot failed is a project the daemon is failing to
597
+ # maintain, so it counts as failing -- it was activated, and no graph is
598
+ # being kept for it (#113).
599
+ failing = sum(1 for state in states.values() if state.last_error is not None) + len(failures)
534
600
  pending = sum(1 for state in states.values() if state.needs_initial_build)
535
601
  payload: dict[str, object] = {
536
602
  "status": "ok" if failing == 0 else "degraded",
537
603
  "updated_at": utc_now(),
538
604
  "base_path": str(base),
539
605
  "cycle": cycle,
540
- "project_count": len(projects),
606
+ "project_count": len(projects) + len(failures),
541
607
  "healthy_projects": healthy,
542
608
  "failing_projects": failing,
543
609
  "pending_projects": pending,
544
610
  # Repositories currently open in a coding agent -- the whole supervised
545
- # set. An unopened repo is absent by construction, not by pruning.
546
- "active_projects": sorted(str(root) for root in states),
611
+ # set. An unopened repo is absent by construction, not by pruning. A
612
+ # repo the daemon cannot snapshot is open but unsupervised, so it
613
+ # belongs here too (#113).
614
+ "active_projects": sorted(str(root) for root in set(states) | set(snapshot_failures or {})),
547
615
  "limits": {
548
616
  "scan_interval_seconds": options.scan_interval_seconds,
549
617
  "discover_interval_seconds": options.discover_interval_seconds,
@@ -555,6 +623,10 @@ def _write_status(
555
623
  "build_timeout_seconds": options.build_timeout_seconds,
556
624
  },
557
625
  "projects": projects,
626
+ "snapshot_failures": [
627
+ failure.to_status()
628
+ for failure in sorted(failures, key=lambda item: str(item.root).lower())
629
+ ],
558
630
  }
559
631
  if provider_lifecycle is not None:
560
632
  payload["provider_lifecycle"] = provider_lifecycle
@@ -627,6 +699,11 @@ def run_daemon(
627
699
  provider_worker.start()
628
700
 
629
701
  states: dict[Path, ProjectRuntime] = {}
702
+ # Projects that are activated but whose snapshot failed. They are NOT in
703
+ # `states` -- there is no snapshot to diff or build -- but they are
704
+ # reported, because a failure that only reaches the log is a failure
705
+ # nobody acts on (#113).
706
+ snapshot_failures: dict[Path, SnapshotFailure] = {}
630
707
  last_discovery = 0.0
631
708
  last_status: dict[str, object] = {}
632
709
  cycle = 0
@@ -649,8 +726,21 @@ def run_daemon(
649
726
  project_cfg = daemon_config_for_project(cfg, project, options)
650
727
  snap = snapshot(project, project_cfg)
651
728
  except Exception as exc:
652
- logger.event("project_snapshot_failed", project=str(project), error=str(exc))
729
+ # The error is kept, not just logged: the report has to
730
+ # be able to say WHY the graph is not being maintained
731
+ # (#113).
732
+ snapshot_failures[project] = SnapshotFailure(
733
+ root=project,
734
+ error=str(exc).strip() or type(exc).__name__,
735
+ )
736
+ logger.event(
737
+ "project_snapshot_failed",
738
+ project=str(project),
739
+ error=str(exc),
740
+ cause=describe_exception_chain(exc),
741
+ )
653
742
  continue
743
+ snapshot_failures.pop(project, None)
654
744
  states[project] = ProjectRuntime(
655
745
  root=project,
656
746
  snapshot=snap,
@@ -663,6 +753,9 @@ def run_daemon(
663
753
  if project not in discovered:
664
754
  logger.event("project_deactivated", project=str(project))
665
755
  del states[project]
756
+ for project in list(snapshot_failures):
757
+ if project not in discovered:
758
+ del snapshot_failures[project]
666
759
 
667
760
  # An engine upgrade invalidates every supervised graph at once, but
668
761
  # the file-diff path cannot see it: a repo whose files are untouched
@@ -718,7 +811,12 @@ def run_daemon(
718
811
  except Exception as exc:
719
812
  state.last_error = str(exc)
720
813
  state.failure_count += 1
721
- logger.event("project_scan_failed", project=str(project), error=str(exc))
814
+ logger.event(
815
+ "project_scan_failed",
816
+ project=str(project),
817
+ error=str(exc),
818
+ cause=describe_exception_chain(exc),
819
+ )
722
820
  # Failures before a build is attempted (git enumeration,
723
821
  # snapshotting, watcher errors) never reached the incident
724
822
  # writer, so they were durable only in status.json, which ages
@@ -774,6 +872,7 @@ def run_daemon(
774
872
  options,
775
873
  cycle,
776
874
  None if provider_worker is None else provider_worker.snapshot(),
875
+ snapshot_failures,
777
876
  )
778
877
  if options.once:
779
878
  if provider_worker is not None: