{"record":{"id":"fef0ee32e13a7d8a","repo":"Graphify-Labs/graphify","slug":"deduplicate-entities-nodes-span-multiple-repos-s","errorCode":null,"errorMessage":"deduplicate_entities: nodes span multiple repos {sorted(repos_seen)!r}. Cross-project dedup is disabled — run dedup per-repo before merging.","messagePattern":"deduplicate_entities: nodes span multiple repos (.+?)\\. Cross-project dedup is disabled — run dedup per-repo before merging\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"graphify/dedup.py","lineNumber":489,"sourceCode":"    \"\"\"Deduplicate near-identical entities in a knowledge graph.\n\n    Args:\n        nodes: list of node dicts with at minimum {\"id\": str, \"label\": str}\n        edges: list of edge dicts with {\"source\": str, \"target\": str, ...}\n        communities: mapping of node_id -> community_id (from cluster())\n        dedup_llm_backend: if set, use LLM to resolve ambiguous pairs\n        root: scan root; ID-collision ranking judges source paths relative to\n            it so path form and checkout location cannot flip the survivor (#2532)\n\n    Returns:\n        (deduped_nodes, deduped_edges) with edges rewired to survivors\n    \"\"\"\n    # Guard: cross-project dedup is not supported — nodes from different repos\n    # share label names by coincidence and must never be merged by string similarity.\n    # If you need to dedup a global graph, run deduplicate_entities per-repo first.\n    repos_seen = {n.get(\"repo\") for n in nodes if n.get(\"repo\")}\n    if len(repos_seen) > 1:\n        raise ValueError(\n            f\"deduplicate_entities: nodes span multiple repos {sorted(repos_seen)!r}. \"\n            f\"Cross-project dedup is disabled — run dedup per-repo before merging.\"\n        )\n\n    if len(nodes) <= 1:\n        return nodes, edges\n\n    # Resolve the scan root once: _collision_rank ranks each node's source_file\n    # relative to it, so an absolute stored path and its repo-relative twin rank\n    # identically and lifecycle markers in the checkout location's own segments\n    # cannot flip the survivor (#2532).\n    try:\n        root_resolved: Path | None = Path(root).resolve() if root else None\n    except Exception:\n        root_resolved = None\n\n    # Pre-deduplicate: one node per ID. The survivor is the node that *defines* the\n    # ID (its source_file is the file the ID encodes), not merely the first seen —","sourceCodeStart":471,"sourceCodeEnd":507,"githubUrl":"https://github.com/Graphify-Labs/graphify/blob/7fe58b0b0f3873be9a21c30106b8b8527c353aa6/graphify/dedup.py#L471-L507","documentation":"Graph-existence preflight in the /graphify path command of the devin fragment (tools/skillgen/fragments/core/devin.md:1196). Shortest-path traversal needs graphify-out/graph.json (loaded via json_graph.node_link_graph(data, edges='links')); the guard exits 1 up front when the file is absent.","triggerScenarios":"Running /graphify path between two concepts in a workspace where graphify-out/graph.json does not exist — never built, wrong cwd, deleted, or a failed prior build never reached export.","commonSituations":"Querying a fresh clone; relative-path miss because the agent runs in a subdirectory; cleanup removed graphify-out/; previous build failed at extraction or shrink guard.","solutions":["Build the graph with /graphify <path> before running path queries.","Verify cwd is the directory holding graphify-out/graph.json.","Fix any earlier build failure so graph.json actually gets written.","Rebuild if the graph output was cleaned."],"exampleFix":"# before\n/graphify path router handler\n# ERROR: No graph found ...\n\n# after\n/graphify .\n/graphify path router handler","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\nif not Path('graphify-out/graph.json').is_file():\n    raise SystemExit('no graph - run /graphify <path> before path queries')\nprint('ok')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Preflight before every /graphify path invocation.","Build first in fresh workspaces.","Verify cwd contains graphify-out/.","Rebuild after cleanup."],"tags":["graphify","devin","preflight","missing-file","shortest-path"],"backgroundTag":null,"analyzedSha":"7fe58b0b0f3873be9a21c30106b8b8527c353aa6","analyzedAt":"2026-08-14T19:23:21.323Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}