graphite-code 1.8.0__tar.gz → 1.8.1__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 (338) hide show
  1. graphite_code-1.8.1/.mcp.json +20 -0
  2. {graphite_code-1.8.0 → graphite_code-1.8.1}/CHANGELOG.md +64 -0
  3. {graphite_code-1.8.0 → graphite_code-1.8.1}/PKG-INFO +1 -1
  4. graphite_code-1.8.1/SECURITY.md +73 -0
  5. graphite_code-1.8.1/benchmarks/__init__.py +1 -0
  6. graphite_code-1.8.1/benchmarks/build_benchmark.py +129 -0
  7. graphite_code-1.8.1/benchmarks/realty_router/README.md +20 -0
  8. graphite_code-1.8.1/benchmarks/realty_router/__init__.py +1 -0
  9. graphite_code-1.8.1/benchmarks/realty_router/evaluate.py +140 -0
  10. graphite_code-1.8.1/benchmarks/realty_router/tasks.json +20 -0
  11. graphite_code-1.8.1/benchmarks/synthetic_repo.py +92 -0
  12. {graphite_code-1.8.0 → graphite_code-1.8.1}/pyproject.toml +23 -0
  13. graphite_code-1.8.1/scripts/compare_dist.py +104 -0
  14. graphite_code-1.8.1/scripts/gen_cli_reference.py +155 -0
  15. graphite_code-1.8.1/scripts/mutation_tests.py +371 -0
  16. graphite_code-1.8.1/scripts/pyscopeoracle.py +730 -0
  17. graphite_code-1.8.1/scripts/sqloracle.py +400 -0
  18. graphite_code-1.8.1/scripts/verify_artifact.py +161 -0
  19. graphite_code-1.8.1/scripts/verify_published_release.py +300 -0
  20. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/__init__.py +1 -1
  21. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/doctor_probes.py +66 -3
  22. graphite_code-1.8.1/src/graphite/py.typed +0 -0
  23. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/conftest.py +42 -0
  24. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_doctor.py +156 -0
  25. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_hardening.py +88 -0
  26. {graphite_code-1.8.0 → graphite_code-1.8.1}/.gitignore +0 -0
  27. {graphite_code-1.8.0 → graphite_code-1.8.1}/ARCHITECTURE.md +0 -0
  28. {graphite_code-1.8.0 → graphite_code-1.8.1}/CONTRIBUTING.md +0 -0
  29. {graphite_code-1.8.0 → graphite_code-1.8.1}/LICENSE +0 -0
  30. {graphite_code-1.8.0 → graphite_code-1.8.1}/README.md +0 -0
  31. {graphite_code-1.8.0 → graphite_code-1.8.1}/RELEASING.md +0 -0
  32. /graphite_code-1.8.0/src/graphite/py.typed → /graphite_code-1.8.1/scripts/__init__.py +0 -0
  33. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/__main__.py +0 -0
  34. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/_cleanup_worker.py +0 -0
  35. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/_win32_ctypes.py +0 -0
  36. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/activation.py +0 -0
  37. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/agent_hooks.py +0 -0
  38. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/agent_settings.py +0 -0
  39. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/analyze.py +0 -0
  40. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/answer_contract.py +0 -0
  41. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/bootstrap.py +0 -0
  42. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/buildlock.py +0 -0
  43. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/cache.py +0 -0
  44. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/channel.py +0 -0
  45. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/cli.py +0 -0
  46. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/cluster.py +0 -0
  47. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/config.py +0 -0
  48. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/context.py +0 -0
  49. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/daemon.py +0 -0
  50. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/daemon_health.py +0 -0
  51. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/daemon_launch.py +0 -0
  52. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/debt.py +0 -0
  53. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/dependency_install.py +0 -0
  54. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/detach.py +0 -0
  55. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/doctor.py +0 -0
  56. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/engine_identity.py +0 -0
  57. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/export/__init__.py +0 -0
  58. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/export/html.py +0 -0
  59. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/export/json.py +0 -0
  60. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/export/md.py +0 -0
  61. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/extract/__init__.py +0 -0
  62. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/extract/ast.py +0 -0
  63. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/extract/pyscope.py +0 -0
  64. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/freshness.py +0 -0
  65. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/git.py +0 -0
  66. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/graph.py +0 -0
  67. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/graph_io.py +0 -0
  68. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/health.py +0 -0
  69. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/hook_entry.py +0 -0
  70. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/hookinstall.py +0 -0
  71. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/hookshim.py +0 -0
  72. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/incident_ledger.py +0 -0
  73. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/ingest.py +0 -0
  74. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/init.py +0 -0
  75. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/io.py +0 -0
  76. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/launchd_agent.py +0 -0
  77. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/listing.py +0 -0
  78. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/llm.py +0 -0
  79. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/llm_probe.py +0 -0
  80. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/mcp.py +0 -0
  81. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/mcp_server.py +0 -0
  82. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/natural_query.py +0 -0
  83. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/overlays.py +0 -0
  84. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/ownership.py +0 -0
  85. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/probe_process.py +0 -0
  86. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/probe_workspace.py +0 -0
  87. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/process_contracts.py +0 -0
  88. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/programs.py +0 -0
  89. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/provider_observer.py +0 -0
  90. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/query.py +0 -0
  91. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/query_plan.py +0 -0
  92. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/replacement_audit.py +0 -0
  93. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/resolve.py +0 -0
  94. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/review.py +0 -0
  95. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/__init__.py +0 -0
  96. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/approval.py +0 -0
  97. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/classifier.py +0 -0
  98. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/claude_executor.py +0 -0
  99. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/claude_probe.py +0 -0
  100. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/cli_identity.py +0 -0
  101. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/codex_executor.py +0 -0
  102. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/codex_probe.py +0 -0
  103. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/context_builder.py +0 -0
  104. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/contracts.py +0 -0
  105. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/diff_policy.py +0 -0
  106. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/edit_apply.py +0 -0
  107. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/effort.py +0 -0
  108. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/lifecycle.py +0 -0
  109. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/lifecycle_operator.py +0 -0
  110. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/lifecycle_service.py +0 -0
  111. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/lifecycle_storage.py +0 -0
  112. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/ollama_executor.py +0 -0
  113. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/ollama_probe.py +0 -0
  114. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/openrouter_executor.py +0 -0
  115. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/openrouter_probe.py +0 -0
  116. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/policy.py +0 -0
  117. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/probe_runner.py +0 -0
  118. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/process_runner.py +0 -0
  119. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/profiles.py +0 -0
  120. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/prompt.py +0 -0
  121. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/registry.py +0 -0
  122. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/route_pool.py +0 -0
  123. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/route_pool_execution.py +0 -0
  124. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/schema_validation.py +0 -0
  125. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/service.py +0 -0
  126. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/settings.py +0 -0
  127. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/shadow.py +0 -0
  128. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/storage.py +0 -0
  129. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/telemetry.py +0 -0
  130. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/worktree.py +0 -0
  131. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/zai_edit.py +0 -0
  132. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/zai_executor.py +0 -0
  133. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/routing/zai_probe.py +0 -0
  134. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/savings.py +0 -0
  135. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/systemd_unit.py +0 -0
  136. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/ts_bridge.py +0 -0
  137. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/ts_resolver.mjs +0 -0
  138. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/typescript_activation.py +0 -0
  139. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/usage_ledger.py +0 -0
  140. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/validation.py +0 -0
  141. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/watch.py +0 -0
  142. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/windows_job.py +0 -0
  143. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/windows_startup.py +0 -0
  144. {graphite_code-1.8.0 → graphite_code-1.8.1}/src/graphite/windows_task.py +0 -0
  145. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/data/sqloracle/blindspots.py.txt +0 -0
  146. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/data/sqloracle/round69.py.txt +0 -0
  147. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/fake_clis/fake_cli.py +0 -0
  148. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/fixtures/provider_lifecycle_schema_v1.sql +0 -0
  149. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/fixtures/routing_schema_v2_ca77600.sql +0 -0
  150. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/fixtures/routing_schema_v3_94eb333.sql +0 -0
  151. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/fixtures/routing_schema_v4_lifecycle_migration.sql +0 -0
  152. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test__win32_ctypes.py +0 -0
  153. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_activation.py +0 -0
  154. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_activation_backstop.py +0 -0
  155. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_agent_hook_activation.py +0 -0
  156. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_agent_hooks.py +0 -0
  157. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_agent_hooks_session_books.py +0 -0
  158. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_agent_hooks_session_tagging.py +0 -0
  159. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_agent_settings.py +0 -0
  160. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_answer_contract.py +0 -0
  161. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_arrow_and_constructor_binding.py +0 -0
  162. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_ast_make_id_length.py +0 -0
  163. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_ast_name_a_module_only_imports.py +0 -0
  164. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_ast_source_lines.py +0 -0
  165. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_ast_super_over_a_builtin_base.py +0 -0
  166. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_atomic_write.py +0 -0
  167. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_bootstrap.py +0 -0
  168. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_build_detach.py +0 -0
  169. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_buildlock.py +0 -0
  170. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cache_engine_identity.py +0 -0
  171. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cache_entry_pruning.py +0 -0
  172. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cache_file_identity.py +0 -0
  173. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cache_file_set.py +0 -0
  174. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cache_pruning.py +0 -0
  175. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_call_graph.py +0 -0
  176. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_case_ambiguous_answer.py +0 -0
  177. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_channel_attribution.py +0 -0
  178. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_channel_cli.py +0 -0
  179. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_channel_core.py +0 -0
  180. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_channel_kind.py +0 -0
  181. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_channel_lock.py +0 -0
  182. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_channel_log_integrity.py +0 -0
  183. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_channel_mcp.py +0 -0
  184. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_channel_register.py +0 -0
  185. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_channel_report.py +0 -0
  186. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_channel_status.py +0 -0
  187. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_class_field_arrow_binding.py +0 -0
  188. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cli_below_repository_root.py +0 -0
  189. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cli_build_missing_path.py +0 -0
  190. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cli_channel.py +0 -0
  191. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cli_channel_attribution.py +0 -0
  192. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cli_doctor_below_root.py +0 -0
  193. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cli_reference.py +0 -0
  194. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cli_usage.py +0 -0
  195. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cli_version.py +0 -0
  196. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cluster.py +0 -0
  197. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_compare_dist.py +0 -0
  198. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_configuration_reference.py +0 -0
  199. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_context.py +0 -0
  200. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_context_builder.py +0 -0
  201. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cwd_relative_config.py +0 -0
  202. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_cycle_search.py +0 -0
  203. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_daemon.py +0 -0
  204. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_daemon_activation.py +0 -0
  205. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_daemon_build_lock.py +0 -0
  206. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_daemon_child_lock.py +0 -0
  207. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_daemon_engine_staleness.py +0 -0
  208. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_daemon_health.py +0 -0
  209. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_daemon_health_activation.py +0 -0
  210. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_daemon_launch.py +0 -0
  211. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_daemon_service_cli.py +0 -0
  212. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_daemon_snapshot_failure.py +0 -0
  213. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_debt.py +0 -0
  214. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_dependency_install.py +0 -0
  215. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_destructured_binding.py +0 -0
  216. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_determinism.py +0 -0
  217. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_dispatch_evidence.py +0 -0
  218. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_doctor_agent_hooks.py +0 -0
  219. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_doctor_hooks.py +0 -0
  220. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_doctor_managed_docs.py +0 -0
  221. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_doctor_probes.py +0 -0
  222. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_documentation.py +0 -0
  223. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_edit_apply.py +0 -0
  224. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_engine_identity.py +0 -0
  225. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_exit_codes_reference.py +0 -0
  226. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_external_calls.py +0 -0
  227. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_file_node_id_collision.py +0 -0
  228. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_git_security.py +0 -0
  229. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_go_rust.py +0 -0
  230. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_graph_io.py +0 -0
  231. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_graph_provider_isolation.py +0 -0
  232. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_health.py +0 -0
  233. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_hook_entry.py +0 -0
  234. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_hook_template.py +0 -0
  235. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_hookinstall.py +0 -0
  236. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_hookshim.py +0 -0
  237. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_html_security.py +0 -0
  238. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_incident_ledger.py +0 -0
  239. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_init.py +0 -0
  240. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_init_activation_doctrine.py +0 -0
  241. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_init_hooks.py +0 -0
  242. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_init_validation_exit.py +0 -0
  243. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_launchd_agent.py +0 -0
  244. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_lifecycle_operator.py +0 -0
  245. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_listing.py +0 -0
  246. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_listing_surfaces.py +0 -0
  247. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_llm.py +0 -0
  248. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_llm_probe.py +0 -0
  249. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_mcp.py +0 -0
  250. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_mcp_server.py +0 -0
  251. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_mcp_server_channel_attribution.py +0 -0
  252. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_member_call_receiver.py +0 -0
  253. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_method_dispatch_scope.py +0 -0
  254. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_monorepo.py +0 -0
  255. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_mutation_tests.py +0 -0
  256. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_natural_query.py +0 -0
  257. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_no_path_is_graded.py +0 -0
  258. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_node_identity.py +0 -0
  259. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_ollama_executor.py +0 -0
  260. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_overlays.py +0 -0
  261. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_path_leak_fixture.py +0 -0
  262. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_probe_diagnostics.py +0 -0
  263. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_probe_process.py +0 -0
  264. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_probe_workspace.py +0 -0
  265. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_process_contracts.py +0 -0
  266. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_programs.py +0 -0
  267. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_provider_claude_probe.py +0 -0
  268. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_provider_codex_probe.py +0 -0
  269. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_provider_lifecycle.py +0 -0
  270. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_provider_lifecycle_service.py +0 -0
  271. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_provider_lifecycle_storage.py +0 -0
  272. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_provider_observer.py +0 -0
  273. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_provider_ollama_probe.py +0 -0
  274. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_provider_openrouter_probe.py +0 -0
  275. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_provider_probe_runner.py +0 -0
  276. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_public_surface.py +0 -0
  277. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_published_schemas.py +0 -0
  278. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_pyscope.py +0 -0
  279. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_pyscopeoracle.py +0 -0
  280. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_python_builtin_named_symbols.py +0 -0
  281. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_python_import_bindings.py +0 -0
  282. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_python_inherits_edge.py +0 -0
  283. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_python_local_alias_call.py +0 -0
  284. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_python_reexport_follow.py +0 -0
  285. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_python_resolver.py +0 -0
  286. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_python_scope_identity.py +0 -0
  287. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_query_plan.py +0 -0
  288. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_reliability.py +0 -0
  289. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_replacement_audit.py +0 -0
  290. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_repository_root_ownership.py +0 -0
  291. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_resolve.py +0 -0
  292. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_resolve_python_reexports_of.py +0 -0
  293. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_review.py +0 -0
  294. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_route_pool.py +0 -0
  295. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_route_pool_execution.py +0 -0
  296. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_approval.py +0 -0
  297. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_benchmark.py +0 -0
  298. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_classifier.py +0 -0
  299. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_claude_executor.py +0 -0
  300. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_cli.py +0 -0
  301. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_cli_contracts.py +0 -0
  302. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_cli_recovery.py +0 -0
  303. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_codex_executor.py +0 -0
  304. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_context.py +0 -0
  305. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_contracts.py +0 -0
  306. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_diff_policy.py +0 -0
  307. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_executor.py +0 -0
  308. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_openrouter_executor.py +0 -0
  309. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_policy.py +0 -0
  310. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_process_runner.py +0 -0
  311. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_profiles.py +0 -0
  312. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_registry.py +0 -0
  313. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_schema_validation.py +0 -0
  314. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_security.py +0 -0
  315. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_service.py +0 -0
  316. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_shadow.py +0 -0
  317. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_storage.py +0 -0
  318. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_telemetry.py +0 -0
  319. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_worktree.py +0 -0
  320. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_zai_executor.py +0 -0
  321. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_routing_zai_probe.py +0 -0
  322. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_savings.py +0 -0
  323. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_search.py +0 -0
  324. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_self_super_dispatch.py +0 -0
  325. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_smoke.py +0 -0
  326. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_sqloracle.py +0 -0
  327. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_synthetic_repo.py +0 -0
  328. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_systemd_unit.py +0 -0
  329. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_ts_bridge.py +0 -0
  330. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_typescript_activation.py +0 -0
  331. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_typescript_resolver.py +0 -0
  332. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_usage_ledger.py +0 -0
  333. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_verify_artifact.py +0 -0
  334. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_verify_published_release.py +0 -0
  335. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_watch.py +0 -0
  336. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_windows_startup.py +0 -0
  337. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_windows_task.py +0 -0
  338. {graphite_code-1.8.0 → graphite_code-1.8.1}/tests/test_zai_edit.py +0 -0
