graphite-code 1.5.0__tar.gz → 1.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {graphite_code-1.5.0 → graphite_code-1.6.0}/CHANGELOG.md +132 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/CONTRIBUTING.md +8 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/PKG-INFO +3 -2
- {graphite_code-1.5.0 → graphite_code-1.6.0}/README.md +1 -1
- {graphite_code-1.5.0 → graphite_code-1.6.0}/pyproject.toml +12 -1
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/__init__.py +1 -1
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/cli.py +12 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/daemon.py +105 -6
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/daemon_health.py +83 -2
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/doctor.py +9 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/git.py +12 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/ingest.py +7 -2
- graphite_code-1.6.0/tests/test_daemon_snapshot_failure.py +507 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_hardening.py +31 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_listing_surfaces.py +2 -1
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_typescript_activation.py +89 -6
- {graphite_code-1.5.0 → graphite_code-1.6.0}/.gitignore +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/ARCHITECTURE.md +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/LICENSE +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/RELEASING.md +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/__main__.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/_cleanup_worker.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/_win32_ctypes.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/activation.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/agent_hooks.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/agent_settings.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/analyze.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/answer_contract.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/bootstrap.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/buildlock.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/cache.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/channel.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/cluster.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/config.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/context.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/daemon_launch.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/debt.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/dependency_install.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/detach.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/doctor_probes.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/engine_identity.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/export/__init__.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/export/html.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/export/json.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/export/md.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/extract/__init__.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/extract/ast.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/extract/pyscope.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/freshness.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/graph.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/graph_io.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/health.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/hook_entry.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/hookinstall.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/hookshim.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/incident_ledger.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/init.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/io.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/launchd_agent.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/listing.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/llm.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/llm_probe.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/mcp.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/mcp_server.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/natural_query.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/overlays.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/ownership.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/probe_process.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/probe_workspace.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/process_contracts.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/programs.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/provider_observer.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/py.typed +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/query.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/query_plan.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/replacement_audit.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/resolve.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/review.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/__init__.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/approval.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/classifier.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/claude_executor.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/claude_probe.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/cli_identity.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/codex_executor.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/codex_probe.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/context_builder.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/contracts.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/diff_policy.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/edit_apply.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/effort.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/lifecycle.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/lifecycle_operator.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/lifecycle_service.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/lifecycle_storage.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/ollama_executor.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/ollama_probe.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/openrouter_executor.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/openrouter_probe.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/policy.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/probe_runner.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/process_runner.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/profiles.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/prompt.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/registry.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/route_pool.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/route_pool_execution.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/schema_validation.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/service.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/settings.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/shadow.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/storage.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/telemetry.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/worktree.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/zai_edit.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/zai_executor.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/routing/zai_probe.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/savings.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/systemd_unit.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/ts_bridge.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/ts_resolver.mjs +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/typescript_activation.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/usage_ledger.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/validation.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/watch.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/windows_job.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/windows_startup.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/src/graphite/windows_task.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/conftest.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/data/sqloracle/blindspots.py.txt +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/data/sqloracle/round69.py.txt +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/fake_clis/fake_cli.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/fixtures/provider_lifecycle_schema_v1.sql +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/fixtures/routing_schema_v2_ca77600.sql +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/fixtures/routing_schema_v3_94eb333.sql +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/fixtures/routing_schema_v4_lifecycle_migration.sql +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test__win32_ctypes.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_activation.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_activation_backstop.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_agent_hook_activation.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_agent_hooks.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_agent_hooks_session_books.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_agent_hooks_session_tagging.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_agent_settings.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_answer_contract.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_arrow_and_constructor_binding.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_ast_make_id_length.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_ast_name_a_module_only_imports.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_ast_source_lines.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_ast_super_over_a_builtin_base.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_atomic_write.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_bootstrap.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_build_detach.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_buildlock.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cache_engine_identity.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cache_entry_pruning.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cache_file_identity.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cache_file_set.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cache_pruning.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_call_graph.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_case_ambiguous_answer.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_channel_attribution.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_channel_cli.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_channel_core.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_channel_kind.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_channel_lock.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_channel_log_integrity.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_channel_mcp.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_channel_register.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_channel_report.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_channel_status.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_class_field_arrow_binding.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cli_below_repository_root.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cli_build_missing_path.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cli_channel.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cli_channel_attribution.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cli_doctor_below_root.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cli_reference.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cli_usage.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cli_version.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cluster.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_compare_dist.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_configuration_reference.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_context.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_context_builder.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cwd_relative_config.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_cycle_search.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_daemon.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_daemon_activation.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_daemon_build_lock.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_daemon_child_lock.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_daemon_engine_staleness.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_daemon_health.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_daemon_health_activation.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_daemon_launch.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_daemon_service_cli.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_debt.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_dependency_install.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_destructured_binding.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_determinism.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_dispatch_evidence.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_doctor.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_doctor_agent_hooks.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_doctor_hooks.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_doctor_managed_docs.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_doctor_probes.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_documentation.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_edit_apply.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_engine_identity.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_exit_codes_reference.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_external_calls.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_file_node_id_collision.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_git_security.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_go_rust.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_graph_io.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_graph_provider_isolation.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_health.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_hook_entry.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_hook_template.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_hookinstall.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_hookshim.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_html_security.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_incident_ledger.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_init.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_init_activation_doctrine.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_init_hooks.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_init_validation_exit.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_launchd_agent.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_lifecycle_operator.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_listing.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_llm.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_llm_probe.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_mcp.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_mcp_server.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_mcp_server_channel_attribution.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_member_call_receiver.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_method_dispatch_scope.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_monorepo.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_mutation_tests.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_natural_query.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_no_path_is_graded.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_node_identity.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_ollama_executor.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_overlays.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_path_leak_fixture.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_probe_diagnostics.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_probe_process.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_probe_workspace.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_process_contracts.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_programs.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_provider_claude_probe.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_provider_codex_probe.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_provider_lifecycle.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_provider_lifecycle_service.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_provider_lifecycle_storage.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_provider_observer.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_provider_ollama_probe.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_provider_openrouter_probe.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_provider_probe_runner.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_public_surface.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_published_schemas.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_pyscope.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_pyscopeoracle.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_python_builtin_named_symbols.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_python_import_bindings.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_python_inherits_edge.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_python_local_alias_call.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_python_reexport_follow.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_python_resolver.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_python_scope_identity.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_query_plan.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_reliability.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_replacement_audit.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_repository_root_ownership.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_resolve.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_resolve_python_reexports_of.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_review.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_route_pool.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_route_pool_execution.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_approval.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_benchmark.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_classifier.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_claude_executor.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_cli.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_cli_contracts.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_cli_recovery.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_codex_executor.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_context.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_contracts.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_diff_policy.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_executor.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_openrouter_executor.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_policy.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_process_runner.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_profiles.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_registry.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_schema_validation.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_security.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_service.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_shadow.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_storage.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_telemetry.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_worktree.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_zai_executor.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_routing_zai_probe.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_savings.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_search.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_self_super_dispatch.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_smoke.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_sqloracle.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_synthetic_repo.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_systemd_unit.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_ts_bridge.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_typescript_resolver.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_usage_ledger.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_verify_artifact.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_verify_published_release.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_watch.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_windows_startup.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_windows_task.py +0 -0
- {graphite_code-1.5.0 → graphite_code-1.6.0}/tests/test_zai_edit.py +0 -0
|
@@ -15,6 +15,138 @@ machine-checkable identity; the version is for humans.
|
|
|
15
15
|
|
|
16
16
|
## [Unreleased]
|
|
17
17
|
|
|
18
|
+
## [1.6.0] — 2026-10-27
|
|
19
|
+
|
|
20
|
+
A minor release: the daemon's health report no longer reads "ok" while every
|
|
21
|
+
snapshot of an activated project fails (#113), and the daemon's log now
|
|
22
|
+
carries the cause of a failure instead of only its message. The
|
|
23
|
+
`daemon-health --json` output gains two fields on a failing project and a
|
|
24
|
+
new error code, and the `dev` extra gains one dependency, so this is a
|
|
25
|
+
minor by the rule in `docs/compatibility.md` -- "Fields are added in
|
|
26
|
+
minors" -- and by the precedent of 1.1.0, whose own note reads "The agent
|
|
27
|
+
channel's read surfaces gain fields, which is an addition to a stable
|
|
28
|
+
surface." No command, option, exit code or entry point is added, removed or
|
|
29
|
+
renamed, and the `daemon-status` output gains a listing where it had none.
|
|
30
|
+
|
|
31
|
+
The graph changes by what this fix adds. Measured on this repository: the
|
|
32
|
+
1.5.0 release tree built by the installed 1.5.0 engine, and this tree built
|
|
33
|
+
by this engine, each into fresh output, cache and state directories:
|
|
34
|
+
|
|
35
|
+
- 9,244 nodes become 9,298 and 25,415 edges become 25,599. The 54 new nodes
|
|
36
|
+
are the functions and classes this change adds, the file of the new test
|
|
37
|
+
file, and the fixtures and helpers that go with them;
|
|
38
|
+
- every node id survives: 9,244 of 9,244 are in both, 54 are new and none
|
|
39
|
+
is removed;
|
|
40
|
+
- 6,712 definition ids become 6,752: 6,495 survive naming the same
|
|
41
|
+
definition at the same line, and 217 survive by id but move line -- every
|
|
42
|
+
one of them in the eight files this change touches (`cli.py` 43,
|
|
43
|
+
`doctor.py` 37, `daemon.py` 31, `daemon_health.py` 18,
|
|
44
|
+
`tests/test_typescript_activation.py` 17, `git.py` 12,
|
|
45
|
+
`ingest.py` 2, `tests/test_hardening.py` 57). No definition id is
|
|
46
|
+
removed and 40 are new;
|
|
47
|
+
- `contains` goes from 6,710 relation triples to 6,750 and `imports` from
|
|
48
|
+
2,465 to 2,480; `calls` goes from 16,290 to 16,418; `inherits` (120)
|
|
49
|
+
becomes 121. 25,585 relation triples become 25,769, with none removed;
|
|
50
|
+
- 18 cycles where there were 18, the same ones, and 177 communities where
|
|
51
|
+
there were 175. Orphans and surprising connections are identical; the
|
|
52
|
+
entry points, the god nodes and the top files by links differ, because
|
|
53
|
+
the new code adds and moves them.
|
|
54
|
+
|
|
55
|
+
`metadata.engine.fingerprint` moves, as it does whenever the engine's own
|
|
56
|
+
files change -- and they do: the identity hashes every `.py` and `.mjs`
|
|
57
|
+
file in the package, so a change to the daemon, the health report, the
|
|
58
|
+
ingest or the Git wrapper moves it whether or not the extraction changed.
|
|
59
|
+
|
|
60
|
+
The two builds above used different `tree-sitter` versions (0.25.2 for the
|
|
61
|
+
installed 1.5.0 and 0.26.0 for the dev environment; `tree-sitter-python`
|
|
62
|
+
is 0.25.0 in both), so the difference was controlled for rather than
|
|
63
|
+
assumed away: the SAME tree built by both engines gives the same ids, the
|
|
64
|
+
same edges and the same triples, node for node -- 9,298 nodes, 25,599
|
|
65
|
+
edges and all 25,769 relation triples identical, with no id moved and none
|
|
66
|
+
removed, and the same resolution health. The figures above are therefore
|
|
67
|
+
attributable to this change and not to the parsers.
|
|
68
|
+
|
|
69
|
+
### Fixed
|
|
70
|
+
|
|
71
|
+
- Daemon: the health report no longer reads `ok` while every snapshot of an
|
|
72
|
+
activated project fails (#113). A project the daemon could not snapshot
|
|
73
|
+
was logged as `project_snapshot_failed` and then dropped: it never entered
|
|
74
|
+
the supervised set, so it was absent from `status.json`, nothing counted
|
|
75
|
+
it as failing, and `daemon-health` read `ok, 0 projects, 0 failing` while
|
|
76
|
+
no graph was being maintained at all. On 2026-10-27 the daemon failed every
|
|
77
|
+
snapshot of an activated repository -- ten failures across nine discovery
|
|
78
|
+
cycles, 01:50:22Z to 02:03:59Z -- and the report said `ok` throughout. The
|
|
79
|
+
daemon now keeps each failure -- its root and its reason -- under
|
|
80
|
+
`snapshot_failures` in `status.json`, counts the project as failing, and
|
|
81
|
+
names it with the reason in `daemon-health` and `daemon-status`. A
|
|
82
|
+
`status.json` written before this key existed is read unchanged, and a
|
|
83
|
+
failure whose reason is missing is still counted and named: the reason is
|
|
84
|
+
absent, not the failure. A project whose snapshot failed is still never
|
|
85
|
+
built -- with no snapshot there is no change set, and building on an empty
|
|
86
|
+
one would publish an empty graph over a working one -- and one broken
|
|
87
|
+
repository no longer blinds the daemon to the healthy ones beside it.
|
|
88
|
+
Measured on this machine against a repository whose `.git` is not a valid
|
|
89
|
+
repository, the failure the daemon hit on 2026-10-27: the health report
|
|
90
|
+
goes from `ok`, `0 total, 0 failing` to `degraded`, `2 total, 1 failing`,
|
|
91
|
+
naming the project and the reason, while the healthy repository beside it
|
|
92
|
+
is still built.
|
|
93
|
+
- Daemon: a snapshot failure now logs the cause, not just the sentence
|
|
94
|
+
(#113's follow-up). The daemon logged `str(exc)`, which for a failed
|
|
95
|
+
enumeration is the constant `unable to enumerate Git repository safely` and
|
|
96
|
+
nothing else: which step failed and which errno it was lived in the
|
|
97
|
+
exception's `__cause__` chain, and the chain was discarded. On 2026-10-27
|
|
98
|
+
the daemon failed every snapshot of an activated repository for thirteen
|
|
99
|
+
minutes, and the log could not say why. The `project_snapshot_failed` and
|
|
100
|
+
`project_scan_failed` events now carry a `cause`: the exception and its
|
|
101
|
+
chain, rendered path-free -- a `GitError` by its own `diagnostic()` (class,
|
|
102
|
+
step, errno) and every other exception by its class name alone, so no path
|
|
103
|
+
and no Git text can reach the log. The chain is bounded and a cycle cannot
|
|
104
|
+
make it loop. A Git command that runs and exits non-zero now leaves a
|
|
105
|
+
cause too: Git's own text is discarded on purpose, and the run's stderr
|
|
106
|
+
was never captured, but the exit status is an integer and is the only
|
|
107
|
+
thing left that says which failure this was -- previously that error
|
|
108
|
+
carried no cause at all.
|
|
109
|
+
- Tests: a stubbed module no longer outlives the test that made it. The
|
|
110
|
+
boundary test in `tests/test_typescript_activation.py` installs fake `mcp`
|
|
111
|
+
modules -- `mcp.types.Tool = object` -- to check that importing the MCP
|
|
112
|
+
server never reaches activation orchestration, and then imports
|
|
113
|
+
`graphite.mcp` against them. `monkeypatch.delitem(sys.modules, name,
|
|
114
|
+
raising=False)` records NOTHING when the key is absent, so the
|
|
115
|
+
`graphite.mcp` / `graphite.mcp_server` imported against the stubs stayed
|
|
116
|
+
reachable after the test: in `sys.modules`, and as the ATTRIBUTE the import
|
|
117
|
+
system sets on the parent package, which `from graphite import mcp_server`
|
|
118
|
+
returns without importing anything. A later test in the same worker that
|
|
119
|
+
read the module got the stub, and died with `AttributeError: type object
|
|
120
|
+
'object' has no attribute 'model_validate'`. The serial suite never saw
|
|
121
|
+
it, because every file that reads `graphite.mcp_server` sorts before the
|
|
122
|
+
one that stubs it; the parallel suite does, because `--dist loadfile`
|
|
123
|
+
reorders the work queue by test count per file (`--loadscope-reorder`
|
|
124
|
+
defaults to on) and the stubbing file is the largest in the suite. The
|
|
125
|
+
import is now undone in a `finally`, from both places it was reachable, and
|
|
126
|
+
a regression test pins that.
|
|
127
|
+
|
|
128
|
+
### Changed
|
|
129
|
+
|
|
130
|
+
- The test suite runs in parallel. The suite is WAIT-bound, not CPU-bound
|
|
131
|
+
-- the channel tests alone spend about 760s mostly sleeping on locks and
|
|
132
|
+
broker round trips -- so serial execution paid for nothing.
|
|
133
|
+
`pytest-xdist` is a declared dev dependency, which adds one
|
|
134
|
+
`Requires-Dist` line to the wheel's metadata for the `dev` extra alone,
|
|
135
|
+
and the pre-push gate runs the suite across six processes, distributed by
|
|
136
|
+
file so that a file's tests share one process and the suite keeps the
|
|
137
|
+
per-file semantics it has today. Measured on this machine, same
|
|
138
|
+
interpreter, the same tree six tests apart: **1,190s serial becomes
|
|
139
|
+
323s**, 3.7x faster, and green either way -- six tests cannot account
|
|
140
|
+
for the difference. No assertion changes; only how many of them run at
|
|
141
|
+
once. The gate's budgets are re-derived from that measurement rather than
|
|
142
|
+
left stale: `timeout_s` 1800 -> 1200 and `pre_push` 2100 -> 1800.
|
|
143
|
+
The gate also runs it with `--no-loadscope-reorder`, because `--dist
|
|
144
|
+
loadfile` alone does NOT keep the suite's order: pytest-xdist reorders the
|
|
145
|
+
work queue by test count per file unless that is turned off, so the
|
|
146
|
+
parallel run stops matching the serial one. Measured on this machine, same
|
|
147
|
+
tree, same interpreter: 412.5s with the reorder on, 329.9s with it off --
|
|
148
|
+
not slower, because the suite is WAIT-bound rather than CPU-bound.
|
|
149
|
+
|
|
18
150
|
## [1.5.0] — 2026-10-26
|
|
19
151
|
|
|
20
152
|
A minor release: one fix to the agent hooks' savings line (#110), and with
|
|
@@ -100,6 +100,14 @@ python -m graphite --help
|
|
|
100
100
|
|
|
101
101
|
Focused tests shorten the feedback loop; they do not replace the full Ruff, mypy, pytest, and CLI smoke checks. Add behavior-level tests for new or changed contracts and ensure failures are meaningful rather than dependent on local machine state.
|
|
102
102
|
|
|
103
|
+
The suite is WAIT-bound, not CPU-bound — the channel tests alone spend most of their time sleeping on locks and broker round trips — so `pytest-xdist` is a declared dev dependency and the suite can be run across processes:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
python -m pytest -q -rs -n 6 --dist loadfile --no-loadscope-reorder
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
`--dist loadfile` keeps a file's tests in one worker, which preserves the per-file semantics the suite has today; plain `-n` balances better but splits a file's tests across workers. `--no-loadscope-reorder` is needed because `--dist loadfile` alone does NOT keep the suite's order: pytest-xdist reorders the work queue by test count per file (descending) unless that is turned off, so the biggest file runs first and the parallel run stops matching the serial one. A test that depends on which file ran first is then order-dependent in a way the serial suite never was — which is how a stub-imported module in `tests/test_typescript_activation.py` reached a later test in the same worker and failed it. The pre-push gate runs the suite this way, and `aramid.toml` records the measurement.
|
|
110
|
+
|
|
103
111
|
What CI enforces on every push and pull request (`.github/workflows/ci.yml`): a `lint` job (ruff, mypy, the generated CLI reference in sync); a `test` matrix of Windows, Linux and macOS × Python 3.11–3.14 in which **every cell gates**; a `security` job that runs the same aramid pre-commit and pre-push gates as the local hooks (gitleaks, semgrep, ruff security rules, the repo-root shadow check, mypy, the suite) and asserts from the gate's JSON report that each scanner actually ran; the `coverage` floor; a `benchmark` job against the synthetic corpus; and an `artifact` job that builds the distribution twice and requires byte-identical results. The local git hooks are installed by `aramid` from the committed `aramid.toml`; do not push with `--no-verify`.
|
|
104
112
|
|
|
105
113
|
Doctor changes require focused tests for stable doctor JSON, deterministic ordering, redaction, end-to-end deadlines, process cleanup, missing tools, and optional semantics. Cover both successful and adversarial outcomes. Cross-platform behavior must have Windows and POSIX coverage; use narrowly scoped platform skips only when an operating-system primitive truly has no counterpart, and test the portable contract on every platform.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: graphite-code
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.0
|
|
4
4
|
Summary: Local-first, zero-LLM knowledge graph extraction for codebases.
|
|
5
5
|
Project-URL: Homepage, https://github.com/jared0565/graphite
|
|
6
6
|
Project-URL: Repository, https://github.com/jared0565/graphite
|
|
@@ -37,6 +37,7 @@ Provides-Extra: dev
|
|
|
37
37
|
Requires-Dist: mypy>=1.14; extra == 'dev'
|
|
38
38
|
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
39
39
|
Requires-Dist: pytest-timeout>=2.3; extra == 'dev'
|
|
40
|
+
Requires-Dist: pytest-xdist>=3.5; extra == 'dev'
|
|
40
41
|
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
41
42
|
Requires-Dist: ruff>=0.5; extra == 'dev'
|
|
42
43
|
Provides-Extra: local-llm
|
|
@@ -48,7 +49,7 @@ Description-Content-Type: text/markdown
|
|
|
48
49
|
|
|
49
50
|
Local-first, deterministic knowledge graph extraction for codebases — zero-LLM, daemon-maintained, agent-agnostic.
|
|
50
51
|
|
|
51
|
-
**Status: 1.
|
|
52
|
+
**Status: 1.6.0, production/stable.** Published on PyPI as
|
|
52
53
|
[`graphite-code`](https://pypi.org/project/graphite-code/) with PEP 740
|
|
53
54
|
attestations; supported on Windows, Linux and macOS with Python 3.11–3.14
|
|
54
55
|
(every cell gates CI). What 1.x promises — CLI, JSON outputs, `graph.json`,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Local-first, deterministic knowledge graph extraction for codebases — zero-LLM, daemon-maintained, agent-agnostic.
|
|
4
4
|
|
|
5
|
-
**Status: 1.
|
|
5
|
+
**Status: 1.6.0, production/stable.** Published on PyPI as
|
|
6
6
|
[`graphite-code`](https://pypi.org/project/graphite-code/) with PEP 740
|
|
7
7
|
attestations; supported on Windows, Linux and macOS with Python 3.11–3.14
|
|
8
8
|
(every cell gates CI). What 1.x promises — CLI, JSON outputs, `graph.json`,
|
|
@@ -116,7 +116,18 @@ mcp = ["mcp>=1.0,<3"]
|
|
|
116
116
|
# here because that job installs `[dev]`, and a `--timeout` flag without the
|
|
117
117
|
# plugin is an unknown-argument error -- which would turn a hang into a
|
|
118
118
|
# different silent failure rather than naming it. See #45.
|
|
119
|
-
|
|
119
|
+
# `pytest-xdist` runs the suite across processes. It is here because the
|
|
120
|
+
# suite is WAIT-bound, not CPU-bound: the channel tests alone spend about
|
|
121
|
+
# 760s mostly sleeping on locks and broker round trips, so serial execution
|
|
122
|
+
# pays for nothing. 6 workers is this machine's physical core count.
|
|
123
|
+
dev = [
|
|
124
|
+
"pytest>=8.0",
|
|
125
|
+
"ruff>=0.5",
|
|
126
|
+
"pytest-timeout>=2.3",
|
|
127
|
+
"pytest-cov>=5.0",
|
|
128
|
+
"pytest-xdist>=3.5",
|
|
129
|
+
"mypy>=1.14",
|
|
130
|
+
]
|
|
120
131
|
|
|
121
132
|
# Without these the package advertises no way back to its own source. A
|
|
122
133
|
# distribution page with no repository link is the shape a typosquat has, and it
|
|
@@ -38,4 +38,4 @@ __all__ = ["__version__"]
|
|
|
38
38
|
#: Coarse and hand-maintained by construction. It is a release label, not
|
|
39
39
|
#: evidence that a given fix is present -- to answer that, survey for the marker
|
|
40
40
|
#: the fix introduced, or compare `graphite --version` fingerprints.
|
|
41
|
-
__version__ = "1.
|
|
41
|
+
__version__ = "1.6.0"
|
|
@@ -2021,6 +2021,18 @@ def cmd_daemon_status(args: argparse.Namespace) -> int:
|
|
|
2021
2021
|
more_hint=" — use --json for the full list",
|
|
2022
2022
|
):
|
|
2023
2023
|
print(line)
|
|
2024
|
+
# A project the daemon could not snapshot is not in `projects` -- it
|
|
2025
|
+
# never entered the supervised set -- but it is a project the daemon
|
|
2026
|
+
# is failing to maintain, so it is named here too (#113).
|
|
2027
|
+
failures = status.get("snapshot_failures", [])
|
|
2028
|
+
for line in listing_lines(
|
|
2029
|
+
failures if isinstance(failures, list) else [],
|
|
2030
|
+
lambda f: f"{f.get('root')} | snapshot failed: {f.get('error')}",
|
|
2031
|
+
cap=_DAEMON_STATUS_PROJECT_CAP,
|
|
2032
|
+
empty=None,
|
|
2033
|
+
more_hint=" — use --json for the full list",
|
|
2034
|
+
):
|
|
2035
|
+
print(line)
|
|
2024
2036
|
return 0
|
|
2025
2037
|
|
|
2026
2038
|
|
|
@@ -16,6 +16,7 @@ from . import activation, buildlock
|
|
|
16
16
|
from .config import Config
|
|
17
17
|
from .engine_identity import EngineIdentityError, engine_identity
|
|
18
18
|
from .freshness import graph_engine_changed
|
|
19
|
+
from .git import GitError
|
|
19
20
|
from .incident_ledger import record_incident, repo_ledger_dir
|
|
20
21
|
from .io import atomic_write_json
|
|
21
22
|
from .provider_observer import ProviderObservationSummary
|
|
@@ -164,6 +165,66 @@ class BuildResult:
|
|
|
164
165
|
return self.returncode == buildlock.REFUSED_EXIT_STATUS
|
|
165
166
|
|
|
166
167
|
|
|
168
|
+
_MAX_CAUSE_DEPTH = 5
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
def _exception_identity(exc: BaseException) -> str:
|
|
172
|
+
"""One exception's path-free identity.
|
|
173
|
+
|
|
174
|
+
A `GitError` carries its own: `diagnostic()` names the class, the step
|
|
175
|
+
that failed and the errno, and is built from fixed tokens and an integer
|
|
176
|
+
so no path and no Git text can ride along. Every other exception
|
|
177
|
+
contributes its class name and nothing else -- the message may name a
|
|
178
|
+
path, and the class is what separates the causes.
|
|
179
|
+
"""
|
|
180
|
+
if isinstance(exc, GitError):
|
|
181
|
+
return exc.diagnostic()
|
|
182
|
+
return type(exc).__name__
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
def describe_exception_chain(exc: BaseException) -> str:
|
|
186
|
+
"""An exception and whatever caused it, in one path-free line.
|
|
187
|
+
|
|
188
|
+
`str(exc)` says WHAT failed and not WHY, and for the daemon's snapshot
|
|
189
|
+
path that difference is the whole diagnosis: seven distinct sites raise
|
|
190
|
+
`GitLaunchError` inside `_run_bounded` alone, and only its step token
|
|
191
|
+
and errno separate them. On 2026-10-27 the daemon failed every snapshot
|
|
192
|
+
of an activated repository for thirteen minutes and the log could not
|
|
193
|
+
say why -- the cause was in the exception's chain, and the chain was
|
|
194
|
+
discarded.
|
|
195
|
+
"""
|
|
196
|
+
parts: list[str] = []
|
|
197
|
+
seen: set[int] = set()
|
|
198
|
+
current: BaseException | None = exc
|
|
199
|
+
while current is not None and len(parts) < _MAX_CAUSE_DEPTH and id(current) not in seen:
|
|
200
|
+
seen.add(id(current))
|
|
201
|
+
parts.append(_exception_identity(current))
|
|
202
|
+
current = current.__cause__
|
|
203
|
+
return " <- ".join(parts)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
@dataclass(frozen=True)
|
|
207
|
+
class SnapshotFailure:
|
|
208
|
+
"""An activated project the daemon could not snapshot (#113).
|
|
209
|
+
|
|
210
|
+
Kept out of the supervised set on purpose. A project with no snapshot has
|
|
211
|
+
no change set to diff and nothing to build, so putting it there would
|
|
212
|
+
make the build path act on an empty one. It is reported instead: a
|
|
213
|
+
failure that is only in the log is a failure nobody sees.
|
|
214
|
+
"""
|
|
215
|
+
|
|
216
|
+
root: Path
|
|
217
|
+
error: str
|
|
218
|
+
failed_at: str = field(default_factory=utc_now)
|
|
219
|
+
|
|
220
|
+
def to_status(self) -> dict[str, object]:
|
|
221
|
+
return {
|
|
222
|
+
"root": str(self.root),
|
|
223
|
+
"error": self.error,
|
|
224
|
+
"failed_at": self.failed_at,
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
|
|
167
228
|
@dataclass
|
|
168
229
|
class ProjectRuntime:
|
|
169
230
|
root: Path
|
|
@@ -527,23 +588,30 @@ def _write_status(
|
|
|
527
588
|
options: DaemonOptions,
|
|
528
589
|
cycle: int,
|
|
529
590
|
provider_lifecycle: dict[str, object] | None = None,
|
|
591
|
+
snapshot_failures: dict[Path, SnapshotFailure] | None = None,
|
|
530
592
|
) -> dict[str, object]:
|
|
593
|
+
failures = list((snapshot_failures or {}).values())
|
|
531
594
|
projects = [state.to_status() for _, state in sorted(states.items(), key=lambda item: str(item[0]).lower())]
|
|
532
595
|
healthy = sum(1 for state in states.values() if state.last_error is None and not state.needs_initial_build)
|
|
533
|
-
|
|
596
|
+
# A project whose snapshot failed is a project the daemon is failing to
|
|
597
|
+
# maintain, so it counts as failing -- it was activated, and no graph is
|
|
598
|
+
# being kept for it (#113).
|
|
599
|
+
failing = sum(1 for state in states.values() if state.last_error is not None) + len(failures)
|
|
534
600
|
pending = sum(1 for state in states.values() if state.needs_initial_build)
|
|
535
601
|
payload: dict[str, object] = {
|
|
536
602
|
"status": "ok" if failing == 0 else "degraded",
|
|
537
603
|
"updated_at": utc_now(),
|
|
538
604
|
"base_path": str(base),
|
|
539
605
|
"cycle": cycle,
|
|
540
|
-
"project_count": len(projects),
|
|
606
|
+
"project_count": len(projects) + len(failures),
|
|
541
607
|
"healthy_projects": healthy,
|
|
542
608
|
"failing_projects": failing,
|
|
543
609
|
"pending_projects": pending,
|
|
544
610
|
# Repositories currently open in a coding agent -- the whole supervised
|
|
545
|
-
# set. An unopened repo is absent by construction, not by pruning.
|
|
546
|
-
|
|
611
|
+
# set. An unopened repo is absent by construction, not by pruning. A
|
|
612
|
+
# repo the daemon cannot snapshot is open but unsupervised, so it
|
|
613
|
+
# belongs here too (#113).
|
|
614
|
+
"active_projects": sorted(str(root) for root in set(states) | set(snapshot_failures or {})),
|
|
547
615
|
"limits": {
|
|
548
616
|
"scan_interval_seconds": options.scan_interval_seconds,
|
|
549
617
|
"discover_interval_seconds": options.discover_interval_seconds,
|
|
@@ -555,6 +623,10 @@ def _write_status(
|
|
|
555
623
|
"build_timeout_seconds": options.build_timeout_seconds,
|
|
556
624
|
},
|
|
557
625
|
"projects": projects,
|
|
626
|
+
"snapshot_failures": [
|
|
627
|
+
failure.to_status()
|
|
628
|
+
for failure in sorted(failures, key=lambda item: str(item.root).lower())
|
|
629
|
+
],
|
|
558
630
|
}
|
|
559
631
|
if provider_lifecycle is not None:
|
|
560
632
|
payload["provider_lifecycle"] = provider_lifecycle
|
|
@@ -627,6 +699,11 @@ def run_daemon(
|
|
|
627
699
|
provider_worker.start()
|
|
628
700
|
|
|
629
701
|
states: dict[Path, ProjectRuntime] = {}
|
|
702
|
+
# Projects that are activated but whose snapshot failed. They are NOT in
|
|
703
|
+
# `states` -- there is no snapshot to diff or build -- but they are
|
|
704
|
+
# reported, because a failure that only reaches the log is a failure
|
|
705
|
+
# nobody acts on (#113).
|
|
706
|
+
snapshot_failures: dict[Path, SnapshotFailure] = {}
|
|
630
707
|
last_discovery = 0.0
|
|
631
708
|
last_status: dict[str, object] = {}
|
|
632
709
|
cycle = 0
|
|
@@ -649,8 +726,21 @@ def run_daemon(
|
|
|
649
726
|
project_cfg = daemon_config_for_project(cfg, project, options)
|
|
650
727
|
snap = snapshot(project, project_cfg)
|
|
651
728
|
except Exception as exc:
|
|
652
|
-
|
|
729
|
+
# The error is kept, not just logged: the report has to
|
|
730
|
+
# be able to say WHY the graph is not being maintained
|
|
731
|
+
# (#113).
|
|
732
|
+
snapshot_failures[project] = SnapshotFailure(
|
|
733
|
+
root=project,
|
|
734
|
+
error=str(exc).strip() or type(exc).__name__,
|
|
735
|
+
)
|
|
736
|
+
logger.event(
|
|
737
|
+
"project_snapshot_failed",
|
|
738
|
+
project=str(project),
|
|
739
|
+
error=str(exc),
|
|
740
|
+
cause=describe_exception_chain(exc),
|
|
741
|
+
)
|
|
653
742
|
continue
|
|
743
|
+
snapshot_failures.pop(project, None)
|
|
654
744
|
states[project] = ProjectRuntime(
|
|
655
745
|
root=project,
|
|
656
746
|
snapshot=snap,
|
|
@@ -663,6 +753,9 @@ def run_daemon(
|
|
|
663
753
|
if project not in discovered:
|
|
664
754
|
logger.event("project_deactivated", project=str(project))
|
|
665
755
|
del states[project]
|
|
756
|
+
for project in list(snapshot_failures):
|
|
757
|
+
if project not in discovered:
|
|
758
|
+
del snapshot_failures[project]
|
|
666
759
|
|
|
667
760
|
# An engine upgrade invalidates every supervised graph at once, but
|
|
668
761
|
# the file-diff path cannot see it: a repo whose files are untouched
|
|
@@ -718,7 +811,12 @@ def run_daemon(
|
|
|
718
811
|
except Exception as exc:
|
|
719
812
|
state.last_error = str(exc)
|
|
720
813
|
state.failure_count += 1
|
|
721
|
-
logger.event(
|
|
814
|
+
logger.event(
|
|
815
|
+
"project_scan_failed",
|
|
816
|
+
project=str(project),
|
|
817
|
+
error=str(exc),
|
|
818
|
+
cause=describe_exception_chain(exc),
|
|
819
|
+
)
|
|
722
820
|
# Failures before a build is attempted (git enumeration,
|
|
723
821
|
# snapshotting, watcher errors) never reached the incident
|
|
724
822
|
# writer, so they were durable only in status.json, which ages
|
|
@@ -774,6 +872,7 @@ def run_daemon(
|
|
|
774
872
|
options,
|
|
775
873
|
cycle,
|
|
776
874
|
None if provider_worker is None else provider_worker.snapshot(),
|
|
875
|
+
snapshot_failures,
|
|
777
876
|
)
|
|
778
877
|
if options.once:
|
|
779
878
|
if provider_worker is not None:
|
|
@@ -205,6 +205,17 @@ def evaluate_daemon_health(
|
|
|
205
205
|
opts.max_project_success_age_seconds,
|
|
206
206
|
)
|
|
207
207
|
for project in project_health["failing"]:
|
|
208
|
+
if project.get("failure_source") == "snapshot":
|
|
209
|
+
# The reason travels with the report: "how many" is not an answer
|
|
210
|
+
# an operator can act on (#113).
|
|
211
|
+
_append_bounded(errors, {
|
|
212
|
+
"code": "project_snapshot_failed",
|
|
213
|
+
"message": (
|
|
214
|
+
f"project snapshot failed: {project['root']}: {project.get('last_error') or ''}"
|
|
215
|
+
).rstrip(": "),
|
|
216
|
+
"project": project,
|
|
217
|
+
})
|
|
218
|
+
continue
|
|
208
219
|
_append_bounded(errors, {
|
|
209
220
|
"code": "project_failing",
|
|
210
221
|
"message": f"project build failing: {project['root']}",
|
|
@@ -436,12 +447,32 @@ def _project_health(
|
|
|
436
447
|
pending: list[dict[str, Any]] = []
|
|
437
448
|
old: list[dict[str, Any]] = []
|
|
438
449
|
counts = {"failing": 0, "pending": 0, "not_built_recently": 0}
|
|
450
|
+
# Snapshot failures come first: they are the ones the report exists to
|
|
451
|
+
# name, and the category list is capped. The entry carries the same
|
|
452
|
+
# fields a build failure carries -- a consumer reading `build_count` off
|
|
453
|
+
# a failing project must not find the key missing -- with the values
|
|
454
|
+
# that are true of a project that was never built.
|
|
455
|
+
for failure in status.get("snapshot_failures", []):
|
|
456
|
+
counts["failing"] += 1
|
|
457
|
+
if len(failing) < _MAX_CATEGORY_DETAILS:
|
|
458
|
+
failing.append({
|
|
459
|
+
"root": failure.get("root"),
|
|
460
|
+
"file_count": None,
|
|
461
|
+
"build_count": 0,
|
|
462
|
+
"failure_count": 0,
|
|
463
|
+
"last_error": failure.get("error"),
|
|
464
|
+
"last_success_at": None,
|
|
465
|
+
"last_success_age_seconds": None,
|
|
466
|
+
"needs_initial_build": True,
|
|
467
|
+
"failure_source": "snapshot",
|
|
468
|
+
"failed_at": failure.get("failed_at"),
|
|
469
|
+
})
|
|
439
470
|
for item in status.get("projects", []):
|
|
440
471
|
project = _project_summary(item, now)
|
|
441
472
|
if item.get("last_error") is not None:
|
|
442
473
|
counts["failing"] += 1
|
|
443
474
|
if len(failing) < _MAX_CATEGORY_DETAILS:
|
|
444
|
-
failing.append(project)
|
|
475
|
+
failing.append({**project, "failure_source": "build"})
|
|
445
476
|
if item.get("needs_initial_build") or int(item.get("build_count") or 0) == 0:
|
|
446
477
|
counts["pending"] += 1
|
|
447
478
|
if len(pending) < _MAX_CATEGORY_DETAILS:
|
|
@@ -531,6 +562,30 @@ def _invalid_project_field(item: Mapping[str, Any]) -> str | None:
|
|
|
531
562
|
return None
|
|
532
563
|
|
|
533
564
|
|
|
565
|
+
def _invalid_snapshot_failure_field(item: Mapping[str, Any]) -> str | None:
|
|
566
|
+
"""The fields a snapshot-failure record must carry, and their bounds.
|
|
567
|
+
|
|
568
|
+
`error` may be empty: the daemon always writes a reason, but a record
|
|
569
|
+
whose reason is missing is still a FAILURE, and dropping it would make it
|
|
570
|
+
invisible again -- the defect this report exists to close (#113). A record
|
|
571
|
+
with no reason is counted and named; only the reason is absent.
|
|
572
|
+
"""
|
|
573
|
+
root = item.get("root")
|
|
574
|
+
if (
|
|
575
|
+
not isinstance(root, str)
|
|
576
|
+
or not _bounded_clean_string(root, _MAX_ROOT_LENGTH, nullable=False)
|
|
577
|
+
or not root.strip()
|
|
578
|
+
):
|
|
579
|
+
return "root"
|
|
580
|
+
error = item.get("error")
|
|
581
|
+
if not isinstance(error, str) or not _bounded_clean_string(error, _MAX_LAST_ERROR_LENGTH, nullable=False):
|
|
582
|
+
return "error"
|
|
583
|
+
failed_at = item.get("failed_at")
|
|
584
|
+
if not isinstance(failed_at, str) or not _bounded_clean_string(failed_at, _MAX_TIMESTAMP_LENGTH, nullable=False):
|
|
585
|
+
return "failed_at"
|
|
586
|
+
return None
|
|
587
|
+
|
|
588
|
+
|
|
534
589
|
def _normalize_status(
|
|
535
590
|
raw_status: object,
|
|
536
591
|
) -> tuple[dict[str, Any], list[dict[str, Any]], dict[str, int]]:
|
|
@@ -605,11 +660,37 @@ def _normalize_status(
|
|
|
605
660
|
"truncated_count": truncated_count,
|
|
606
661
|
})
|
|
607
662
|
|
|
663
|
+
# A project the daemon could not snapshot (#113). Normalized explicitly,
|
|
664
|
+
# like every other key here: a key health is allowed to classify on and
|
|
665
|
+
# does not name explicitly is silently dropped, which is how the failure
|
|
666
|
+
# went unreported in the first place.
|
|
667
|
+
raw_failures = raw_status.get("snapshot_failures")
|
|
668
|
+
valid_failures: list[dict[str, Any]] = []
|
|
669
|
+
if raw_failures is not None and not isinstance(raw_failures, list):
|
|
670
|
+
issues.append(_schema_issue("snapshot_failures"))
|
|
671
|
+
elif isinstance(raw_failures, list):
|
|
672
|
+
for index, item in enumerate(raw_failures[:_MAX_INPUT_PROJECTS]):
|
|
673
|
+
if not isinstance(item, Mapping):
|
|
674
|
+
if len(issues) < _MAX_SCHEMA_ISSUES:
|
|
675
|
+
issues.append(_schema_issue("snapshot_failure", index))
|
|
676
|
+
continue
|
|
677
|
+
invalid_field = _invalid_snapshot_failure_field(item)
|
|
678
|
+
if invalid_field is not None:
|
|
679
|
+
if len(issues) < _MAX_SCHEMA_ISSUES:
|
|
680
|
+
issues.append(_schema_issue(invalid_field, index))
|
|
681
|
+
continue
|
|
682
|
+
valid_failures.append({
|
|
683
|
+
"root": item["root"],
|
|
684
|
+
"error": item["error"],
|
|
685
|
+
"failed_at": item["failed_at"],
|
|
686
|
+
})
|
|
687
|
+
status["snapshot_failures"] = valid_failures
|
|
688
|
+
|
|
608
689
|
raw_project_count = raw_status.get("project_count")
|
|
609
690
|
if not _nonnegative_int(raw_project_count):
|
|
610
691
|
if len(issues) < _MAX_SCHEMA_ISSUES:
|
|
611
692
|
issues.append(_schema_issue("project_count"))
|
|
612
|
-
status["project_count"] = len(valid_projects)
|
|
693
|
+
status["project_count"] = len(valid_projects) + len(valid_failures)
|
|
613
694
|
|
|
614
695
|
raw_daemon_status = raw_status.get("status")
|
|
615
696
|
if raw_daemon_status is not None and (
|
|
@@ -37,6 +37,7 @@ _FILE_LIMIT = 10_000
|
|
|
37
37
|
_PROCESS_CLEANUP_SECONDS = 0.2
|
|
38
38
|
_DAEMON_ISSUES_EXCLUDED_FROM_GLOBAL = {
|
|
39
39
|
"project_failing",
|
|
40
|
+
"project_snapshot_failed",
|
|
40
41
|
"project_pending_initial_build",
|
|
41
42
|
"project_not_built_recently",
|
|
42
43
|
"project_nested_repo_unsupervised",
|
|
@@ -431,9 +432,17 @@ def check_daemon(root: Path, daemon_base: Path) -> DoctorCheck:
|
|
|
431
432
|
raw_projects = raw_status.get("projects", []) if isinstance(raw_status, MappingABC) else []
|
|
432
433
|
if not isinstance(raw_projects, list):
|
|
433
434
|
raw_projects = []
|
|
435
|
+
# A project the daemon could not snapshot is registered -- it is
|
|
436
|
+
# activated -- even though it never entered the supervised set (#113).
|
|
437
|
+
raw_failures = raw_status.get("snapshot_failures", []) if isinstance(raw_status, MappingABC) else []
|
|
438
|
+
if not isinstance(raw_failures, list):
|
|
439
|
+
raw_failures = []
|
|
434
440
|
registered = any(
|
|
435
441
|
isinstance(item, MappingABC) and _normalized_root(item.get("root")) == selected
|
|
436
442
|
for item in raw_projects
|
|
443
|
+
) or any(
|
|
444
|
+
isinstance(item, MappingABC) and _normalized_root(item.get("root")) == selected
|
|
445
|
+
for item in raw_failures
|
|
437
446
|
)
|
|
438
447
|
failing = bool(selected and _category_contains(report, "failing", selected))
|
|
439
448
|
pending = bool(selected and _category_contains(report, "pending", selected))
|
|
@@ -121,6 +121,18 @@ class GitOutputLimitError(GitError):
|
|
|
121
121
|
"""Raised when Git stdout exceeds the configured bound."""
|
|
122
122
|
|
|
123
123
|
|
|
124
|
+
class GitCommandFailedError(_StepGitError):
|
|
125
|
+
"""Raised when a Git command ran and exited non-zero.
|
|
126
|
+
|
|
127
|
+
Git's own text is discarded on purpose -- it routinely embeds the
|
|
128
|
+
checkout path -- and the run's stderr is never captured at all. The exit
|
|
129
|
+
status is neither: it is an integer, and it is the only thing left that
|
|
130
|
+
says WHICH failure this was. Without it the enumeration error carried no
|
|
131
|
+
cause at all, so a daemon that failed every snapshot of a repository
|
|
132
|
+
could not say why (#113).
|
|
133
|
+
"""
|
|
134
|
+
|
|
135
|
+
|
|
124
136
|
class GitUnsupportedVersionError(_StepGitError):
|
|
125
137
|
"""Raised when Git's protected command configuration is unavailable.
|
|
126
138
|
|
|
@@ -10,7 +10,7 @@ from typing import Callable, Iterable
|
|
|
10
10
|
from . import ownership
|
|
11
11
|
from .cache import file_hash
|
|
12
12
|
from .config import Config
|
|
13
|
-
from .git import GitError, GitRunner
|
|
13
|
+
from .git import GitCommandFailedError, GitError, GitRunner
|
|
14
14
|
from .hook_entry import MARKER as _SETUP_MARKER
|
|
15
15
|
|
|
16
16
|
|
|
@@ -258,7 +258,12 @@ def _git_ls_files(
|
|
|
258
258
|
except GitError as exc:
|
|
259
259
|
raise IngestError("unable to enumerate Git repository safely") from exc
|
|
260
260
|
if result.returncode != 0:
|
|
261
|
-
|
|
261
|
+
# The message stays the path-free constant it has always been; the
|
|
262
|
+
# cause carries the exit status, which is an integer and is the only
|
|
263
|
+
# thing left that says which failure this was (#113).
|
|
264
|
+
raise IngestError("unable to enumerate Git repository safely") from GitCommandFailedError(
|
|
265
|
+
"git command failed", reason=f"exit_{result.returncode}"
|
|
266
|
+
)
|
|
262
267
|
try:
|
|
263
268
|
output = result.stdout.decode("utf-8")
|
|
264
269
|
except UnicodeDecodeError as exc:
|