doubled-graph 3.0.3__tar.gz → 3.0.5__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.0.3 → doubled_graph-3.0.5}/PKG-INFO +20 -17
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/README.md +19 -16
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/pyproject.toml +1 -1
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/cli.py +49 -3
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/health.py +33 -3
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/integrations/cgc.py +231 -53
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/migrations/grace3_to_grace4.py +0 -53
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/setup.py +234 -161
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/tools/analyze.py +38 -3
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/tools/detect_changes.py +5 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_bom_support.py +15 -3
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_cgc_backend.py +254 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_cgc_contract.py +52 -1
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_cli_entrypoint.py +3 -3
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_cli_surface.py +67 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_crossref_drift.py +3 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_e2e_acceptance.py +44 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_health.py +80 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_migration_coverage.py +13 -9
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_migration_grace3_to_grace4.py +35 -6
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_setup_coverage.py +224 -105
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_smoke.py +163 -8
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/.gitignore +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/ARTICLE.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/INDEX.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/LICENSE +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/for-ai-existing-project/README.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/for-ai-maintenance/README.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/for-ai-new-project/README.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/for-humans/FAQ.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/for-humans/deep-dive.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/for-humans/getting-started.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/README.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/approval-checkpoints.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/artifacts.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/auto-scaling.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/ci-templates/github-actions.yml +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/ci-templates/gitlab-ci.yml +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/drift-and-priority.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/language-adapters/_template.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/language-adapters/csharp.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/language-adapters/go.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/language-adapters/java.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/language-adapters/python.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/language-adapters/rust.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/language-adapters/swift.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/language-adapters/typescript.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/principles.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/roles.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/runtime-adapters/_template.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/runtime-adapters/claude-code.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/runtime-adapters/codex.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/runtime-adapters/continue.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/runtime-adapters/cursor.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/runtime-adapters/local-llm.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/runtime-adapters/windsurf.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/tools.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/methodology/workflow.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/maintenance/on-after-edit.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/maintenance/on-before-edit.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/maintenance/on-drift-detected.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/maintenance/on-user-manual-edit.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/migrate-existing-project/00-entry-prompt.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/migrate-existing-project/01-discover.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/migrate-existing-project/02-reconstruct-intent.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/migrate-existing-project/03-draft-plan.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/migrate-existing-project/04-markup-codebase.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/migrate-existing-project/05-verification-and-logs.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/migrate-existing-project/06-validation-gates.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/new-project/00-entry-prompt.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/new-project/01-intent-interview.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/new-project/02-requirements.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/new-project/03-technology.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/new-project/04-development-plan.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/new-project/05-verification-plan.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/new-project/06-generate.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/new-project/07-post-init-sync.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/upgrade-methodology/00-entry-prompt.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/prompts/upgrade-methodology/01-content-gaps.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/__init__.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/__main__.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/config.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/daemon/__init__.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/daemon/main.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/daemon/server.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/data/skills/doubled-graph-after-edit/SKILL.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/data/skills/doubled-graph-before-edit/SKILL.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/data/skills/doubled-graph-drift/SKILL.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/data/skills/doubled-graph-guide/SKILL.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/data/skills/doubled-graph-manual-edit/SKILL.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/data/skills/doubled-graph-refactor/SKILL.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/data/skills/doubled-graph-verify/SKILL.md +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/graphs/__init__.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/graphs/anchors.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/graphs/crossref.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/graphs/declared.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/graphs/grace4.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/hooks_installer.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/integrations/__init__.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/integrations/grace_cli.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/integrations/graphd.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/integrations/service.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/migrations/__init__.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/policy/__init__.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/policy/agents_md.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/policy/phase.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/server.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/storage/__init__.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/storage/paths.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/tools/__init__.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/tools/_meta.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/tools/context.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/tools/impact.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/tools/post_tool.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/tools/provenance.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/src/doubled_graph/uninstall.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/__init__.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/conftest.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_anchors.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_cgc_lifecycle.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_cli_daemon.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_daemon.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_daemon_main.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_declared_coverage.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_grace4_artifacts.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_grace_cli_coverage.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_grace_cli_engine.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_graphd_client.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_hook_public_coverage.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_mcp_transport.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_mcp_validation.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_mutation_gate_script.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_mutation_kill_analyze.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_mutation_kill_cgc_edges.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_mutation_kill_cgc_fallback.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_mutation_kill_cgc_misc.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_mutation_kill_context.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_mutation_kill_crossref.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_mutation_kill_hooks.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_mutation_kill_impact.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_mutation_probes.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_packaging.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_platform_branches.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_provenance.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_release_script.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_repo_hygiene.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_service.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_setup_artifacts.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_setup_failure_semantics.py +0 -0
- {doubled_graph-3.0.3 → doubled_graph-3.0.5}/tests/test_uninstall.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: doubled-graph
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.5
|
|
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
|
|
@@ -88,30 +88,30 @@ pipx ensurepath
|
|
|
88
88
|
|
|
89
89
|
### 2. Установить doubled-graph
|
|
90
90
|
|
|
91
|
-
На PyPI сейчас опубликована **3.0.1**. Версии **3.0.2 и 3.0.
|
|
92
|
-
опубликованы**, поэтому `pipx install doubled-graph` (без версии) на
|
|
91
|
+
На PyPI сейчас опубликована **3.0.1**. Версии **3.0.2, 3.0.3, 3.0.4 и 3.0.5 в PyPI
|
|
92
|
+
ещё не опубликованы**, поэтому `pipx install doubled-graph` (без версии) на
|
|
93
93
|
поддерживаемом Python поставит 3.0.1, а `doubled-graph --version` покажет не
|
|
94
|
-
3.0.
|
|
95
|
-
3.0.
|
|
94
|
+
3.0.5. Чтобы поставить именно
|
|
95
|
+
3.0.5 из этого репозитория, соберите wheel поддерживаемым интерпретатором
|
|
96
96
|
(3.11–3.14) и установите его **с явным `--python`**: если сам pipx запущен
|
|
97
97
|
на 3.15, его venv тоже будет 3.15, и pip откажется ставить пакет.
|
|
98
98
|
|
|
99
99
|
```bash
|
|
100
100
|
python3.14 -m pip install build
|
|
101
101
|
python3.14 -m build --wheel
|
|
102
|
-
pipx install --python python3.14 --force dist/doubled_graph-3.0.
|
|
102
|
+
pipx install --python python3.14 --force dist/doubled_graph-3.0.5-py3-none-any.whl
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
Подойдёт любой минор из 3.11–3.14; `--python python3.14` — пример. После
|
|
106
106
|
публикации релиза команда станет обычной и точной:
|
|
107
107
|
|
|
108
108
|
```bash
|
|
109
|
-
pipx install --python python3.14 doubled-graph==3.0.
|
|
109
|
+
pipx install --python python3.14 doubled-graph==3.0.5 # до релиза — wheel выше
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
> Уже работаете в своём venv или conda-окружении? `python3.14 -m pip install
|
|
113
|
-
> doubled-graph` из PyPI тоже поставит 3.0.1; для 3.0.
|
|
114
|
-
> `python3.14 -m pip install dist/doubled_graph-3.0.
|
|
113
|
+
> doubled-graph` из PyPI тоже поставит 3.0.1; для 3.0.5 используйте wheel:
|
|
114
|
+
> `python3.14 -m pip install dist/doubled_graph-3.0.5-py3-none-any.whl`.
|
|
115
115
|
|
|
116
116
|
---
|
|
117
117
|
|
|
@@ -166,7 +166,7 @@ doubled-graph setup
|
|
|
166
166
|
> `pipx install --python python3.12|3.13|3.14 --force doubled-graph==<установленная
|
|
167
167
|
> версия>` (`setup.py::_auto_reinstall_on_working_python`). Версия
|
|
168
168
|
> **запинена**: команда без версии поставила бы опубликованную 3.0.1 и молча
|
|
169
|
-
> откатила 3.0.
|
|
169
|
+
> откатила текущую версию (3.0.5). Это единственная сетевая переустановка пакета; при `--dry-run`
|
|
170
170
|
> она только репортится (`status: "dry_run_reinstall"`), а при `pip install` в
|
|
171
171
|
> venv/CI не выполняется вовсе (`_looks_like_pipx_install()`). Если сети нет
|
|
172
172
|
> или такой версии ещё нет на PyPI, шаг честно возвращает `reinstall_failed`
|
|
@@ -223,7 +223,7 @@ head -1 "$(which doubled-graph)" # вывести shebang — это и ест
|
|
|
223
223
|
### 4. Проверить, что всё встало
|
|
224
224
|
|
|
225
225
|
```bash
|
|
226
|
-
doubled-graph --version # 3.0.
|
|
226
|
+
doubled-graph --version # 3.0.5 (после wheel-установки выше; 3.0.1 при pipx install из PyPI)
|
|
227
227
|
doubled-graph status --repo . # artifacts.project_kind = grace4, grace_engine.upgrade_required = false
|
|
228
228
|
doubled-graph daemon status # installed = true, running = true
|
|
229
229
|
doubled-graph health --repo . # cgc.ok = true (демон ответил)
|
|
@@ -235,7 +235,10 @@ doubled-graph migrate check --repo . # map_pending / placeholders — что
|
|
|
235
235
|
Если `upgrade_required` = `true` — движок старее 4.x: `npm install -g @osovv/grace-cli@4.2.1`, затем `setup` повторно.
|
|
236
236
|
Если `daemon.running` = `false`, а `health.cgc.ok` = `false` — демон не запущен: выполните `doubled-graph setup` в обычном шелле (из песочницы `launchctl`/`systemctl` могут быть запрещены), затем `daemon status`. Без демона графовые команды возвращают `CGC_BACKEND_FAIL` и rc=1 — это не «пустой граф».
|
|
237
237
|
Если `daemon status` показывает `installed: false`, `plist_present: true`, `loaded: false` — plist/unit записан, но job не загружен (launchd отключил сервис, `bootstrap` отклонён, остался stale-lock/сокет). С 3.0.3 это лечится само: `setup` и `daemon restart` останавливают старый процесс, удаляют discovery и stale-lock только при мёртвом PID-владельце, при необходимости выполняют `launchctl enable`/`systemctl unmask`, переписывают unit и делают `bootstrap`, а при отказе показывают реальный stderr супервизора и подсказку `log show --last 1m`. Ручная чистка `~/.doubled-graph` не требуется.
|
|
238
|
-
Если `health.cgc.diagnostic` = `FalkorDB Lite previously failed to start…` — в 3.0.0 это была памятка о прошлой неудаче, а не причина. В 3.0.1 кэш сбрасывается перед каждой попыткой, а мёртвый `falkordb.sock` и осиротевший `graph.settings` удаляются автоматически: первый `analyze`/`setup` чинит репозиторий сам, `health.cgc.repaired` перечисляет удалённое (в 3.0.3 этот список приходит из демона, а не всегда пуст). В 3.0.3 также `setup` всегда перезапускает демон, поэтому обновление не оставляет старый процесс со старым кэшем.
|
|
238
|
+
Если `health.cgc.diagnostic` = `FalkorDB Lite previously failed to start…` — в 3.0.0 это была памятка о прошлой неудаче, а не причина. В 3.0.1 кэш сбрасывается перед каждой попыткой, а мёртвый `falkordb.sock` и осиротевший `graph.settings` удаляются автоматически: первый `analyze`/`setup` чинит репозиторий сам, `health.cgc.repaired` перечисляет удалённое (в 3.0.3 этот список приходит из демона, а не всегда пуст). В 3.0.3 также `setup` всегда перезапускает демон, поэтому обновление не оставляет старый процесс со старым кэшем.
|
|
239
|
+
С 3.0.5 `scan.exclude` — общий фильтр: full/incremental/`--paths` в `analyze` видят те же исключения, что `detect-changes`, и scratch-каталоги (`.dg-tmp/**`, `node_modules/**`) не попадают в граф. `setup` печатает по шагу только `ok`/`failed (причина)`/`skipped`, а счётчики и списки `per_ide` оставляет в JSON (в `--dry-run` — прогноз `would write/overwrite/append`). `detect-changes` получил `files_examined_count` (список — с `--verbose`), `health` — `modules.without_verification_breakdown: {missing, placeholder}`, а `migrate` в консоли печатает только `created`/`markup_pending` (полный отчёт — `migrate ... --json`).
|
|
240
|
+
|
|
241
|
+
Если после этого движок всё равно падает с `Connection refused`, а `redis-server` в логах пишет `Can't handle RDB format version 13`, виновата сама база: файл `<db_path>` записан новее, чем умеет читать текущий `redis-server`. С 3.0.4 `_ensure` после двух неудач **переименовывает** его в `<db_path>.incompatible-<UTC timestamp>` (никогда не удаляет), один раз повторяет запуск на свежей базе, а `analyze` эмитит `CGC_ENGINE_DB_QUARANTINED`. `health.cgc.quarantined` перечисляет такие файлы, `health.cgc.repaired` — и их, и удалённые stale-файлы, а `setup` показывает `quarantined` в отчёте шага analyze (и `quarantine_candidate` в `--dry-run`). Если и третий запуск не удался, `CGCUnavailable` перечисляет все попытки и путь карантина; дальше — `daemon logs` и `cgc.backend`.
|
|
239
242
|
Если `lint` вернул `markup.module-map-missing` — это содержательная работа, промпт `prompts/upgrade-methodology/01-content-gaps.md`.
|
|
240
243
|
|
|
241
244
|
Полная проверка (ruff + unit + real-CGC E2E + diff/version): `bash scripts/verify.sh`; критерии готовности — [docs/VERIFICATION.md](docs/VERIFICATION.md).
|
|
@@ -451,10 +454,10 @@ Bun/Node-пакет 4.x: `bun remove -g @osovv/grace-cli` или
|
|
|
451
454
|
|
|
452
455
|
Пошагово с 2.x (или 1.9.x, если проект ещё на `docs/*.xml`):
|
|
453
456
|
|
|
454
|
-
1. **Поставьте именно 3.0.
|
|
455
|
-
**3.0.1**, а не 3.0.
|
|
457
|
+
1. **Поставьте именно 3.0.5.** `pipx upgrade doubled-graph` сейчас даёт
|
|
458
|
+
**3.0.1**, а не 3.0.5 (3.0.2, 3.0.3, 3.0.4 и 3.0.5 ещё не в PyPI). Точный путь — wheel с явным
|
|
456
459
|
`--python`: см. [§Установка](#2-установить-doubled-graph). Убедитесь:
|
|
457
|
-
`doubled-graph --version` → `3.0.
|
|
460
|
+
`doubled-graph --version` → `3.0.5`.
|
|
458
461
|
2. **`cd your-project && doubled-graph setup`** — в **обычном** шелле, не из
|
|
459
462
|
песочницы. `setup` **всегда** останавливает и заново запускает сервис
|
|
460
463
|
`graphd` (stop → install/update unit → start), регистрирует проект,
|
|
@@ -483,9 +486,9 @@ Bun/Node-пакет 4.x: `bun remove -g @osovv/grace-cli` или
|
|
|
483
486
|
обновлением на 3.0:
|
|
484
487
|
|
|
485
488
|
```bash
|
|
486
|
-
# 1. поставить 3.0.
|
|
489
|
+
# 1. поставить 3.0.5 (pipx upgrade даст только 3.0.1 — см. §Установка)
|
|
487
490
|
python3.14 -m build --wheel
|
|
488
|
-
pipx install --python python3.14 --force dist/doubled_graph-3.0.
|
|
491
|
+
pipx install --python python3.14 --force dist/doubled_graph-3.0.5-py3-none-any.whl
|
|
489
492
|
cd your-project
|
|
490
493
|
doubled-graph setup # 2. движок, .grace и демон graphd — одной командой
|
|
491
494
|
```
|
|
@@ -47,30 +47,30 @@ pipx ensurepath
|
|
|
47
47
|
|
|
48
48
|
### 2. Установить doubled-graph
|
|
49
49
|
|
|
50
|
-
На PyPI сейчас опубликована **3.0.1**. Версии **3.0.2 и 3.0.
|
|
51
|
-
опубликованы**, поэтому `pipx install doubled-graph` (без версии) на
|
|
50
|
+
На PyPI сейчас опубликована **3.0.1**. Версии **3.0.2, 3.0.3, 3.0.4 и 3.0.5 в PyPI
|
|
51
|
+
ещё не опубликованы**, поэтому `pipx install doubled-graph` (без версии) на
|
|
52
52
|
поддерживаемом Python поставит 3.0.1, а `doubled-graph --version` покажет не
|
|
53
|
-
3.0.
|
|
54
|
-
3.0.
|
|
53
|
+
3.0.5. Чтобы поставить именно
|
|
54
|
+
3.0.5 из этого репозитория, соберите wheel поддерживаемым интерпретатором
|
|
55
55
|
(3.11–3.14) и установите его **с явным `--python`**: если сам pipx запущен
|
|
56
56
|
на 3.15, его venv тоже будет 3.15, и pip откажется ставить пакет.
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
59
|
python3.14 -m pip install build
|
|
60
60
|
python3.14 -m build --wheel
|
|
61
|
-
pipx install --python python3.14 --force dist/doubled_graph-3.0.
|
|
61
|
+
pipx install --python python3.14 --force dist/doubled_graph-3.0.5-py3-none-any.whl
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
Подойдёт любой минор из 3.11–3.14; `--python python3.14` — пример. После
|
|
65
65
|
публикации релиза команда станет обычной и точной:
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
|
-
pipx install --python python3.14 doubled-graph==3.0.
|
|
68
|
+
pipx install --python python3.14 doubled-graph==3.0.5 # до релиза — wheel выше
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
> Уже работаете в своём venv или conda-окружении? `python3.14 -m pip install
|
|
72
|
-
> doubled-graph` из PyPI тоже поставит 3.0.1; для 3.0.
|
|
73
|
-
> `python3.14 -m pip install dist/doubled_graph-3.0.
|
|
72
|
+
> doubled-graph` из PyPI тоже поставит 3.0.1; для 3.0.5 используйте wheel:
|
|
73
|
+
> `python3.14 -m pip install dist/doubled_graph-3.0.5-py3-none-any.whl`.
|
|
74
74
|
|
|
75
75
|
---
|
|
76
76
|
|
|
@@ -125,7 +125,7 @@ doubled-graph setup
|
|
|
125
125
|
> `pipx install --python python3.12|3.13|3.14 --force doubled-graph==<установленная
|
|
126
126
|
> версия>` (`setup.py::_auto_reinstall_on_working_python`). Версия
|
|
127
127
|
> **запинена**: команда без версии поставила бы опубликованную 3.0.1 и молча
|
|
128
|
-
> откатила 3.0.
|
|
128
|
+
> откатила текущую версию (3.0.5). Это единственная сетевая переустановка пакета; при `--dry-run`
|
|
129
129
|
> она только репортится (`status: "dry_run_reinstall"`), а при `pip install` в
|
|
130
130
|
> venv/CI не выполняется вовсе (`_looks_like_pipx_install()`). Если сети нет
|
|
131
131
|
> или такой версии ещё нет на PyPI, шаг честно возвращает `reinstall_failed`
|
|
@@ -182,7 +182,7 @@ head -1 "$(which doubled-graph)" # вывести shebang — это и ест
|
|
|
182
182
|
### 4. Проверить, что всё встало
|
|
183
183
|
|
|
184
184
|
```bash
|
|
185
|
-
doubled-graph --version # 3.0.
|
|
185
|
+
doubled-graph --version # 3.0.5 (после wheel-установки выше; 3.0.1 при pipx install из PyPI)
|
|
186
186
|
doubled-graph status --repo . # artifacts.project_kind = grace4, grace_engine.upgrade_required = false
|
|
187
187
|
doubled-graph daemon status # installed = true, running = true
|
|
188
188
|
doubled-graph health --repo . # cgc.ok = true (демон ответил)
|
|
@@ -194,7 +194,10 @@ doubled-graph migrate check --repo . # map_pending / placeholders — что
|
|
|
194
194
|
Если `upgrade_required` = `true` — движок старее 4.x: `npm install -g @osovv/grace-cli@4.2.1`, затем `setup` повторно.
|
|
195
195
|
Если `daemon.running` = `false`, а `health.cgc.ok` = `false` — демон не запущен: выполните `doubled-graph setup` в обычном шелле (из песочницы `launchctl`/`systemctl` могут быть запрещены), затем `daemon status`. Без демона графовые команды возвращают `CGC_BACKEND_FAIL` и rc=1 — это не «пустой граф».
|
|
196
196
|
Если `daemon status` показывает `installed: false`, `plist_present: true`, `loaded: false` — plist/unit записан, но job не загружен (launchd отключил сервис, `bootstrap` отклонён, остался stale-lock/сокет). С 3.0.3 это лечится само: `setup` и `daemon restart` останавливают старый процесс, удаляют discovery и stale-lock только при мёртвом PID-владельце, при необходимости выполняют `launchctl enable`/`systemctl unmask`, переписывают unit и делают `bootstrap`, а при отказе показывают реальный stderr супервизора и подсказку `log show --last 1m`. Ручная чистка `~/.doubled-graph` не требуется.
|
|
197
|
-
Если `health.cgc.diagnostic` = `FalkorDB Lite previously failed to start…` — в 3.0.0 это была памятка о прошлой неудаче, а не причина. В 3.0.1 кэш сбрасывается перед каждой попыткой, а мёртвый `falkordb.sock` и осиротевший `graph.settings` удаляются автоматически: первый `analyze`/`setup` чинит репозиторий сам, `health.cgc.repaired` перечисляет удалённое (в 3.0.3 этот список приходит из демона, а не всегда пуст). В 3.0.3 также `setup` всегда перезапускает демон, поэтому обновление не оставляет старый процесс со старым кэшем.
|
|
197
|
+
Если `health.cgc.diagnostic` = `FalkorDB Lite previously failed to start…` — в 3.0.0 это была памятка о прошлой неудаче, а не причина. В 3.0.1 кэш сбрасывается перед каждой попыткой, а мёртвый `falkordb.sock` и осиротевший `graph.settings` удаляются автоматически: первый `analyze`/`setup` чинит репозиторий сам, `health.cgc.repaired` перечисляет удалённое (в 3.0.3 этот список приходит из демона, а не всегда пуст). В 3.0.3 также `setup` всегда перезапускает демон, поэтому обновление не оставляет старый процесс со старым кэшем.
|
|
198
|
+
С 3.0.5 `scan.exclude` — общий фильтр: full/incremental/`--paths` в `analyze` видят те же исключения, что `detect-changes`, и scratch-каталоги (`.dg-tmp/**`, `node_modules/**`) не попадают в граф. `setup` печатает по шагу только `ok`/`failed (причина)`/`skipped`, а счётчики и списки `per_ide` оставляет в JSON (в `--dry-run` — прогноз `would write/overwrite/append`). `detect-changes` получил `files_examined_count` (список — с `--verbose`), `health` — `modules.without_verification_breakdown: {missing, placeholder}`, а `migrate` в консоли печатает только `created`/`markup_pending` (полный отчёт — `migrate ... --json`).
|
|
199
|
+
|
|
200
|
+
Если после этого движок всё равно падает с `Connection refused`, а `redis-server` в логах пишет `Can't handle RDB format version 13`, виновата сама база: файл `<db_path>` записан новее, чем умеет читать текущий `redis-server`. С 3.0.4 `_ensure` после двух неудач **переименовывает** его в `<db_path>.incompatible-<UTC timestamp>` (никогда не удаляет), один раз повторяет запуск на свежей базе, а `analyze` эмитит `CGC_ENGINE_DB_QUARANTINED`. `health.cgc.quarantined` перечисляет такие файлы, `health.cgc.repaired` — и их, и удалённые stale-файлы, а `setup` показывает `quarantined` в отчёте шага analyze (и `quarantine_candidate` в `--dry-run`). Если и третий запуск не удался, `CGCUnavailable` перечисляет все попытки и путь карантина; дальше — `daemon logs` и `cgc.backend`.
|
|
198
201
|
Если `lint` вернул `markup.module-map-missing` — это содержательная работа, промпт `prompts/upgrade-methodology/01-content-gaps.md`.
|
|
199
202
|
|
|
200
203
|
Полная проверка (ruff + unit + real-CGC E2E + diff/version): `bash scripts/verify.sh`; критерии готовности — [docs/VERIFICATION.md](docs/VERIFICATION.md).
|
|
@@ -410,10 +413,10 @@ Bun/Node-пакет 4.x: `bun remove -g @osovv/grace-cli` или
|
|
|
410
413
|
|
|
411
414
|
Пошагово с 2.x (или 1.9.x, если проект ещё на `docs/*.xml`):
|
|
412
415
|
|
|
413
|
-
1. **Поставьте именно 3.0.
|
|
414
|
-
**3.0.1**, а не 3.0.
|
|
416
|
+
1. **Поставьте именно 3.0.5.** `pipx upgrade doubled-graph` сейчас даёт
|
|
417
|
+
**3.0.1**, а не 3.0.5 (3.0.2, 3.0.3, 3.0.4 и 3.0.5 ещё не в PyPI). Точный путь — wheel с явным
|
|
415
418
|
`--python`: см. [§Установка](#2-установить-doubled-graph). Убедитесь:
|
|
416
|
-
`doubled-graph --version` → `3.0.
|
|
419
|
+
`doubled-graph --version` → `3.0.5`.
|
|
417
420
|
2. **`cd your-project && doubled-graph setup`** — в **обычном** шелле, не из
|
|
418
421
|
песочницы. `setup` **всегда** останавливает и заново запускает сервис
|
|
419
422
|
`graphd` (stop → install/update unit → start), регистрирует проект,
|
|
@@ -442,9 +445,9 @@ Bun/Node-пакет 4.x: `bun remove -g @osovv/grace-cli` или
|
|
|
442
445
|
обновлением на 3.0:
|
|
443
446
|
|
|
444
447
|
```bash
|
|
445
|
-
# 1. поставить 3.0.
|
|
448
|
+
# 1. поставить 3.0.5 (pipx upgrade даст только 3.0.1 — см. §Установка)
|
|
446
449
|
python3.14 -m build --wheel
|
|
447
|
-
pipx install --python python3.14 --force dist/doubled_graph-3.0.
|
|
450
|
+
pipx install --python python3.14 --force dist/doubled_graph-3.0.5-py3-none-any.whl
|
|
448
451
|
cd your-project
|
|
449
452
|
doubled-graph setup # 2. движок, .grace и демон graphd — одной командой
|
|
450
453
|
```
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "doubled-graph"
|
|
7
|
-
version = "3.0.
|
|
7
|
+
version = "3.0.5"
|
|
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" }
|
|
@@ -130,7 +130,16 @@ def _cmd_analyze(args: argparse.Namespace) -> int:
|
|
|
130
130
|
session_id=getattr(args, "session_id", None),
|
|
131
131
|
)
|
|
132
132
|
if not args.silent:
|
|
133
|
-
|
|
133
|
+
payload = result.model_dump()
|
|
134
|
+
if not getattr(args, "verbose", False):
|
|
135
|
+
# The per-file lists are inventories: they do not change the next
|
|
136
|
+
# action and can be thousands of lines. Counts stay in `stats`
|
|
137
|
+
# (`files_processed`/`files_deleted`); `--verbose` returns names.
|
|
138
|
+
stats = payload.get("stats")
|
|
139
|
+
if isinstance(stats, dict):
|
|
140
|
+
stats.pop("processed_files", None)
|
|
141
|
+
stats.pop("deleted_files", None)
|
|
142
|
+
print(json.dumps(payload, indent=2, default=str))
|
|
134
143
|
# Unavailable backend is always a failure for the public command. The JSON
|
|
135
144
|
# report (with its `CGC_BACKEND_FAIL` warning and install hint) is still
|
|
136
145
|
# printed, so a CI log keeps the diagnosis; only the exit code is honest.
|
|
@@ -582,7 +591,19 @@ def _cmd_migrate(args: argparse.Namespace) -> int:
|
|
|
582
591
|
report = check_migration(repo)
|
|
583
592
|
else:
|
|
584
593
|
report = apply_migration(repo, dry_run=args.dry_run, fix_markup=not args.no_markup_fix)
|
|
585
|
-
|
|
594
|
+
if args.json:
|
|
595
|
+
print(json.dumps(report.as_dict(), indent=2, ensure_ascii=False))
|
|
596
|
+
else:
|
|
597
|
+
# The console is the next action: what was (or would be) created and
|
|
598
|
+
# what still needs the LINKS repair. `kept_existing` and the other
|
|
599
|
+
# inventories are in the JSON report (`--json` / the migration report).
|
|
600
|
+
print(f"created: {', '.join(report.created) if report.created else 'none'}")
|
|
601
|
+
print(
|
|
602
|
+
"markup_pending: "
|
|
603
|
+
f"{', '.join(report.markup_pending) if report.markup_pending else 'none'}"
|
|
604
|
+
)
|
|
605
|
+
for issue in report.errors:
|
|
606
|
+
print(f"{issue.code} ({issue.file}): {issue.message}", file=sys.stderr)
|
|
586
607
|
return 0 if report.ok else 1
|
|
587
608
|
|
|
588
609
|
|
|
@@ -696,7 +717,12 @@ def _cmd_detect_changes(args: argparse.Namespace) -> int:
|
|
|
696
717
|
since_ref=args.since_ref,
|
|
697
718
|
include_unchanged=args.include_unchanged,
|
|
698
719
|
)
|
|
699
|
-
|
|
720
|
+
payload = result.model_dump(mode="json")
|
|
721
|
+
if not getattr(args, "verbose", False):
|
|
722
|
+
# `files_examined` can be every source file in the repository; the
|
|
723
|
+
# count answers "how much was checked", the names are diagnostics.
|
|
724
|
+
payload.pop("files_examined", None)
|
|
725
|
+
print(json.dumps(payload, indent=2, ensure_ascii=False))
|
|
700
726
|
# A dead backend/Daemon produces an *empty* snapshot, so `drift` is empty
|
|
701
727
|
# even though nothing was actually compared. That must fail without any
|
|
702
728
|
# flag: `detect-changes --scope all` returning rc=0 here let a CI script
|
|
@@ -847,6 +873,11 @@ def main(argv_default: list[str] | None = None, argv: list[str] | None = None) -
|
|
|
847
873
|
p_an.add_argument("--paths", nargs="*", default=None)
|
|
848
874
|
p_an.add_argument("--force", action="store_true")
|
|
849
875
|
p_an.add_argument("--silent", action="store_true")
|
|
876
|
+
p_an.add_argument(
|
|
877
|
+
"--verbose",
|
|
878
|
+
action="store_true",
|
|
879
|
+
help="include stats.processed_files/deleted_files (per-file lists) in the JSON",
|
|
880
|
+
)
|
|
850
881
|
p_an.add_argument(
|
|
851
882
|
"--strict",
|
|
852
883
|
action="store_true",
|
|
@@ -975,6 +1006,11 @@ def main(argv_default: list[str] | None = None, argv: list[str] | None = None) -
|
|
|
975
1006
|
"check", help="Read-only inventory: legacy artifacts, coverage gaps, markup to repair"
|
|
976
1007
|
)
|
|
977
1008
|
p_migrate_check.add_argument("--repo")
|
|
1009
|
+
p_migrate_check.add_argument(
|
|
1010
|
+
"--json",
|
|
1011
|
+
action="store_true",
|
|
1012
|
+
help="print the full MigrationReport JSON (kept_existing, placeholders, issues, …)",
|
|
1013
|
+
)
|
|
978
1014
|
p_migrate_check.set_defaults(func=_cmd_migrate)
|
|
979
1015
|
p_migrate_apply = migrate_sub.add_parser(
|
|
980
1016
|
"apply", help="Write .grace from legacy docs (copy-and-validate; legacy untouched)"
|
|
@@ -986,6 +1022,11 @@ def main(argv_default: list[str] | None = None, argv: list[str] | None = None) -
|
|
|
986
1022
|
action="store_true",
|
|
987
1023
|
help="do not add M-* to MODULE_CONTRACT LINKS",
|
|
988
1024
|
)
|
|
1025
|
+
p_migrate_apply.add_argument(
|
|
1026
|
+
"--json",
|
|
1027
|
+
action="store_true",
|
|
1028
|
+
help="print the full MigrationReport JSON (kept_existing, placeholders, issues, …)",
|
|
1029
|
+
)
|
|
989
1030
|
p_migrate_apply.set_defaults(func=_cmd_migrate)
|
|
990
1031
|
|
|
991
1032
|
# Phase policy — single writer/reader of AGENTS.md phase-block.
|
|
@@ -1043,6 +1084,11 @@ def main(argv_default: list[str] | None = None, argv: list[str] | None = None) -
|
|
|
1043
1084
|
"a backend failure already exits 1 without this flag"
|
|
1044
1085
|
),
|
|
1045
1086
|
)
|
|
1087
|
+
p_dc.add_argument(
|
|
1088
|
+
"--verbose",
|
|
1089
|
+
action="store_true",
|
|
1090
|
+
help="include files_examined (the per-file list) in the JSON; the count is always present",
|
|
1091
|
+
)
|
|
1046
1092
|
p_dc.set_defaults(func=_cmd_detect_changes)
|
|
1047
1093
|
|
|
1048
1094
|
# Graph daemon: OS-supervised engine owner. The client never starts it.
|
|
@@ -117,6 +117,7 @@ def build_health_report(repo: Path) -> dict[str, Any]:
|
|
|
117
117
|
a health report must degrade into a visible warning, never into a crash.
|
|
118
118
|
"""
|
|
119
119
|
from doubled_graph.graphs.declared import load_declared_graph
|
|
120
|
+
from doubled_graph.integrations.cgc import quarantined_paths
|
|
120
121
|
from doubled_graph.integrations.graphd import open_graph, probe_daemon
|
|
121
122
|
from doubled_graph.integrations.service import get_service_manager
|
|
122
123
|
from doubled_graph.policy.phase import read_phase
|
|
@@ -135,8 +136,23 @@ def build_health_report(repo: Path) -> dict[str, Any]:
|
|
|
135
136
|
for v in declared.verification.values()
|
|
136
137
|
if v.module_id and v.described and not v.placeholder
|
|
137
138
|
}
|
|
139
|
+
covered_module_ids = {
|
|
140
|
+
v.module_id for v in declared.verification.values() if v.module_id
|
|
141
|
+
}
|
|
142
|
+
# Two different gaps used to appear as two contradicting numbers in one
|
|
143
|
+
# report: `modules.without_verification` (nothing usable, including an
|
|
144
|
+
# empty placeholder) and `drift.by_type.missing_verification` (no V-* record
|
|
145
|
+
# at all). Name both counts explicitly; the list stays for compatibility.
|
|
146
|
+
modules_missing_verification = sorted(
|
|
147
|
+
mid for mid in declared.modules if mid not in covered_module_ids
|
|
148
|
+
)
|
|
149
|
+
modules_placeholder_verification = sorted(
|
|
150
|
+
mid
|
|
151
|
+
for mid in declared.modules
|
|
152
|
+
if mid in covered_module_ids and mid not in verified_module_ids
|
|
153
|
+
)
|
|
138
154
|
modules_without_verification = sorted(
|
|
139
|
-
|
|
155
|
+
set(modules_missing_verification) | set(modules_placeholder_verification)
|
|
140
156
|
)
|
|
141
157
|
|
|
142
158
|
# Any error-severity issue means the declared graph could not be read as a
|
|
@@ -223,6 +239,11 @@ def build_health_report(repo: Path) -> dict[str, Any]:
|
|
|
223
239
|
}
|
|
224
240
|
)
|
|
225
241
|
|
|
242
|
+
# Engine files removed (or a database quarantined) to heal a failed
|
|
243
|
+
# start. `open_graph` is closed above, but `last_repair` is a plain list
|
|
244
|
+
# on the client, so it survives and stays reportable.
|
|
245
|
+
repaired = list(getattr(cgc, "last_repair", []) or [])
|
|
246
|
+
|
|
226
247
|
return {
|
|
227
248
|
"phase": read_phase(repo),
|
|
228
249
|
"artifacts": {
|
|
@@ -243,13 +264,22 @@ def build_health_report(repo: Path) -> dict[str, Any]:
|
|
|
243
264
|
"diagnostic": cgc_diag,
|
|
244
265
|
"daemon": daemon,
|
|
245
266
|
# Engine files the backend removed because a previous start died
|
|
246
|
-
# halfway
|
|
247
|
-
|
|
267
|
+
# halfway, and databases moved aside because the installed engine
|
|
268
|
+
# cannot read them: both repairs must be visible, not silent.
|
|
269
|
+
"repaired": repaired,
|
|
270
|
+
"quarantined": quarantined_paths(repaired),
|
|
248
271
|
},
|
|
249
272
|
"modules": {
|
|
250
273
|
"total": len(declared.modules),
|
|
251
274
|
"verified": len(verified_module_ids & set(declared.modules.keys())),
|
|
252
275
|
"without_verification": modules_without_verification,
|
|
276
|
+
# `missing` == drift.by_type.missing_verification; `placeholder`
|
|
277
|
+
# is a structurally valid but empty V-<M> (lint:
|
|
278
|
+
# verification.placeholder). Both make `ok` false.
|
|
279
|
+
"without_verification_breakdown": {
|
|
280
|
+
"missing": len(modules_missing_verification),
|
|
281
|
+
"placeholder": len(modules_placeholder_verification),
|
|
282
|
+
},
|
|
253
283
|
},
|
|
254
284
|
"verification": {"total_v_m_records": len(declared.verification)},
|
|
255
285
|
"drift": {"total": drift_count, "by_type": drift_by_type},
|