doubled-graph 3.2.0__tar.gz → 3.2.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.
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/PKG-INFO +1 -1
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/for-humans/FAQ.md +6 -6
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/for-humans/getting-started.md +9 -9
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/ci-templates/github-actions.yml +11 -11
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/ci-templates/gitlab-ci.yml +10 -10
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/upgrade-methodology/00-entry-prompt.md +9 -9
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/pyproject.toml +1 -1
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/contracts.py +2 -1
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/graphs/crossref.py +76 -8
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/hooks_installer.py +1 -1
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/index/parser.py +5 -1
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/index/snapshot.py +32 -35
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/integrations/cgc.py +100 -41
- doubled_graph-3.2.1/src/doubled_graph/symbols.py +198 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/tools/context.py +14 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/tools/impact.py +23 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_cgc_contract.py +60 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_cli_entrypoint.py +1 -1
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_command_surface.py +5 -5
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_contracts.py +4 -4
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_crossref_drift.py +286 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_index_graph.py +142 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_mutation_kill_cgc_misc.py +20 -2
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_mutation_kill_context.py +44 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_mutation_kill_impact.py +38 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_provenance.py +116 -0
- doubled_graph-3.2.1/tests/test_symbols.py +166 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/.gitignore +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/ARTICLE.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/INDEX.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/LICENSE +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/README.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/for-ai-existing-project/README.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/for-ai-maintenance/README.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/for-ai-new-project/README.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/for-humans/deep-dive.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/README.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/approval-checkpoints.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/artifacts.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/auto-scaling.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/drift-and-priority.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/language-adapters/_template.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/language-adapters/csharp.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/language-adapters/go.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/language-adapters/java.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/language-adapters/python.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/language-adapters/rust.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/language-adapters/swift.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/language-adapters/typescript.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/principles.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/roles.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/runtime-adapters/_template.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/runtime-adapters/claude-code.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/runtime-adapters/codex.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/runtime-adapters/continue.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/runtime-adapters/cursor.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/runtime-adapters/local-llm.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/runtime-adapters/windsurf.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/tools.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/methodology/workflow.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/maintenance/on-after-edit.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/maintenance/on-before-edit.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/maintenance/on-drift-detected.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/maintenance/on-user-manual-edit.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/migrate-existing-project/00-entry-prompt.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/migrate-existing-project/01-discover.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/migrate-existing-project/02-reconstruct-intent.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/migrate-existing-project/03-draft-plan.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/migrate-existing-project/04-markup-codebase.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/migrate-existing-project/05-verification-and-logs.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/migrate-existing-project/06-validation-gates.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/new-project/00-entry-prompt.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/new-project/01-intent-interview.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/new-project/02-requirements.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/new-project/03-technology.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/new-project/04-development-plan.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/new-project/05-verification-plan.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/new-project/06-generate.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/new-project/07-post-init-sync.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/prompts/upgrade-methodology/01-content-gaps.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/__init__.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/__main__.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/artifacts_repair.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/cli.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/config.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/daemon/__init__.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/daemon/index_store.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/daemon/main.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/daemon/server.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/data/skills/doubled-graph-after-edit/SKILL.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/data/skills/doubled-graph-before-edit/SKILL.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/data/skills/doubled-graph-drift/SKILL.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/data/skills/doubled-graph-guide/SKILL.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/data/skills/doubled-graph-manual-edit/SKILL.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/data/skills/doubled-graph-refactor/SKILL.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/data/skills/doubled-graph-verify/SKILL.md +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/graphs/__init__.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/graphs/anchors.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/graphs/declared.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/graphs/grace4.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/health.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/index/__init__.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/index/discovery.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/index/linker.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/index/manifest.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/index/parse_cache.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/integrations/__init__.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/integrations/grace_cli.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/integrations/grace_discovery.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/integrations/grace_node_boot.mjs +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/integrations/grace_node_loader.mjs +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/integrations/grace_process.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/integrations/graphd.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/integrations/service.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/migrations/__init__.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/migrations/grace3_to_grace4.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/policy/__init__.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/policy/agents_md.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/policy/phase.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/server.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/setup.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/storage/__init__.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/storage/paths.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/tools/__init__.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/tools/_meta.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/tools/analyze.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/tools/analyze_sync.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/tools/check_drift.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/tools/index_status.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/tools/post_tool.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/tools/provenance.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/src/doubled_graph/uninstall.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/__init__.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/conftest.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/launchd_stub/fake_launchctl.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/launchd_stub/launchctl +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_analyze_sync.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_anchors.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_artifacts_repair.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_bom_support.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_cgc_backend.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_cgc_lifecycle.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_check_drift.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_cli_daemon.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_cli_surface.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_daemon.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_daemon_main.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_declared_coverage.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_doc_contract.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_e2e_acceptance.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_grace4_artifacts.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_grace_cli_coverage.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_grace_cli_engine.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_grace_node_fallback.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_graphd_client.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_health.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_hook_public_coverage.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_index_core.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_index_manifest.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_integration_daemon_cgc.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_mcp_transport.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_mcp_validation.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_migration_coverage.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_migration_grace3_to_grace4.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_mutation_gate_script.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_mutation_kill_cgc_edges.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_mutation_kill_cgc_fallback.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_mutation_kill_crossref.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_mutation_kill_hooks.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_mutation_probes.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_packaging.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_platform_branches.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_protocol_v2.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_release_edges.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_release_script.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_repo_hygiene.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_service.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_service_async_unload.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_service_start_fallback.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_setup_artifacts.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_setup_coverage.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_setup_failure_semantics.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_setup_launchd_e2e.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_smoke.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_snapshot_oracle.py +0 -0
- {doubled_graph-3.2.0 → doubled_graph-3.2.1}/tests/test_uninstall.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: doubled-graph
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.1
|
|
4
4
|
Summary: MCP facade over CodeGraphContext + GRACE 4 (.grace artifacts): impact, context, drift-detect, migration for LLM-driven codebases.
|
|
5
5
|
Project-URL: Homepage, https://github.com/rour/doubled-graph-mcp
|
|
6
6
|
Project-URL: Repository, https://github.com/rour/doubled-graph-mcp
|
|
@@ -60,10 +60,10 @@ cgc:
|
|
|
60
60
|
**A:** Три шага:
|
|
61
61
|
|
|
62
62
|
```bash
|
|
63
|
-
# 1. Поставить именно 3.2.
|
|
63
|
+
# 1. Поставить именно 3.2.1: pipx upgrade даст 3.0.7, пока 3.2.1 не в PyPI
|
|
64
64
|
python3.14 -m build --wheel
|
|
65
|
-
pipx install --python python3.14 --force dist/doubled_graph-3.2.
|
|
66
|
-
doubled-graph --version # 3.2.
|
|
65
|
+
pipx install --python python3.14 --force dist/doubled_graph-3.2.1-py3-none-any.whl
|
|
66
|
+
doubled-graph --version # 3.2.1
|
|
67
67
|
|
|
68
68
|
# 2. В обычном шелле (не из песочницы), из каталога проекта
|
|
69
69
|
cd your-project
|
|
@@ -85,11 +85,11 @@ doubled-graph health # cgc.ok: true
|
|
|
85
85
|
|
|
86
86
|
### Q: Почему `pipx upgrade doubled-graph` не обновляет до 3.2?
|
|
87
87
|
**A:** Потому что на PyPI пока опубликована 3.0.7: версия 3.1.0 не
|
|
88
|
-
публиковалась, а текущая версия репозитория — 3.2.
|
|
88
|
+
публиковалась, а текущая версия репозитория — 3.2.1. `pipx upgrade` ставит
|
|
89
89
|
последнюю опубликованную версию, поэтому после него `doubled-graph --version`
|
|
90
|
-
покажет 3.0.7. Для 3.2.
|
|
90
|
+
покажет 3.0.7. Для 3.2.1 нужен wheel из этого репозитория и явный
|
|
91
91
|
`--python 3.14` (см. вопрос выше и [README §Установка](../README.md#2-установить-doubled-graph));
|
|
92
|
-
после публикации — `pipx install --python python3.14 doubled-graph==3.2.
|
|
92
|
+
после публикации — `pipx install --python python3.14 doubled-graph==3.2.1`.
|
|
93
93
|
|
|
94
94
|
### Q: В каком порядке удалять, чтобы не остался перезапускающийся сервис?
|
|
95
95
|
**A:** Сначала `doubled-graph uninstall` (при необходимости с
|
|
@@ -44,7 +44,7 @@ pipx ensurepath
|
|
|
44
44
|
|
|
45
45
|
(перезапусти терминал). Дальше — установка doubled-graph и онбординг репозитория.
|
|
46
46
|
|
|
47
|
-
> **Версия.** На PyPI опубликована 3.0.7, а 3.2.
|
|
47
|
+
> **Версия.** На PyPI опубликована 3.0.7, а 3.2.1 ещё нет. Поэтому ставь
|
|
48
48
|
> wheel этого репозитория и указывай `--python` явно: если сам pipx запущен на
|
|
49
49
|
> 3.15, его venv тоже будет 3.15, и pip откажется ставить пакет. Подробнее —
|
|
50
50
|
> [README §Установка](../README.md#установка).
|
|
@@ -52,12 +52,12 @@ pipx ensurepath
|
|
|
52
52
|
```bash
|
|
53
53
|
python3.14 -m pip install build
|
|
54
54
|
python3.14 -m build --wheel
|
|
55
|
-
pipx install --python python3.14 --force dist/doubled_graph-3.2.
|
|
55
|
+
pipx install --python python3.14 --force dist/doubled_graph-3.2.1-py3-none-any.whl
|
|
56
56
|
doubled-graph setup
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
> Работаешь в своём venv/conda? Тогда без pipx: `python3.14 -m pip install
|
|
60
|
-
> dist/doubled_graph-3.2.
|
|
60
|
+
> dist/doubled_graph-3.2.1-py3-none-any.whl`. pipx нужен тем, кто ставит
|
|
61
61
|
> глобально — на новом Python/Homebrew/Debian обычный `pip install`
|
|
62
62
|
> блокируется PEP 668.
|
|
63
63
|
|
|
@@ -79,11 +79,11 @@ doubled-graph setup
|
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
81
|
# 1. Поставить именно 3.2. `pipx upgrade doubled-graph` даст 3.0.7,
|
|
82
|
-
# пока 3.2.
|
|
82
|
+
# пока 3.2.1 не опубликована в PyPI. Нужен wheel и явный --python:
|
|
83
83
|
python3.14 -m pip install build
|
|
84
84
|
python3.14 -m build --wheel
|
|
85
|
-
pipx install --python python3.14 --force dist/doubled_graph-3.2.
|
|
86
|
-
doubled-graph --version # 3.2.
|
|
85
|
+
pipx install --python python3.14 --force dist/doubled_graph-3.2.1-py3-none-any.whl
|
|
86
|
+
doubled-graph --version # 3.2.1
|
|
87
87
|
|
|
88
88
|
# 2. В обычном шелле (не в песочнице), из каталога проекта:
|
|
89
89
|
cd your-project
|
|
@@ -94,10 +94,10 @@ doubled-graph daemon status # installed: true, running: true
|
|
|
94
94
|
doubled-graph health # cgc.ok: true
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
После публикации 3.2.
|
|
98
|
-
`pipx install --python python3.14 doubled-graph==3.2.
|
|
97
|
+
После публикации 3.2.1 в PyPI команда установки станет обычной:
|
|
98
|
+
`pipx install --python python3.14 doubled-graph==3.2.1`. Предупреждение про
|
|
99
99
|
`pipx upgrade` остаётся: он поставит последнюю опубликованную версию, пока
|
|
100
|
-
это 3.0.7, и `--version` покажет не 3.2.
|
|
100
|
+
это 3.0.7, и `--version` покажет не 3.2.1.
|
|
101
101
|
|
|
102
102
|
Если сервис поставить нельзя (Seatbelt, контейнер, read-only home), сервис
|
|
103
103
|
нужно ставить в обычном шелле, а графовые команды в песочнице недоступны.
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
# fallback. `check-drift` itself needs neither
|
|
10
10
|
# the daemon nor the database — it compares `.grace` with the disk snapshot.
|
|
11
11
|
#
|
|
12
|
-
# Install: the job uses the published 3.2.
|
|
13
|
-
# wheel from the 3.2.
|
|
12
|
+
# Install: the job uses the published 3.2.1. Until 3.2.1 is on PyPI, build a
|
|
13
|
+
# wheel from the 3.2.1 checkout (`python -m build --wheel`, README §Установка)
|
|
14
14
|
# and set DG_WHEEL to its path. The install step validates that the file
|
|
15
15
|
# exists and that the installed release really provides `check-drift`, so a
|
|
16
16
|
# missing or old wheel fails with an actionable message, not a broken run.
|
|
@@ -23,9 +23,9 @@ on:
|
|
|
23
23
|
|
|
24
24
|
env:
|
|
25
25
|
DOUBLED_GRAPH_ENGINE: local
|
|
26
|
-
# Optional. Empty means `pip install doubled-graph==3.2.
|
|
26
|
+
# Optional. Empty means `pip install doubled-graph==3.2.1` from PyPI; set it
|
|
27
27
|
# to a wheel built from the sources, e.g.
|
|
28
|
-
# DG_WHEEL=dist/doubled_graph-3.2.
|
|
28
|
+
# DG_WHEEL=dist/doubled_graph-3.2.1-py3-none-any.whl
|
|
29
29
|
DG_WHEEL: ""
|
|
30
30
|
|
|
31
31
|
jobs:
|
|
@@ -34,7 +34,7 @@ jobs:
|
|
|
34
34
|
steps:
|
|
35
35
|
- uses: actions/checkout@v4
|
|
36
36
|
with:
|
|
37
|
-
# 3.2.
|
|
37
|
+
# 3.2.1: `check-drift` compares the declared graph with a snapshot
|
|
38
38
|
# of the disk, so it needs no merge base and no git history. Full
|
|
39
39
|
# history is kept only for the provenance trailer.
|
|
40
40
|
fetch-depth: 0
|
|
@@ -49,19 +49,19 @@ jobs:
|
|
|
49
49
|
with:
|
|
50
50
|
node-version: "24"
|
|
51
51
|
|
|
52
|
-
- name: Install doubled-graph 3.2.
|
|
52
|
+
- name: Install doubled-graph 3.2.1 and the GRACE engine
|
|
53
53
|
shell: bash
|
|
54
54
|
run: |
|
|
55
55
|
set -euo pipefail
|
|
56
56
|
python -m pip install --upgrade pip
|
|
57
57
|
if [ -n "${DG_WHEEL:-}" ]; then
|
|
58
58
|
if [ ! -f "$DG_WHEEL" ]; then
|
|
59
|
-
echo "::error::DG_WHEEL=$DG_WHEEL does not exist. Build the 3.2.
|
|
59
|
+
echo "::error::DG_WHEEL=$DG_WHEEL does not exist. Build the 3.2.1 wheel with 'python -m build --wheel' (README §Установка) and point DG_WHEEL at it, or unset DG_WHEEL to install the published release."
|
|
60
60
|
exit 1
|
|
61
61
|
fi
|
|
62
62
|
python -m pip install "$DG_WHEEL"
|
|
63
|
-
elif ! python -m pip install "doubled-graph==3.2.
|
|
64
|
-
echo "::error::doubled-graph 3.2.
|
|
63
|
+
elif ! python -m pip install "doubled-graph==3.2.1"; then
|
|
64
|
+
echo "::error::doubled-graph 3.2.1 is not published on PyPI yet. Build the wheel from the 3.2.1 checkout ('python -m build --wheel') and set DG_WHEEL to its path, e.g. DG_WHEEL=dist/doubled_graph-3.2.1-py3-none-any.whl."
|
|
65
65
|
exit 1
|
|
66
66
|
fi
|
|
67
67
|
python - <<'PY'
|
|
@@ -69,8 +69,8 @@ jobs:
|
|
|
69
69
|
import sys
|
|
70
70
|
|
|
71
71
|
version = metadata.version("doubled-graph")
|
|
72
|
-
if version != "3.2.
|
|
73
|
-
sys.exit(f"doubled-graph {version} is installed; 3.2.
|
|
72
|
+
if version != "3.2.1":
|
|
73
|
+
sys.exit(f"doubled-graph {version} is installed; 3.2.1 is required")
|
|
74
74
|
print(f"doubled-graph {version} installed")
|
|
75
75
|
PY
|
|
76
76
|
# The release must actually ship the disk-only drift gate. This never
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
# explicitly (README §Демон), never as a silent
|
|
8
8
|
# fallback. `check-drift` needs neither the daemon nor the database.
|
|
9
9
|
#
|
|
10
|
-
# Install: the job uses the published 3.2.
|
|
11
|
-
# wheel from the 3.2.
|
|
10
|
+
# Install: the job uses the published 3.2.1. Until 3.2.1 is on PyPI, build a
|
|
11
|
+
# wheel from the 3.2.1 checkout (`python -m build --wheel`, README §Установка)
|
|
12
12
|
# and set DG_WHEEL to its path. The install step validates that the file
|
|
13
13
|
# exists and that the installed release really provides `check-drift`.
|
|
14
14
|
stages:
|
|
@@ -19,9 +19,9 @@ doubled-graph-drift:
|
|
|
19
19
|
image: python:3.12
|
|
20
20
|
variables:
|
|
21
21
|
DOUBLED_GRAPH_ENGINE: "local"
|
|
22
|
-
# Optional. Empty means `pip install doubled-graph==3.2.
|
|
22
|
+
# Optional. Empty means `pip install doubled-graph==3.2.1` from PyPI; set
|
|
23
23
|
# it to a wheel built from the sources, e.g.
|
|
24
|
-
# DG_WHEEL=dist/doubled_graph-3.2.
|
|
24
|
+
# DG_WHEEL=dist/doubled_graph-3.2.1-py3-none-any.whl
|
|
25
25
|
DG_WHEEL: ""
|
|
26
26
|
before_script:
|
|
27
27
|
- apt-get update -qq && apt-get install -y -qq git curl unzip
|
|
@@ -34,12 +34,12 @@ doubled-graph-drift:
|
|
|
34
34
|
set -euo pipefail
|
|
35
35
|
if [ -n "${DG_WHEEL:-}" ]; then
|
|
36
36
|
if [ ! -f "$DG_WHEEL" ]; then
|
|
37
|
-
echo "ERROR: DG_WHEEL=$DG_WHEEL does not exist. Build the 3.2.
|
|
37
|
+
echo "ERROR: DG_WHEEL=$DG_WHEEL does not exist. Build the 3.2.1 wheel with 'python -m build --wheel' (README §Установка) and point DG_WHEEL at it, or unset DG_WHEEL to install the published release."
|
|
38
38
|
exit 1
|
|
39
39
|
fi
|
|
40
40
|
pip install "$DG_WHEEL"
|
|
41
|
-
elif ! pip install "doubled-graph==3.2.
|
|
42
|
-
echo "ERROR: doubled-graph 3.2.
|
|
41
|
+
elif ! pip install "doubled-graph==3.2.1"; then
|
|
42
|
+
echo "ERROR: doubled-graph 3.2.1 is not published on PyPI yet. Build the wheel from the 3.2.1 checkout ('python -m build --wheel') and set DG_WHEEL to its path, e.g. DG_WHEEL=dist/doubled_graph-3.2.1-py3-none-any.whl."
|
|
43
43
|
exit 1
|
|
44
44
|
fi
|
|
45
45
|
python - <<'PY'
|
|
@@ -47,8 +47,8 @@ doubled-graph-drift:
|
|
|
47
47
|
import sys
|
|
48
48
|
|
|
49
49
|
version = metadata.version("doubled-graph")
|
|
50
|
-
if version != "3.2.
|
|
51
|
-
sys.exit(f"doubled-graph {version} is installed; 3.2.
|
|
50
|
+
if version != "3.2.1":
|
|
51
|
+
sys.exit(f"doubled-graph {version} is installed; 3.2.1 is required")
|
|
52
52
|
print(f"doubled-graph {version} installed")
|
|
53
53
|
PY
|
|
54
54
|
# The release must actually ship the disk-only drift gate. This never
|
|
@@ -62,7 +62,7 @@ doubled-graph-drift:
|
|
|
62
62
|
fi
|
|
63
63
|
script:
|
|
64
64
|
- doubled-graph analyze --rebuild --strict
|
|
65
|
-
# 3.2.
|
|
65
|
+
# 3.2.1: the check is disk-based; no base revision selects files and no
|
|
66
66
|
# daemon/database is involved.
|
|
67
67
|
- doubled-graph check-drift --fail-on-drift
|
|
68
68
|
- doubled-graph lint
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
|
|
21
21
|
## Порядок действий (детерминированный)
|
|
22
22
|
|
|
23
|
-
1. Поставить именно 3.2. **`pipx upgrade doubled-graph` даст 3.0.7**, пока 3.2.
|
|
23
|
+
1. Поставить именно 3.2. **`pipx upgrade doubled-graph` даст 3.0.7**, пока 3.2.1 не опубликована в PyPI. Собери wheel из этого репозитория и поставь его с явным интерпретатором:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
python3.14 -m pip install build
|
|
27
27
|
python3.14 -m build --wheel
|
|
28
|
-
pipx install --python python3.14 --force dist/doubled_graph-3.2.
|
|
29
|
-
doubled-graph --version # должно быть 3.2.
|
|
28
|
+
pipx install --python python3.14 --force dist/doubled_graph-3.2.1-py3-none-any.whl
|
|
29
|
+
doubled-graph --version # должно быть 3.2.1
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
После публикации на PyPI: `pipx install --python python3.14 doubled-graph==3.2.
|
|
32
|
+
После публикации на PyPI: `pipx install --python python3.14 doubled-graph==3.2.1`. Если pipx запущен на Python 3.15, без `--python 3.14` его venv тоже будет 3.15, и pip откажется ставить пакет (`requires-python <3.15`).
|
|
33
33
|
|
|
34
34
|
2. Проверить состояние (только чтение):
|
|
35
35
|
|
|
@@ -138,12 +138,12 @@ verification, legacy не потерян), и закрыть то, что миг
|
|
|
138
138
|
daemon.running (после setup должен быть true; false — это BLOCKED, а не «ожидаемо»).
|
|
139
139
|
|
|
140
140
|
Шаг 1. Поставь пакет 3.2 (выполняет человек, не ИИ):
|
|
141
|
-
pipx upgrade doubled-graph # ВНИМАНИЕ: пока даст 3.0.7, а не 3.2.
|
|
142
|
-
# правильный путь до публикации 3.2.
|
|
141
|
+
pipx upgrade doubled-graph # ВНИМАНИЕ: пока даст 3.0.7, а не 3.2.1
|
|
142
|
+
# правильный путь до публикации 3.2.1 в PyPI:
|
|
143
143
|
python3.14 -m pip install build && python3.14 -m build --wheel
|
|
144
|
-
pipx install --python python3.14 --force dist/doubled_graph-3.2.
|
|
145
|
-
doubled-graph --version # 3.2.
|
|
146
|
-
# после публикации: pipx install --python python3.14 doubled-graph==3.2.
|
|
144
|
+
pipx install --python python3.14 --force dist/doubled_graph-3.2.1-py3-none-any.whl
|
|
145
|
+
doubled-graph --version # 3.2.1
|
|
146
|
+
# после публикации: pipx install --python python3.14 doubled-graph==3.2.1
|
|
147
147
|
|
|
148
148
|
Шаг 2. Обнови движок, артефакты и демон одной командой (в обычном шелле, не в песочнице):
|
|
149
149
|
doubled-graph setup --repo .
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "doubled-graph"
|
|
7
|
-
version = "3.2.
|
|
7
|
+
version = "3.2.1"
|
|
8
8
|
description = "MCP facade over CodeGraphContext + GRACE 4 (.grace artifacts): impact, context, drift-detect, migration for LLM-driven codebases."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -39,7 +39,7 @@ PARSE_SCHEMA = 1
|
|
|
39
39
|
INDEX_SCHEMA = 3
|
|
40
40
|
|
|
41
41
|
#: Version of the file_data normalizer (paths, dedupe rules, symbol kinds).
|
|
42
|
-
NORMALIZER_VERSION = "norm-3.1
|
|
42
|
+
NORMALIZER_VERSION = "norm-3.2.1"
|
|
43
43
|
|
|
44
44
|
#: parser_version override for tests and for reproducible fixtures.
|
|
45
45
|
PARSER_VERSION_ENV = "DOUBLED_GRAPH_PARSER_VERSION"
|
|
@@ -214,6 +214,7 @@ ERROR_CODES: dict[str, ErrorInfo] = {
|
|
|
214
214
|
_info("ANALYZE_LEGACY_ARGUMENTS", "analyze MCP/CLI", "a deprecated mode/paths/since_ref/force argument was mapped or ignored", "none for one release; drop the legacy argument"),
|
|
215
215
|
_info("TARGET_NOT_FOUND", "impact", "the target is absent from the computed graph: impact is unknown, not none", "analyze, then repeat; risk stays HIGH"),
|
|
216
216
|
_info("TARGET_AMBIGUOUS", "impact", "the target matched several symbols; direct/transitive were not traversed", "qualify the name (module.function) and repeat"),
|
|
217
|
+
_info("TARGET_KIND_WITHOUT_CALLS", "impact/context", "CGC builds CALLS edges only to Function/Class/Interface/Object; this kind has no callers by construction", "none; impact/callers of this kind are unknown, not empty"),
|
|
217
218
|
_info("NOT_FOUND", "context", "the symbol is absent from the computed graph", "analyze, then repeat"),
|
|
218
219
|
_info("AMBIGUOUS", "context", "the symbol matched several candidates; callers/callees were skipped", "qualify the name (module.function) and repeat"),
|
|
219
220
|
_info("SCOPE_IGNORED", "impact", "the requested scope does not exist here and full scope was used", "none; scope=full was already the answer"),
|
|
@@ -28,6 +28,13 @@ from doubled_graph.graphs.grace4 import (
|
|
|
28
28
|
module_map_entries,
|
|
29
29
|
module_map_required,
|
|
30
30
|
)
|
|
31
|
+
from doubled_graph.symbols import (
|
|
32
|
+
DECLARATION_KINDS,
|
|
33
|
+
declared_name_matches,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
#: `namespace A.B;` / `namespace A { namespace B {` / C++ `namespace A::B {`.
|
|
37
|
+
_NAMESPACE_DECL = re.compile(r"\bnamespace\s+([\w.:]+)")
|
|
31
38
|
|
|
32
39
|
#: Comment prefixes the engine accepts before a markup key.
|
|
33
40
|
_COMMENT = r"(?:(?://|#|--|;+|\*)\s*)?"
|
|
@@ -48,6 +55,12 @@ class ComputedSymbol:
|
|
|
48
55
|
kind: str = "function"
|
|
49
56
|
args: tuple[str, ...] = ()
|
|
50
57
|
arg_types: tuple[str, ...] = ()
|
|
58
|
+
#: Declared namespace/package of the file (C#/Go/Java ``package_name``,
|
|
59
|
+
#: Kotlin ``package``). Used to resolve dotted ``MODULE_MAP`` entries.
|
|
60
|
+
namespace: str = ""
|
|
61
|
+
#: Enclosing type for members (CGC's ``class_context``): lets
|
|
62
|
+
#: ``Holder.Run`` resolve to the method ``Run``.
|
|
63
|
+
scope: str = ""
|
|
51
64
|
|
|
52
65
|
@property
|
|
53
66
|
def params(self) -> list[tuple[str, str]]:
|
|
@@ -187,6 +200,19 @@ def _read_source(repo_path: Path, file_rel: str) -> str:
|
|
|
187
200
|
return ""
|
|
188
201
|
|
|
189
202
|
|
|
203
|
+
def _declared_namespaces(text: str) -> frozenset[str]:
|
|
204
|
+
"""Namespace names a source file declares (segments, not full paths).
|
|
205
|
+
|
|
206
|
+
Nested blocks (`namespace A { namespace B {`) are recorded by CGC as just
|
|
207
|
+
the first declaration, so `A.B.Type` needs the set to prove that `B` is a
|
|
208
|
+
real namespace of this file rather than a typo.
|
|
209
|
+
"""
|
|
210
|
+
parts: set[str] = set()
|
|
211
|
+
for match in _NAMESPACE_DECL.finditer(text):
|
|
212
|
+
parts.update(segment for segment in re.split(r"::|\.", match.group(1)) if segment)
|
|
213
|
+
return frozenset(parts)
|
|
214
|
+
|
|
215
|
+
|
|
190
216
|
def markup_missing(repo_path: Path, file_rel: str) -> list[str]:
|
|
191
217
|
"""Missing structural markers for one source file.
|
|
192
218
|
|
|
@@ -243,7 +269,7 @@ def _code_without_module(
|
|
|
243
269
|
functions = [
|
|
244
270
|
symbol.name
|
|
245
271
|
for symbol in snapshot.symbols_for([file_rel])
|
|
246
|
-
if symbol.kind in
|
|
272
|
+
if symbol.kind in DECLARATION_KINDS
|
|
247
273
|
]
|
|
248
274
|
out.append(
|
|
249
275
|
{
|
|
@@ -657,10 +683,33 @@ def _contract_mismatches(
|
|
|
657
683
|
)
|
|
658
684
|
continue
|
|
659
685
|
|
|
686
|
+
# A qualified `<Export>` resolves by the same rule as MODULE_MAP: the
|
|
687
|
+
# namespace proof must come from the file that **declares the symbol**.
|
|
688
|
+
# An export is module-level, so it may name a declaration from any
|
|
689
|
+
# file of the module — but it must not borrow another file's namespace:
|
|
690
|
+
# in C# `A.B` and `A` are different namespaces, and unioning the proof
|
|
691
|
+
# would resolve `A.B.Inner` against an `Inner` declared under plain
|
|
692
|
+
# `namespace A;` elsewhere in the module.
|
|
693
|
+
file_texts: dict[str, str] = {}
|
|
694
|
+
namespaces_by_file: dict[str, frozenset[str]] = {}
|
|
695
|
+
if repo_path is not None:
|
|
696
|
+
for file_rel in files:
|
|
697
|
+
text = _read_source(repo_path, file_rel)
|
|
698
|
+
file_texts[file_rel] = text
|
|
699
|
+
namespaces_by_file[file_rel] = _declared_namespaces(text)
|
|
660
700
|
declared_exports = set(module.exports)
|
|
661
|
-
|
|
701
|
+
missing_exports = {
|
|
702
|
+
name
|
|
703
|
+
for name in declared_exports
|
|
704
|
+
if not any(
|
|
705
|
+
declared_name_matches(
|
|
706
|
+
name, symbol, namespaces_by_file.get(symbol.file, frozenset())
|
|
707
|
+
)
|
|
708
|
+
for symbol in symbols
|
|
709
|
+
)
|
|
710
|
+
}
|
|
662
711
|
if not ambiguous_owner:
|
|
663
|
-
for name in sorted(
|
|
712
|
+
for name in sorted(missing_exports):
|
|
664
713
|
out.append(
|
|
665
714
|
{
|
|
666
715
|
"module_id": module_id,
|
|
@@ -680,12 +729,22 @@ def _contract_mismatches(
|
|
|
680
729
|
for file_rel in files:
|
|
681
730
|
if file_rel in empty_files:
|
|
682
731
|
continue
|
|
683
|
-
text =
|
|
732
|
+
text = file_texts.get(file_rel, "")
|
|
684
733
|
if not text:
|
|
685
734
|
continue
|
|
686
|
-
file_symbols =
|
|
687
|
-
|
|
688
|
-
|
|
735
|
+
file_symbols = snapshot.symbols_for([file_rel])
|
|
736
|
+
namespace_names = namespaces_by_file.get(file_rel, frozenset())
|
|
737
|
+
# Names, not a dict: a C# constructor and its class share a name,
|
|
738
|
+
# and a name->symbol dict silently kept only one of them.
|
|
739
|
+
unresolved = [
|
|
740
|
+
name
|
|
741
|
+
for name in module_map_entries(text)
|
|
742
|
+
if not any(
|
|
743
|
+
declared_name_matches(name, symbol, namespace_names)
|
|
744
|
+
for symbol in file_symbols
|
|
745
|
+
)
|
|
746
|
+
]
|
|
747
|
+
for name in sorted(unresolved):
|
|
689
748
|
if name in missing_exports:
|
|
690
749
|
continue
|
|
691
750
|
out.append(
|
|
@@ -700,7 +759,16 @@ def _contract_mismatches(
|
|
|
700
759
|
}
|
|
701
760
|
)
|
|
702
761
|
for contract in _function_contracts(text):
|
|
703
|
-
|
|
762
|
+
# `INPUTS` describes a callable, so a same-named record or
|
|
763
|
+
# property must not shadow the function (and vice versa).
|
|
764
|
+
symbol = next(
|
|
765
|
+
(
|
|
766
|
+
candidate
|
|
767
|
+
for candidate in file_symbols
|
|
768
|
+
if candidate.name == contract.name and candidate.kind == "function"
|
|
769
|
+
),
|
|
770
|
+
None,
|
|
771
|
+
)
|
|
704
772
|
if symbol is None:
|
|
705
773
|
continue
|
|
706
774
|
mismatch = _function_contract_mismatch(
|
|
@@ -14,7 +14,7 @@ import time
|
|
|
14
14
|
from pathlib import Path
|
|
15
15
|
|
|
16
16
|
POST_COMMIT_SCRIPT = """#!/usr/bin/env bash
|
|
17
|
-
# Installed by doubled-graph init-hooks (3.2.
|
|
17
|
+
# Installed by doubled-graph init-hooks (3.2.1)
|
|
18
18
|
# Purpose: refresh computed graph after commit. See HOOKS.md §1.
|
|
19
19
|
# To disable: chmod -x .git/hooks/post-commit
|
|
20
20
|
|
|
@@ -21,7 +21,11 @@ from doubled_graph.graphs import grace4
|
|
|
21
21
|
from doubled_graph.index.discovery import lang_for
|
|
22
22
|
from doubled_graph.index.parse_cache import ParseCache
|
|
23
23
|
|
|
24
|
-
#:
|
|
24
|
+
#: Collections normalized to a list so the cached shape is stable. This is not
|
|
25
|
+
#: the set of *symbol* collections: the authoritative list of declaration keys
|
|
26
|
+
#: is ``doubled_graph.symbols.SYMBOL_KINDS`` (interfaces, enums, records,
|
|
27
|
+
#: structs, traits, ...). Consumers iterate that table, so a parser that omits
|
|
28
|
+
#: an optional key here is not a data loss.
|
|
25
29
|
_FILE_DATA_LIST_KEYS = ("functions", "classes", "types", "variables", "function_calls")
|
|
26
30
|
|
|
27
31
|
|
|
@@ -23,15 +23,7 @@ from doubled_graph.index.discovery import has_source_files, is_parseable
|
|
|
23
23
|
from doubled_graph.index.linker import link
|
|
24
24
|
from doubled_graph.index.manifest import ManifestScan, scan_manifest
|
|
25
25
|
from doubled_graph.index.parser import ParseAdapter
|
|
26
|
-
|
|
27
|
-
#: Symbol kind per file_data collection. Mirrors the DB labels the persistent
|
|
28
|
-
#: graph uses, so the two snapshots compare key by key (oracle 12.1).
|
|
29
|
-
_KIND_BY_KEY = (
|
|
30
|
-
("functions", "function"),
|
|
31
|
-
("classes", "class"),
|
|
32
|
-
("types", "type"),
|
|
33
|
-
("variables", "variable"),
|
|
34
|
-
)
|
|
26
|
+
from doubled_graph.symbols import iter_symbols, namespace_of
|
|
35
27
|
|
|
36
28
|
|
|
37
29
|
@dataclass
|
|
@@ -227,31 +219,36 @@ def _symbols(file_data: dict[str, Any], relpath: str) -> list[ComputedSymbol]:
|
|
|
227
219
|
"""
|
|
228
220
|
seen: set[tuple[str, int]] = set()
|
|
229
221
|
out: list[ComputedSymbol] = []
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
)
|
|
255
|
-
|
|
222
|
+
namespace = namespace_of(file_data)
|
|
223
|
+
for kind, record in iter_symbols(file_data):
|
|
224
|
+
name = str(record.get("name") or "").strip()
|
|
225
|
+
if not name or name == "<module>":
|
|
226
|
+
continue
|
|
227
|
+
line = int(record.get("line_number") or 0)
|
|
228
|
+
if (name, line) in seen:
|
|
229
|
+
continue
|
|
230
|
+
seen.add((name, line))
|
|
231
|
+
args = record.get("args")
|
|
232
|
+
arg_types = record.get("arg_types")
|
|
233
|
+
# Some CGC parsers put tuples in `class_context` (calls do); a
|
|
234
|
+
# non-string must not become "('A', 'B')" and silently break the
|
|
235
|
+
# dotted match.
|
|
236
|
+
raw_scope = record.get("class_context")
|
|
237
|
+
scope = raw_scope.strip() if isinstance(raw_scope, str) else ""
|
|
238
|
+
out.append(
|
|
239
|
+
ComputedSymbol(
|
|
240
|
+
name=name,
|
|
241
|
+
file=relpath,
|
|
242
|
+
line=line,
|
|
243
|
+
kind=kind,
|
|
244
|
+
args=tuple(str(item) for item in args) if isinstance(args, list) else (),
|
|
245
|
+
arg_types=(
|
|
246
|
+
tuple(str(item) for item in arg_types)
|
|
247
|
+
if isinstance(arg_types, list)
|
|
248
|
+
else ()
|
|
249
|
+
),
|
|
250
|
+
namespace=namespace,
|
|
251
|
+
scope=scope,
|
|
256
252
|
)
|
|
253
|
+
)
|
|
257
254
|
return out
|