graphite-code 1.8.1__tar.gz → 1.9.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.8.1 → graphite_code-1.9.0}/CHANGELOG.md +85 -7
- {graphite_code-1.8.1 → graphite_code-1.9.0}/PKG-INFO +2 -2
- {graphite_code-1.8.1 → graphite_code-1.9.0}/README.md +1 -1
- {graphite_code-1.8.1 → graphite_code-1.9.0}/RELEASING.md +9 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/scripts/gen_cli_reference.py +7 -6
- {graphite_code-1.8.1 → graphite_code-1.9.0}/scripts/verify_artifact.py +114 -2
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/__init__.py +1 -1
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/cli.py +34 -2
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/engine_identity.py +110 -17
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/freshness.py +28 -2
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_agent_hooks.py +1 -1
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_bootstrap.py +9 -8
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cache_engine_identity.py +6 -2
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cli_channel.py +1 -1
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cli_reference.py +2 -1
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_daemon_health.py +45 -45
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_daemon_health_activation.py +3 -3
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_daemon_snapshot_failure.py +5 -5
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_documentation.py +1 -1
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_engine_identity.py +52 -10
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_hardening.py +139 -12
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_init.py +6 -2
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_mutation_tests.py +2 -2
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_reliability.py +5 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_verify_artifact.py +110 -5
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_verify_published_release.py +1 -1
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_windows_startup.py +1 -1
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_windows_task.py +2 -2
- {graphite_code-1.8.1 → graphite_code-1.9.0}/.gitignore +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/.mcp.json +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/ARCHITECTURE.md +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/CONTRIBUTING.md +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/LICENSE +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/SECURITY.md +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/benchmarks/__init__.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/benchmarks/build_benchmark.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/benchmarks/realty_router/README.md +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/benchmarks/realty_router/__init__.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/benchmarks/realty_router/evaluate.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/benchmarks/realty_router/tasks.json +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/benchmarks/synthetic_repo.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/pyproject.toml +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/scripts/__init__.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/scripts/compare_dist.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/scripts/mutation_tests.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/scripts/pyscopeoracle.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/scripts/sqloracle.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/scripts/verify_published_release.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/__main__.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/_cleanup_worker.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/_win32_ctypes.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/activation.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/agent_hooks.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/agent_settings.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/analyze.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/answer_contract.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/bootstrap.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/buildlock.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/cache.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/channel.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/cluster.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/config.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/context.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/daemon.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/daemon_health.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/daemon_launch.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/debt.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/dependency_install.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/detach.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/doctor.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/doctor_probes.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/export/__init__.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/export/html.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/export/json.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/export/md.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/extract/__init__.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/extract/ast.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/extract/pyscope.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/git.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/graph.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/graph_io.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/health.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/hook_entry.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/hookinstall.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/hookshim.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/incident_ledger.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/ingest.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/init.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/io.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/launchd_agent.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/listing.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/llm.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/llm_probe.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/mcp.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/mcp_server.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/natural_query.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/overlays.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/ownership.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/probe_process.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/probe_workspace.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/process_contracts.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/programs.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/provider_observer.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/py.typed +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/query.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/query_plan.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/replacement_audit.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/resolve.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/review.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/__init__.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/approval.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/classifier.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/claude_executor.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/claude_probe.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/cli_identity.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/codex_executor.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/codex_probe.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/context_builder.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/contracts.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/diff_policy.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/edit_apply.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/effort.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/lifecycle.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/lifecycle_operator.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/lifecycle_service.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/lifecycle_storage.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/ollama_executor.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/ollama_probe.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/openrouter_executor.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/openrouter_probe.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/policy.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/probe_runner.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/process_runner.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/profiles.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/prompt.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/registry.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/route_pool.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/route_pool_execution.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/schema_validation.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/service.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/settings.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/shadow.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/storage.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/telemetry.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/worktree.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/zai_edit.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/zai_executor.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/routing/zai_probe.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/savings.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/systemd_unit.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/ts_bridge.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/ts_resolver.mjs +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/typescript_activation.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/usage_ledger.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/validation.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/watch.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/windows_job.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/windows_startup.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/src/graphite/windows_task.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/conftest.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/data/sqloracle/blindspots.py.txt +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/data/sqloracle/round69.py.txt +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/fake_clis/fake_cli.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/fixtures/provider_lifecycle_schema_v1.sql +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/fixtures/routing_schema_v2_ca77600.sql +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/fixtures/routing_schema_v3_94eb333.sql +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/fixtures/routing_schema_v4_lifecycle_migration.sql +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test__win32_ctypes.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_activation.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_activation_backstop.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_agent_hook_activation.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_agent_hooks_session_books.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_agent_hooks_session_tagging.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_agent_settings.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_answer_contract.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_arrow_and_constructor_binding.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_ast_make_id_length.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_ast_name_a_module_only_imports.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_ast_source_lines.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_ast_super_over_a_builtin_base.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_atomic_write.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_build_detach.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_buildlock.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cache_entry_pruning.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cache_file_identity.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cache_file_set.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cache_pruning.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_call_graph.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_case_ambiguous_answer.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_channel_attribution.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_channel_cli.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_channel_core.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_channel_kind.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_channel_lock.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_channel_log_integrity.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_channel_mcp.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_channel_register.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_channel_report.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_channel_status.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_class_field_arrow_binding.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cli_below_repository_root.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cli_build_missing_path.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cli_channel_attribution.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cli_doctor_below_root.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cli_usage.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cli_version.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cluster.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_compare_dist.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_configuration_reference.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_context.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_context_builder.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cwd_relative_config.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_cycle_search.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_daemon.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_daemon_activation.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_daemon_build_lock.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_daemon_child_lock.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_daemon_engine_staleness.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_daemon_launch.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_daemon_service_cli.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_debt.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_dependency_install.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_destructured_binding.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_determinism.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_dispatch_evidence.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_doctor.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_doctor_agent_hooks.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_doctor_hooks.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_doctor_managed_docs.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_doctor_probes.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_edit_apply.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_exit_codes_reference.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_external_calls.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_file_node_id_collision.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_git_security.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_go_rust.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_graph_io.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_graph_provider_isolation.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_health.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_hook_entry.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_hook_template.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_hookinstall.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_hookshim.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_html_security.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_incident_ledger.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_init_activation_doctrine.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_init_hooks.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_init_validation_exit.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_launchd_agent.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_lifecycle_operator.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_listing.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_listing_surfaces.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_llm.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_llm_probe.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_mcp.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_mcp_server.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_mcp_server_channel_attribution.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_member_call_receiver.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_method_dispatch_scope.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_monorepo.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_natural_query.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_no_path_is_graded.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_node_identity.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_ollama_executor.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_overlays.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_path_leak_fixture.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_probe_diagnostics.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_probe_process.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_probe_workspace.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_process_contracts.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_programs.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_provider_claude_probe.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_provider_codex_probe.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_provider_lifecycle.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_provider_lifecycle_service.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_provider_lifecycle_storage.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_provider_observer.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_provider_ollama_probe.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_provider_openrouter_probe.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_provider_probe_runner.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_public_surface.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_published_schemas.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_pyscope.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_pyscopeoracle.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_python_builtin_named_symbols.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_python_import_bindings.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_python_inherits_edge.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_python_local_alias_call.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_python_reexport_follow.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_python_resolver.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_python_scope_identity.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_query_plan.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_replacement_audit.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_repository_root_ownership.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_resolve.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_resolve_python_reexports_of.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_review.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_route_pool.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_route_pool_execution.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_approval.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_benchmark.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_classifier.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_claude_executor.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_cli.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_cli_contracts.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_cli_recovery.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_codex_executor.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_context.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_contracts.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_diff_policy.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_executor.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_openrouter_executor.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_policy.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_process_runner.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_profiles.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_registry.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_schema_validation.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_security.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_service.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_shadow.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_storage.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_telemetry.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_worktree.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_zai_executor.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_routing_zai_probe.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_savings.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_search.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_self_super_dispatch.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_smoke.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_sqloracle.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_synthetic_repo.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_systemd_unit.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_ts_bridge.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_typescript_activation.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_typescript_resolver.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_usage_ledger.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_watch.py +0 -0
- {graphite_code-1.8.1 → graphite_code-1.9.0}/tests/test_zai_edit.py +0 -0
|
@@ -15,6 +15,87 @@ machine-checkable identity; the version is for humans.
|
|
|
15
15
|
|
|
16
16
|
## [Unreleased]
|
|
17
17
|
|
|
18
|
+
## [1.9.0] — 2026-10-31
|
|
19
|
+
|
|
20
|
+
A minor release: one addition to a stable JSON output, and no change to any
|
|
21
|
+
command, option, exit code or entry point. By the rule in
|
|
22
|
+
`docs/compatibility.md` — "additions are minors" — a field added to a versioned
|
|
23
|
+
JSON output is a minor, not a patch.
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
**`check` now names the engine file that moved, not just the fact that the
|
|
28
|
+
engine moved.** `engine_changed` reported that graphite's own engine had
|
|
29
|
+
changed since the graph was built and listed no files — and that was
|
|
30
|
+
structural, not an oversight: the engine's fingerprint covers the *package*
|
|
31
|
+
directory while the file-level diff covers the *repository* being checked, so
|
|
32
|
+
the file that moved was in neither list, and the repository's `added`,
|
|
33
|
+
`changed` and `removed` were empty by construction. The 1.7.0 pre-push gate
|
|
34
|
+
hit exactly this and could say nothing about what had moved.
|
|
35
|
+
|
|
36
|
+
The build now records the engine's file inventory in the manifest, and
|
|
37
|
+
`check --json` reports the difference as `engine_files`
|
|
38
|
+
(`added`/`changed`/`removed`, relative to the engine's package root, so no
|
|
39
|
+
absolute path is disclosed). The short form names the files too. When the
|
|
40
|
+
manifest records no inventory — one written before this, or an engine that
|
|
41
|
+
cannot be read — the answer is `null`, not an empty list: "no file changed"
|
|
42
|
+
and "we do not know" are different claims.
|
|
43
|
+
|
|
44
|
+
The engine's *fingerprint* is unchanged, byte for byte: this adds a record
|
|
45
|
+
beside the identity, and no existing graph is invalidated by it. The inventory
|
|
46
|
+
comes out of the pass the fingerprint already made, so the build does not read
|
|
47
|
+
the package twice — measured at 127 ms per build before and after.
|
|
48
|
+
|
|
49
|
+
## [1.8.2] — 2026-10-30
|
|
50
|
+
|
|
51
|
+
A patch release: one fix, and no change to any stable surface. What a source
|
|
52
|
+
distribution contains is not a stable surface, and the release gate is not one
|
|
53
|
+
either, so by the rule in `docs/compatibility.md` — "fixes are patches" — this
|
|
54
|
+
is a patch. **Fixes: graphite#135.**
|
|
55
|
+
|
|
56
|
+
**The publish gate now scans the SDIST's content, not just the wheel's.**
|
|
57
|
+
`scripts/verify_artifact.py` checked the wheel's bytes and the sdist's member
|
|
58
|
+
*NAMES*; the sdist's content was never read. That is where the leak was: the
|
|
59
|
+
sdist is the archive that carries the tests and the scripts, and the 1.8.0
|
|
60
|
+
sdist already shipped ten members naming the build machine, all of which the
|
|
61
|
+
gate passed.
|
|
62
|
+
|
|
63
|
+
**⇒⇒⇒ ⇒⇒⇒⇒ THE NEEDLE LIST HAD TO CHANGE DIRECTION, NOT SIZE.** The check
|
|
64
|
+
derived its needles from `ROOT` and `Path.home()` — the machine doing the
|
|
65
|
+
checking. The gate runs on a CI runner, where those needles are the runner's
|
|
66
|
+
own POSIX paths, so in CI they could never match a path baked into the source
|
|
67
|
+
on a developer's Windows box. **A rule that only sees its own machine's
|
|
68
|
+
spelling of a path is a local check, not a release gate.** The rule now
|
|
69
|
+
matches the SHAPE of such a path instead, and therefore fires on a CI runner
|
|
70
|
+
as well as locally.
|
|
71
|
+
|
|
72
|
+
**⇒⇒⇒ ⇒⇒⇒⇒ ⇒⇒⇒⇒ WHAT THE SHAPE CANNOT DISTINGUISH, AND WHAT DOES.** The
|
|
73
|
+
repository's own examples have the same shape as the leak: a bare projects
|
|
74
|
+
root in the README is indistinguishable from the maintainer's. The rule
|
|
75
|
+
therefore carries an explicit vocabulary of the roots the repository writes as
|
|
76
|
+
EXAMPLES — the README's example projects root and the placeholder user
|
|
77
|
+
profiles the fixtures use — and flags a path of the same shape under any
|
|
78
|
+
other root. The vocabulary is closed and short; a new example path has to be
|
|
79
|
+
registered, which is the gate doing its job.
|
|
80
|
+
|
|
81
|
+
**⇒⇒⇒ ⇒⇒⇒⇒ ⇒⇒⇒⇒ ⇒⇒⇒⇒ ⇒⇒⇒⇒ THE SHIPPED TREES ARE ALSO CLEAN NOW.** The
|
|
82
|
+
source distribution named the maintainer's own projects root in **63 places
|
|
83
|
+
across 13 members**: fixture data (which moved to the example root the README
|
|
84
|
+
already uses), sentences that quoted the literal (which now say what it was
|
|
85
|
+
without spelling it), the release notes for 1.8.1 (which described the leak
|
|
86
|
+
while spelling it), and one entry in the history of this file. The tree check
|
|
87
|
+
that enforces it — `tests/test_hardening.py` — now covers everything the
|
|
88
|
+
sdist ships rather than `src/` alone, and it imports the same rule the
|
|
89
|
+
release gate uses, so the two cannot drift apart.
|
|
90
|
+
|
|
91
|
+
**Known, and still open: `DEFAULT_TASK_NAME` in `src/graphite/windows_task.py`
|
|
92
|
+
is `GraphiteDaemon-FProjects`** — the maintainer's projects root with the
|
|
93
|
+
separator stripped, in the shipped wheel. A path-shaped rule cannot see it,
|
|
94
|
+
because it is a NAME. Changing the default renames the scheduled task and the
|
|
95
|
+
startup launcher that existing installations already have, so it is a
|
|
96
|
+
user-visible change rather than a hygiene fix, and it is not made here.
|
|
97
|
+
Filed as **#137**, and deliberately left for its own decision.
|
|
98
|
+
|
|
18
99
|
## [1.8.1] — 2026-10-29
|
|
19
100
|
|
|
20
101
|
A patch release: two fixes, and no change to any stable surface. The identity
|
|
@@ -72,12 +153,9 @@ broken; it was not.
|
|
|
72
153
|
**Known, and not fixed here.** The publish gate
|
|
73
154
|
(`scripts/verify_artifact.py`) scans the **wheel's** content for absolute
|
|
74
155
|
paths that name the build machine, and never the **sdist's**. The 1.8.0 sdist
|
|
75
|
-
already shipped ten members whose content
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
suite needs it. Closing the gap is not a one-line change: the needles overlap
|
|
79
|
-
the product's documented default, so a content check over the sdist would fail
|
|
80
|
-
on shipped test files that legitimately mention it. Filed as **#135**.
|
|
156
|
+
already shipped ten members whose content named the maintainer's own projects
|
|
157
|
+
root, and the gate passed those artifacts. 1.8.1's sdist ships one more such
|
|
158
|
+
member (`scripts/`), because the suite needs it. Filed as **#135**.
|
|
81
159
|
|
|
82
160
|
## [1.8.0] — 2026-10-29
|
|
83
161
|
|
|
@@ -1711,7 +1789,7 @@ Four kinds of search are now refused that used to pass:
|
|
|
1711
1789
|
- `cd docs && grep -rn <symbol> ..`, where `..` is the repository root. The
|
|
1712
1790
|
path was resolved against the root itself and read as leading outside.
|
|
1713
1791
|
- On Windows, a Git Bash drive path into the repository, such as
|
|
1714
|
-
`grep -rn <symbol>
|
|
1792
|
+
`grep -rn <symbol> <drive-path>/repo/src`. Read by Python it was a path on
|
|
1715
1793
|
the current drive. The Bash tool's `/c/...` paths are now read as the drive.
|
|
1716
1794
|
- A search rooted at a directory the repository lies under, such as
|
|
1717
1795
|
`grep -rn <symbol> ..`. It was read as a search outside the repository,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: graphite-code
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9.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
|
|
@@ -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.
|
|
52
|
+
**Status: 1.9.0, 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.
|
|
5
|
+
**Status: 1.9.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`,
|
|
@@ -180,6 +180,15 @@ wheel's `METADATA` fields `Name`, `Version`, and every `Requires-Dist`, plus
|
|
|
180
180
|
source and build files. Both archives must exclude credentials, caches, VCS files,
|
|
181
181
|
local configuration, scratch output, and absolute developer paths.
|
|
182
182
|
|
|
183
|
+
The `artifact` gate enforces the last of those for **both** archives:
|
|
184
|
+
`scripts/verify_artifact.py` scans each one's content for a path that names one
|
|
185
|
+
developer's machine. It matches the SHAPE of such a path rather than a list of
|
|
186
|
+
paths, so it fires on a CI runner as well as on the machine that built the
|
|
187
|
+
artifact -- a list derived from the running machine can only ever see that
|
|
188
|
+
machine. A path under a root the repository writes as an example (the README's
|
|
189
|
+
example projects root, the placeholder user profiles the fixtures use) is not a
|
|
190
|
+
developer's path, and is allowed.
|
|
191
|
+
|
|
183
192
|
The digests that get PINNED in `publish.yml` are CI's: the `artifact` job of the CI run
|
|
184
193
|
on the release commit builds twice with the same pins, proves the two builds
|
|
185
194
|
byte-identical, prints `dist.sha256`, and keeps `dist/` as a workflow artifact for 90
|
|
@@ -33,12 +33,13 @@ def _default(action: argparse.Action) -> str:
|
|
|
33
33
|
return ""
|
|
34
34
|
rendered = str(action.default)
|
|
35
35
|
# Defaults derived from the environment are the machine's, not the
|
|
36
|
-
# tool's. The first cut of this page rendered
|
|
37
|
-
#
|
|
38
|
-
# test then failed on every CI leg,
|
|
39
|
-
# the
|
|
40
|
-
# the
|
|
41
|
-
#
|
|
36
|
+
# tool's. The first cut of this page rendered the maintainer's own
|
|
37
|
+
# projects root -- the value of GRAPHITE_PROJECTS_ROOT on the box it
|
|
38
|
+
# was written on -- and the lockstep test then failed on every CI leg,
|
|
39
|
+
# where the same default is `.`. Name the rule, never the value. Keyed
|
|
40
|
+
# on the DESTINATION, not the value: with the variable unset the value
|
|
41
|
+
# is `.`, which is also the honest default of every plain `path`
|
|
42
|
+
# argument and must keep rendering as `.`.
|
|
42
43
|
if action.dest in _ENVIRONMENT_DERIVED_DESTS or Path(rendered).is_absolute():
|
|
43
44
|
return " (default: the projects root -- `GRAPHITE_PROJECTS_ROOT`, else the current directory)"
|
|
44
45
|
return f" (default: `{rendered}`)"
|
|
@@ -8,9 +8,11 @@ release -- which means drift between releases is invisible by construction, and
|
|
|
8
8
|
two defects have already been found by finally looking:
|
|
9
9
|
|
|
10
10
|
* a developer path shipped inside the wheel METADATA, rendering on PyPI;
|
|
11
|
-
* the release runbook naming artifacts the build no longer produces
|
|
11
|
+
* the release runbook naming artifacts the build no longer produces;
|
|
12
|
+
* a developer path shipped inside the SDIST -- which carries the tests and the
|
|
13
|
+
scripts, and was never scanned for content at all.
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
All were invisible to 2856 passing tests, because none is a property of the
|
|
14
16
|
source tree.
|
|
15
17
|
|
|
16
18
|
Run with a path to a directory containing exactly one wheel and one sdist:
|
|
@@ -43,6 +45,55 @@ FORBIDDEN_PATHS = re.compile(
|
|
|
43
45
|
r")(/|$)"
|
|
44
46
|
)
|
|
45
47
|
|
|
48
|
+
# The SHAPE of an absolute path that belongs to one developer's machine.
|
|
49
|
+
#
|
|
50
|
+
# Deliberately machine-INDEPENDENT. The first version of this check derived
|
|
51
|
+
# its needles from `ROOT` and `Path.home()`, which is right for catching a
|
|
52
|
+
# path leaked out of the machine doing the building -- but the gate runs on a
|
|
53
|
+
# CI runner, where those needles are the runner's own POSIX paths and can
|
|
54
|
+
# never match a path baked into the source on a developer's Windows box. A
|
|
55
|
+
# rule that only sees its own machine's spelling of a path is a local check,
|
|
56
|
+
# not a release gate; this one matches the shape instead, so it sees the path
|
|
57
|
+
# whoever wrote it.
|
|
58
|
+
#
|
|
59
|
+
# The trailing group is optional on purpose: the literal that actually
|
|
60
|
+
# shipped was a bare projects root, and the version with a required
|
|
61
|
+
# separator missed it.
|
|
62
|
+
#
|
|
63
|
+
# Separators are matched as runs, because source code spells a Windows path
|
|
64
|
+
# with escaped backslashes and a document spells the same path with one.
|
|
65
|
+
DEVELOPER_PATH = re.compile(
|
|
66
|
+
# `C:/Users/x`, `C:\Projects`, and their escaped spellings.
|
|
67
|
+
r"[A-Za-z]:[\\/]+(?:Users|Projects)(?:[\\/]+[^\s\"'`)\]}]*)?"
|
|
68
|
+
# the MSYS spelling of the same thing.
|
|
69
|
+
r"|(?<![A-Za-z0-9])/[a-zA-Z][\\/]+(?:Users|Projects)(?:[\\/]+[^\s\"'`)\]}]*)?"
|
|
70
|
+
# `/home/someone`, `/Users/me`. A segment is required, so a bare home
|
|
71
|
+
# prefix is a prefix rather than a path -- the same shape the
|
|
72
|
+
# repository's own rule uses.
|
|
73
|
+
r"|(?<![A-Za-z0-9])/(?:home|Users)[\\/]+[a-z][\w.-]*(?:[\\/]+[^\s\"'`)\]}]*)?",
|
|
74
|
+
re.IGNORECASE,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
# The roots this repository writes as EXAMPLES, as normalised path prefixes.
|
|
78
|
+
# A path under one of these is an example on purpose; a path with the same
|
|
79
|
+
# shape under any other root is somebody's machine. Each entry is a path the
|
|
80
|
+
# repository itself writes -- the README's example projects root, and the
|
|
81
|
+
# placeholder user profiles the fixtures use -- so the list is closed and
|
|
82
|
+
# short rather than a denylist of every path that ever leaked.
|
|
83
|
+
#
|
|
84
|
+
# A prefix rather than a whole path, because the examples nest: the README
|
|
85
|
+
# shows both a bare projects root and a project under it.
|
|
86
|
+
EXAMPLE_ROOTS = (
|
|
87
|
+
"c:/projects",
|
|
88
|
+
"c:/users/someone",
|
|
89
|
+
"c:/users/x",
|
|
90
|
+
"c:/users/example",
|
|
91
|
+
"c:/users/<user>",
|
|
92
|
+
"/users/me",
|
|
93
|
+
"/home/someone",
|
|
94
|
+
"/home/x",
|
|
95
|
+
)
|
|
96
|
+
|
|
46
97
|
|
|
47
98
|
def _distribution_name() -> str:
|
|
48
99
|
declared = tomllib.loads((ROOT / "pyproject.toml").read_text(encoding="utf-8"))
|
|
@@ -78,11 +129,58 @@ def _check_members(label: str, names: list[str], problems: list[str]) -> None:
|
|
|
78
129
|
problems.append(f"{label} contains an excluded path: {name}")
|
|
79
130
|
|
|
80
131
|
|
|
132
|
+
def _normalise(path: str) -> str:
|
|
133
|
+
collapsed = re.sub(r"[\\/]+", "/", path)
|
|
134
|
+
return collapsed.lower()
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def _msys_to_windows(normalised: str) -> str:
|
|
138
|
+
"""`/c/users/x` is the same path as `c:/users/x`."""
|
|
139
|
+
parts = normalised.lstrip("/").split("/")
|
|
140
|
+
if len(parts) > 1 and len(parts[0]) == 1 and parts[0].isalpha():
|
|
141
|
+
return parts[0] + ":/" + "/".join(parts[1:])
|
|
142
|
+
return normalised
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
def _is_example(path: str) -> bool:
|
|
146
|
+
"""Whether `path` sits under a root this repository writes as an example."""
|
|
147
|
+
normalised = _normalise(path)
|
|
148
|
+
candidates = {normalised, _msys_to_windows(normalised)}
|
|
149
|
+
return any(
|
|
150
|
+
candidate == root or candidate.startswith(root + "/")
|
|
151
|
+
for candidate in candidates
|
|
152
|
+
for root in EXAMPLE_ROOTS
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def developer_paths(text: str) -> list[str]:
|
|
157
|
+
"""The absolute paths in `text` that name one developer's machine.
|
|
158
|
+
|
|
159
|
+
Machine-independent by construction: it matches the SHAPE of such a path
|
|
160
|
+
rather than this machine's spelling of it. Returns the offending path
|
|
161
|
+
strings in the order they appear.
|
|
162
|
+
"""
|
|
163
|
+
found = []
|
|
164
|
+
for match in DEVELOPER_PATH.finditer(text):
|
|
165
|
+
path = match.group(0).rstrip(",;:!?")
|
|
166
|
+
if not path or _is_example(path):
|
|
167
|
+
continue
|
|
168
|
+
found.append(path)
|
|
169
|
+
return found
|
|
170
|
+
|
|
171
|
+
|
|
81
172
|
def _check_content(label: str, blobs: dict[str, bytes], problems: list[str]) -> None:
|
|
82
173
|
for needle in _machine_needles():
|
|
83
174
|
for name, blob in blobs.items():
|
|
84
175
|
if needle.encode("utf-8") in blob:
|
|
85
176
|
problems.append(f"{label}:{name} names the build machine: {needle!r}")
|
|
177
|
+
for name, blob in blobs.items():
|
|
178
|
+
try:
|
|
179
|
+
text = blob.decode("utf-8")
|
|
180
|
+
except UnicodeDecodeError:
|
|
181
|
+
continue
|
|
182
|
+
for path in developer_paths(text):
|
|
183
|
+
problems.append(f"{label}:{name} names a developer's machine: {path!r}")
|
|
86
184
|
|
|
87
185
|
|
|
88
186
|
def verify(dist_dir: Path) -> list[str]:
|
|
@@ -134,6 +232,20 @@ def verify(dist_dir: Path) -> list[str]:
|
|
|
134
232
|
|
|
135
233
|
with tarfile.open(sdist) as archive:
|
|
136
234
|
_check_members("sdist", archive.getnames(), problems)
|
|
235
|
+
# The sdist's CONTENT, not just its member names. It ships the test
|
|
236
|
+
# suite and the scripts, and the whole of that is text a developer
|
|
237
|
+
# path can hide in -- a comment ships exactly as a string literal
|
|
238
|
+
# does. Scanning only the wheel left the larger archive unchecked,
|
|
239
|
+
# and the larger archive is the one that carries the sources.
|
|
240
|
+
blobs = {}
|
|
241
|
+
for member in archive.getmembers():
|
|
242
|
+
if not member.isfile():
|
|
243
|
+
continue
|
|
244
|
+
handle = archive.extractfile(member)
|
|
245
|
+
if handle is None: # pragma: no cover - defensive
|
|
246
|
+
continue
|
|
247
|
+
blobs[member.name] = handle.read()
|
|
248
|
+
_check_content("sdist", blobs, problems)
|
|
137
249
|
|
|
138
250
|
return problems
|
|
139
251
|
|
|
@@ -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.9.0"
|
|
@@ -42,7 +42,7 @@ from .daemon_health import HealthOptions, evaluate_daemon_health, format_health_
|
|
|
42
42
|
from . import buildlock
|
|
43
43
|
from .detach import spawn_detached
|
|
44
44
|
from .doctor import format_doctor_text, run_doctor
|
|
45
|
-
from .engine_identity import engine_identity
|
|
45
|
+
from .engine_identity import engine_identity, engine_identity_and_files
|
|
46
46
|
from .export.html import to_html as export_html
|
|
47
47
|
from .export.json import build_bundle, to_json as export_json
|
|
48
48
|
from .export.md import to_markdown as export_md
|
|
@@ -277,10 +277,18 @@ def _scan(args: argparse.Namespace, cfg: Config) -> tuple[dict[str, Any], list[A
|
|
|
277
277
|
|
|
278
278
|
start = time.time()
|
|
279
279
|
entries = collect_files(root, cfg)
|
|
280
|
+
# One pass over the engine's files yields both the identity and the
|
|
281
|
+
# inventory, so the inventory costs nothing beyond what the fingerprint
|
|
282
|
+
# already cost.
|
|
283
|
+
engine, engine_files = engine_identity_and_files(cfg.cache_version)
|
|
280
284
|
manifest = {
|
|
281
285
|
"root": root.name,
|
|
282
286
|
"file_count": len(entries),
|
|
283
|
-
"engine":
|
|
287
|
+
"engine": engine,
|
|
288
|
+
# The engine's own files, so a later `check` can name WHICH of them
|
|
289
|
+
# moved when the identity does. The fingerprint alone cannot: it says
|
|
290
|
+
# that something under the package directory changed and not what.
|
|
291
|
+
"engine_files": engine_files,
|
|
284
292
|
"files": [
|
|
285
293
|
{"rel_path": e.rel_path, "language": e.language, "size": e.size, "hash": e.content_hash}
|
|
286
294
|
for e in entries
|
|
@@ -809,6 +817,29 @@ def _short_value(value: Any, limit: int = 12) -> str:
|
|
|
809
817
|
return text if len(text) <= limit else text[:limit] + "..."
|
|
810
818
|
|
|
811
819
|
|
|
820
|
+
def _print_engine_files(files: Any) -> None:
|
|
821
|
+
"""Name the engine's own files that moved, when they are known.
|
|
822
|
+
|
|
823
|
+
`engine_changed` otherwise says only THAT the engine moved. The file
|
|
824
|
+
names are what a consumer can act on, and they are what the 1.7.0 gate
|
|
825
|
+
could not report.
|
|
826
|
+
"""
|
|
827
|
+
if not isinstance(files, dict):
|
|
828
|
+
return
|
|
829
|
+
named: list[str] = []
|
|
830
|
+
for key in ("changed", "added", "removed"):
|
|
831
|
+
values = files.get(key)
|
|
832
|
+
if not isinstance(values, list):
|
|
833
|
+
continue
|
|
834
|
+
for name in values:
|
|
835
|
+
named.append(f"{key}: {name}")
|
|
836
|
+
if not named:
|
|
837
|
+
return
|
|
838
|
+
print(" engine files that moved:")
|
|
839
|
+
for line in named:
|
|
840
|
+
print(f" {line}")
|
|
841
|
+
|
|
842
|
+
|
|
812
843
|
def cmd_check(args: argparse.Namespace) -> int:
|
|
813
844
|
root = Path(args.path).resolve()
|
|
814
845
|
# Below a repository's root there is no graph to be fresh or stale, and
|
|
@@ -855,6 +886,7 @@ def cmd_check(args: argparse.Namespace) -> int:
|
|
|
855
886
|
if reason == "engine_changed":
|
|
856
887
|
print(" graphite was updated since this graph was built; rebuild to refresh")
|
|
857
888
|
_print_engine_delta(status.get("engine_delta"))
|
|
889
|
+
_print_engine_files(status.get("engine_files"))
|
|
858
890
|
for key in ("added", "changed", "removed"):
|
|
859
891
|
if status.get(key):
|
|
860
892
|
print(f" {key}: {', '.join(status[key])}")
|
|
@@ -5,6 +5,7 @@ import hashlib
|
|
|
5
5
|
import json
|
|
6
6
|
import os
|
|
7
7
|
import stat
|
|
8
|
+
from collections.abc import Iterator
|
|
8
9
|
from importlib import metadata
|
|
9
10
|
from pathlib import Path
|
|
10
11
|
from typing import Final
|
|
@@ -172,7 +173,36 @@ def _parser_record(name: str) -> str:
|
|
|
172
173
|
return f"{name}=absent"
|
|
173
174
|
|
|
174
175
|
|
|
175
|
-
def
|
|
176
|
+
def _read_engine_files(
|
|
177
|
+
root: Path,
|
|
178
|
+
*,
|
|
179
|
+
max_files: int,
|
|
180
|
+
max_file_bytes: int,
|
|
181
|
+
max_total_bytes: int,
|
|
182
|
+
) -> Iterator[tuple[str, bytes]]:
|
|
183
|
+
"""Every engine source file, in a stable order, with the byte budget enforced.
|
|
184
|
+
|
|
185
|
+
One pass, so that the fingerprint and the file inventory cost what the
|
|
186
|
+
fingerprint alone used to cost: reading the package twice would double
|
|
187
|
+
every build.
|
|
188
|
+
"""
|
|
189
|
+
paths = _collect_engine_files(root, max_files=max_files)
|
|
190
|
+
inventory: list[tuple[str, Path]] = [(_contained_relative(path, root), path) for path in paths]
|
|
191
|
+
total_bytes = 0
|
|
192
|
+
for relative, path in sorted(inventory, key=lambda item: item[0]):
|
|
193
|
+
try:
|
|
194
|
+
data = _read_stable_file(path, root, max_file_bytes)
|
|
195
|
+
except EngineIdentityError:
|
|
196
|
+
raise
|
|
197
|
+
except OSError as exc:
|
|
198
|
+
raise EngineIdentityError("engine_file_unreadable") from exc
|
|
199
|
+
total_bytes += len(data)
|
|
200
|
+
if total_bytes > max_total_bytes:
|
|
201
|
+
raise EngineIdentityError("engine_total_too_large")
|
|
202
|
+
yield relative, data
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
def engine_identity_and_files(
|
|
176
206
|
cache_version: str,
|
|
177
207
|
*,
|
|
178
208
|
package_root: Path | None = None,
|
|
@@ -181,8 +211,16 @@ def engine_identity(
|
|
|
181
211
|
max_files: int = MAX_ENGINE_FILES,
|
|
182
212
|
max_file_bytes: int = MAX_ENGINE_FILE_BYTES,
|
|
183
213
|
max_total_bytes: int = MAX_ENGINE_TOTAL_BYTES,
|
|
184
|
-
) -> dict[str, str]:
|
|
185
|
-
"""
|
|
214
|
+
) -> tuple[dict[str, str], dict[str, str]]:
|
|
215
|
+
"""The engine's identity, and the inventory of the files it covers.
|
|
216
|
+
|
|
217
|
+
The fingerprint says THAT the engine changed; the inventory says WHICH file
|
|
218
|
+
changed. The fingerprint covers the PACKAGE directory, so a source edit
|
|
219
|
+
moves it without touching the repository being checked, while the
|
|
220
|
+
repository's file-level diff covers the REPOSITORY and so names nothing.
|
|
221
|
+
That asymmetry is why `check` reported `engine_changed` with empty
|
|
222
|
+
added/changed/removed lists and no actor -- the 1.7.0 gate hit exactly it.
|
|
223
|
+
"""
|
|
186
224
|
if isinstance(max_file_bytes, bool) or max_file_bytes <= 0:
|
|
187
225
|
raise EngineIdentityError("engine_file_too_large")
|
|
188
226
|
if isinstance(max_total_bytes, bool) or max_total_bytes <= 0:
|
|
@@ -207,7 +245,6 @@ def engine_identity(
|
|
|
207
245
|
root = candidate_root.resolve(strict=True)
|
|
208
246
|
except OSError as exc:
|
|
209
247
|
raise EngineIdentityError("engine_root_invalid") from exc
|
|
210
|
-
paths = _collect_engine_files(root, max_files=max_files)
|
|
211
248
|
|
|
212
249
|
header = {
|
|
213
250
|
"cache_version": cache_version,
|
|
@@ -217,22 +254,78 @@ def engine_identity(
|
|
|
217
254
|
}
|
|
218
255
|
digest = hashlib.sha256()
|
|
219
256
|
digest.update(json.dumps(header, sort_keys=True, separators=(",", ":")).encode("utf-8"))
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
except OSError as exc:
|
|
228
|
-
raise EngineIdentityError("engine_file_unreadable") from exc
|
|
229
|
-
total_bytes += len(data)
|
|
230
|
-
if total_bytes > max_total_bytes:
|
|
231
|
-
raise EngineIdentityError("engine_total_too_large")
|
|
257
|
+
files: dict[str, str] = {}
|
|
258
|
+
for relative, data in _read_engine_files(
|
|
259
|
+
root,
|
|
260
|
+
max_files=max_files,
|
|
261
|
+
max_file_bytes=max_file_bytes,
|
|
262
|
+
max_total_bytes=max_total_bytes,
|
|
263
|
+
):
|
|
232
264
|
encoded_name = relative.encode("utf-8")
|
|
233
265
|
digest.update(len(encoded_name).to_bytes(4, "big"))
|
|
234
266
|
digest.update(encoded_name)
|
|
235
267
|
digest.update(len(data).to_bytes(8, "big"))
|
|
236
268
|
digest.update(data)
|
|
269
|
+
files[relative] = hashlib.sha256(data).hexdigest()
|
|
270
|
+
|
|
271
|
+
return {**header, "fingerprint": digest.hexdigest()}, files
|
|
272
|
+
|
|
237
273
|
|
|
238
|
-
|
|
274
|
+
def engine_identity(
|
|
275
|
+
cache_version: str,
|
|
276
|
+
*,
|
|
277
|
+
package_root: Path | None = None,
|
|
278
|
+
parsers: str | None = None,
|
|
279
|
+
version: str | None = None,
|
|
280
|
+
max_files: int = MAX_ENGINE_FILES,
|
|
281
|
+
max_file_bytes: int = MAX_ENGINE_FILE_BYTES,
|
|
282
|
+
max_total_bytes: int = MAX_ENGINE_TOTAL_BYTES,
|
|
283
|
+
) -> dict[str, str]:
|
|
284
|
+
"""Return a public, path-free identity for trusted packaged engine files."""
|
|
285
|
+
identity, _ = engine_identity_and_files(
|
|
286
|
+
cache_version,
|
|
287
|
+
package_root=package_root,
|
|
288
|
+
parsers=parsers,
|
|
289
|
+
version=version,
|
|
290
|
+
max_files=max_files,
|
|
291
|
+
max_file_bytes=max_file_bytes,
|
|
292
|
+
max_total_bytes=max_total_bytes,
|
|
293
|
+
)
|
|
294
|
+
return identity
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
def engine_file_inventory(
|
|
298
|
+
package_root: Path | None = None,
|
|
299
|
+
*,
|
|
300
|
+
max_files: int = MAX_ENGINE_FILES,
|
|
301
|
+
max_file_bytes: int = MAX_ENGINE_FILE_BYTES,
|
|
302
|
+
max_total_bytes: int = MAX_ENGINE_TOTAL_BYTES,
|
|
303
|
+
) -> dict[str, str]:
|
|
304
|
+
"""The engine's own source files, keyed by path relative to the package
|
|
305
|
+
root and valued by the hash of their bytes.
|
|
306
|
+
|
|
307
|
+
The fingerprint says THAT the engine changed. This says WHICH file changed,
|
|
308
|
+
and it is the only thing that can: the fingerprint covers the PACKAGE
|
|
309
|
+
directory, so a source edit moves it without touching the repository being
|
|
310
|
+
checked, while the file-level diff covers the REPOSITORY and so names
|
|
311
|
+
nothing. That asymmetry is why `check` reported `engine_changed` with empty
|
|
312
|
+
added/changed/removed lists and no actor -- the 1.7.0 gate hit exactly it.
|
|
313
|
+
|
|
314
|
+
Keys are relative and carry no absolute path, so an inventory can be
|
|
315
|
+
recorded in the manifest and in a diagnostic without disclosing where the
|
|
316
|
+
engine is installed.
|
|
317
|
+
"""
|
|
318
|
+
candidate_root = package_root if package_root is not None else Path(__file__).parent
|
|
319
|
+
try:
|
|
320
|
+
root = candidate_root.resolve(strict=True)
|
|
321
|
+
except OSError as exc:
|
|
322
|
+
raise EngineIdentityError("engine_root_invalid") from exc
|
|
323
|
+
return {
|
|
324
|
+
relative: hashlib.sha256(data).hexdigest()
|
|
325
|
+
for relative, data in _read_engine_files(
|
|
326
|
+
root,
|
|
327
|
+
max_files=max_files,
|
|
328
|
+
max_file_bytes=max_file_bytes,
|
|
329
|
+
max_total_bytes=max_total_bytes,
|
|
330
|
+
)
|
|
331
|
+
}
|
|
@@ -6,7 +6,7 @@ from pathlib import Path
|
|
|
6
6
|
from typing import Any
|
|
7
7
|
|
|
8
8
|
from .config import Config
|
|
9
|
-
from .engine_identity import EngineIdentityError,
|
|
9
|
+
from .engine_identity import EngineIdentityError, engine_identity_and_files
|
|
10
10
|
from .ingest import collect_files
|
|
11
11
|
|
|
12
12
|
_DOCTOR_FILE_LIMIT = 10_000
|
|
@@ -62,6 +62,31 @@ def engine_identity_delta(previous: Any, current: dict[str, Any]) -> dict[str, A
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
|
|
65
|
+
def engine_file_diff(recorded: Any, current: dict[str, str]) -> dict[str, Any] | None:
|
|
66
|
+
"""Which of the engine's own files moved, when the manifest recorded them.
|
|
67
|
+
|
|
68
|
+
`engine_changed` says the engine moved and nothing else, and the
|
|
69
|
+
repository's added/changed/removed lists are empty BY CONSTRUCTION on that
|
|
70
|
+
path -- the file diff is never computed. So the actor stayed unnamed: the
|
|
71
|
+
1.7.0 pre-push gate reported `engine_changed` on two tests in two workers
|
|
72
|
+
and could say nothing about what had moved.
|
|
73
|
+
|
|
74
|
+
The manifest records the engine's file inventory, so the difference names
|
|
75
|
+
the file. `None` means the question cannot be answered -- a manifest
|
|
76
|
+
written before the inventory was recorded -- and it is reported as absent
|
|
77
|
+
rather than as "nothing changed", which would be a different and false
|
|
78
|
+
claim.
|
|
79
|
+
"""
|
|
80
|
+
if not isinstance(recorded, dict) or not recorded:
|
|
81
|
+
return None
|
|
82
|
+
added = sorted(set(current) - set(recorded))
|
|
83
|
+
removed = sorted(set(recorded) - set(current))
|
|
84
|
+
changed = sorted(
|
|
85
|
+
name for name in set(current) & set(recorded) if current[name] != recorded[name]
|
|
86
|
+
)
|
|
87
|
+
return {"added": added, "changed": changed, "removed": removed}
|
|
88
|
+
|
|
89
|
+
|
|
65
90
|
def graph_engine_changed(cfg: Config, current_engine: dict[str, Any]) -> bool:
|
|
66
91
|
"""True when a built graph records an engine identity other than the current one.
|
|
67
92
|
|
|
@@ -127,7 +152,7 @@ def check_graph_freshness(
|
|
|
127
152
|
raise FreshnessLimitError("freshness file limit exceeded")
|
|
128
153
|
if not ignore_engine:
|
|
129
154
|
try:
|
|
130
|
-
current_engine =
|
|
155
|
+
current_engine, current_files = engine_identity_and_files(cfg.cache_version)
|
|
131
156
|
except EngineIdentityError:
|
|
132
157
|
return {
|
|
133
158
|
"stale": True,
|
|
@@ -141,6 +166,7 @@ def check_graph_freshness(
|
|
|
141
166
|
"stale": True,
|
|
142
167
|
"reason": "engine_changed",
|
|
143
168
|
"engine_delta": engine_identity_delta(previous.get("engine"), current_engine),
|
|
169
|
+
"engine_files": engine_file_diff(previous.get("engine_files"), current_files),
|
|
144
170
|
"added": [],
|
|
145
171
|
"changed": [],
|
|
146
172
|
"removed": [],
|
|
@@ -1367,7 +1367,7 @@ def test_a_parent_path_after_cd_no_longer_reads_as_outside_the_repository(litera
|
|
|
1367
1367
|
("text", "msys", "expected"),
|
|
1368
1368
|
[
|
|
1369
1369
|
("/c/Users/x", True, "C:/Users/x"),
|
|
1370
|
-
("/
|
|
1370
|
+
("/d/work", True, "D:/work"),
|
|
1371
1371
|
("/c", True, "C:/"),
|
|
1372
1372
|
("/cache/x", True, "/cache/x"), # a directory named `cache`, not drive C
|
|
1373
1373
|
("src/pkg", True, "src/pkg"),
|