graphite-code 1.7.0__tar.gz → 1.7.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {graphite_code-1.7.0 → graphite_code-1.7.1}/CHANGELOG.md +94 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/PKG-INFO +2 -2
- {graphite_code-1.7.0 → graphite_code-1.7.1}/README.md +1 -1
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/__init__.py +1 -1
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/dependency_install.py +37 -10
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/probe_process.py +64 -7
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_agent_hooks_session_tagging.py +26 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_dependency_install.py +62 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_doctor.py +289 -33
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_probe_process.py +47 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_published_schemas.py +21 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/.gitignore +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/ARCHITECTURE.md +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/CONTRIBUTING.md +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/LICENSE +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/RELEASING.md +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/pyproject.toml +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/__main__.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/_cleanup_worker.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/_win32_ctypes.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/activation.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/agent_hooks.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/agent_settings.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/analyze.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/answer_contract.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/bootstrap.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/buildlock.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/cache.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/channel.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/cli.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/cluster.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/config.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/context.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/daemon.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/daemon_health.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/daemon_launch.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/debt.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/detach.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/doctor.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/doctor_probes.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/engine_identity.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/export/__init__.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/export/html.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/export/json.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/export/md.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/extract/__init__.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/extract/ast.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/extract/pyscope.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/freshness.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/git.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/graph.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/graph_io.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/health.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/hook_entry.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/hookinstall.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/hookshim.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/incident_ledger.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/ingest.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/init.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/io.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/launchd_agent.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/listing.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/llm.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/llm_probe.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/mcp.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/mcp_server.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/natural_query.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/overlays.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/ownership.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/probe_workspace.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/process_contracts.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/programs.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/provider_observer.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/py.typed +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/query.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/query_plan.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/replacement_audit.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/resolve.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/review.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/__init__.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/approval.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/classifier.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/claude_executor.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/claude_probe.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/cli_identity.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/codex_executor.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/codex_probe.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/context_builder.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/contracts.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/diff_policy.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/edit_apply.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/effort.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/lifecycle.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/lifecycle_operator.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/lifecycle_service.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/lifecycle_storage.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/ollama_executor.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/ollama_probe.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/openrouter_executor.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/openrouter_probe.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/policy.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/probe_runner.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/process_runner.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/profiles.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/prompt.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/registry.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/route_pool.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/route_pool_execution.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/schema_validation.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/service.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/settings.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/shadow.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/storage.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/telemetry.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/worktree.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/zai_edit.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/zai_executor.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/routing/zai_probe.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/savings.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/systemd_unit.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/ts_bridge.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/ts_resolver.mjs +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/typescript_activation.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/usage_ledger.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/validation.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/watch.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/windows_job.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/windows_startup.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/src/graphite/windows_task.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/conftest.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/data/sqloracle/blindspots.py.txt +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/data/sqloracle/round69.py.txt +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/fake_clis/fake_cli.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/fixtures/provider_lifecycle_schema_v1.sql +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/fixtures/routing_schema_v2_ca77600.sql +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/fixtures/routing_schema_v3_94eb333.sql +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/fixtures/routing_schema_v4_lifecycle_migration.sql +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test__win32_ctypes.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_activation.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_activation_backstop.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_agent_hook_activation.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_agent_hooks.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_agent_hooks_session_books.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_agent_settings.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_answer_contract.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_arrow_and_constructor_binding.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_ast_make_id_length.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_ast_name_a_module_only_imports.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_ast_source_lines.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_ast_super_over_a_builtin_base.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_atomic_write.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_bootstrap.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_build_detach.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_buildlock.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cache_engine_identity.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cache_entry_pruning.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cache_file_identity.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cache_file_set.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cache_pruning.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_call_graph.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_case_ambiguous_answer.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_channel_attribution.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_channel_cli.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_channel_core.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_channel_kind.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_channel_lock.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_channel_log_integrity.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_channel_mcp.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_channel_register.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_channel_report.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_channel_status.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_class_field_arrow_binding.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cli_below_repository_root.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cli_build_missing_path.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cli_channel.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cli_channel_attribution.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cli_doctor_below_root.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cli_reference.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cli_usage.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cli_version.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cluster.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_compare_dist.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_configuration_reference.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_context.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_context_builder.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cwd_relative_config.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_cycle_search.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_daemon.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_daemon_activation.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_daemon_build_lock.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_daemon_child_lock.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_daemon_engine_staleness.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_daemon_health.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_daemon_health_activation.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_daemon_launch.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_daemon_service_cli.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_daemon_snapshot_failure.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_debt.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_destructured_binding.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_determinism.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_dispatch_evidence.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_doctor_agent_hooks.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_doctor_hooks.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_doctor_managed_docs.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_doctor_probes.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_documentation.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_edit_apply.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_engine_identity.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_exit_codes_reference.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_external_calls.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_file_node_id_collision.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_git_security.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_go_rust.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_graph_io.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_graph_provider_isolation.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_hardening.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_health.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_hook_entry.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_hook_template.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_hookinstall.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_hookshim.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_html_security.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_incident_ledger.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_init.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_init_activation_doctrine.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_init_hooks.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_init_validation_exit.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_launchd_agent.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_lifecycle_operator.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_listing.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_listing_surfaces.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_llm.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_llm_probe.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_mcp.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_mcp_server.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_mcp_server_channel_attribution.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_member_call_receiver.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_method_dispatch_scope.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_monorepo.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_mutation_tests.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_natural_query.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_no_path_is_graded.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_node_identity.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_ollama_executor.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_overlays.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_path_leak_fixture.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_probe_diagnostics.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_probe_workspace.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_process_contracts.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_programs.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_provider_claude_probe.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_provider_codex_probe.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_provider_lifecycle.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_provider_lifecycle_service.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_provider_lifecycle_storage.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_provider_observer.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_provider_ollama_probe.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_provider_openrouter_probe.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_provider_probe_runner.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_public_surface.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_pyscope.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_pyscopeoracle.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_python_builtin_named_symbols.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_python_import_bindings.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_python_inherits_edge.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_python_local_alias_call.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_python_reexport_follow.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_python_resolver.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_python_scope_identity.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_query_plan.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_reliability.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_replacement_audit.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_repository_root_ownership.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_resolve.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_resolve_python_reexports_of.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_review.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_route_pool.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_route_pool_execution.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_approval.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_benchmark.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_classifier.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_claude_executor.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_cli.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_cli_contracts.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_cli_recovery.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_codex_executor.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_context.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_contracts.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_diff_policy.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_executor.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_openrouter_executor.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_policy.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_process_runner.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_profiles.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_registry.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_schema_validation.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_security.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_service.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_shadow.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_storage.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_telemetry.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_worktree.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_zai_executor.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_routing_zai_probe.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_savings.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_search.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_self_super_dispatch.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_smoke.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_sqloracle.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_synthetic_repo.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_systemd_unit.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_ts_bridge.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_typescript_activation.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_typescript_resolver.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_usage_ledger.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_verify_artifact.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_verify_published_release.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_watch.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_windows_startup.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_windows_task.py +0 -0
- {graphite_code-1.7.0 → graphite_code-1.7.1}/tests/test_zai_edit.py +0 -0
|
@@ -15,6 +15,100 @@ machine-checkable identity; the version is for humans.
|
|
|
15
15
|
|
|
16
16
|
## [Unreleased]
|
|
17
17
|
|
|
18
|
+
## [1.7.1] — 2026-10-28
|
|
19
|
+
|
|
20
|
+
A patch release: three fixes, and no change to any stable surface. No command,
|
|
21
|
+
option, exit code, entry point or JSON field is added, removed or renamed, so
|
|
22
|
+
this is a patch by the rule in `docs/compatibility.md` -- "fixes are patches".
|
|
23
|
+
|
|
24
|
+
**A launch failure keeps its cause.** `probe_process.py` raised
|
|
25
|
+
`ProbeProcessError("launch_failed") from None`, so the exception under it was
|
|
26
|
+
discarded and the CI log said only `probe process failed: launch_failed` --
|
|
27
|
+
nothing said why the interpreter failed to start. The cause is now kept, as
|
|
28
|
+
the `__cause__` and not in the message, so the text a report or a log line may
|
|
29
|
+
carry still holds no path and no process data.
|
|
30
|
+
|
|
31
|
+
**A child that exits first no longer fails the launch.** The cause the first
|
|
32
|
+
fix made visible turned out to be a race, and it is now fixed rather than
|
|
33
|
+
merely explained. On macOS the exit observer is a kqueue registration, and the
|
|
34
|
+
kernel refuses it for a process that is no longer there. The registration is
|
|
35
|
+
made right after the fork, so a child that exits before it reaches the kernel
|
|
36
|
+
lost the race -- and the launch was then reported as a transport failure, for a
|
|
37
|
+
child that had run and succeeded.
|
|
38
|
+
|
|
39
|
+
The child is a zombie at that point, so its status is still readable, and it is
|
|
40
|
+
read where it was always read: at the reap, after the containment. That order
|
|
41
|
+
is what keeps the process group held -- the zombie keeps the group non-empty,
|
|
42
|
+
so the group's id cannot be recycled under the signals that follow -- and the
|
|
43
|
+
status stays unread until then rather than carrying a placeholder that would
|
|
44
|
+
be a false status.
|
|
45
|
+
|
|
46
|
+
A test beside it was repaired too. The sibling that claims "fails closed
|
|
47
|
+
before spawn" was failing in the environment validation and never reached its
|
|
48
|
+
own spawn check, and its "must not spawn" was an assertion that the launch's
|
|
49
|
+
own `except Exception` would have swallowed into the same verdict. It now
|
|
50
|
+
reaches the check and asserts it.
|
|
51
|
+
|
|
52
|
+
**A directory's moving times are not the trusted route's identity.** The POSIX
|
|
53
|
+
trusted-command route captured every directory on the path from the filesystem
|
|
54
|
+
root down to the executable, and refused a component whose stat moved between
|
|
55
|
+
the capture's two `lstat` calls -- comparing a directory's size, mtime and
|
|
56
|
+
ctime. None of those is a directory's identity: the size is its entry count,
|
|
57
|
+
and the times move whenever a child is created or removed.
|
|
58
|
+
|
|
59
|
+
pytest's xdist workers all create their `popen-gwN` directory inside the
|
|
60
|
+
SHARED `pytest-N` parent, so one worker's `mkdir` landed inside another
|
|
61
|
+
worker's route capture, and the route was refused -- a route that never went
|
|
62
|
+
near the executable. The refusal was silent where it matters: the manager
|
|
63
|
+
resolution returned `None` (`manager_unavailable`) and the revalidation failed
|
|
64
|
+
(`command_changed`). Two CI cells, two shapes, one defect, and both were a
|
|
65
|
+
security control failing CLOSED on a harmless event.
|
|
66
|
+
|
|
67
|
+
What the route's trust rests on is the hop's inode (is it still the same
|
|
68
|
+
object), its mode (who may write it) and its owner (who owns it), and all
|
|
69
|
+
three are still compared: a swap changes the inode, a `chmod` the mode, a
|
|
70
|
+
`chown` the owner. The code already said this about a directory's link count,
|
|
71
|
+
which is its number of subdirectories; the fix extends the same reasoning to
|
|
72
|
+
the size and the times. A file keeps every field -- its content is hashed and
|
|
73
|
+
compared separately, and its times are its identity.
|
|
74
|
+
|
|
75
|
+
Two further changes in this release are TEST-ONLY and change no product
|
|
76
|
+
behaviour: the published `check` schema is now checked against every shape it
|
|
77
|
+
answers -- which is what kills the recorded mutation survivor in `cli.py`,
|
|
78
|
+
measured by mutating that one line and watching the suite fail at the new
|
|
79
|
+
assertion; and a fourth wall-clock race in the doctor tests -- a teardown
|
|
80
|
+
waited for by a one-second poll rather than by the teardown's own signal -- is
|
|
81
|
+
fixed the way its three siblings already were.
|
|
82
|
+
|
|
83
|
+
The graph changes by what these fixes add. Measured on this repository: the
|
|
84
|
+
v1.7.0 tree built by the installed 1.7.0 engine, and this tree built by this
|
|
85
|
+
engine, each into fresh output, cache and state directories:
|
|
86
|
+
|
|
87
|
+
- 9,322 nodes become 9,352 and 25,655 edges become 25,714.
|
|
88
|
+
- every node id survives: 9,322 of 9,322 are in both, 30 are new and 0 is removed.
|
|
89
|
+
- 6,768 definition ids become 6,793: 6,479 keep their id and their definition, 289 keep their id but move, 0 is removed and 25 are new.
|
|
90
|
+
- `calls` goes from 16,457 to 16,490, `contains` goes from 6,766 to 6,791, `imports` goes from 2,480 to 2,484, `inherits` stays at 122.
|
|
91
|
+
- 25,825 relation triples become 25,887, with 3 only in the old graph and 65 only in the new.
|
|
92
|
+
- the cycle count goes from 18 to 18, and the communities from 178 to 180.
|
|
93
|
+
- every one of those moves is in the 6 files this release touches (`src/graphite/dependency_install.py` 43, `src/graphite/probe_process.py` 17, `tests/test_dependency_install.py` 16, `tests/test_doctor.py` 201, `tests/test_probe_process.py` 6, `tests/test_published_schemas.py` 6).
|
|
94
|
+
- the control holds: the same tree built by both engines gives the same 9,352 nodes, the same 25,714 edges and the same 25,887 relation triples, with no id moved and none removed, and identical cycles, communities and `resolution_health` -- so the difference above is attributable to this change and not to the engine behind it.
|
|
95
|
+
|
|
96
|
+
`metadata.engine.fingerprint` moves, as it does whenever the engine's own
|
|
97
|
+
files change -- and they do: the identity hashes every `.py` and `.mjs` file
|
|
98
|
+
in the package, so a change to the probe transport or to the trusted-command
|
|
99
|
+
route moves it whether or not the extraction changed.
|
|
100
|
+
|
|
101
|
+
The two builds above used different `tree-sitter` versions (0.25.2 for the
|
|
102
|
+
installed 1.7.0 and 0.26.0 for the dev environment), so the difference was
|
|
103
|
+
controlled for rather than assumed away. The grammar that actually parses
|
|
104
|
+
Python is the same in both -- `tree-sitter-python` 0.25.0 -- and the control
|
|
105
|
+
build settles the rest: the SAME tree built by both engines gives the same
|
|
106
|
+
ids, the same edges and the same triples, node for node, with no id moved and
|
|
107
|
+
none removed, and identical cycles, entry points, god nodes, orphans,
|
|
108
|
+
surprising connections, top files by links, clusters and `resolution_health`.
|
|
109
|
+
The figures above are therefore attributable to this change and not to the
|
|
110
|
+
parsers.
|
|
111
|
+
|
|
18
112
|
## [1.7.0] — 2026-10-28
|
|
19
113
|
|
|
20
114
|
A minor release: the daemon's log now says WHICH way enumerating a repository
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: graphite-code
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.1
|
|
4
4
|
Summary: Local-first, zero-LLM knowledge graph extraction for codebases.
|
|
5
5
|
Project-URL: Homepage, https://github.com/jared0565/graphite
|
|
6
6
|
Project-URL: Repository, https://github.com/jared0565/graphite
|
|
@@ -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.7.
|
|
52
|
+
**Status: 1.7.1, 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.7.
|
|
5
|
+
**Status: 1.7.1, 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`,
|
|
@@ -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.7.
|
|
41
|
+
__version__ = "1.7.1"
|
|
@@ -312,17 +312,44 @@ def _capture_posix_component(path: Path) -> TrustedPathComponent | None:
|
|
|
312
312
|
after = lexical.lstat()
|
|
313
313
|
except (OSError, RuntimeError, ValueError):
|
|
314
314
|
return None
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
315
|
+
# The fields that IDENTIFY a component: the device and the inode say
|
|
316
|
+
# whether this is still the same object, the mode and the owner say who
|
|
317
|
+
# may replace it. A swap changes the inode, a chmod changes the mode, a
|
|
318
|
+
# chown changes the owner -- all three are compared, and they are what
|
|
319
|
+
# the route's trust actually rests on.
|
|
320
|
+
#
|
|
321
|
+
# A DIRECTORY has no identity in its size, its times or its link count:
|
|
322
|
+
# the size is its entry count, the times move whenever a child is created
|
|
323
|
+
# or removed, and the link count is the number of subdirectories it has.
|
|
324
|
+
# pytest's xdist workers all create their `popen-gwN` directory inside the
|
|
325
|
+
# SHARED `pytest-N` parent, so one worker's mkdir lands inside another
|
|
326
|
+
# worker's route capture -- and a capture that refuses on any of those
|
|
327
|
+
# three refuses a route that never went near the executable.
|
|
328
|
+
#
|
|
329
|
+
# The refusal is silent where it matters: the manager resolution returns
|
|
330
|
+
# None ("manager_unavailable") or the revalidation fails
|
|
331
|
+
# ("command_changed"), and a security control that fails closed turns a
|
|
332
|
+
# harmless concurrent mkdir into a refusal to install.
|
|
333
|
+
#
|
|
334
|
+
# A FILE keeps every field: its content is hashed and compared
|
|
335
|
+
# separately, and its link count is a trust signal (a hard link is a
|
|
336
|
+
# second name for the same bytes).
|
|
337
|
+
is_directory = stat.S_ISDIR(before.st_mode)
|
|
338
|
+
fields = (
|
|
339
|
+
("st_dev", "st_ino", "st_mode", "st_uid")
|
|
340
|
+
if is_directory
|
|
341
|
+
else (
|
|
342
|
+
"st_dev",
|
|
343
|
+
"st_ino",
|
|
344
|
+
"st_mode",
|
|
345
|
+
"st_size",
|
|
346
|
+
"st_mtime_ns",
|
|
347
|
+
"st_ctime_ns",
|
|
348
|
+
"st_nlink",
|
|
349
|
+
"st_uid",
|
|
350
|
+
)
|
|
324
351
|
)
|
|
325
|
-
if any(getattr(before, field, None) != getattr(after, field, None) for field in
|
|
352
|
+
if any(getattr(before, field, None) != getattr(after, field, None) for field in fields):
|
|
326
353
|
return None
|
|
327
354
|
return TrustedPathComponent(
|
|
328
355
|
lexical,
|
|
@@ -246,7 +246,7 @@ class _Process(Protocol):
|
|
|
246
246
|
stdout: Any
|
|
247
247
|
stderr: Any
|
|
248
248
|
returncode: int | None
|
|
249
|
-
def wait(self, timeout: float) -> int: ...
|
|
249
|
+
def wait(self, timeout: float) -> int | None: ...
|
|
250
250
|
def kill(self) -> bool | None: ...
|
|
251
251
|
|
|
252
252
|
|
|
@@ -263,6 +263,9 @@ class _PosixProcess:
|
|
|
263
263
|
self._reaped = False
|
|
264
264
|
self._kqueue: Any | None = None
|
|
265
265
|
self._kqueue_exit_flags = 0
|
|
266
|
+
# True once the child is known to have exited while its status is
|
|
267
|
+
# still unread. See `_observe` and the registration below.
|
|
268
|
+
self._exit_pending = False
|
|
266
269
|
if not callable(getattr(os, "waitid", None)):
|
|
267
270
|
if sys.platform != "darwin" or not hasattr(select, "kqueue"):
|
|
268
271
|
raise RuntimeError("non-reaping process observation unavailable")
|
|
@@ -275,11 +278,42 @@ class _PosixProcess:
|
|
|
275
278
|
flags=select.KQ_EV_ADD | select.KQ_EV_ENABLE | select.KQ_EV_ONESHOT,
|
|
276
279
|
fflags=self._kqueue_exit_flags,
|
|
277
280
|
)
|
|
278
|
-
|
|
281
|
+
try:
|
|
282
|
+
self._kqueue.control([event], 0, 0)
|
|
283
|
+
except ProcessLookupError:
|
|
284
|
+
# The child exited before the registration reached the
|
|
285
|
+
# kernel, and macOS refuses an EVFILT_PROC registration for
|
|
286
|
+
# a process that is no longer there.
|
|
287
|
+
#
|
|
288
|
+
# MEASURED on macos-latest 3.11 (CI run 40696690448, job
|
|
289
|
+
# 122845242659): the registration answered
|
|
290
|
+
# `ProcessLookupError: [Errno 3] No such process` for a
|
|
291
|
+
# child that had already run and exited 0 -- the child's
|
|
292
|
+
# own wait succeeded afterwards, so it was an unreaped
|
|
293
|
+
# ZOMBIE, not a process that had never existed. The launch
|
|
294
|
+
# was then reported as `launch_failed`: a transport
|
|
295
|
+
# failure for a child that succeeded.
|
|
296
|
+
#
|
|
297
|
+
# The child is a zombie, so its status is still readable --
|
|
298
|
+
# by waitpid, which reaps it -- and the reap is where it is
|
|
299
|
+
# read, AFTER containment. That order is what keeps the
|
|
300
|
+
# process group held: the zombie keeps the group
|
|
301
|
+
# non-empty, so the group's id cannot be recycled under the
|
|
302
|
+
# signals that follow.
|
|
303
|
+
self._kqueue.close()
|
|
304
|
+
self._kqueue = None
|
|
305
|
+
self._exit_pending = True
|
|
279
306
|
|
|
280
307
|
def _observe(self) -> int | None:
|
|
281
308
|
if self.returncode is not None:
|
|
282
309
|
return self.returncode
|
|
310
|
+
if self._exit_pending:
|
|
311
|
+
# The child exited before the observer could be registered, so
|
|
312
|
+
# its status is unread -- and `os.waitid`, which would read it
|
|
313
|
+
# without reaping, does not exist on darwin. The reap reads it,
|
|
314
|
+
# after containment. Returning None here says "no status",
|
|
315
|
+
# which is true; `_exit_pending` is what says "exited".
|
|
316
|
+
return None
|
|
283
317
|
if self._kqueue is not None:
|
|
284
318
|
events = self._kqueue.control(None, 1, 0)
|
|
285
319
|
if not events:
|
|
@@ -300,12 +334,18 @@ class _PosixProcess:
|
|
|
300
334
|
def poll(self) -> int | None:
|
|
301
335
|
return self._observe()
|
|
302
336
|
|
|
303
|
-
def wait(self, timeout: float) -> int:
|
|
337
|
+
def wait(self, timeout: float) -> int | None:
|
|
304
338
|
deadline = time.monotonic() + timeout
|
|
305
339
|
while True:
|
|
306
340
|
result = self._observe()
|
|
307
341
|
if result is not None:
|
|
308
342
|
return result
|
|
343
|
+
if self._exit_pending:
|
|
344
|
+
# The child exited before the observer could be registered.
|
|
345
|
+
# The caller wants the EXIT, and it happened; the status is
|
|
346
|
+
# unread and the reap reads it, after containment. This is
|
|
347
|
+
# not a timeout, which is a different verdict.
|
|
348
|
+
return None
|
|
309
349
|
remaining = deadline - time.monotonic()
|
|
310
350
|
if remaining <= 0:
|
|
311
351
|
raise subprocess.TimeoutExpired([], timeout)
|
|
@@ -448,12 +488,23 @@ def run_bounded_process(
|
|
|
448
488
|
validated_environment = _validated_environment(environment)
|
|
449
489
|
except ProbeProcessError:
|
|
450
490
|
raise
|
|
451
|
-
except Exception:
|
|
452
|
-
|
|
491
|
+
except Exception as exc:
|
|
492
|
+
# The cause is KEPT, and it is kept as the cause rather than in the
|
|
493
|
+
# message. `launch_failed` says what happened; the exception under it
|
|
494
|
+
# says why, and the difference is the whole diagnosis: the macOS cell
|
|
495
|
+
# failed to start its probes twice with nothing but the code, so the
|
|
496
|
+
# next occurrence could not be told apart from a missing program.
|
|
497
|
+
#
|
|
498
|
+
# The message stays `probe process failed: launch_failed`, so the text
|
|
499
|
+
# a report, a log line or a caller may carry still holds no path and no
|
|
500
|
+
# process data -- the house rule this module follows. The cause rides
|
|
501
|
+
# in the traceback, which is a developer surface: `graphite`'s CLI
|
|
502
|
+
# prints one only under `GRAPHITE_DEBUG`.
|
|
503
|
+
raise ProbeProcessError("launch_failed") from exc
|
|
453
504
|
try:
|
|
454
505
|
process = _launch_process(argv, cwd=cwd, input_data=input_data, environment=validated_environment)
|
|
455
|
-
except Exception:
|
|
456
|
-
raise ProbeProcessError("launch_failed") from
|
|
506
|
+
except Exception as exc:
|
|
507
|
+
raise ProbeProcessError("launch_failed") from exc
|
|
457
508
|
|
|
458
509
|
outputs = {"stdout": bytearray(), "stderr": bytearray()}
|
|
459
510
|
overflow: threading.Event | None = None
|
|
@@ -870,6 +921,12 @@ def _darwin_group_holds_only_the_zombie_leader(process: _Process, error: OSError
|
|
|
870
921
|
"""
|
|
871
922
|
if sys.platform != "darwin" or not isinstance(error, PermissionError):
|
|
872
923
|
return False
|
|
924
|
+
if getattr(process, "_exit_pending", False):
|
|
925
|
+
# The child exited before the observer could be registered, so the
|
|
926
|
+
# leader is a zombie -- which is the case this function reads. The
|
|
927
|
+
# status is unread at this point, so `returncode` cannot say it;
|
|
928
|
+
# the flag does.
|
|
929
|
+
return True
|
|
873
930
|
if process.returncode is None:
|
|
874
931
|
# `returncode` is only set where the run HAPPENED to observe the exit.
|
|
875
932
|
# The success and timeout paths reach `process.wait` and so carry a
|
|
@@ -262,3 +262,29 @@ def test_a_cursor_state_without_an_offset_reads_the_ledger_from_its_start(
|
|
|
262
262
|
unit = _one_entry_tokens(repo)
|
|
263
263
|
assert summary is not None
|
|
264
264
|
assert _session_tokens(repo, "A") == unit
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
def test_a_cursor_state_without_a_token_count_starts_from_zero(
|
|
268
|
+
repo: Path, monkeypatch: pytest.MonkeyPatch
|
|
269
|
+
) -> None:
|
|
270
|
+
"""A state that lost its token count is a damaged cursor, and a damaged
|
|
271
|
+
cursor counts no tokens of its own.
|
|
272
|
+
|
|
273
|
+
The session's total is the stored total plus this turn's, and it is
|
|
274
|
+
carried forward for the rest of the session's life. A default of 1
|
|
275
|
+
would invent a token that was never saved: the count would read one too
|
|
276
|
+
high from then on, and every later report would carry it. The default is
|
|
277
|
+
0 -- no stored tokens, no stored tokens.
|
|
278
|
+
"""
|
|
279
|
+
_start(repo, "A")
|
|
280
|
+
_use(repo, monkeypatch, "A")
|
|
281
|
+
|
|
282
|
+
# Damage the cursor: the session's state keeps no token count.
|
|
283
|
+
cursor = read_cursor(repo)
|
|
284
|
+
cursor["sessions"]["A"].pop("tokens", None)
|
|
285
|
+
usage_ledger.write_cursor(repo, cursor)
|
|
286
|
+
|
|
287
|
+
_stop(repo, "A")
|
|
288
|
+
|
|
289
|
+
unit = _one_entry_tokens(repo)
|
|
290
|
+
assert _session_tokens(repo, "A") == unit
|
|
@@ -11,6 +11,8 @@ checks -- with plain bytes.
|
|
|
11
11
|
from __future__ import annotations
|
|
12
12
|
|
|
13
13
|
import json
|
|
14
|
+
import os
|
|
15
|
+
from pathlib import Path
|
|
14
16
|
|
|
15
17
|
import pytest
|
|
16
18
|
|
|
@@ -240,3 +242,63 @@ def test_minimal_node_environment_keeps_locale_only_and_pins_path() -> None:
|
|
|
240
242
|
assert "NPM_TOKEN" not in env
|
|
241
243
|
assert env["PATH"] != "/evil"
|
|
242
244
|
assert env["PATH"].endswith("System32") if "SYSTEMROOT" in env else env["PATH"] == "/usr/bin:/bin"
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
# --- the POSIX route's component identity ------------------------------------------------------
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def test_route_component_survives_a_directory_whose_times_move(
|
|
251
|
+
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
|
|
252
|
+
) -> None:
|
|
253
|
+
"""A DIRECTORY's times are not its identity, and the route knows that.
|
|
254
|
+
|
|
255
|
+
pytest's xdist workers all create their `popen-gwN` directory inside the
|
|
256
|
+
SHARED `pytest-N` parent, so a directory on the route changes while the
|
|
257
|
+
route is being captured. The capture stats the component twice and
|
|
258
|
+
refuses when the two disagree -- and for a directory its size and its
|
|
259
|
+
times move for that reason alone, with nothing about the executable
|
|
260
|
+
changing.
|
|
261
|
+
|
|
262
|
+
The refusal is silent where it matters: the manager resolution returns
|
|
263
|
+
None ("manager_unavailable") and the revalidation fails
|
|
264
|
+
("command_changed"), so a harmless concurrent mkdir becomes a refusal
|
|
265
|
+
to install. Those are the two shapes the macOS and the Ubuntu CI cells
|
|
266
|
+
reported, from the same defect.
|
|
267
|
+
|
|
268
|
+
What the route's trust rests on is the hop's IDENTITY (the inode), its
|
|
269
|
+
MODE (who may write it) and its OWNER (who owns it): a swap changes the
|
|
270
|
+
inode, a chmod changes the mode, a chown changes the owner, and all
|
|
271
|
+
three are still compared. A FILE keeps every field -- its content is
|
|
272
|
+
hashed and compared separately, and its times ARE its identity.
|
|
273
|
+
"""
|
|
274
|
+
from graphite import dependency_install as install
|
|
275
|
+
|
|
276
|
+
directory = tmp_path / "hop"
|
|
277
|
+
directory.mkdir()
|
|
278
|
+
executable = tmp_path / "npm"
|
|
279
|
+
executable.write_text("#!/usr/bin/env node\n", encoding="utf-8")
|
|
280
|
+
|
|
281
|
+
real_lstat = Path.lstat
|
|
282
|
+
seen: dict[str, int] = {}
|
|
283
|
+
|
|
284
|
+
def moving_lstat(self: Path) -> os.stat_result:
|
|
285
|
+
result = real_lstat(self)
|
|
286
|
+
key = str(self)
|
|
287
|
+
seen[key] = seen.get(key, 0) + 1
|
|
288
|
+
if seen[key] == 2:
|
|
289
|
+
# The capture's SECOND stat of this component reports a moved
|
|
290
|
+
# time -- what a sibling's mkdir does to a directory.
|
|
291
|
+
fields = list(result)
|
|
292
|
+
fields[8] = fields[8] + 1
|
|
293
|
+
return os.stat_result(tuple(fields))
|
|
294
|
+
return result
|
|
295
|
+
|
|
296
|
+
monkeypatch.setattr(Path, "lstat", moving_lstat)
|
|
297
|
+
|
|
298
|
+
assert install._capture_posix_component(directory) is not None, (
|
|
299
|
+
"a directory's moving times must not refuse the route"
|
|
300
|
+
)
|
|
301
|
+
seen.clear()
|
|
302
|
+
assert install._capture_posix_component(executable) is None, (
|
|
303
|
+
"a file's moving times ARE its identity, and the route must refuse it"
|
|
304
|
+
)
|