@@ -0,0 +1,20 @@
1
+ {
2
+ "mcpServers": {
3
+ "graphite": {
4
+ "command": "python",
5
+ "args": [
6
+ "-P",
7
+ "-m",
8
+ "graphite.mcp"
9
+ ]
10
+ },
11
+ "aramid": {
12
+ "command": "python",
13
+ "args": [
14
+ "-P",
15
+ "-m",
16
+ "aramid.mcp"
17
+ ]
18
+ }
19
+ }
20
+ }
@@ -15,6 +15,70 @@ machine-checkable identity; the version is for humans.
15
15
 
16
16
  ## [Unreleased]
17
17
 
18
+ ## [1.8.1] — 2026-10-29
19
+
20
+ A patch release: two fixes, and no change to any stable surface. The identity
21
+ a path binding compares is internal to the MCP probe, and what a source
22
+ distribution contains is not a stable surface, so by the rule in
23
+ `docs/compatibility.md` — "fixes are patches" — this is a patch.
24
+
25
+ **A directory's times are not its identity.** The MCP probe's manifest builder
26
+ binds every path it hands to a child by `[st_dev, st_ino, st_size,
27
+ st_mtime_ns]`, and the server child re-validates that binding before it
28
+ imports anything. For a FILE that is right: a file's size and mtime are its
29
+ content, and they are what says the content did not change under us.
30
+
31
+ For a DIRECTORY it is wrong, and wrong in the direction that turns routine
32
+ work into a refusal. A directory's size is its entry count, and its times
33
+ move whenever a child is created or removed — which for a repository root is
34
+ ordinary. A coverage run writing its own `.coverage.*` files into the
35
+ checkout is enough. The builder binds the selected root, the server
36
+ re-validates it, and anything created or removed in between moved the root's
37
+ mtime and made the server refuse with no output at all: reported as
38
+ `nonzero`, which reads as a crash and is not one.
39
+
40
+ The old check was also backwards about what it could see. An in-place edit to
41
+ a file inside a directory does NOT move the directory's times, so the
42
+ directory check never saw it; a benign create or delete always moved them.
43
+ What a directory binding can reliably express is WHICH directory it is, and
44
+ that is what it now says: a directory is compared by its device and inode,
45
+ and a file keeps every field.
46
+
47
+ The anti-swap property is unchanged. A replaced directory is a different
48
+ inode, and is still refused (#132).
49
+
50
+ **The source distribution ships what its own test suite imports.** The sdist
51
+ carried `tests/` and none of what those tests import: four of them put
52
+ `<root>/scripts` on `sys.path` and import `compare_dist`, `verify_artifact`
53
+ and `verify_published_release`, one imports `scripts.gen_cli_reference` as a
54
+ package, and one imports `benchmarks.realty_router.evaluate`;
55
+ `tests/test_mutation_tests.py` loads `scripts/mutation_tests.py` by path.
56
+ MEASURED against the unpacked 1.8.0 sdist: the suite did not **collect** — 6
57
+ collection errors, 0 tests run, exit 2 — so a consumer who unpacked the sdist
58
+ and ran the suite it was shipped with got an import error, not a test result.
59
+
60
+ The sdist now ships `/scripts` and `/benchmarks`, along with `.mcp.json` and
61
+ `SECURITY.md`. MEASURED against the same tree rebuilt: **4882 passed, 173
62
+ skipped**, exit 0 — the suite collects and runs from an unpacked sdist.
63
+
64
+ **The documentation tree is deliberately still not shipped.** It is the
65
+ repository's internal engineering record, and two dozen of its documents quote
66
+ a developer machine's absolute paths, which `RELEASING.md` makes a stop
67
+ condition for an archive. The **117 tests** that read that tree are repository
68
+ tests rather than package tests, and they now **skip**, with the reason named,
69
+ when the tree is absent. They used to fail, which said the artifact was
70
+ broken; it was not.
71
+
72
+ **Known, and not fixed here.** The publish gate
73
+ (`scripts/verify_artifact.py`) scans the **wheel's** content for absolute
74
+ paths that name the build machine, and never the **sdist's**. The 1.8.0 sdist
75
+ already shipped ten members whose content names it — `F:\Projects`, which is
76
+ graphite's own legacy default projects root — and the gate passes those
77
+ artifacts. 1.8.1's sdist ships one more such member (`scripts/`), because the
78
+ suite needs it. Closing the gap is not a one-line change: the needles overlap
79
+ the product's documented default, so a content check over the sdist would fail
80
+ on shipped test files that legitimately mention it. Filed as **#135**.
81
+
18
82
  ## [1.8.0] — 2026-10-29
19
83
 
20
84
  A minor release: one addition to a stable JSON output, and no change to any
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: graphite-code
3
- Version: 1.8.0
3
+ Version: 1.8.1
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
@@ -0,0 +1,73 @@
1
+ # Security policy
2
+
3
+ ## Supported versions
4
+
5
+ | Version | Supported |
6
+ |---|---|
7
+ | 1.x | yes — fixes ship in the next patch release of the current minor |
8
+ | < 1.0 | no |
9
+
10
+ ## Reporting a vulnerability
11
+
12
+ Use GitHub **Private vulnerability reporting** on this repository
13
+ (Security → Report a vulnerability, or
14
+ <https://github.com/jared0565/graphite/security/advisories/new>). Do not open
15
+ a public issue or pull request for an exploitable defect; `CONTRIBUTING.md`
16
+ already forbids publishing exploit details.
17
+
18
+ Include the output of `graphite --version` (the version and the engine
19
+ fingerprint), the platform, and the smallest reproduction you have. You will
20
+ get an acknowledgement within 7 days and a fix or a documented mitigation
21
+ before any public disclosure. Reports are handled by the maintainer named in
22
+ `.github/CODEOWNERS`.
23
+
24
+ ## What graphite treats as untrusted
25
+
26
+ Repository files, file names, symlinks, Git metadata, generated graph data,
27
+ and model output are all untrusted input (see "Security expectations" in
28
+ `CONTRIBUTING.md`). A finding that any of them can escape path containment,
29
+ reach a shell, or drive an unbounded read is in scope. So is anything that
30
+ makes a generated launcher, hook, or `.mcp.json` entry run a `python -m
31
+ graphite` without `-P`, because that is the shape a repo-local shadow needs.
32
+
33
+ ## What is checked on every push
34
+
35
+ The same scanner configuration runs in the local git hooks and in the CI
36
+ `security` job, against the committed `aramid.toml` and
37
+ `.aramid-suppressions.toml`: gitleaks, semgrep, ruff's security rules, the
38
+ repo-root shadow check, mypy, a dependency-vulnerability audit (pip-audit),
39
+ and the full test suite through the development interpreter. The CI job
40
+ asserts from the gate's own JSON report that every one of those scanners
41
+ actually ran and that the report holds no block-tier finding — the verdict
42
+ is read from the report, never from the gate's exit status alone — so a
43
+ scanner that silently never fired, or a gate that exits 0 over blocking
44
+ findings, cannot read as clean. Suppressions are reviewed in the
45
+ repository, never applied ad hoc.
46
+
47
+ ### Dependency vulnerabilities
48
+
49
+ pip-audit runs at pre-push in project mode, checking the dependencies
50
+ declared in `pyproject.toml` under `[project].dependencies` against known
51
+ advisories. Its limits are part of the control:
52
+
53
+ - **The optional extras are not audited.** Project mode reads only
54
+ `[project].dependencies`, so the `mcp` extra, which `graphite-mcp` needs,
55
+ and the `dev` tools are outside it.
56
+ - **A new finding blocks; a recorded one warns.** pip-audit reports no
57
+ severity, so aramid grades every finding low, below its `critical` block
58
+ threshold. The pre-push ratchet then escalates any finding that is new to
59
+ the run to block. CI starts every run from an empty ledger, so there any
60
+ finding fails the `security` job. In the local hook, a finding already in
61
+ the ledger warns until it is fixed or overridden with a ledger-logged
62
+ reason.
63
+ - **A local result can be a day old.** aramid caches the audit for 24 hours
64
+ while `pyproject.toml` is unchanged. CI runs without that cache.
65
+
66
+ GitHub's Dependabot alerts are enabled on this repository and report
67
+ advisories against the dependencies GitHub's dependency graph detects. That
68
+ graph reads the optional extras too, so the alerts cover the `mcp` extra and
69
+ the `dev` tools that pip-audit's project mode leaves out.
70
+ Dependabot security updates, which open fix pull requests on their own, are
71
+ not enabled. `.github/dependabot.yml` schedules weekly version updates for
72
+ pip and GitHub Actions; they propose newer versions, but they are not a
73
+ vulnerability control.
@@ -0,0 +1 @@
1
+ """Reproducible Graphite benchmark packages."""
@@ -0,0 +1,129 @@
1
+ """Build a synthetic repository and record how graphite scales.
2
+
3
+ python benchmarks/build_benchmark.py --files 3000 --out metrics.json
4
+
5
+ Writes one JSON document: file count, wall time, ms/file, peak RSS of the
6
+ build process (POSIX only; -1 on Windows), node and edge counts, graph size,
7
+ platform. It is a RECORD, not a promise -- `docs/benchmarks.md` collects the
8
+ runs that back `capabilities`' `supported_repo_files`.
9
+
10
+ In CI it is a catastrophe detector: with `--wall-budget-s` the exit status
11
+ is non-zero only when the build blows past the budget or the graph exceeds
12
+ `max_graph_bytes`. Nothing here compares one run against another.
13
+ """
14
+ from __future__ import annotations
15
+
16
+ import argparse
17
+ import importlib.util
18
+ import json
19
+ import platform
20
+ import subprocess
21
+ import sys
22
+ import tempfile
23
+ import time
24
+ from collections.abc import Callable
25
+ from pathlib import Path
26
+
27
+
28
+ def _load_generate() -> Callable[..., dict[str, int]]:
29
+ """Import the sibling generator by file location, not by path search.
30
+
31
+ Prepending the repository root to ``sys.path`` would put a repo-local
32
+ ``graphite.py`` ahead of the installed package for this interpreter --
33
+ the exact shape the launch contract forbids (``-P`` exists to close it).
34
+ Loading ``synthetic_repo.py`` by its location touches ``sys.path`` not at
35
+ all, and CI runs this script under ``-P`` so the script directory is not
36
+ prepended either.
37
+ """
38
+ location = Path(__file__).resolve().with_name("synthetic_repo.py")
39
+ spec = importlib.util.spec_from_file_location("graphite_benchmark_synthetic_repo", location)
40
+ if spec is None or spec.loader is None:
41
+ raise ImportError(f"cannot load {location}")
42
+ module = importlib.util.module_from_spec(spec)
43
+ spec.loader.exec_module(module)
44
+ return module.generate
45
+
46
+
47
+ generate = _load_generate()
48
+
49
+ MAX_GRAPH_BYTES = 128 * 1024 * 1024
50
+ EXIT_BUILD_FAILED = 1
51
+ EXIT_BUDGET_EXCEEDED = 2
52
+ EXIT_GRAPH_TOO_LARGE = 3
53
+
54
+
55
+ def _peak_child_rss_mb() -> float:
56
+ """Peak RSS of waited-for children. POSIX only: ru_maxrss is KiB on Linux
57
+ and bytes on macOS; Windows has no `resource` module and reports -1."""
58
+ if sys.platform == "win32":
59
+ return -1.0
60
+ import resource
61
+
62
+ raw = resource.getrusage(resource.RUSAGE_CHILDREN).ru_maxrss
63
+ return raw / (1024 * 1024) if sys.platform == "darwin" else raw / 1024
64
+
65
+
66
+ def run(files: int, out: Path, *, wall_budget_s: float | None, seed: int) -> int:
67
+ # ignore_cleanup_errors: on Windows the build's worker processes can hold a
68
+ # handle for a moment after `build` returns, and a cleanup race must not
69
+ # turn a recorded measurement into a failed run (seen: WinError 145).
70
+ with tempfile.TemporaryDirectory(prefix="graphite-bench-", ignore_cleanup_errors=True) as tmp:
71
+ root = Path(tmp) / "repo"
72
+ output = Path(tmp) / "out"
73
+ cache = Path(tmp) / "cache"
74
+ counts = generate(root, files=files, seed=seed)
75
+ argv = [
76
+ sys.executable, "-P", "-m", "graphite",
77
+ "--llm", "none", "--output-dir", str(output), "--cache-dir", str(cache),
78
+ "build", str(root),
79
+ ]
80
+ start = time.perf_counter()
81
+ proc = subprocess.run(argv, capture_output=True, text=True, check=False, cwd=tmp)
82
+ wall = time.perf_counter() - start
83
+ graph = output / "graph.json"
84
+ graph_bytes = graph.stat().st_size if graph.is_file() else -1
85
+ nodes = edges = -1
86
+ if graph.is_file():
87
+ data = json.loads(graph.read_text(encoding="utf-8"))
88
+ nodes, edges = len(data.get("nodes", [])), len(data.get("edges", []))
89
+ metrics = {
90
+ "files": files,
91
+ "seed": seed,
92
+ "counts": counts,
93
+ "returncode": proc.returncode,
94
+ "wall_s": round(wall, 2),
95
+ "ms_per_file": round(wall * 1000 / files, 2),
96
+ "peak_rss_mb": round(_peak_child_rss_mb(), 1),
97
+ "nodes": nodes,
98
+ "edges": edges,
99
+ "graph_bytes": graph_bytes,
100
+ "platform": platform.platform(),
101
+ "python": platform.python_version(),
102
+ }
103
+ out.write_text(json.dumps(metrics, indent=2) + "\n", encoding="utf-8")
104
+ print(json.dumps(metrics, indent=2))
105
+ if proc.returncode != 0:
106
+ print(proc.stdout[-2000:], file=sys.stderr)
107
+ print(proc.stderr[-2000:], file=sys.stderr)
108
+ return EXIT_BUILD_FAILED
109
+ if wall_budget_s is not None and wall > wall_budget_s:
110
+ print(f"BUDGET EXCEEDED: {wall:.1f}s > {wall_budget_s}s", file=sys.stderr)
111
+ return EXIT_BUDGET_EXCEEDED
112
+ if graph_bytes > MAX_GRAPH_BYTES:
113
+ print(f"GRAPH TOO LARGE: {graph_bytes} bytes > {MAX_GRAPH_BYTES}", file=sys.stderr)
114
+ return EXIT_GRAPH_TOO_LARGE
115
+ return 0
116
+
117
+
118
+ def main(argv: list[str] | None = None) -> int:
119
+ parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
120
+ parser.add_argument("--files", type=int, default=3000, help="source files to generate (default 3000)")
121
+ parser.add_argument("--seed", type=int, default=7, help="generator seed (default 7)")
122
+ parser.add_argument("--out", type=Path, default=Path("benchmark-metrics.json"), help="where to write the metrics JSON")
123
+ parser.add_argument("--wall-budget-s", type=float, default=None, help="fail (exit 2) when the build takes longer than this")
124
+ arguments = parser.parse_args(argv)
125
+ return run(arguments.files, arguments.out, wall_budget_s=arguments.wall_budget_s, seed=arguments.seed)
126
+
127
+
128
+ if __name__ == "__main__":
129
+ raise SystemExit(main())
@@ -0,0 +1,20 @@
1
+ # Realty routing benchmark
2
+
3
+ This versioned synthetic corpus compares `frontier_only`, `native_automatic`, and
4
+ `graphite_routed` result sets without provider access. It contains no customer data,
5
+ credentials, MLS/IDX content, or copied proprietary code.
6
+
7
+ ```powershell
8
+ python -B benchmarks/realty_router/evaluate.py --results captured-results.json
9
+ ```
10
+
11
+ Result records must name exact model, profile, and policy versions. The evaluator
12
+ reports sample size, USD-equivalent micro-cost, aggregate latency, acceptance,
13
+ repairs, escalations, severe failures, and a 95% Wilson lower bound. Small samples
14
+ are labeled insufficient evidence; the report does not claim delivery-speed,
15
+ quality, robustness, or cost causality.
16
+
17
+ Offline evaluation is the default and opens no provider connection. Live evaluation
18
+ is deliberately not a CI path: use Graphite's approval-gated routing service with
19
+ explicit per-run cost review and hard quotas, then supply the resulting records to
20
+ this evaluator.
@@ -0,0 +1 @@
1
+ """Synthetic Realty routing benchmark."""
@@ -0,0 +1,140 @@
1
+ """Offline-first evaluator for versioned Realty routing result records."""
2
+ from __future__ import annotations
3
+
4
+ import argparse
5
+ import json
6
+ import re
7
+ from pathlib import Path, PurePosixPath
8
+ from typing import Any
9
+
10
+ from graphite.routing.policy import wilson_lower_bound
11
+
12
+ _TASK_FIELDS = frozenset({
13
+ "task_id", "category", "risk", "objective", "targets", "allowed_evidence",
14
+ "verification", "max_context_bytes",
15
+ })
16
+ _RESULT_FIELDS = frozenset({
17
+ "task_id", "policy", "model_id", "profile_version", "policy_version",
18
+ "accepted", "repair_count", "escalated", "severe_failure", "latency_ms",
19
+ "cost_usd_equivalent_micros",
20
+ })
21
+ _CATEGORIES = frozenset({
22
+ "documentation", "isolated_code", "feature", "refactor", "architecture",
23
+ "authentication", "authorization", "tenant_isolation", "migration",
24
+ "deployment", "infrastructure", "concurrency", "financial", "legal", "unknown",
25
+ })
26
+ _POLICIES = frozenset({"frontier_only", "native_automatic", "graphite_routed"})
27
+ _IDENTIFIER = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$")
28
+ _MUTABLE_ALIASES = frozenset({"latest", "default", "stable", "auto"})
29
+
30
+
31
+ def _relative_path(value: object) -> bool:
32
+ if not isinstance(value, str) or not value or "\x00" in value or "\\" in value:
33
+ return False
34
+ path = PurePosixPath(value)
35
+ return not value.startswith("/") and all(part not in {"", ".", ".."} for part in path.parts)
36
+
37
+
38
+ def load_tasks(path: Path) -> dict[str, Any]:
39
+ try:
40
+ data = json.loads(path.read_text(encoding="utf-8"))
41
+ except (OSError, UnicodeDecodeError, json.JSONDecodeError) as exc:
42
+ raise ValueError("corpus_invalid") from exc
43
+ if not isinstance(data, dict) or set(data) != {"schema_version", "corpus", "tasks"}:
44
+ raise ValueError("corpus_fields_invalid")
45
+ if data["schema_version"] != "1" or data["corpus"] != "synthetic-realty-router":
46
+ raise ValueError("corpus_version_invalid")
47
+ tasks = data["tasks"]
48
+ if not isinstance(tasks, list) or not 1 <= len(tasks) <= 100:
49
+ raise ValueError("corpus_tasks_invalid")
50
+ identifiers: set[str] = set()
51
+ for task in tasks:
52
+ if not isinstance(task, dict) or set(task) != _TASK_FIELDS:
53
+ raise ValueError("task_fields_invalid")
54
+ task_id = task["task_id"]
55
+ if not isinstance(task_id, str) or not _IDENTIFIER.fullmatch(task_id) or task_id in identifiers:
56
+ raise ValueError("task_id_invalid")
57
+ identifiers.add(task_id)
58
+ if task["category"] not in _CATEGORIES or task["risk"] not in {"low", "medium", "high"}:
59
+ raise ValueError("task_label_invalid")
60
+ if not isinstance(task["objective"], str) or not 1 <= len(task["objective"]) <= 4096:
61
+ raise ValueError("task_objective_invalid")
62
+ if not isinstance(task["targets"], list) or not task["targets"] or not all(_relative_path(item) for item in task["targets"]):
63
+ raise ValueError("task_targets_invalid")
64
+ for field in ("allowed_evidence", "verification"):
65
+ values = task[field]
66
+ if not isinstance(values, list) or not values or not all(isinstance(item, str) and _IDENTIFIER.fullmatch(item) for item in values):
67
+ raise ValueError(f"task_{field}_invalid")
68
+ maximum = task["max_context_bytes"]
69
+ if isinstance(maximum, bool) or not isinstance(maximum, int) or not 16_384 <= maximum <= 262_144:
70
+ raise ValueError("task_context_invalid")
71
+ return data
72
+
73
+
74
+ def _nonnegative(value: object, code: str) -> int:
75
+ if isinstance(value, bool) or not isinstance(value, int) or value < 0 or value > 10**12:
76
+ raise ValueError(code)
77
+ return value
78
+
79
+
80
+ def evaluate_records(corpus: dict[str, Any], records: list[dict[str, Any]]) -> dict[str, Any]:
81
+ task_ids = {task["task_id"] for task in corpus["tasks"]}
82
+ grouped: dict[str, list[dict[str, Any]]] = {}
83
+ for record in records:
84
+ if not isinstance(record, dict) or set(record) != _RESULT_FIELDS:
85
+ raise ValueError("result_fields_invalid")
86
+ if record["task_id"] not in task_ids or record["policy"] not in _POLICIES:
87
+ raise ValueError("result_identity_invalid")
88
+ model = record["model_id"]
89
+ if not isinstance(model, str) or not _IDENTIFIER.fullmatch(model) or model.casefold() in _MUTABLE_ALIASES:
90
+ raise ValueError("result_model_invalid")
91
+ for field in ("profile_version", "policy_version"):
92
+ if not isinstance(record[field], str) or not _IDENTIFIER.fullmatch(record[field]):
93
+ raise ValueError("result_version_invalid")
94
+ for field in ("accepted", "escalated", "severe_failure"):
95
+ if not isinstance(record[field], bool):
96
+ raise ValueError("result_boolean_invalid")
97
+ for field in ("repair_count", "latency_ms", "cost_usd_equivalent_micros"):
98
+ _nonnegative(record[field], f"result_{field}_invalid")
99
+ grouped.setdefault(record["policy"], []).append(record)
100
+ policies: dict[str, Any] = {}
101
+ for policy, values in sorted(grouped.items()):
102
+ accepted = sum(item["accepted"] for item in values)
103
+ policies[policy] = {
104
+ "sample_count": len(values),
105
+ "accepted_count": accepted,
106
+ "acceptance_wilson_lower_95": wilson_lower_bound(accepted, len(values)),
107
+ "repair_count": sum(item["repair_count"] for item in values),
108
+ "escalation_count": sum(item["escalated"] for item in values),
109
+ "severe_failure_count": sum(item["severe_failure"] for item in values),
110
+ "latency_ms": sum(item["latency_ms"] for item in values),
111
+ "cost_usd_equivalent_micros": sum(item["cost_usd_equivalent_micros"] for item in values),
112
+ }
113
+ sufficient = len(records) >= 100 and all(len(values) >= 30 for values in grouped.values())
114
+ return {
115
+ "schema_version": "1",
116
+ "total_samples": len(records),
117
+ "policies": policies,
118
+ "causal_claim": "descriptive_only" if sufficient else "insufficient_evidence",
119
+ }
120
+
121
+
122
+ def main(argv: list[str] | None = None) -> int:
123
+ parser = argparse.ArgumentParser()
124
+ parser.add_argument("--tasks", type=Path, default=Path(__file__).with_name("tasks.json"))
125
+ parser.add_argument("--results", type=Path, required=True)
126
+ parser.add_argument("--live", action="store_true")
127
+ parser.add_argument("--approve-cost", action="store_true")
128
+ args = parser.parse_args(argv)
129
+ if args.live:
130
+ if not args.approve_cost:
131
+ parser.error("--live requires --approve-cost")
132
+ parser.error("live runs must be initiated through the approval-gated routing service")
133
+ corpus = load_tasks(args.tasks)
134
+ records = json.loads(args.results.read_text(encoding="utf-8"))
135
+ print(json.dumps(evaluate_records(corpus, records), indent=2, sort_keys=True))
136
+ return 0
137
+
138
+
139
+ if __name__ == "__main__":
140
+ raise SystemExit(main())
@@ -0,0 +1,20 @@
1
+ {
2
+ "schema_version": "1",
3
+ "corpus": "synthetic-realty-router",
4
+ "tasks": [
5
+ {"task_id":"realty-docs-001","category":"documentation","risk":"low","objective":"Document listing lifecycle states and API error semantics.","targets":["docs/listings.md"],"allowed_evidence":["lint","human_review"],"verification":["documentation_review"],"max_context_bytes":32768},
6
+ {"task_id":"realty-schema-001","category":"feature","risk":"medium","objective":"Design typed listing and media metadata schemas with validation.","targets":["src/listings/schema.ts"],"allowed_evidence":["tests","typecheck"],"verification":["schema_tests","boundary_validation"],"max_context_bytes":65536},
7
+ {"task_id":"realty-crud-001","category":"feature","risk":"medium","objective":"Implement listing CRUD contracts with optimistic concurrency.","targets":["src/listings/service.ts"],"allowed_evidence":["tests","typecheck"],"verification":["unit_tests","concurrency_tests"],"max_context_bytes":131072},
8
+ {"task_id":"realty-search-001","category":"architecture","risk":"medium","objective":"Design paginated search, filters, and geospatial query boundaries.","targets":["src/search/design.md"],"allowed_evidence":["tests","human_review"],"verification":["query_plan_review","pagination_tests"],"max_context_bytes":131072},
9
+ {"task_id":"realty-leads-001","category":"feature","risk":"medium","objective":"Design lead and enquiry workflows with explicit state transitions.","targets":["src/leads/workflow.ts"],"allowed_evidence":["tests","typecheck"],"verification":["state_machine_tests"],"max_context_bytes":98304},
10
+ {"task_id":"realty-favourites-001","category":"isolated_code","risk":"low","objective":"Implement idempotent favourite creation and deletion.","targets":["src/favourites/service.ts"],"allowed_evidence":["tests"],"verification":["idempotency_tests"],"max_context_bytes":65536},
11
+ {"task_id":"realty-appointments-001","category":"concurrency","risk":"high","objective":"Prevent double booking under concurrent appointment requests.","targets":["src/appointments/service.ts"],"allowed_evidence":["tests","security_review"],"verification":["concurrency_tests","transaction_review"],"max_context_bytes":131072},
12
+ {"task_id":"realty-tenancy-001","category":"tenant_isolation","risk":"high","objective":"Enforce tenant isolation for listings, leads, cache keys, and audit logs.","targets":["src/authz/tenant-policy.ts"],"allowed_evidence":["tests","security_review"],"verification":["cross_tenant_tests","security_review"],"max_context_bytes":196608},
13
+ {"task_id":"realty-migration-001","category":"migration","risk":"high","objective":"Plan a zero-downtime listing status migration with rollback.","targets":["migrations/plan.md"],"allowed_evidence":["tests","human_review"],"verification":["migration_test","rollback_test"],"max_context_bytes":131072},
14
+ {"task_id":"realty-queues-001","category":"concurrency","risk":"high","objective":"Design notification jobs with retries, idempotency, and dead-letter handling.","targets":["src/jobs/notifications.ts"],"allowed_evidence":["tests","human_review"],"verification":["retry_tests","idempotency_tests","dead_letter_test"],"max_context_bytes":131072},
15
+ {"task_id":"realty-deploy-001","category":"deployment","risk":"high","objective":"Design staged deployment, observability, backup, recovery, and rollback.","targets":["ops/runbook.md"],"allowed_evidence":["tests","human_review"],"verification":["restore_drill","rollback_review"],"max_context_bytes":98304},
16
+ {"task_id":"realty-a11y-001","category":"feature","risk":"medium","objective":"Review listing results for accessibility and defensive loading states.","targets":["src/ui/ListingResults.tsx"],"allowed_evidence":["tests","human_review"],"verification":["accessibility_tests","keyboard_review"],"max_context_bytes":98304},
17
+ {"task_id":"realty-performance-001","category":"refactor","risk":"medium","objective":"Bound listing search latency and eliminate unbounded result rendering.","targets":["src/search/service.ts","src/ui/ListingResults.tsx"],"allowed_evidence":["tests","benchmark"],"verification":["performance_budget","pagination_tests"],"max_context_bytes":131072},
18
+ {"task_id":"realty-security-001","category":"authorization","risk":"high","objective":"Review listing administration for broken access control and unsafe uploads.","targets":["src/admin/listings.ts","src/media/upload.ts"],"allowed_evidence":["tests","security_review"],"verification":["authorization_tests","upload_security_tests"],"max_context_bytes":196608}
19
+ ]
20
+ }
@@ -0,0 +1,92 @@
1
+ """Deterministic synthetic repository for build benchmarks.
2
+
3
+ Five languages in fixed proportions (py 40 %, ts 25 %, js 15 %, go 10 %,
4
+ rs 10 %). Every file defines `_FUNCS_PER_FILE` functions and one class, and
5
+ imports and calls into the previous file of its language, so the resolver
6
+ has real cross-file work to do rather than a pile of unrelated leaves.
7
+
8
+ from benchmarks.synthetic_repo import generate
9
+ counts = generate(Path("repo"), files=3000)
10
+
11
+ Same `seed` and `files` -> byte-identical tree, so two measurements differ
12
+ only by the machine and the engine.
13
+ """
14
+ from __future__ import annotations
15
+
16
+ import random
17
+ from pathlib import Path
18
+
19
+ _SHARES: tuple[tuple[str, float], ...] = (("py", 0.40), ("ts", 0.25), ("js", 0.15), ("go", 0.10), ("rs", 0.10))
20
+ _FUNCS_PER_FILE = 12
21
+
22
+
23
+ def _py(prev: str | None) -> str:
24
+ head = f"from .mod_{prev} import fn_0 as prev_fn\n\n\n" if prev else ""
25
+ body = "".join(
26
+ f"def fn_{k}(x: int) -> int:\n return {'prev_fn(x)' if prev and k == 0 else 'x'} + {k}\n\n\n"
27
+ for k in range(_FUNCS_PER_FILE)
28
+ )
29
+ return head + body + "class Widget:\n def run(self) -> int:\n return fn_1(1)\n"
30
+
31
+
32
+ def _ts(prev: str | None, *, typed: bool) -> str:
33
+ param = "x: number" if typed else "x"
34
+ ret = ": number" if typed else ""
35
+ head = f"import {{ fn0 }} from './mod_{prev}';\n\n" if prev else ""
36
+ body = "".join(
37
+ f"export function fn{k}({param}){ret} {{ return {'fn0(x)' if prev and k == 0 else 'x'} + {k}; }}\n"
38
+ for k in range(_FUNCS_PER_FILE)
39
+ )
40
+ return head + body + f"export class Widget {{ run(){ret} {{ return fn1(1); }} }}\n"
41
+
42
+
43
+ def _go(prev: str | None) -> str:
44
+ body = "".join(
45
+ f"func Fn{k}(x int) int {{ return {'Fn0(x)' if prev and k == 1 else 'x'} + {k} }}\n"
46
+ for k in range(_FUNCS_PER_FILE)
47
+ )
48
+ return "package synth\n\n" + body + "func Run() int { return Fn1(1) }\n"
49
+
50
+
51
+ def _rs(prev: str | None) -> str:
52
+ head = f"use crate::mod_{prev}::fn_0 as prev_fn;\n\n" if prev else ""
53
+ body = "".join(
54
+ f"pub fn fn_{k}(x: i64) -> i64 {{ {'prev_fn(x)' if prev and k == 0 else 'x'} + {k} }}\n"
55
+ for k in range(_FUNCS_PER_FILE)
56
+ )
57
+ return head + body + "pub fn run() -> i64 { fn_1(1) }\n"
58
+
59
+
60
+ def generate(root: Path, *, files: int, seed: int = 7) -> dict[str, int]:
61
+ """Write `files` source files under `root`; return the per-language counts."""
62
+ if files < 1:
63
+ raise ValueError("files must be positive")
64
+ rng = random.Random(seed)
65
+ counts = {lang: int(files * share) for lang, share in _SHARES}
66
+ counts["py"] += files - sum(counts.values())
67
+ root.mkdir(parents=True, exist_ok=True)
68
+ for lang, count in counts.items():
69
+ directory = root / lang
70
+ directory.mkdir(parents=True, exist_ok=True)
71
+ prev: str | None = None
72
+ for index in range(count):
73
+ name = f"{index:05d}_{rng.randrange(1000):03d}"
74
+ if lang == "py":
75
+ (directory / f"mod_{name}.py").write_text(_py(prev), encoding="utf-8")
76
+ elif lang == "ts":
77
+ (directory / f"mod_{name}.ts").write_text(_ts(prev, typed=True), encoding="utf-8")
78
+ elif lang == "js":
79
+ (directory / f"mod_{name}.js").write_text(_ts(prev, typed=False), encoding="utf-8")
80
+ elif lang == "go":
81
+ (directory / f"mod_{name}.go").write_text(_go(prev), encoding="utf-8")
82
+ else:
83
+ (directory / f"mod_{name}.rs").write_text(_rs(prev), encoding="utf-8")
84
+ prev = name
85
+ if counts["py"]:
86
+ (root / "py" / "__init__.py").write_text("", encoding="utf-8")
87
+ if counts["rs"]:
88
+ mods = sorted(p.stem for p in (root / "rs").glob("mod_*.rs"))
89
+ (root / "rs" / "lib.rs").write_text("".join(f"pub mod {m};\n" for m in mods), encoding="utf-8")
90
+ (root / "package.json").write_text('{"name": "synth", "private": true}\n', encoding="utf-8")
91
+ (root / "go.mod").write_text("module synth\n\ngo 1.22\n", encoding="utf-8")
92
+ return counts
@@ -170,16 +170,39 @@ packages = ["src/graphite"]
170
170
  # repo root should be absent from the sdist by default, not shipped until
171
171
  # someone notices. Tests are included deliberately -- an sdist a consumer
172
172
  # cannot run the suite from is not much of a source distribution.
173
+ #
174
+ # `/scripts` and `/benchmarks` are included for the SAME reason, and they were
175
+ # missing until 2026-10-29. The shipped tests import from them: four of them
176
+ # put `<root>/scripts` on `sys.path` and import `compare_dist`,
177
+ # `verify_artifact` and `verify_published_release`, one imports
178
+ # `scripts.gen_cli_reference` as a package, one imports
179
+ # `benchmarks.realty_router.evaluate`, and `tests/test_mutation_tests.py`
180
+ # loads `scripts/mutation_tests.py` by path. MEASURED against the unpacked
181
+ # 1.8.0 sdist: the suite did not COLLECT -- 6 collection errors and 0 tests
182
+ # run, exit 2 -- so a consumer could not run the suite it was shipped with at
183
+ # all. Shipping the tests without what they import is not shipping a suite.
184
+ #
185
+ # The `docs/` tree is deliberately NOT shipped. It is the repository's internal
186
+ # engineering record, and two dozen of its documents quote a developer
187
+ # machine's absolute paths -- `RELEASING.md` makes those a stop condition for
188
+ # an archive, and rewriting a record of what was decided to suit a packaging
189
+ # boundary is worse than leaving it out. The tests that read it are
190
+ # REPOSITORY tests rather than package tests, and they SKIP when the tree is
191
+ # absent (see `tests/conftest.py`).
173
192
  [tool.hatch.build.targets.sdist]
174
193
  include = [
175
194
  "/src",
176
195
  "/tests",
196
+ "/scripts",
197
+ "/benchmarks",
198
+ "/.mcp.json",
177
199
  "/pyproject.toml",
178
200
  "/README.md",
179
201
  "/CHANGELOG.md",
180
202
  "/RELEASING.md",
181
203
  "/CONTRIBUTING.md",
182
204
  "/ARCHITECTURE.md",
205
+ "/SECURITY.md",
183
206
  "/LICENSE",
184
207
  ]
185
208