Skip to content

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

docs: fix stale FILE_CODE_EDGE_TYPES reference (#2536)

Ava6f532a8b7951
diff --git a/docs/architecture/language-support.md b/docs/architecture/language-support.md
index 218b24b84..b8cdba7f1 100644
--- a/docs/architecture/language-support.md
+++ b/docs/architecture/language-support.md
@@ -185,9 +185,7 @@ derived.
#### Step 1: Add a `LanguageSpec` module
Language identity data lives in `languages/specs/`, **one module per language**.
-Create
-`packages/core/src/repowise/core/ingestion/languages/specs/mylang.py`
-exporting a single `SPEC`:
+Create a new module under `packages/core/src/repowise/core/ingestion/languages/specs/`, one module per language, exporting a single `SPEC`. For example, a new language can use a file named `mylang.py`:
```python
"""LanguageSpec for mylang."""
@@ -562,7 +560,7 @@ remove. The distinctions that matter most when consuming the graph:
| `dynamic_*` | A dynamic-dispatch hint, prefixed by kind (`dynamic_url_route`, `dynamic_uses`, `dynamic_imports`) | A static edge. Note the prefix: a consumer matching bare `"dynamic"` matches none of these |
Three derived sets are what consumers should read rather than re-deriving their
-own filter: `FILE_CODE_EDGE_TYPES`, `SYMBOL_USE_EDGE_TYPES`, and
+own filter: `FILE_DEPENDENCY_EDGE_TYPES`, `SYMBOL_USE_EDGE_TYPES`, and
`REACHABILITY_USE_EDGE_TYPES` (the symbol set plus `type_use`).
### Flow termination
diff --git a/tests/unit/test_language_support_docs.py b/tests/unit/test_language_support_docs.py
new file mode 100644
index 000000000..b998b42d3
--- /dev/null
+++ b/tests/unit/test_language_support_docs.py
@@ -0,0 +1,28 @@
+from __future__ import annotations
+
+import ast
+from pathlib import Path
+import re
+
+ROOT = Path(__file__).resolve().parents[2]
+DOC = ROOT / "docs" / "architecture" / "language-support.md"
+MODELS = ROOT / "packages" / "core" / "src" / "repowise" / "core" / "ingestion" / "models.py"
+
+
+def test_language_support_edge_type_sets_are_real_model_symbols() -> None:
+ text = DOC.read_text(encoding="utf-8")
+ names = sorted(set(re.findall(r"`([A-Z][A-Z0-9_]*_EDGE_TYPES)`", text)))
+ assert names, "language-support.md documents no *_EDGE_TYPES identifiers"
+
+ tree = ast.parse(MODELS.read_text(encoding="utf-8"))
+ attributes = {
+ target.id
+ for node in tree.body
+ if isinstance(node, (ast.Assign, ast.AnnAssign))
+ for target in (
+ ([node.target] if isinstance(node, ast.AnnAssign) else node.targets)
+ )
+ if isinstance(target, ast.Name)
+ }
+ missing = sorted(set(names) - attributes)
+ assert not missing, f"docs reference missing ingestion.models symbols: {missing}"