graphite-code 1.9.3__tar.gz → 1.9.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {graphite_code-1.9.3 → graphite_code-1.9.4}/CHANGELOG.md +45 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/PKG-INFO +2 -2
- {graphite_code-1.9.3 → graphite_code-1.9.4}/README.md +1 -1
- {graphite_code-1.9.3 → graphite_code-1.9.4}/RELEASING.md +9 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/__init__.py +1 -1
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/agent_hooks.py +13 -6
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/cli.py +10 -8
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/ingest.py +41 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_activation_backstop.py +26 -15
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_agent_hook_activation.py +15 -7
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cli_below_repository_root.py +72 -1
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cli_version.py +25 -1
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_debt.py +7 -1
- {graphite_code-1.9.3 → graphite_code-1.9.4}/.gitignore +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/.mcp.json +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/ARCHITECTURE.md +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/CONTRIBUTING.md +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/LICENSE +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/SECURITY.md +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/benchmarks/__init__.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/benchmarks/build_benchmark.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/benchmarks/realty_router/README.md +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/benchmarks/realty_router/__init__.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/benchmarks/realty_router/evaluate.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/benchmarks/realty_router/tasks.json +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/benchmarks/synthetic_repo.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/pyproject.toml +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/scripts/__init__.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/scripts/compare_dist.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/scripts/gen_cli_reference.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/scripts/mutation_tests.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/scripts/pyscopeoracle.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/scripts/sqloracle.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/scripts/verify_artifact.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/scripts/verify_published_release.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/__main__.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/_cleanup_worker.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/_win32_ctypes.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/activation.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/agent_settings.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/analyze.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/answer_contract.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/bootstrap.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/buildlock.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/cache.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/channel.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/cluster.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/config.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/context.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/daemon.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/daemon_health.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/daemon_launch.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/debt.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/dependency_install.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/detach.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/doctor.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/doctor_probes.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/engine_identity.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/export/__init__.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/export/html.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/export/json.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/export/md.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/extract/__init__.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/extract/ast.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/extract/pyscope.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/freshness.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/git.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/graph.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/graph_io.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/health.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/hook_entry.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/hookinstall.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/hookshim.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/incident_ledger.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/init.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/io.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/launchd_agent.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/listing.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/llm.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/llm_probe.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/mcp.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/mcp_server.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/natural_query.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/overlays.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/ownership.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/probe_process.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/probe_workspace.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/process_contracts.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/programs.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/provider_observer.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/py.typed +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/query.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/query_plan.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/replacement_audit.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/resolve.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/review.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/__init__.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/approval.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/classifier.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/claude_executor.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/claude_probe.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/cli_identity.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/codex_executor.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/codex_probe.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/context_builder.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/contracts.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/diff_policy.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/edit_apply.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/effort.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/lifecycle.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/lifecycle_operator.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/lifecycle_service.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/lifecycle_storage.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/ollama_executor.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/ollama_probe.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/openrouter_executor.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/openrouter_probe.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/policy.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/probe_runner.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/process_runner.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/profiles.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/prompt.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/registry.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/route_pool.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/route_pool_execution.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/schema_validation.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/service.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/settings.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/shadow.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/storage.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/telemetry.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/worktree.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/zai_edit.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/zai_executor.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/routing/zai_probe.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/savings.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/systemd_unit.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/ts_bridge.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/ts_resolver.mjs +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/typescript_activation.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/usage_ledger.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/validation.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/watch.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/windows_job.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/windows_startup.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/src/graphite/windows_task.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/conftest.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/data/sqloracle/blindspots.py.txt +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/data/sqloracle/round69.py.txt +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/fake_clis/fake_cli.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/fixtures/provider_lifecycle_schema_v1.sql +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/fixtures/routing_schema_v2_ca77600.sql +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/fixtures/routing_schema_v3_94eb333.sql +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/fixtures/routing_schema_v4_lifecycle_migration.sql +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test__win32_ctypes.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_activation.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_agent_hooks.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_agent_hooks_session_books.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_agent_hooks_session_tagging.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_agent_settings.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_answer_contract.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_arrow_and_constructor_binding.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_ast_make_id_length.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_ast_name_a_module_only_imports.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_ast_source_lines.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_ast_super_over_a_builtin_base.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_atomic_write.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_bootstrap.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_build_detach.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_buildlock.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cache_engine_identity.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cache_entry_pruning.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cache_file_identity.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cache_file_set.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cache_pruning.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_call_graph.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_case_ambiguous_answer.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_channel_attribution.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_channel_cli.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_channel_core.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_channel_kind.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_channel_lock.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_channel_log_integrity.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_channel_mcp.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_channel_register.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_channel_report.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_channel_status.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_class_field_arrow_binding.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cli_build_missing_path.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cli_channel.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cli_channel_attribution.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cli_doctor_below_root.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cli_reference.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cli_usage.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cluster.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_compare_dist.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_configuration_reference.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_context.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_context_builder.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cwd_relative_config.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_cycle_search.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_daemon.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_daemon_activation.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_daemon_build_lock.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_daemon_child_lock.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_daemon_engine_staleness.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_daemon_health.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_daemon_health_activation.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_daemon_launch.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_daemon_service_cli.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_daemon_snapshot_failure.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_dependency_install.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_destructured_binding.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_determinism.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_dispatch_evidence.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_doctor.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_doctor_agent_hooks.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_doctor_hooks.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_doctor_managed_docs.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_doctor_probes.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_documentation.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_edit_apply.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_engine_identity.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_exit_codes_reference.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_external_calls.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_file_node_id_collision.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_git_security.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_go_rust.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_graph_io.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_graph_provider_isolation.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_hardening.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_health.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_hook_entry.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_hook_template.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_hookinstall.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_hookshim.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_html_security.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_incident_ledger.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_init.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_init_activation_doctrine.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_init_hooks.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_init_validation_exit.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_launchd_agent.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_lifecycle_operator.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_listing.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_listing_surfaces.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_llm.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_llm_probe.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_mcp.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_mcp_server.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_mcp_server_channel_attribution.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_member_call_receiver.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_method_dispatch_scope.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_monorepo.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_mutation_tests.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_natural_query.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_no_path_is_graded.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_node_identity.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_ollama_executor.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_overlays.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_path_leak_fixture.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_probe_diagnostics.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_probe_process.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_probe_workspace.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_process_contracts.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_programs.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_provider_claude_probe.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_provider_codex_probe.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_provider_lifecycle.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_provider_lifecycle_service.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_provider_lifecycle_storage.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_provider_observer.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_provider_ollama_probe.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_provider_openrouter_probe.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_provider_probe_runner.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_public_surface.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_published_schemas.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_pyscope.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_pyscopeoracle.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_python_builtin_named_symbols.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_python_import_bindings.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_python_inherits_edge.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_python_local_alias_call.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_python_reexport_follow.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_python_resolver.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_python_scope_identity.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_query_plan.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_reliability.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_replacement_audit.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_repository_root_ownership.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_resolve.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_resolve_python_reexports_of.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_review.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_route_pool.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_route_pool_execution.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_approval.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_benchmark.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_classifier.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_claude_executor.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_cli.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_cli_contracts.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_cli_recovery.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_codex_executor.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_context.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_contracts.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_diff_policy.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_executor.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_openrouter_executor.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_policy.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_process_runner.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_profiles.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_registry.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_schema_validation.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_security.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_service.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_shadow.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_storage.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_telemetry.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_worktree.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_zai_executor.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_routing_zai_probe.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_savings.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_search.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_self_super_dispatch.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_smoke.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_sqloracle.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_synthetic_repo.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_systemd_unit.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_ts_bridge.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_typescript_activation.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_typescript_resolver.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_usage_ledger.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_verify_artifact.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_verify_published_release.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_watch.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_windows_startup.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_windows_task.py +0 -0
- {graphite_code-1.9.3 → graphite_code-1.9.4}/tests/test_zai_edit.py +0 -0
|
@@ -13,6 +13,51 @@ machine-checkable identity; the version is for humans.
|
|
|
13
13
|
|
|
14
14
|
[Keep a Changelog]: https://keepachangelog.com/en/1.1.0/
|
|
15
15
|
|
|
16
|
+
## [1.9.4] — 2026-11-08
|
|
17
|
+
|
|
18
|
+
A patch release: one fix, and no change to any command, option, exit code,
|
|
19
|
+
entry point or published schema. Which folders a command or an agent session
|
|
20
|
+
registers with the daemon is not a stable surface (`docs/compatibility.md`),
|
|
21
|
+
and `graphite activate` is unchanged.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
**A command or agent session in a folder that is in no repository no longer
|
|
26
|
+
puts that folder under daemon supervision unless graphite is set up there,
|
|
27
|
+
and a drive or filesystem root never.** The CLI registers the repository a
|
|
28
|
+
command is typed in, so agents graphite cannot hook still get their
|
|
29
|
+
repository supervised. For a folder in no Git repository at all, it
|
|
30
|
+
registered the folder itself, whatever it was. A command typed in a drive
|
|
31
|
+
root, which is where release deploy steps run to keep a checkout off
|
|
32
|
+
`sys.path`, put the whole drive under supervision. Every build of it then
|
|
33
|
+
timed out after the daemon's 240-second limit and was retried, for the hour
|
|
34
|
+
until the marker expired. One machine's records show it four times, each on
|
|
35
|
+
a release day:
|
|
36
|
+
- three episodes ran for about an hour, with 17, 14 and 14 timed-out builds;
|
|
37
|
+
- the fourth, caused by commands run from the drive root after a deploy, was
|
|
38
|
+
cut short at 4 when its marker was removed.
|
|
39
|
+
|
|
40
|
+
A home directory is the same case.
|
|
41
|
+
|
|
42
|
+
Such a folder now registers only where graphite is set up: it has a graph,
|
|
43
|
+
or the `GRAPHITE.md` that `init` writes. A drive or filesystem root never
|
|
44
|
+
does, not even one holding `.git`, since a stray `.git` there is still the
|
|
45
|
+
whole drive; `trusted_root` already refuses such a root for the same reason.
|
|
46
|
+
The price: a repository whose root really is a drive root no longer
|
|
47
|
+
registers from a command or a session, and is registered with
|
|
48
|
+
`graphite activate` instead. A checkout's root anywhere else still registers
|
|
49
|
+
itself, set up or not, which is how a fresh clone gets its first graph. A
|
|
50
|
+
folder below a checkout's root still registers nothing.
|
|
51
|
+
|
|
52
|
+
The agent hooks follow the same rule from one shared definition. A session's
|
|
53
|
+
`cwd` follows a `cd` in the shell, and `Stop` renews the marker every turn,
|
|
54
|
+
so a session that wandered to a drive root would keep the drive supervised
|
|
55
|
+
for as long as it stayed there. `graphite activate` names its path and is
|
|
56
|
+
still believed as given.
|
|
57
|
+
|
|
58
|
+
In a folder outside any repository that has no graph yet, the `build` that
|
|
59
|
+
makes the first graph registers nothing, and the next command does.
|
|
60
|
+
|
|
16
61
|
## [1.9.3] — 2026-11-08
|
|
17
62
|
|
|
18
63
|
A patch release: three fixes, and no change to any command, option, exit
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: graphite-code
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.4
|
|
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
|
|
@@ -49,7 +49,7 @@ Description-Content-Type: text/markdown
|
|
|
49
49
|
|
|
50
50
|
Local-first, deterministic knowledge graph extraction for codebases — zero-LLM, daemon-maintained, agent-agnostic.
|
|
51
51
|
|
|
52
|
-
**Status: 1.9.
|
|
52
|
+
**Status: 1.9.4, production/stable.** Published on PyPI as
|
|
53
53
|
[`graphite-code`](https://pypi.org/project/graphite-code/) with PEP 740
|
|
54
54
|
attestations; supported on Windows, Linux and macOS with Python 3.11–3.14
|
|
55
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.9.
|
|
5
|
+
**Status: 1.9.4, 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`,
|
|
@@ -437,6 +437,15 @@ readback. Until 1.9.3 the readback stopped at the version, so an MCP probe that
|
|
|
437
437
|
on every run with mcp beside graphite shipped unseen in every wheel from 0.3.0, the first
|
|
438
438
|
one deployed, through 1.9.2.
|
|
439
439
|
|
|
440
|
+
Run every `graphite` command of a readback from a repository, as `python -P -m graphite`
|
|
441
|
+
so the working directory cannot shadow the package. The `python -c` checks above are the
|
|
442
|
+
only part to run from a neutral directory. Through 1.9.3 a `graphite` command typed in a
|
|
443
|
+
folder that is in no repository registered that folder as open: typed in a drive root --
|
|
444
|
+
where deploy steps run to keep the checkout off `sys.path` -- it put the whole drive under
|
|
445
|
+
daemon supervision, and every build of it timed out until the marker expired an hour
|
|
446
|
+
later. A release with the fix no longer does that, but the installed version during a
|
|
447
|
+
deploy is the old one, so the rule holds for the readback either way.
|
|
448
|
+
|
|
440
449
|
Prove a rollback path in a throwaway virtual environment before relying on it,
|
|
441
450
|
and prove the return as well. An untested recovery step is not a recovery step.
|
|
442
451
|
|
|
@@ -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.9.
|
|
41
|
+
__version__ = "1.9.4"
|
|
@@ -23,7 +23,7 @@ from .graph import edge_relations
|
|
|
23
23
|
from .graph_io import load_validated_graph_bundle
|
|
24
24
|
from .health import _edge_language, is_placeholder, persisted_resolution
|
|
25
25
|
from .incident_ledger import record_incident, repo_ledger_dir
|
|
26
|
-
from .ingest import
|
|
26
|
+
from .ingest import activation_root, repository_root
|
|
27
27
|
from .query import _CALL_RELATIONS
|
|
28
28
|
|
|
29
29
|
SESSION_CONTRACT = (
|
|
@@ -77,18 +77,25 @@ def _activate(root: Path) -> None:
|
|
|
77
77
|
"""Register this repo as open, so the daemon supervises it and leaves the
|
|
78
78
|
rest of the machine alone.
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
What is registered is `ingest.activation_root`'s answer, the rule the
|
|
81
|
+
CLI's backstop uses too. A directory below a checkout's root is never
|
|
82
|
+
registered: no build can run there, so the daemon would fail on it at
|
|
83
|
+
every discovery cycle for as long as the marker lived. A folder in no
|
|
84
|
+
repository is registered only where graphite is set up there, and a drive
|
|
85
|
+
or filesystem root never is, not even one holding `.git`. The payload's
|
|
86
|
+
`cwd` follows a `cd` in the shell and `Stop` renews the marker every turn,
|
|
87
|
+
so a session that wandered to a drive root would otherwise keep the whole
|
|
88
|
+
drive under supervision.
|
|
83
89
|
|
|
84
90
|
Guarded separately from the caller's own try/except: activation is
|
|
85
91
|
bookkeeping, and this module is fail-open by contract -- a broken registry
|
|
86
92
|
must never cost the agent its session context or its graph-first reminder.
|
|
87
93
|
"""
|
|
88
94
|
try:
|
|
89
|
-
|
|
95
|
+
opened = activation_root(root)
|
|
96
|
+
if opened is None:
|
|
90
97
|
return
|
|
91
|
-
mark_active(
|
|
98
|
+
mark_active(opened, "claude")
|
|
92
99
|
except Exception:
|
|
93
100
|
return
|
|
94
101
|
|
|
@@ -53,7 +53,7 @@ from .graph_io import MAX_GRAPH_BYTES, GraphReadError, load_validated_graph_bund
|
|
|
53
53
|
from .health import persisted_resolution, ratio_percent, resolution_health
|
|
54
54
|
from . import hookinstall
|
|
55
55
|
from .incident_ledger import record_incident, repo_ledger_dir
|
|
56
|
-
from .ingest import collect_files, enclosing_git_root, repository_root, trusted_root
|
|
56
|
+
from .ingest import activation_root, collect_files, enclosing_git_root, repository_root, trusted_root
|
|
57
57
|
from .init import init_project, platform_choices, resolve_platform_selection
|
|
58
58
|
from .io import atomic_write_json
|
|
59
59
|
from .listing import listing_lines
|
|
@@ -3704,14 +3704,16 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
3704
3704
|
# GRAPHITE_DAEMON_CHILD, without which activation would never expire.
|
|
3705
3705
|
#
|
|
3706
3706
|
# What is registered is the REPOSITORY the command is typed in, not the
|
|
3707
|
-
# directory (#81)
|
|
3708
|
-
#
|
|
3709
|
-
#
|
|
3710
|
-
#
|
|
3711
|
-
#
|
|
3707
|
+
# directory (#81), and `ingest.activation_root` decides it for this path
|
|
3708
|
+
# and for `agent_hooks._activate` alike: never a drive or filesystem root,
|
|
3709
|
+
# not even one holding `.git`; otherwise a checkout's root; nothing for a
|
|
3710
|
+
# folder below a root, where no build can run; and a folder in no
|
|
3711
|
+
# repository only where graphite is set up there. Registering any folder
|
|
3712
|
+
# a command ran in put a whole drive under supervision when a command was
|
|
3713
|
+
# typed at its root.
|
|
3712
3714
|
if args.command not in _ACTIVATION_EXEMPT_COMMANDS and not _is_scratch_workspace(Path.cwd()):
|
|
3713
|
-
opened =
|
|
3714
|
-
if
|
|
3715
|
+
opened = activation_root(Path.cwd())
|
|
3716
|
+
if opened is not None:
|
|
3715
3717
|
activation.mark_active(opened, "cli")
|
|
3716
3718
|
|
|
3717
3719
|
try:
|
|
@@ -248,6 +248,9 @@ def repository_root(directory: Path) -> Path:
|
|
|
248
248
|
is asked last: the hooks ask for the root at every tool call.
|
|
249
249
|
|
|
250
250
|
Never raises: a directory that cannot be read stands for itself.
|
|
251
|
+
|
|
252
|
+
This answers where a session or command READS. What it may REGISTER with
|
|
253
|
+
the daemon is narrower, and `activation_root` decides that.
|
|
251
254
|
"""
|
|
252
255
|
try:
|
|
253
256
|
top = enclosing_git_root(directory)
|
|
@@ -260,6 +263,44 @@ def repository_root(directory: Path) -> Path:
|
|
|
260
263
|
return directory
|
|
261
264
|
|
|
262
265
|
|
|
266
|
+
def activation_root(directory: Path) -> Path | None:
|
|
267
|
+
"""The directory a session or command in `directory` registers as open, or
|
|
268
|
+
None for nothing.
|
|
269
|
+
|
|
270
|
+
Asked by the two paths that INFER activation from where they run: the
|
|
271
|
+
CLI's backstop and the agent hooks. `graphite activate` names its path and
|
|
272
|
+
is believed as given, so it does not ask.
|
|
273
|
+
|
|
274
|
+
- A drive or filesystem root never registers, not even one holding
|
|
275
|
+
`.git`. Registering whatever folder a command ran in handed the daemon
|
|
276
|
+
that folder to build: a command typed in a drive root put the whole
|
|
277
|
+
drive under supervision, and every build of it timed out until the
|
|
278
|
+
marker expired an hour later. A stray `.git` at a drive root is the
|
|
279
|
+
same drive, so it is asked about first -- the stance `trusted_root`
|
|
280
|
+
already takes. A repository whose root really is a drive root is
|
|
281
|
+
registered with `graphite activate`, which names its path.
|
|
282
|
+
- A checkout's root registers itself, set up or not. That is how a fresh
|
|
283
|
+
clone gets its first graph.
|
|
284
|
+
- A folder below a checkout's root registers nothing. No build can run
|
|
285
|
+
there (#80, #81), so the daemon would fail on the marker at every cycle.
|
|
286
|
+
- A folder in no repository registers itself only where graphite is set
|
|
287
|
+
up there (a graph, or `GRAPHITE.md`). A home directory, which often
|
|
288
|
+
holds a stray package manifest, is otherwise the drive-root case again.
|
|
289
|
+
|
|
290
|
+
Never raises: a directory that cannot be read registers nothing.
|
|
291
|
+
"""
|
|
292
|
+
try:
|
|
293
|
+
root = repository_root(directory)
|
|
294
|
+
if root.parent == root or _resolved(root).parent == _resolved(root):
|
|
295
|
+
return None
|
|
296
|
+
top = enclosing_git_root(root)
|
|
297
|
+
if top is not None:
|
|
298
|
+
return root if top == root else None
|
|
299
|
+
return root if _is_set_up(root) else None
|
|
300
|
+
except OSError:
|
|
301
|
+
return None
|
|
302
|
+
|
|
303
|
+
|
|
263
304
|
def _git_ls_files(
|
|
264
305
|
root: Path,
|
|
265
306
|
*,
|
|
@@ -5,6 +5,7 @@ own build children are excluded, or activation would renew itself forever.
|
|
|
5
5
|
"""
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
|
+
import subprocess
|
|
8
9
|
from pathlib import Path
|
|
9
10
|
|
|
10
11
|
import pytest
|
|
@@ -14,6 +15,10 @@ from graphite.config import Config
|
|
|
14
15
|
from graphite.daemon import _build_command
|
|
15
16
|
|
|
16
17
|
|
|
18
|
+
def _git_init(directory: Path) -> None:
|
|
19
|
+
subprocess.run(["git", "init", "--quiet", str(directory)], check=True, capture_output=True)
|
|
20
|
+
|
|
21
|
+
|
|
17
22
|
def test_daemon_build_children_run_with_the_suppression_flag(tmp_path: Path) -> None:
|
|
18
23
|
"""_build_command(cfg, root) -> (argv, env). Signature verified, not guessed."""
|
|
19
24
|
repo = tmp_path / "repo"
|
|
@@ -78,6 +83,7 @@ def test_interactive_cli_invocation_marks_the_repo_active(
|
|
|
78
83
|
repo = tmp_path / "repo"
|
|
79
84
|
(repo / "src").mkdir(parents=True)
|
|
80
85
|
(repo / "src" / "a.py").write_text("def a():\n return 1\n", encoding="utf-8")
|
|
86
|
+
_git_init(repo)
|
|
81
87
|
monkeypatch.chdir(repo)
|
|
82
88
|
|
|
83
89
|
main(["build", "."])
|
|
@@ -98,24 +104,26 @@ def test_backstop_ignores_graphite_scratch_workspaces(
|
|
|
98
104
|
|
|
99
105
|
Opportunistic marking is conservative; explicit activation (`graphite
|
|
100
106
|
activate`, agent hooks) is trusted and still honoured -- see the test below.
|
|
101
|
-
"""
|
|
102
|
-
import tempfile
|
|
103
107
|
|
|
104
|
-
|
|
108
|
+
The workspace is a git checkout, which the backstop WOULD register: only the
|
|
109
|
+
prefix rule stands between it and a marker, so this fails if that rule goes.
|
|
105
110
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
+
It lives under `tmp_path`, never `tempfile.mkdtemp`: the test runs inside
|
|
112
|
+
it, and removing a directory that is still the working directory fails on
|
|
113
|
+
Windows. `rmtree(..., ignore_errors=True)` hid that, and every run left an
|
|
114
|
+
empty `graphite-doctor-*` directory in the system temp dir.
|
|
115
|
+
"""
|
|
116
|
+
from graphite.cli import main
|
|
111
117
|
|
|
112
|
-
|
|
118
|
+
scratch = tmp_path / "graphite-doctor-probe"
|
|
119
|
+
(scratch / "src").mkdir(parents=True)
|
|
120
|
+
(scratch / "src" / "a.py").write_text("def a():\n return 1\n", encoding="utf-8")
|
|
121
|
+
_git_init(scratch)
|
|
122
|
+
monkeypatch.chdir(scratch)
|
|
113
123
|
|
|
114
|
-
|
|
115
|
-
finally:
|
|
116
|
-
import shutil
|
|
124
|
+
main(["build", "."])
|
|
117
125
|
|
|
118
|
-
|
|
126
|
+
assert activation.read_active() == []
|
|
119
127
|
|
|
120
128
|
|
|
121
129
|
def test_explicit_activation_of_a_temp_path_is_still_honoured(tmp_path: Path) -> None:
|
|
@@ -138,11 +146,14 @@ def test_explicit_activation_of_a_temp_path_is_still_honoured(tmp_path: Path) ->
|
|
|
138
146
|
def test_daemon_subcommand_does_not_mark_the_repo_active(
|
|
139
147
|
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
|
|
140
148
|
) -> None:
|
|
141
|
-
"""The supervisor is not an editing session.
|
|
149
|
+
"""The supervisor is not an editing session.
|
|
150
|
+
|
|
151
|
+
`base` holds `.git`, so the backstop would register it: only the
|
|
152
|
+
exemption stands between it and a marker."""
|
|
142
153
|
from graphite.cli import main
|
|
143
154
|
|
|
144
155
|
base = tmp_path / "base"
|
|
145
|
-
base.mkdir()
|
|
156
|
+
(base / ".git").mkdir(parents=True)
|
|
146
157
|
monkeypatch.chdir(base)
|
|
147
158
|
|
|
148
159
|
main(["daemon", str(base), "--once", "--state-dir", str(tmp_path / "state")])
|
|
@@ -13,9 +13,15 @@ from graphite import activation
|
|
|
13
13
|
from graphite.agent_hooks import handle_session_start, handle_stop
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
def
|
|
16
|
+
def _checkout(tmp_path: Path) -> Path:
|
|
17
|
+
"""A checkout's root: `.git` is what makes a folder registrable."""
|
|
17
18
|
repo = tmp_path / "repo"
|
|
18
|
-
repo.mkdir()
|
|
19
|
+
(repo / ".git").mkdir(parents=True)
|
|
20
|
+
return repo
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def test_session_start_marks_the_repo_active(tmp_path: Path) -> None:
|
|
24
|
+
repo = _checkout(tmp_path)
|
|
19
25
|
|
|
20
26
|
handle_session_start({"cwd": str(repo)})
|
|
21
27
|
|
|
@@ -25,8 +31,7 @@ def test_session_start_marks_the_repo_active(tmp_path: Path) -> None:
|
|
|
25
31
|
|
|
26
32
|
|
|
27
33
|
def test_stop_refreshes_activation_as_a_heartbeat(tmp_path: Path) -> None:
|
|
28
|
-
repo = tmp_path
|
|
29
|
-
repo.mkdir()
|
|
34
|
+
repo = _checkout(tmp_path)
|
|
30
35
|
activation.mark_active(repo, "claude", now=1000.0)
|
|
31
36
|
|
|
32
37
|
handle_stop({"cwd": str(repo)})
|
|
@@ -40,9 +45,12 @@ def test_session_start_still_returns_context_when_activation_fails(
|
|
|
40
45
|
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
|
|
41
46
|
) -> None:
|
|
42
47
|
"""Fail-open contract: a broken registry must not cost the agent its
|
|
43
|
-
session context. agent_hooks is fail-open by module contract.
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
session context. agent_hooks is fail-open by module contract.
|
|
49
|
+
|
|
50
|
+
The folder is a checkout's root, so registration is attempted and the
|
|
51
|
+
failure is real: in a folder that registers nothing, `mark_active` would
|
|
52
|
+
never be reached and the test could not fail."""
|
|
53
|
+
repo = _checkout(tmp_path)
|
|
46
54
|
monkeypatch.setattr(
|
|
47
55
|
"graphite.agent_hooks.mark_active",
|
|
48
56
|
lambda *a, **k: (_ for _ in ()).throw(OSError("boom")),
|
|
@@ -628,19 +628,90 @@ def test_a_run_below_a_root_graphite_is_not_set_up_in_registers_nothing(
|
|
|
628
628
|
assert _active_roots() == []
|
|
629
629
|
|
|
630
630
|
|
|
631
|
-
def
|
|
631
|
+
def test_a_run_in_no_repository_registers_nothing_where_graphite_is_not_set_up(
|
|
632
632
|
tmp_path: Path, monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
|
|
633
633
|
) -> None:
|
|
634
|
+
"""A folder in no repository used to register itself, whatever it was. A
|
|
635
|
+
command typed in a drive root then handed the daemon the whole drive, and
|
|
636
|
+
every build of it timed out until the marker expired. A package manifest
|
|
637
|
+
does not make a folder a project here: a home directory often has one."""
|
|
634
638
|
plain = tmp_path / "plain"
|
|
635
639
|
plain.mkdir()
|
|
640
|
+
(plain / "package.json").write_text("{}\n", encoding="utf-8")
|
|
636
641
|
|
|
637
642
|
code, _out, err = _run(plain, ["query", "callers anything"], monkeypatch, capsys)
|
|
638
643
|
|
|
639
644
|
assert code == 1
|
|
640
645
|
assert "graph_missing" in err
|
|
646
|
+
assert _active_roots() == []
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
def test_a_run_in_no_repository_registers_the_folder_where_graphite_is_set_up_by_init(
|
|
650
|
+
tmp_path: Path, monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
|
|
651
|
+
) -> None:
|
|
652
|
+
plain = tmp_path / "plain"
|
|
653
|
+
plain.mkdir()
|
|
654
|
+
(plain / "GRAPHITE.md").write_text("# graphite\n", encoding="utf-8")
|
|
655
|
+
|
|
656
|
+
_run(plain, ["query", "callers anything"], monkeypatch, capsys)
|
|
657
|
+
|
|
658
|
+
assert _active_roots() == [plain.resolve()]
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
def test_a_run_in_no_repository_registers_the_folder_once_it_has_a_graph(
|
|
662
|
+
tmp_path: Path, monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
|
|
663
|
+
) -> None:
|
|
664
|
+
"""The `build` that makes the first graph is asked about before the graph
|
|
665
|
+
exists, so it registers nothing; the next command does."""
|
|
666
|
+
plain = tmp_path / "plain"
|
|
667
|
+
_write(plain, APP)
|
|
668
|
+
|
|
669
|
+
code, _out, _err = _run(plain, ["build", "."], monkeypatch, capsys)
|
|
670
|
+
assert code == 0
|
|
671
|
+
assert _active_roots() == []
|
|
672
|
+
|
|
673
|
+
code, _out, _err = _run(plain, ["query", "callers compute_total"], monkeypatch, capsys)
|
|
674
|
+
|
|
675
|
+
assert code == 0
|
|
641
676
|
assert _active_roots() == [plain.resolve()]
|
|
642
677
|
|
|
643
678
|
|
|
679
|
+
def test_a_drive_or_filesystem_root_never_registers(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
|
|
680
|
+
"""Even where graphite looks set up. `_is_set_up` is forced true so the
|
|
681
|
+
root rule is the only thing that can refuse it."""
|
|
682
|
+
monkeypatch.setattr(ingest, "_is_set_up", lambda top: True)
|
|
683
|
+
anchor = Path(tmp_path.anchor)
|
|
684
|
+
|
|
685
|
+
assert ingest.activation_root(anchor) is None
|
|
686
|
+
assert ingest.activation_root(tmp_path) == tmp_path
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
def test_a_drive_or_filesystem_root_holding_git_never_registers(
|
|
690
|
+
monkeypatch: pytest.MonkeyPatch, tmp_path: Path
|
|
691
|
+
) -> None:
|
|
692
|
+
"""A stray `.git` at a drive root is still the whole drive. Every directory
|
|
693
|
+
is made to read as a checkout's root, so only the order of the root rule
|
|
694
|
+
-- asked before the git-root branch -- can refuse the anchor. The control
|
|
695
|
+
is a checkout's root that is not a drive root: it still registers."""
|
|
696
|
+
monkeypatch.setattr(ingest, "enclosing_git_root", lambda path: path)
|
|
697
|
+
anchor = Path(tmp_path.anchor)
|
|
698
|
+
|
|
699
|
+
assert ingest.activation_root(anchor) is None
|
|
700
|
+
assert ingest.activation_root(tmp_path) == tmp_path
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
def test_the_hooks_register_nothing_in_a_folder_of_no_repository_not_set_up(tmp_path: Path) -> None:
|
|
704
|
+
"""The same rule on the hook path: a session's `cwd` follows a `cd`, and
|
|
705
|
+
`Stop` renews its marker every turn."""
|
|
706
|
+
plain = tmp_path / "plain"
|
|
707
|
+
plain.mkdir()
|
|
708
|
+
|
|
709
|
+
agent_hooks.handle_session_start({"cwd": str(plain)})
|
|
710
|
+
agent_hooks.handle_stop({"cwd": str(plain)})
|
|
711
|
+
|
|
712
|
+
assert _active_roots() == []
|
|
713
|
+
|
|
714
|
+
|
|
644
715
|
# --- build and check name `.`: refused below a root, with the root named ------
|
|
645
716
|
|
|
646
717
|
|
|
@@ -159,12 +159,17 @@ def test_version_needs_no_graph_and_no_project(tmp_path, monkeypatch, capsys) ->
|
|
|
159
159
|
assert "graphite" in capsys.readouterr().out.lower()
|
|
160
160
|
|
|
161
161
|
|
|
162
|
-
def test_version_does_not_mark_the_repo_active(monkeypatch, capsys) -> None:
|
|
162
|
+
def test_version_does_not_mark_the_repo_active(monkeypatch, capsys, tmp_path) -> None:
|
|
163
163
|
"""Surveying eight consumer repos must not enrol eight repos into daemon
|
|
164
164
|
supervision. Activation is what tells the daemon to keep a graph fresh, so a
|
|
165
165
|
read-only identity question that activates would trigger eight rebuilds --
|
|
166
166
|
the survey would change the thing it measures.
|
|
167
|
+
|
|
168
|
+
It is asked from a checkout's root, which the backstop would register; the
|
|
169
|
+
process's own directory is not one everywhere (an unpacked sdist).
|
|
167
170
|
"""
|
|
171
|
+
(tmp_path / ".git").mkdir()
|
|
172
|
+
monkeypatch.chdir(tmp_path)
|
|
168
173
|
calls: list[object] = []
|
|
169
174
|
monkeypatch.setattr(activation, "mark_active", lambda *a, **k: calls.append(a))
|
|
170
175
|
|
|
@@ -174,6 +179,25 @@ def test_version_does_not_mark_the_repo_active(monkeypatch, capsys) -> None:
|
|
|
174
179
|
assert calls == [], "--version marked the repository active"
|
|
175
180
|
|
|
176
181
|
|
|
182
|
+
def test_graphite_with_no_command_prints_help_and_exits_1(monkeypatch, capsys, tmp_path) -> None:
|
|
183
|
+
"""Bare `graphite` is the help screen, and it fails: a script that ran the
|
|
184
|
+
command without a subcommand did not get what it asked for. Nothing held
|
|
185
|
+
the status -- a mutant returning 2 survived the suite.
|
|
186
|
+
|
|
187
|
+
Like `--version` it returns before the activation backstop, so it is asked
|
|
188
|
+
from a checkout's root, which the backstop would register."""
|
|
189
|
+
(tmp_path / ".git").mkdir()
|
|
190
|
+
monkeypatch.chdir(tmp_path)
|
|
191
|
+
calls: list[object] = []
|
|
192
|
+
monkeypatch.setattr(activation, "mark_active", lambda *a, **k: calls.append(a))
|
|
193
|
+
|
|
194
|
+
assert main([]) == 1
|
|
195
|
+
out = capsys.readouterr().out
|
|
196
|
+
|
|
197
|
+
assert out.startswith("usage: graphite"), out[:80]
|
|
198
|
+
assert calls == [], "bare graphite marked the repository active"
|
|
199
|
+
|
|
200
|
+
|
|
177
201
|
def test_version_degrades_honestly_when_the_engine_cannot_be_identified(
|
|
178
202
|
monkeypatch, capsys
|
|
179
203
|
) -> None:
|
|
@@ -122,16 +122,22 @@ def test_the_cli_renders_the_report(capsys) -> None:
|
|
|
122
122
|
assert "declaration -> fix" in out, "the retired series must be visible too"
|
|
123
123
|
|
|
124
124
|
|
|
125
|
-
def test_the_cli_does_not_mark_the_repository_active(monkeypatch, capsys) -> None:
|
|
125
|
+
def test_the_cli_does_not_mark_the_repository_active(monkeypatch, capsys, tmp_path) -> None:
|
|
126
126
|
"""Asking how much debt exists must not enrol the directory you asked from.
|
|
127
127
|
|
|
128
128
|
Same failure as a version survey that activates eight repos: the
|
|
129
129
|
measurement changes the thing it measures, and the daemon starts
|
|
130
130
|
supervising whatever the operator happened to `cd` into.
|
|
131
|
+
|
|
132
|
+
It is asked from a checkout's root, which the backstop would register:
|
|
133
|
+
only the exemption stands between it and a marker. The process's own
|
|
134
|
+
directory is not that everywhere -- an unpacked sdist has no `.git`.
|
|
131
135
|
"""
|
|
132
136
|
from graphite import activation
|
|
133
137
|
from graphite.cli import main
|
|
134
138
|
|
|
139
|
+
(tmp_path / ".git").mkdir()
|
|
140
|
+
monkeypatch.chdir(tmp_path)
|
|
135
141
|
calls: list[object] = []
|
|
136
142
|
monkeypatch.setattr(activation, "mark_active", lambda *a, **k: calls.append(a))
|
|
137
143
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|